Commit 4fe9685b authored by Jan Kiszka's avatar Jan Kiszka
Browse files

Add support for ARM-based swupdate/secure boot image



Everything is now lined up so that enabling this almost trivial,
reusing what is there for qemu-arm64.

Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent ed13b6ac
......@@ -132,11 +132,11 @@ if IMAGE_FLASH && !KERNEL_4_4 && !KERNEL_4_19
config IMAGE_SWUPDATE
bool "SWUpdate support for root partition"
depends on TARGET_QEMU_AMD64 || TARGET_SIMATIC_IPC227E || TARGET_QEMU_ARM64
depends on TARGET_QEMU_AMD64 || TARGET_SIMATIC_IPC227E || TARGET_QEMU_ARM64 || TARGET_QEMU_ARM
config IMAGE_SECURE_BOOT
bool "Secure boot support"
depends on TARGET_QEMU_AMD64 || TARGET_QEMU_ARM64
depends on TARGET_QEMU_AMD64 || TARGET_QEMU_ARM64 || TARGET_QEMU_ARM
select IMAGE_SWUPDATE
config KAS_INCLUDE_SWUPDATE_SECBOOT
......
......@@ -12,3 +12,8 @@ DISTRO_ARCH = "armhf"
IMAGE_FSTYPES ?= "ext4"
USE_CIP_KERNEL_CONFIG = "1"
KERNEL_DEFCONFIG ?= "cip-kernel-config/${KERNEL_DEFCONFIG_VERSION}/arm/qemu_arm_defconfig"
# for SWUpdate setups: watchdog is configured in U-Boot
WDOG_TIMEOUT = "0"
PREFERRED_PROVIDER_u-boot-${MACHINE} = "u-boot-qemu-arm"
......@@ -36,3 +36,4 @@ local_conf_header:
DISTRO_APT_PREFERENCES_append_qemu-amd64_buster = " conf/distro/preferences.ovmf-snakeoil.conf"
# Add U-Boot for qemu
IMAGER_BUILD_DEPS_append_qemu-arm64 += "u-boot-qemu-arm64"
IMAGER_BUILD_DEPS_append_qemu-arm += "u-boot-qemu-arm"
#
# CIP Core, generic profile
#
# Copyright (c) Siemens AG, 2022
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# SPDX-License-Identifier: MIT
#
require u-boot-qemu-common.inc
U_BOOT_CONFIG = "qemu_arm_defconfig"
EFI_ARCH = "arm"
......@@ -184,6 +184,7 @@ class EfibootguardBootPlugin(SourcePlugin):
distro_to_efi_arch = {
"amd64": "x64",
"arm64": "aa64",
"armhf": "arm",
"i386": "ia32"
}
rootfs_path = rootfs_dir.get('ROOTFS_DIR')
......
......@@ -55,6 +55,7 @@ class EfibootguardEFIPlugin(SourcePlugin):
distro_to_efi_arch = {
"amd64": "x64",
"arm64": "aa64",
"armhf": "arm",
"i386": "ia32"
}
......
......@@ -145,8 +145,8 @@ if [ -n "${SECURE_BOOT}${SWUPDATE_BOOT}" ]; then
${QEMU_COMMON_OPTIONS} "$@"
fi
;;
arm64|aarch64)
u_boot_bin=${FIRMWARE_BIN:-./build/tmp/deploy/images/qemu-arm64/firmware.bin}
arm64|aarch64|arm|armhf)
u_boot_bin=${FIRMWARE_BIN:-./build/tmp/deploy/images/qemu-${QEMU_ARCH}/firmware.bin}
${QEMU_PATH}${QEMU} \
-drive file=${IMAGE_PREFIX}.wic,discard=unmap,if=none,id=disk,format=raw \
......
qemu-arm64-efibootguard-secureboot.wks.in
\ No newline at end of file
qemu-arm64-efibootguard.wks.in
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment