chore(omnect-os-init): replaces legacy initramfs scripts with Rust init - #636
Draft
JoergZeidler wants to merge 21 commits into
Draft
chore(omnect-os-init): replaces legacy initramfs scripts with Rust init#636JoergZeidler wants to merge 21 commits into
JoergZeidler wants to merge 21 commits into
Conversation
JoergZeidler
force-pushed
the
feature_init_rust
branch
4 times, most recently
from
March 30, 2026 18:23
069caea to
2a80451
Compare
Refactors GRUB's root partition identification by transitioning from a static `rootblk` parameter to a dynamic filesystem UUID. This enhances boot reliability by eliminating dependency on potentially unstable block device names. The GRUB `probe` command is leveraged to detect the boot partition's UUID and pass it to the kernel as `bootpart_fsuuid`.
Adds `util-linux-blkid` to the initramfs, providing essential tools for robust identification of block devices, which is crucial for locating and mounting the root filesystem. Introduces conditional Cargo features for the Rust-based `omnect-os-init` based on the detected bootloader (`grub` for EFI, `uboot` otherwise). This allows the init process to be compiled with bootloader-specific logic, improving its adaptability and ensuring correct behavior across different boot environments.
Refreshes the recipe to align with the latest upstream changes in the omnect-os-init repository. Bumps the SRCREV for the primary source. Significantly reduces the number of Rust crate dependencies and their checksums, resulting in a leaner dependency footprint for the project.
Ensures the `resize-data` feature is appended with a comma as a prefix, aligning with the expected comma-separated format for Cargo features. This consistency prevents incorrect parsing of build features.
Updates the `omnect-os-init` Rust component to a newer commit. Includes `e2fsprogs-e2fsck` in the initramfs image to enable filesystem checks, likely required by the updated init for enhanced system integrity and recovery.
…features Enable GPT support by default for all targets and conditionally enable features for release images and persistent logging based on build configuration.
JoergZeidler
force-pushed
the
feature_init_rust
branch
from
June 30, 2026 08:59
f7b03e7 to
887d1ce
Compare
JoergZeidler
force-pushed
the
feature_init_rust
branch
from
July 28, 2026 07:57
e54fa0a to
12b798f
Compare
JoergZeidler
force-pushed
the
feature_init_rust
branch
from
July 28, 2026 12:38
12b798f to
836ac26
Compare
omnect_first_boot_done, omnect_factory_reset_last_error and omnect_fsck_<part> were missing from the writeable env flags list. Unlisted variables are not guaranteed to survive a u-boot saveenv, and omnect_update_flow calls saveenv on both update paths, so the variables are lost across an update boot while omnect_extra_bootargs and the other listed ones survive. Observed effect: after an A/B update the device reports first_boot true again and repeats the first-boot work (resize preflight, extra-bootargs sync). The same applies to a stored fsck record, which is exactly the case the env is meant to carry across a reboot. The list now matches BootEnvKey::as_str() in omnect-os-init. The fsck entries name the partitions the initramfs runs fsck on; the flags syntax takes exact names, so they are enumerated. No change needed for grub: it persists named variables via save_env and keeps the rest of the block, so it has no equivalent drop. Signed-off-by: Joerg Zeidler <62105035+JoergZeidler@users.noreply.github.com>
omnect_first_boot_done, omnect_factory_reset_last_error and omnect_fsck_<part> were missing from the writeable env flags list. Unlisted variables are not guaranteed to survive a u-boot saveenv, and omnect_update_flow calls saveenv on both update paths, so the variables are lost across an update boot while omnect_extra_bootargs and the other listed ones survive. Observed effect: after an A/B update the device reports first_boot true again and repeats the first-boot work (resize preflight, extra-bootargs sync). The same applies to a stored fsck record, which is exactly the case the env is meant to carry across a reboot. The list now matches BootEnvKey::as_str() in omnect-os-init. The fsck entries name the partitions the initramfs runs fsck on; the flags syntax takes exact names, so they are enumerated. No change needed for grub: it persists named variables via save_env and keeps the rest of the block, so it has no equivalent drop. Signed-off-by: Joerg Zeidler <62105035+JoergZeidler@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
initial draft PR to deal with current implementation of