1
0
forked from suse-edge/Factory
Files
Factory/kiwi-builder-image
Rhys Oxenham 27aa096244 Add support for uEFI aarch64 images without rpi config as default
Previously, the default model for aarch64 raw disk images assumes that
you're deploying on Raspberry Pi, and not standard aarch64 systems. This
meant that all raw disk images were built with RPi firmware, and an MBR
boot record, which made it incompatible with systems that require uEFI/GPT
compatibility, especially with Edge Image Builder and Metal3/CAPI deployment
usage.

This PR introduces the following changes:

* Introduces new `Default-RPi` and `Base-RPi` profiles for compatibility with RPi users
* Forces `Base` and `Base-RT` profiles to use GPT based images (not MBR)
* Introduces a new `Base-RT-RPi` profile for kernel-rt on RPi (with MBR)
* Removes Raspberry Pi firmware packages from anything other than RPi profiles
* Modifies the `editbootinstall_rpi.sh` script to support container builds
* Adds policycoreutils-python-utils to the list of packages (for semanage)

See: https://bugzilla.suse.com/show_bug.cgi?id=1240619
2025-04-29 14:54:54 +01:00
..
2025-04-23 19:10:50 +02:00
2025-04-23 19:10:50 +02:00

###########################
Kiwi SDK Image Instructions
###########################

Please ensure that you're running this on a registered SUSE Linux Micro 6.1 system, and make sure that SELinux is disabled:

# setenforce 0

Next, download the podman image:

# podman pull %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0

Make a local output directory (where the images will reside):

# mkdir output

Then, to build a standard "Base" image, run the following in podman:

# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0 build-image

To build a "Base" SelfInstall ISO, you can add additional flags, for example:

# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0 build-image -p Base-SelfInstall

Then, to build a standard "Default" image, run the following in podman:

# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0 build-image -p Default

To build a "Default" SelfInstall ISO, you can add additional flags, for example:

# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0 build-image -p Default-SelfInstall

To build an image with a RealTime kernel, e.g. a RAW disk image ("Default"), use the following:

# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0 build-image -p Base-RT

To build an image that supports a large block/sectorsize (4096), use the "-b" flag, for example:

# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0 build-image -p Default-SelfInstall -b

# mkdir mydefs/
# cp /path/to/SL-Micro.kiwi mydefs/
# cp /path/to/config.sh mydefs/
# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -v ./mydefs/:/micro-sdk/defs/ -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.0 build-image

All output will be in the local $(pwd)/output directory, for example:

# ls -1 output/
SL-Micro.x86_64-6.1.changes
SL-Micro.x86_64-6.1.packages
SL-Micro.x86_64-6.1.raw
SL-Micro.x86_64-6.1.verified
build
kiwi.result
kiwi.result.json

Note, if you want to rebuild the image, you'll need to empty the output directory, or Kiwi will error due to existing output files:

# rm -rf output/*