mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-07 04:58:57 +00:00
arm-autonomy/n1sdp: Add GRUB config when including alternate kernel
For N1SDP as arm-autonomy-host, when alternate-kernel DISTRO_FEATURE is present we set, as GRUB config, the arm-autonomy-n1sdp-rt-grub.cfg which includes additional entries for booting with the PREEMPT_RT kernel. Change-Id: If40aee159ae5ba0efd3d9a5a16ee1c1167fb0504 Issue-Id: SCM-1654 Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
+21
-1
@@ -15,7 +15,14 @@ GUEST_PART_SIZE ?= "4097"
|
||||
GUEST_PART_SIZE_UNIT ?= "M"
|
||||
|
||||
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
|
||||
GRUB_CFG_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg"
|
||||
#
|
||||
# When alternate-kernel DISTRO_FEATURE is present we set the
|
||||
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
|
||||
# additional entries for booting with the PREEMPT_RT kernel.
|
||||
GRUB_CFG_FILE ?= "${@bb.utils.contains('DISTRO_FEATURES','alternate-kernel', \
|
||||
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-rt-grub.cfg', \
|
||||
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg' \
|
||||
, d)}"
|
||||
|
||||
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
|
||||
# the "/" partition is /dev/sda2.
|
||||
@@ -60,3 +67,16 @@ 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 ''}"
|
||||
|
||||
|
||||
EFIDIR ?= "/EFI/BOOT"
|
||||
GRUB_CFG_EXTRA_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg;.${EFIDIR}}"
|
||||
|
||||
# When alternate-kernel DISTRO_FEATURE is present we set the
|
||||
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
|
||||
# additional entries for booting with the PREEMPT_RT kernel and also includes
|
||||
# the main GRUB config file set by GRUB_CFG_EXTRA_FILE.
|
||||
IMAGE_EFI_BOOT_FILES += "\
|
||||
${@ d.getVar('GRUB_CFG_EXTRA_FILE',d) or '' \
|
||||
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
|
||||
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
set term="vt100"
|
||||
set default="3"
|
||||
set timeout="5"
|
||||
|
||||
source $prefix/arm-autonomy-n1sdp-grub.cfg
|
||||
|
||||
menuentry 'N1SDP PREEMPT_RT ACPI Boot' {
|
||||
linux /Image-preempt-rt $kernel_cmdline acpi=force
|
||||
}
|
||||
|
||||
menuentry 'N1SDP PREEMPT_RT Single-Chip Boot (Device Tree)' {
|
||||
devicetree /n1sdp-single-chip.dtb
|
||||
linux /Image-preempt-rt $kernel_cmdline
|
||||
}
|
||||
|
||||
menuentry 'N1SDP PREEMPT_RT Multi-Chip Boot (Device Tree)' {
|
||||
devicetree /n1sdp-multi-chip.dtb
|
||||
linux /Image-preempt-rt $kernel_cmdline
|
||||
}
|
||||
|
||||
menuentry 'N1SDP PREEMPT_RT Arm Autonomy (Xen) Single-Chip Boot (Device Tree)' {
|
||||
# no_argumants under here is a workaround for a bug
|
||||
# also any kernel or dom0 cmdline arguments has to be passed via dtb
|
||||
# because any arguments put here will be ignored by xen
|
||||
xen_hypervisor /xen.efi no_arguments=use_dtb_for_xen_or_kernel_cmdline
|
||||
xen_module /Image-preempt-rt
|
||||
devicetree /n1sdp-single-chip-xen.dtb
|
||||
}
|
||||
Reference in New Issue
Block a user