Skip to content

usr-linux: deploy the user space where the running root is - #7

Merged
daniel-rossier merged 1 commit into
mainfrom
fix/usr-deploy-onto-p2
Sep 25, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
fix/usr-deploy-onto-p2

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

Removes the meta-usr usr-linux bbappend headed "EDGE-M1 Factory Capsule": it injected the apps into rootfs.cpio unconditionally (edge-m1's e1c capsule policy). MICOFE boots the static initrd.cpio and switch_roots to p2, so the apps reached p2 only if nothing had regenerated rootfs.cpio since the last build, and deploy.sh usr-linux never reached the card.

usr-linux:do_deploy now puts the user space in ONE place chosen by IB_RAMFS_SOURCE:

IB_RAMFS_SOURCE apps go to pulled by
"rootfs" INTO rootfs.cpio (extract, sudo rsync, re-pack) → embedded in the ITB bsp-linux:do_prepare_initrd (build); after usr-linux:do_build, never touches the boot media
anything else ("initrd", MICOFE's setting) onto p2, on top of rootfs-linux:do_deploy (sudo rsync, check=True, verdin skipped) bsp-linux:do_deploy (deploy only, no rebuild)

Same change as smartobjectoriented/infrabase#47 and smartobjectoriented/so3#337 (both merged). Validated with bitbake -g bsp-linux (build + deploy graphs), IB_RAMFS_SOURCE forced to "rootfs" and "initrd". Not run on real media.

The usr apps reached the target only indirectly: a usr-linux bbappend
(headed "EDGE-M1 Factory Capsule", the edge-m1 e1c capsule policy)
replaced usr-linux:do_deploy with an injection INTO rootfs.cpio at build
time, whatever the ramfs, and the deploy extracted that cpio onto p2.
With IB_RAMFS_SOURCE = "initrd" (static ramfs pivoting to p2) the apps
reached p2 only if nothing had regenerated rootfs.cpio since the last
bsp-linux build (`build.sh rootfs-linux` then `deploy.sh bsp-linux` gave
a card without them), and `deploy.sh usr-linux` never reached the card.

Generic model, aligned on infrabase: bbappend removed, and
usr-linux:do_deploy puts the apps in ONE place, chosen by
IB_RAMFS_SOURCE:

- "rootfs": baked INTO rootfs.cpio (extract, sudo rsync, re-pack).
  bsp-linux:do_prepare_initrd pulls it into the build, before gzipping
  the cpio into the ITB; it depends on rootfs-linux:do_build (never on
  the boot media) and runs after usr-linux:do_build.
- anything else: copied onto p2 after rootfs-linux:do_deploy, with sudo
  rsync and check=True (p2 is root-owned), verdin skipped like
  rootfs-linux:do_deploy; bsp-linux:do_deploy pulls it, deploy-only,
  no `after do_build`, so a deploy never rebuilds usr and linux.

do_prepare_initrd otherwise depends on rootfs-linux:do_build, as in
infrabase. Validated with `bitbake -g bsp-linux` (build and deploy
graphs) with IB_RAMFS_SOURCE forced to "rootfs" and to "initrd".
@daniel-rossier
daniel-rossier merged commit 431960a into main Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant