@@ -98,6 +98,22 @@ file://${COMMON_LICENSE_DIR}/OPUBL-1.0;md5=99367d4750dbf0ae6cc74209ddd52f6d \
ARM_SYSTEMREADY_LINUX_DISTRO_INSTALL_SIZE = "6144"
+TEST_SUITES = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "arm_systemready_fedora_unattended", "", d)}"
+
+ISO_LABEL = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "Fedora-S-dvd-aarch64-39", "", d)}"
+BOOT_CATALOG = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "boot.catalog", "", d)}"
+BOOT_IMAGE = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "EFI/BOOT/BOOTAA64.EFI", "", d)}"
+EFI_IMAGE = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "images/efiboot.img", "", d)}"
+
PV = "39.1.5"
SRC_URI = "https://download.fedoraproject.org/pub/fedora/linux/releases/39/Server/aarch64/iso/Fedora-Server-dvd-aarch64-39-1.5.iso;unpack=0;downloadfilename=${ISO_IMAGE_NAME}.iso"
SRC_URI[sha256sum] = "d19dc2a39758155fa53e6fd555d0d173ccc8175b55dea48002d499f39cb30ce0"
+
+modifyiso() {
+ UNATTENDED_CONF_DIR="${THISDIR}/unattended-boot-conf/Fedora"
+
+ cp "${UNATTENDED_CONF_DIR}/ks.cfg" ${EXTRACTED_ISO_TEMP_DIR}
+ sed -i 's/set default="1"/set default="0"/g' "${EXTRACTED_ISO_TEMP_DIR}/EFI/BOOT/grub.cfg"
+ sed -i 's/set timeout=60/set timeout=0/g' "${EXTRACTED_ISO_TEMP_DIR}/EFI/BOOT/grub.cfg"
+ sed -i '0,/vmlinuz/s/vmlinuz/& inst.ks=hd:LABEL=Fedora-S-dvd-aarch64-39:\/ks.cfg/' "${EXTRACTED_ISO_TEMP_DIR}/EFI/BOOT/grub.cfg"
+}
@@ -2,8 +2,12 @@ SUMMARY = "Arm SystemReady Linux distros installation"
DESCRIPTION = "Arm SystemReady Linux distro CD/DVD images and installation \
target disk image"
-IMAGE_CLASSES:remove = "license_image testimage create-spdx-image-3.0"
+DISTRO_UNATTENDED_INST_TESTS ?= "0"
+require ${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "arm-systemready-linux-distros-unattended.inc", "", d)}
+
+IMAGE_CLASSES:remove = "license_image create-spdx-image-3.0"
+IMAGE_CLASSES:remove = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "", "testimage", d)}"
BUILDHISTORY_FEATURES:remove = "image"
INHIBIT_DEFAULT_DEPS = "1"
@@ -16,7 +20,7 @@ do_configure[noexec] = "1"
do_compile[noexec] = "1"
ISO_IMAGE_NAME = "${PN}-${PV}"
-IMAGE_LINK_NAME = "${PN}-${PV}-${MACHINE}"
+IMAGE_LINK_NAME = "${PN}-${MACHINE}"
ARM_SYSTEMREADY_LINUX_DISTRO_ISO_IMAGE = \
"${DEPLOY_DIR_IMAGE}/${ISO_IMAGE_NAME}.iso"
@@ -47,7 +51,13 @@ python do_image_complete() {
from oe.utils import execute_pre_post_process
post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND")
execute_pre_post_process(d, post_process_cmds)
+
+ if d.getVar('DISTRO_UNATTENDED_INST_TESTS') == "1":
+ # Ensure an empty rootfs manifest exists (required by testimage)
+ fname = os.path.join(d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME') + ".manifest")
+ open(fname, 'w').close()
}
+
do_image_complete[nostamp] = "1"
addtask image_complete after do_deploy before do_build
new file mode 100644
@@ -0,0 +1,39 @@
+# Generated by Anaconda 39.32.6
+# Generated by pykickstart v3.48
+#version=DEVEL
+# Use text mode install
+text
+
+# Keyboard layouts
+keyboard --vckeymap=us --xlayouts='us'
+# System language
+lang en_GB.UTF-8
+
+# Use CDROM installation media
+cdrom
+
+%packages --excludedocs --ignoremissing
+@core --nodefaults
+
+%end
+
+# Run the Setup Agent on first boot
+firstboot --enable
+# Do not configure the X Window System
+skipx
+
+# System bootloader configuration
+bootloader --location=mbr --boot-drive=vda
+autopart
+# Partition clearing information
+clearpart --all --initlabel --drives=vda
+
+# System timezone
+timezone Europe/London --utc
+
+# Root password
+rootpw --lock
+user --groups=wheel --name=user --password=unsafe --gecos="usr1"
+
+# Reboot after installation with an attempt to eject the installation media
+reboot --eject