From ce9650ec84d525748678f5f512c39efec5409a3f Mon Sep 17 00:00:00 2001 From: Diego Sueiro Date: Tue, 17 Nov 2020 10:04:46 +0000 Subject: [PATCH] arm-autonomy/n1sdp: Add support for building/installing alternate kernel For N1SDP as arm-autonomy-host, when alternate-kernel DISTRO_FEATURE is present we build the linux-linaro-arm-rt (with PREEMPT_RT support) by setting it as the PREFERRED_PROVIDER_alternate/kernel. As required, we set the KERNEL_PACKAGE_NAME_pn-linux-linaro-arm-rt to kernel-rt. Also, include the alternate kernel binary as Image-preempt-rt in the boot partition of the generated wic image by setting the IMAGE_EFI_BOOT_FILES variable. Change-Id: I205caf5ef8b8d6b8a37ec3f4d0981fe8736cae63 Issue-Id: SCM-1654 Signed-off-by: Diego Sueiro Signed-off-by: Jon Mason --- .../conf/machine/n1sdp-extra-settings.inc | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc index 472dd2a1..7501bf5b 100644 --- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc +++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc @@ -38,3 +38,25 @@ do_image_wic[depends] += "xen:do_deploy" IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi" IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}" +# When alternate-kernel DISTRO_FEATURE is present we set the linux-linaro-arm-rt +# by default +PREFERRED_PROVIDER_alternate/kernel ?= "\ +${@bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', \ +'linux-linaro-arm-rt', '', d)}" + +KERNEL_PACKAGE_NAME_alternate/kernel ?= "kernel-rt" +# When alternate-kernel DISTRO_FEATURE is present we set the kernel-rt by +# default +KERNEL_PACKAGE_NAME_pn-linux-linaro-arm-rt = "\ +${@ d.getVar('KERNEL_PACKAGE_NAME_alternate/kernel') \ +if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) \ +else 'kernel' }" + +# Relative path from DEPLOY_DIR_IMAGE of the Kernel PREEMPT_RT deployed Image +KERNEL_RT_IMAGE ?= "kernel-rt/Image-n1sdp.bin;Image-preempt-rt" +# Only include the Kernel PREEMPT_RT Image if we are building with +# alternate-kernel DISTRO_FEATURE +IMAGE_EFI_BOOT_FILES += "\ +${@ d.getVar('KERNEL_RT_IMAGE',d) or '' \ +if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \ +d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"