generator: Fixes for Android Boot environment
authorEric Curtin <ecurtin@redhat.com>
Wed, 21 Feb 2024 16:02:08 +0000 (16:02 +0000)
committerEric Curtin <ecurtin@redhat.com>
Wed, 21 Feb 2024 20:54:55 +0000 (20:54 +0000)
commit4a71845b127f8198c66d2fd2f024db8b01afb618
treeb5cb8106015efa0cae741f0977bc5dfd477d9025
parent8f98143d64489f0f9c4fcfcaf5d179006c213d63
generator: Fixes for Android Boot environment

In Android Boot environment we do not parse ostree= karg to determine
what directory to boot into, alternatively we do this based on the
androidboot.slot_suffix= karg. But we do set ostree=true karg to denote
that we are indeed booting an ostree environment (required for some
systemd unit files). This change accounts for this approach in the
systemd generator. In this case androidboot.slot_suffix= points you to
/ostree/root.[a|b] and then that points you to the directory to boot
into in /ostree/deploy... Here is what a cmdline may look like in this
type of environment:

androidboot.slot_suffix=_a androidboot.bootdevice=*.ufshc root=PARTLABEL=system_a root=UUID=76a22bf4-f153-4541-b6c7-0332c0dfaeac rw ostree=true loglevel=4 acpi=off console=ttyAMA0 systemd.show_status=auto libahci.ignore_sss=1 slub_debug=FPZ fsck.mode=skip rcupdate.rcu_normal_after_boot=0 rcupdate.rcu_expedited=1

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
src/libostree/ostree-impl-system-generator.c
src/libostree/ostree-sysroot-private.h
src/libostree/ostree-sysroot.c
src/libotcore/otcore-prepare-root.c
src/libotcore/otcore.h
src/switchroot/ostree-prepare-root.c
tests/test-otcore.c