-
Notifications
You must be signed in to change notification settings - Fork 659
lindbergh: squashfs support #13714
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
base: master
Are you sure you want to change the base?
lindbergh: squashfs support #13714
Conversation
|
I don't think an overlay is the right solution. However, Sega Lindbergh ROMs really need some level of compression to avoid long gamelist loading and overall management. |
|
Ah yes really an excellent idea :) |
ok fair enough, it is why I filed a request lindbergh loader execute outside the rom directory - perhaps by specifying a path to the rom on the command line as other emulators do. However we need to consider the primary goal of the Lindbergh project is to keep existing Lindbergh Arcade cabinets running so we can't expect this to be implemented short-term. It was a relatively simple change to conditionally create an overlay in Are there other issues you see I am not aware of? |
...ocera/core/batocera-configgen/configgen/configgen/generators/lindbergh/lindberghGenerator.py
Outdated
Show resolved
Hide resolved
| if args.rom.suffix == ".squashfs": | ||
| with squashfs_rom(args.rom) as rom: | ||
| writable_rom = (args.system == "lindbergh") | ||
| with squashfs_rom(args.rom, overlay=writable_rom) as rom: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may need to be refactored as part of Generator (and a refactor of when the generator is created) because it's rare for decisions to be made on the system/emulator/core outside of Generator and its subclasses.
Before talking about this, we need to figure out if an overlay is even the right option.
package/batocera/core/batocera-configgen/configgen/configgen/utils/squashfs.py
Outdated
Show resolved
Hide resolved
64c241d to
80a1a80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use overlay?
using the /var/run/squashfs/ as rw is not an ideal location for preservation of any rom updates. why here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to other ideas & saw this was the most straightforward to implement and get working.
The bottleneck is lindbergh doesn't run outside (eg. /usr/bin/lindbergh and it's shared .so libraries) and the config file in system/configs/lindbergh is only a template so it requires the rom directory to be writeable so the generator can copy all these files into it at runtime.
The solution squashfs already provides is the use of an overlay - this is what it was designed for as far as I can tell.
The changes are only temporary to allow the rom to boot. All changes can be safely discarded after the game exits because the config file is generated every time.
I also noticed the code can be reused as other squashfs mounts like daphne and singe want to write a .dat file into the directory if you don't remember to generate it before mksquashfs. Use of the overlay logic allows the title to boot instead of crapping out because it doesn't have write access as the .dat file can be regenerated (until the rom is upgraded to include it). This is a separate discussion but thought I'd add additional rationale.
80a1a80 to
382b631
Compare
382b631 to
7126b27
Compare
|
just heard from a dev in lindbergh. lindbergh-loader/lindbergh-loader#72 (comment) it sounds like we should be able to run the binary out of I have to assume this has already been tried. Anyone able to share what the sticking issue was & why we copy binaries, shared libraries & config file into the rom directory? When I get a moment, Ill tinker with it in a different branch & if I am able to get lindbergh to boot without copying any files, I will make a separate PR so squashfs support is a separate task. |
|
This? It would still need the correct libs in it, but at least config files of the loader would be somewhere in /userdata/configs/lindbergh |
|
yes - that was the option we were pointed to. new optionsI just found the SRAM and EEPROM options buried in the code: extra librarieswhere would be a good place to copy extra libraries to? would then we could add legacy librariesthe last wrench in the equation is code that deletes a legacy so if this is indeed necessary (as some squashfs files may contain it), then we should probably be safe and just mount the squashfs as writable anyways. (just my 2 cents) Lines 862 to 864 in 7ab1bd1
|
|
Previously when I added the emulator the option didn't work. We can retry again. |
good to know you've tried! You might be right, I notice it accepts the command line option but still seems to create a new The shared libraries appears to be the bigger issue. I added I propose we move forward with the .squashfs implementation. Happy to refactor Generator sooner than later if this is important. The implementation as is works around all the above issues with minimal changes. I will resolve merge conflicts and retest when I get the green light. |
|
Hi, can't we have some kind of writetable overlay like wsquashfs for windows ? (maybe made it generic, it could help for mugen too for example) |
For sure ... so many files in Linberg games ... it is a pain to transfer or delete by FTP :( |
great work on Lindbergh Loader! 🤯
got
.squashfssupport working for lindbergh by implementing an overlay with write access.hummerxtgoes from 20GB+ to 754MB - over 96%!)roms/lindbergh/*/*/Tested on:
.squashfs:3ds,scummvm,daphne,ps3,singe,snes-msu1,xbox