Skip to content
Snippets Groups Projects
Commit 45fccdd4 authored by Nicola Sparnacci's avatar Nicola Sparnacci Committed by Davide Cardillo
Browse files

[GRUB-BOOTCONF] Allow initrds in GRUB boot configuration


Add the possibility to use initrds in GRUB boot configuration. Note that
this configuration is the one that is installed on the board during the
install process with a removable media.

Requires the compatible `grub-efi-cfg-seco.bbclass` in `meta-seco-bsp`
added in 6d6f6ad7d96b125091a3704b217943c8b1831709.

JIRA Reference: [CLEAOS-616]

Signed-off-by: default avatarNicola Sparnacci <nicola.sparnacci@seco.com>
parent b8fbb8d3
No related branches found
No related tags found
1 merge request!143[LAYER] Intel platform support compatible with Clea OS
...@@ -7,19 +7,42 @@ HOMEPAGE = "https://www.gnu.org/software/grub/manual/grub/grub.html#Configuratio ...@@ -7,19 +7,42 @@ HOMEPAGE = "https://www.gnu.org/software/grub/manual/grub/grub.html#Configuratio
RPROVIDES:${PN} += "virtual-grub-bootconf" RPROVIDES:${PN} += "virtual-grub-bootconf"
inherit grub-efi-cfg inherit grub-efi-cfg-seco
require conf/image-uefi.conf require conf/image-uefi.conf
S = "${WORKDIR}" S = "${WORKDIR}"
# GRUB configuration for CleaOS installed on the board after the install
# procedure. The file 'grub.cfg' is populated here using the class
# 'grub-efi-cfg-seco'.
#
# Usage:
# LABELS: is a ';' separated list of labels (i.e menuentry names).
# For example, LABELS = "boot1;boot2" will create two menuentries named
# "boot1" and "boot2".
# ROOT: is the 'root' device used to boot.
# INITRD: list of initrds (';' separated to assign the proper initrds to
# relative labels). This is an optional variable.
# For example, with LABELS = "boot1;boot2" and INITRD = "/initrd1;/initrd2 /initrd3"
# will apply to "boot1" entry the string "initrd /initrd1" and to "boot2" entry
# the string "initrd /initrd2 /initrd3".
# The number of initrds lists bust be less than or equal
# to the number of labels.
# APPEND: is a list of options appended to the first line of a menuentry.
GRUB_CFG = "${S}/grub-bootconf" GRUB_CFG = "${S}/grub-bootconf"
LABELS = "boot" LABELS = "boot"
ROOT ?= "root=/dev/sda2" ROOT ?= "root=/dev/sda2"
INITRD = "/ramfs.img"
BOOTLOADER = "grub"
BOOTDEVICE = "sda"
APPEND += "swiotlb=65536 bootloader=${BOOTLOADER} bootdevice=${BOOTDEVICE}"
python do_configure() { python do_configure() {
# Create the configuration
bb.build.exec_func('build_efi_cfg', d) bb.build.exec_func('build_efi_cfg', d)
# Apply initrds to the configuration
bb.build.exec_func('replace_initrd', d)
} }
do_configure[vardeps] += "APPEND ROOT" do_configure[vardeps] += "APPEND ROOT"
...@@ -29,5 +52,4 @@ do_install() { ...@@ -29,5 +52,4 @@ do_install() {
install grub-bootconf ${D}${EFI_FILES_PATH}/grub.cfg install grub-bootconf ${D}${EFI_FILES_PATH}/grub.cfg
} }
FILES:${PN} = "${EFI_FILES_PATH}/grub.cfg" FILES:${PN} = "${EFI_FILES_PATH}/grub.cfg"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment