-
Notifications
You must be signed in to change notification settings - Fork 2
feature: initial version of a rust based init process for the initramfs #3
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
Open
JoergZeidler
wants to merge
38
commits into
omnect:main
Choose a base branch
from
JoergZeidler:bootable_omnect_os
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,675
−1
Open
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
7d9cd9e
Adds initial structure
JoergZeidler 7b996ed
Mount essential filesystems
JoergZeidler 2df2e84
disable printk ratelimit
JoergZeidler 7c9380b
produce single line kernel messages
JoergZeidler 79c74e9
refactoring after AI configuration templates
JoergZeidler 2111d80
Adds partition detection and management
JoergZeidler 2dabb75
Adds filesystem check and mount management
JoergZeidler aa856f6
Adds overlayfs setup for etc and home
JoergZeidler 1d1164e
Implements init process and ODS integration
JoergZeidler 298873a
Removes unused MountOptions import
JoergZeidler 3c9e61d
Detects root device from kernel command line
JoergZeidler 6d15760
Refactors partition handling and symlink creation
JoergZeidler 9719bf3
Updates sfdisk command path
JoergZeidler efe6f30
Enhances early init and overlayfs setup
JoergZeidler 523ed76
Moves mounts before switch_root for stability
JoergZeidler 83d24bc
Sets up essential tmpfs mounts
JoergZeidler a71a448
Improves initramfs root switching and documentation
JoergZeidler 7525757
Replaces pivot_root with MS_MOVE and chroot
JoergZeidler 24fb8f2
cargo fmt
JoergZeidler 3cf2dc5
fix cargo clippy findings; move run to rootfs; fix format error message
JoergZeidler b24694a
Implements automatic reboot for fsck errors
JoergZeidler aaf1d49
Refactors /run handling for root pivot
JoergZeidler 6e33b31
Loads os-release attributes after rootfs mount
JoergZeidler 2895de0
Fixes incorrect root partition detection
JoergZeidler bf9ca0b
Fixes `partition_suffix` for device names with embedded digits
JoergZeidler b5d6050
Streamlines fsck status persistence
JoergZeidler d480bc5
Refactors root device detection and bootloader init
JoergZeidler 0edec2f
Configures build with Yocto environment variables
JoergZeidler 9c71297
Enhances root device detection using sysfs
JoergZeidler 2b22e6a
Overhauls root device detection logic
JoergZeidler d97abd1
Refactor dependencies and bootloader integration
JoergZeidler 1efb0f5
Refines boot process robustness and fsck handling
JoergZeidler 20a1eda
Persists fsck output in bootloader environment
JoergZeidler dec6b60
Refines exit code handling and reporting
JoergZeidler 9955e10
Enhances fsck output storage and system robustness
JoergZeidler 06ed579
Enhances initramfs stability and bootloader handling
JoergZeidler d535151
Persists fsck output even on reboot
JoergZeidler 51596e2
fix: address PR review findings rounds 6-7 and proactive self-review
JoergZeidler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Generated by Cargo | ||
| /target/ | ||
|
|
||
| # Cargo.lock for binaries | ||
| # Uncomment if this is a library | ||
| # Cargo.lock | ||
|
|
||
| # IDE | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # Build artifacts | ||
| *.o | ||
| *.a | ||
| *.so | ||
|
|
||
| # Debug files | ||
| *.dSYM/ | ||
|
|
||
| .github/ | ||
|
|
||
| omnect-os-init_0.1.0.bb | ||
|
|
||
| origin-rewrite-initramfs-plan.md | ||
|
|
||
| rewrite-initramfs-plan.md |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| [package] | ||
| name = "omnect-os-init" | ||
| version = "0.1.0" | ||
| edition = "2024" | ||
| authors = ["omnect team"] | ||
| description = "Rust-based init process for omnect-os initramfs" | ||
| license = "MIT OR Apache-2.0" | ||
| repository = "https://github.com/omnect/omnect-os-init" | ||
|
|
||
| [lib] | ||
| name = "omnect_os_init" | ||
| path = "src/lib.rs" | ||
|
|
||
| [[bin]] | ||
| name = "omnect-os-init" | ||
| path = "src/main.rs" | ||
|
|
||
| [dependencies] | ||
| # Error handling | ||
| thiserror = { version = "2.0", default-features = false } | ||
|
|
||
| # Serialization | ||
| serde = { version = "1.0", default-features = false, features = ["derive"] } | ||
| serde_json = { version = "1.0", default-features = false, features = ["std"] } | ||
|
|
||
| # Syscalls (symlink, mount, reboot, etc.) | ||
| nix = { version = "0.29", default-features = false, features = ["fs", "mount", "process", "reboot"] } | ||
|
|
||
| # Logging | ||
| log = { version = "0.4", default-features = false, features = ["std"] } | ||
|
|
||
| [features] | ||
| default = ["core"] | ||
| core = [] | ||
| factory-reset = ["core"] | ||
| flash-mode-1 = ["factory-reset"] | ||
| flash-mode-2 = ["flash-mode-1"] | ||
| flash-mode-3 = ["flash-mode-1"] | ||
| persistent-var-log = ["core"] | ||
| resize-data = ["core"] | ||
|
|
||
| [profile.release] | ||
| opt-level = "z" # Optimize for size | ||
| lto = true # Link-time optimization | ||
| codegen-units = 1 # Better optimization | ||
| strip = true # Strip symbols | ||
| panic = "abort" # Smaller panic handling | ||
|
|
||
| [dev-dependencies] | ||
| tempfile = { version = "3.20", default-features = false } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.