From b17c490a9e62ec10b519783bbdf4b3a4597ff919122c44588d7136cfdfd0c5c8 Mon Sep 17 00:00:00 2001 From: e-minguez Date: Mon, 17 Nov 2025 14:19:18 +0100 Subject: [PATCH 1/2] fix: Added missing kiwi files --- kiwi-builder-image/disk.sh | 24 ++++++++++++ kiwi-builder-image/editbootinstall_pine64.sh | 40 ++++++++++++++++++++ kiwi-builder-image/editbootinstall_rpi.sh | 3 -- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 kiwi-builder-image/disk.sh create mode 100644 kiwi-builder-image/editbootinstall_pine64.sh diff --git a/kiwi-builder-image/disk.sh b/kiwi-builder-image/disk.sh new file mode 100644 index 0000000..71d170e --- /dev/null +++ b/kiwi-builder-image/disk.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright (c) 2025 SUSE LLC +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +set -euxo pipefail + +/usr/libexec/setup-etc-subvol diff --git a/kiwi-builder-image/editbootinstall_pine64.sh b/kiwi-builder-image/editbootinstall_pine64.sh new file mode 100644 index 0000000..d18b2ff --- /dev/null +++ b/kiwi-builder-image/editbootinstall_pine64.sh @@ -0,0 +1,40 @@ +#!/bin/bash +set -euxo pipefail + +diskname=$1 +devname="$2" +loopname="${devname%*p?}" +loopdev=/dev/${loopname#/dev/mapper/*} + +#========================================== +# The GPT spans the first 33 sectors, but we need to write our +# at sector 16. Shrink the GPT to only span 5 sectors +# (16 partitions) to give us some space. +#------------------------------------------ +# echo -e 'x\ns\n16\nw\ny' > gdisk.tmp +# Shrink GPT does not work anymore, so let's use legacy MBR for now +cat > gdisk.tmp <<-'EOF' + x + r + g + t + 1 + c + w + y + EOF +dd if=$loopdev of=mbrid.bin bs=1 skip=440 count=4 +gdisk $loopdev < gdisk.tmp +dd of=$loopdev if=mbrid.bin bs=1 seek=440 count=4 +rm -f mbrid.bin +rm -f gdisk.tmp + +#========================================== +# Installing All-in-one U-Boot/SPL +#------------------------------------------ +echo "Installing All-in-one U-Boot/SPL..." +if ! dd if=boot/u-boot-sunxi-with-spl.bin of=$diskname bs=1024 seek=8 conv=notrunc; then + echo "Couldn't install SPL on $diskname" + exit 1 +fi + diff --git a/kiwi-builder-image/editbootinstall_rpi.sh b/kiwi-builder-image/editbootinstall_rpi.sh index a841f57..e62dd41 100644 --- a/kiwi-builder-image/editbootinstall_rpi.sh +++ b/kiwi-builder-image/editbootinstall_rpi.sh @@ -3,12 +3,9 @@ set -euxo pipefail diskname=$1 devname="$2" - loopname="${devname%*p?}" loopdev=/dev/${loopname#/dev/*} -if [ ! -f $loopdev ]; then loopdev=/dev/${loopdev#/dev/mapper/}; fi - #========================================== # copy Raspberry Pi firmware to EFI partition #------------------------------------------ -- 2.51.1 From 4d11270806fdae0b35d340f6a5d8dcbc2fcdcf3754c984aaf4b688ca461b285e Mon Sep 17 00:00:00 2001 From: e-minguez Date: Mon, 17 Nov 2025 14:38:24 +0100 Subject: [PATCH 2/2] fix: Updated SL-Micro.kiwi files --- kiwi-builder-image/Dockerfile | 4 +-- kiwi-builder-image/README.build.md | 28 +++++++++++++++++ kiwi-builder-image/SL-Micro.kiwi | 32 ++++++++++---------- kiwi-builder-image/SL-Micro.kiwi.4096 | 43 +++++++++++++++------------ 4 files changed, 71 insertions(+), 36 deletions(-) create mode 100644 kiwi-builder-image/README.build.md diff --git a/kiwi-builder-image/Dockerfile b/kiwi-builder-image/Dockerfile index c12eeb4..829176d 100644 --- a/kiwi-builder-image/Dockerfile +++ b/kiwi-builder-image/Dockerfile @@ -1,5 +1,5 @@ -#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.2.29.0-%RELEASE% -#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.2.29.0 +#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.2.29.1-%RELEASE% +#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.2.29.1 # Base image version, should match the tag above ARG KIWIVERSION="10.2.29" diff --git a/kiwi-builder-image/README.build.md b/kiwi-builder-image/README.build.md new file mode 100644 index 0000000..bdfc4fb --- /dev/null +++ b/kiwi-builder-image/README.build.md @@ -0,0 +1,28 @@ +The following files are coming from _upstream_ https://build.opensuse.org/package/show/SUSE:SLFO:Products:SL-Micro:6.2/SL-Micro : + +* SL-Micro.kiwi +* disk.sh +* config.sh +* editbootinstall_pine64.sh +* editbootinstall_rpi.sh + +Those can be downloaded as: + +``` +curl -LO https://src.suse.de/products/SL-Micro/raw/branch/6.2/SL-Micro/SL-Micro.kiwi +``` + +The SL-Micro.kiwi file needs to be modified to append a few packages on the bootstrap stanza to be able to generate images with no SSL errors: + +``` + + ++ ++ ++ + +``` + +The SL-Micro.kiwi.4096 file needs to be modified to modify the `target_blocksize="4096"` where appropiate. + +All the other files are used verbatim. diff --git a/kiwi-builder-image/SL-Micro.kiwi b/kiwi-builder-image/SL-Micro.kiwi index 5914935..ae51617 100644 --- a/kiwi-builder-image/SL-Micro.kiwi +++ b/kiwi-builder-image/SL-Micro.kiwi @@ -95,14 +95,14 @@ - - + + - + - + @@ -865,7 +865,7 @@ 32 - + 6.2 zypper @@ -878,7 +878,7 @@ format="qcow2" filesystem="btrfs" firmware="uefi" - efipartsize="512" + efipartsize="512" kernelcmdline="security=selinux selinux=1 quiet systemd.show_status=1 ignition.platform.id=qemu" bootpartition="false" bootkernel="custom" @@ -890,7 +890,7 @@ - + @@ -925,7 +925,7 @@ - + @@ -961,7 +961,7 @@ - + @@ -1002,7 +1002,7 @@ - + @@ -1045,7 +1045,7 @@ - + @@ -1067,7 +1067,7 @@ - + @@ -1151,7 +1151,7 @@ - @@ -1182,7 +1182,7 @@ - @@ -1213,6 +1213,7 @@ + @@ -1229,7 +1230,7 @@ - + @@ -1240,3 +1241,4 @@ + diff --git a/kiwi-builder-image/SL-Micro.kiwi.4096 b/kiwi-builder-image/SL-Micro.kiwi.4096 index b747850..52c07f4 100644 --- a/kiwi-builder-image/SL-Micro.kiwi.4096 +++ b/kiwi-builder-image/SL-Micro.kiwi.4096 @@ -95,14 +95,14 @@ - - + + - + - + @@ -321,6 +321,7 @@ SLE true en_US +