]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
rootfs-handoff: Milestone B - add early userspace /init
authorTulio A M Mendes <[email protected]>
Thu, 11 Jun 2026 03:37:10 +0000 (00:37 -0300)
committerTulio A M Mendes <[email protected]>
Thu, 11 Jun 2026 03:37:10 +0000 (00:37 -0300)
commit3960d77b08d903f55806cafd079dd5cc787fa403
tree14c8afeb6a8f71c56420a476f911e235cd33c1fc
parent88cb3dd6419c5f69f7797e2dce9923dc18346d19
rootfs-handoff: Milestone B - add early userspace /init

- Created user/cmds/initrd_init/initrd_init.c as early /init program
- Created user/cmds/initrd_init/Makefile
- Added initrd_init to USER_CMD_NAMES in main Makefile
- Changed default init path from /sbin/init to /init in cmdline.c
- Early /init checks if /newroot is mounted by kernel
- If /newroot is mounted, executes /sbin/init (basic handoff)
- If /newroot is not mounted, falls back to /sbin/init directly
- Milestone C will add pivot_root and mount moving functionality

Test Results:
- Smoke test: 131/131 PASS
- Battery test: 157/157 PASS
- Analyzer: PASS
- Zero regressions
Makefile
src/kernel/cmdline.c
user/cmds/initrd_init/Makefile [new file with mode: 0644]
user/cmds/initrd_init/initrd_init.c [new file with mode: 0644]