From f189a4e68059012ab1eb06a5c6159f1145cb6b1d Mon Sep 17 00:00:00 2001 From: Zhai Zhaoxuan Date: Wed, 24 Apr 2024 14:38:33 +0800 Subject: [PATCH] support specify sector size in ubuntu-image Signed-off-by: Zhai Zhaoxuan --- debian/changelog | 8 ++++++-- live-build/auto/config | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9f06d6e0..eb6e20c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ -livecd-rootfs (24.10.5) UNRELEASED; urgency=medium +livecd-rootfs (24.10.5ubuntu1) UNRELEASED; urgency=medium + [ Erich Eickmeyer ] * Switch Ubuntu Studio to generic kernel - -- Erich Eickmeyer Wed, 19 Jun 2024 15:52:04 -0700 + [ Zhaoxuan Zhai ] + * support config sector size in ubuntu-image + + -- Zhaoxuan Zhai Thu, 27 Jun 2024 09:58:27 +0800 livecd-rootfs (24.10.4) oracular; urgency=medium diff --git a/live-build/auto/config b/live-build/auto/config index bd61d431..1e89f1ae 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -464,6 +464,9 @@ case $IMAGEFORMAT in echo "$NOW" > config/disk-info UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS --disk-info config/disk-info" fi + if [ -n "$SECTOR_SIZE" ]; then + UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS --sector-size=$SECTOR_SIZE" + fi if [ $PROJECT = "ubuntu-core" ]; then # snap-based core images @@ -521,7 +524,6 @@ case $IMAGEFORMAT in UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS --snap=$snap" done echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common - echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common # Store model assertion in top dir to get it picked up later as a build artifact env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > "$PREFIX".model-assertion echo "Configured ubuntu-image for the following model assertion:" @@ -551,6 +553,7 @@ case $IMAGEFORMAT in # Save the model name used for building, mostly for any model-specific hook execution echo "MODEL=$MODEL" >> config/common echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common + echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common # Fake finished configuration for lb build mkdir -p .build touch .build/config