Files
integ/ostree/initramfs-ostree/debian/all/patches/0008-Allow-specifying-boot-root-devices-for-installs.patch
Robert Church 69f8cdcf4a Add Trixie build support for ostree pkgs
This introduces some packages for a trixie specific build.

Changes include:
 - Add debian_trixie_pkg_dirs_std based off of debian_pkg_dirs and
   comment out all packages except for:
   - ostree/initramfs-ostree
   - ostree/mttyexec
   - ostree/ostree
   - ostree/ostree-upgrade-mgr
 - Move ostree/initramfs-ostree/debian to
   ostree/initramfs-ostree/debian/all
 - Move ostree/mttyexec/debian to ostree/mttyexec/debian/all
 - Move ostree/ostree/debian to ostree/ostree/debian/all
 - Move ostree/ostree-upgrade-mgr/debian to
   ostree/ostree-upgrade-mgr/debian/all

Test Plan:
 - PASS: bullseye: stx-init-env --rebuild, downloader, build-pkgs -a,
   build-image
 - PASS: trixie: stx-init-env --rebuild, downloader, build-pkgs -a,
   build-image

NOTE: build-image for trixie fails, but further integration is required.
      At this point it doesn't appear to be tooling related

Prototype: Concurrent Builds in master

Change-Id: I515a4eeb88f338091ca60e55a6b47f6ef4c21607
Depends-On: https://review.opendev.org/c/starlingx/root/+/946813
Story: NNNNNNN
Task: NNNNN
Signed-off-by: Robert Church <robert.church@windriver.com>
Signed-off-by: Scott Little <scott.little@windriver.com>
2025-07-09 14:58:10 -04:00

84 lines
2.9 KiB
Diff

From e90857af6b969e6507c727335c12a19c1a2ef2c4 Mon Sep 17 00:00:00 2001
From: Robert Church <robert.church@windriver.com>
Date: Wed, 16 Nov 2022 15:07:07 -0600
Subject: Allow specifying boot/root devices for installs
This adds the capability to set specific root devices for A/B
boot/root devices that will control where ostree installation occurs.
Signed-off-by: Robert Church <robert.church@windriver.com>
---
init-ostree-install.sh | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
index 98cfb2b..d54185a 100644
--- a/init-ostree-install.sh
+++ b/init-ostree-install.sh
@@ -95,6 +95,10 @@ OPTIONAL:
inststx=1 - Skip LAT partitioning scheme (StarlingX).
Only call %part ks hook to partition
+ inst_ostree_boot=DEVICE - Specify the ostree boot device
+ inst_ostree_boot_b=DEVICE - Specify the ostree boot_b device
+ inst_ostree_root=DEVICE - Specify the ostree root device
+ inst_ostree_root_b=DEVICE - Specify the ostree root_b device
EOF
}
@@ -572,6 +576,10 @@ KERNEL_PARAMS=""
IP=""
MAX_TIMEOUT_FOR_WAITING_LOWSPEED_DEVICE=60
OSTREE_KERNEL_ARGS=${OSTREE_KERNEL_ARGS=%OSTREE_KERNEL_ARGS%}
+OSTREE_BOOT_DEVICE=${OSTREE_BOOT_DEVICE="LABEL=otaboot"}
+OSTREE_ROOT_DEVICE=${OSTREE_ROOT_DEVICE="LABEL=otaroot"}
+OSTREE_BOOT_B_DEVICE=${OSTREE_BOOT_B_DEVICE="LABEL=otaboot_b"}
+OSTREE_ROOT_B_DEVICE=${OSTREE_ROOT_B_DEVICE="LABEL=otaroot_b"}
KS=""
if [ "$OSTREE_KERNEL_ARGS" = "%OSTREE_KERNEL_ARGS%" ] ; then
@@ -677,6 +685,16 @@ read_args() {
VSZ=$optarg ;;
inststx=*)
INSTSTX=$optarg ;;
+ instiso=*)
+ ISO_INSTLABEL=$optarg ;;
+ inst_ostree_boot=*)
+ OSTREE_BOOT_DEVICE=$optarg ;;
+ inst_ostree_root=*)
+ OSTREE_ROOT_DEVICE=$optarg ;;
+ inst_ostree_boot_b=*)
+ OSTREE_BOOT_B_DEVICE=$optarg ;;
+ inst_ostree_root_b=*)
+ OSTREE_ROOT_B_DEVICE=$optarg ;;
esac
done
# defaults if not set
@@ -1283,8 +1301,6 @@ fi
# OSTree deploy
PHYS_SYSROOT="/sysroot"
-OSTREE_BOOT_DEVICE="LABEL=otaboot"
-OSTREE_ROOT_DEVICE="LABEL=otaroot"
mount_flags="rw,noatime"
if [ -x /init.ima ] ; then
mount --help 2>&1 |grep -q BusyBox
@@ -1385,7 +1401,7 @@ fi
if [ "$INSTAB" = "1" ] ; then
mkdir -p ${PHYS_SYSROOT}_b
- mount -o $mount_flags "${OSTREE_ROOT_DEVICE}_b" "${PHYS_SYSROOT}_b" || fatal "Error mouting ${OSTREE_ROOT_DEVICE}_b"
+ mount -o ${mount_flags} "${OSTREE_ROOT_B_DEVICE}" "${PHYS_SYSROOT}_b" || fatal "Error mounting ${OSTREE_ROOT_B_DEVICE}"
ostree admin --sysroot=${PHYS_SYSROOT}_b init-fs ${PHYS_SYSROOT}_b
ostree admin --sysroot=${PHYS_SYSROOT}_b os-init ${INSTOS}
@@ -1395,7 +1411,7 @@ if [ "$INSTAB" = "1" ] ; then
mkdir -p ${PHYS_SYSROOT}_b/boot
fi
- mount "${OSTREE_BOOT_DEVICE}_b" "${PHYS_SYSROOT}_b/boot" || fatal "Error mouting ${OSTREE_BOOT_DEVICE}_b"
+ mount "${OSTREE_BOOT_B_DEVICE}" "${PHYS_SYSROOT}_b/boot" || fatal "Error mounting ${OSTREE_BOOT_B_DEVICE}"
mkdir -p ${PHYS_SYSROOT}_b/boot/efi