[meta-arm,5/8] arm-autonomy/n1sdp: Add support for building/installing alternate kernel

Submitted by Diego Sueiro on Nov. 17, 2020, 10:04 a.m. | Patch ID: 178117

Details

Message ID 20201117100449.20111-6-diego.sueiro@arm.com
State New
Headers show

Commit Message

Diego Sueiro Nov. 17, 2020, 10:04 a.m.
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 <diego.sueiro@arm.com>

---
 .../conf/machine/n1sdp-extra-settings.inc     | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

-- 
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1382): https://lists.yoctoproject.org/g/meta-arm/message/1382
Mute This Topic: https://lists.yoctoproject.org/mt/78313151/1003190
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

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 472dd2a..7501bf5 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 ''}"