Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEXQonfig: Allow system-provided RootFS images #4067

Closed

Conversation

WhatAmISupposedToPutHere

Add a secondary RootFS directory that can be managed by the system package manager.

Add a secondary RootFS directory that can be managed by the
system package manager.
@alyssarosenzweig
Copy link
Collaborator

Could you explain a bit on the background for this?

For Asahi specifically, the system rootfs will end up living in /run/share/fex-emu, I think, due to krun magic.

@WhatAmISupposedToPutHere
Copy link
Author

For gentoo, i do not want to do krun magic inside the vm, and instead create the squashfs and overlay mounts on the host. Since mounting it inside the per-user rootfs directory would be quite annoying to implement, I instead want to add a secondary "default" rootfs search directory.

@WhatAmISupposedToPutHere
Copy link
Author

And while the current gentoo work is asahi-specific, i want to also run it on my rk3588 boards, which will not use krun.

@alyssarosenzweig
Copy link
Collaborator

OK, makes sense. Not too different from the fedora asahi use case then..

Sonicadvance1 added a commit to Sonicadvance1/FEX that referenced this pull request Sep 18, 2024
Global rootfs doesn't support a named rootfs (only local supports that).
So when it is a global rootfs option just give the full path to the
config path.

Just needs some special handling to ensure the full path is retained for
global paths.

A reimplementation of FEX-Emu#4067 that doesn't hardcode paths and routes the
global data path through FEXCore.
Sonicadvance1 added a commit to Sonicadvance1/FEX that referenced this pull request Sep 18, 2024
Global rootfs doesn't support a named rootfs (only local supports that).
So when it is a global rootfs option just give the full path to the
config path.

Just needs some special handling to ensure the full path is retained for
global paths.

A reimplementation of FEX-Emu#4067 that doesn't hardcode paths and routes the
global data path through FEXCore.
@Sonicadvance1
Copy link
Member

Sonicadvance1 commented Sep 18, 2024

I had a couple of concerns that I didn't have time to articulate before today. So I spent a bit of time to implement this closer to what FEX would want.

  • Hardcoded global paths, we would want FEX to follow what was provided with CMAKE_INSTALL_PREFIX
    • Likely being /usr or /usr/local typically, depending on what the user wants.
  • We want FEXCore to track the global data path so it can tie in to our configuration system, even if only used for this rootfs implementation today.
  • There was some extraneous prefixing thing in this PR which wasn't very necessary, we can just show the full system path instead.
    • This was likely a confusion for how FEX's "named" rootfs behaviour works, which isn't necessary for this global path, just supply the full path.
  • I wanted to reimplement the inotify interface to use ppoll instead of select.
    • This was just my bad implementation from the start
  • The watch descriptors didn't need to be saved in the global object so I wanted to change that (We don't support removing a WD from an inotify on full path deletion)

Thank you for bringing up that you wanted this as a feature in FEXConfig!

Sonicadvance1 added a commit to Sonicadvance1/FEX that referenced this pull request Sep 24, 2024
Global rootfs doesn't support a named rootfs (only local supports that).
So when it is a global rootfs option just give the full path to the
config path.

Just needs some special handling to ensure the full path is retained for
global paths.

A reimplementation of FEX-Emu#4067 that doesn't hardcode paths and routes the
global data path through FEXCore.
@Sonicadvance1
Copy link
Member

Handled by #4074. If there's any more features you want then make sure to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants