[WIP] Install full OSTree into the initramfs #106
+5
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I'm opening this PR mostly just to start a discussion about how ostree-prepare-root should be used.
I spent some time integrating meta-updater into my Yocto build and I ran into an issue where
ostree-prepare-root
(as called from the init.sh script of the initrd) would throw an assert failure on this line: https://github.com/ostreedev/ostree/blob/main/src/switchroot/ostree-prepare-root-static.c#L166. It expects to be running as PID 1, which is not the case as the init.sh is our PID 1.The top-level comment of ostree-prepare-static says:
Since it seems that using an initrd is the intended way of using
meta-updater
, I added this toostree_%.bbappend
in my layer:And I also changed initramfs-ostree-image.bb to install the full ostree (including shared libraries) into the initramfs.
This results in a change in size of the initramfs from 2MB to 10MB. I think it's possible to reduce it further by removing other PACKAGECONFIG options (like
curl
) for theostree
package intended for the initramfs. I haven't looked further into this yet.