nerves icon indicating copy to clipboard operation
nerves copied to clipboard

Build from from `rootfs.tar` system files

Open jjcarstens opened this issue 1 year ago • 3 comments

Starts support to allow building firmware from a rootfs.tar tarball file more efficiently in Elixir, rather than relying on bash scripts to unsquash, combine, and resquash an FS.

The mix firmware task was due for a good refactoring, so it looks like a lot. The old way of building is maintained for the typical rootfs.squashfs file that systems have traditionally provided.

It also adjusts the build process to allow using EROFS instead of squashfs when making the firmware

[!NOTE] This adds config :nerves, :firmware, fs_type: :erofs to specify to use EROFS. If there is a preferred option name and/or location, let me know

Other pieces to still consider:

jjcarstens avatar May 27 '24 00:05 jjcarstens

Cool! Thank you. I believe tar_merger is still private so I'll copy over and rename. It has a number of deficiencies that I forgot to tell you about but it's getting close and this will definitely help me.

fhunleth avatar May 27 '24 01:05 fhunleth

I added a few more notes. This could probably be split into 2 PRs for the EROFS concern, but after the redact that piece is so small that it could really go either way ¯_(ツ)_/¯

I've tested manually, but probably worth adding some tests if I can think of a good way how

jjcarstens avatar May 27 '24 01:05 jjcarstens

I made a pass at rebasing this PR in the firmware-build-from-tar2 branch.

fhunleth avatar Jan 27 '25 13:01 fhunleth