From 48c335a46e03b46540a83a365fea76b92940927b Mon Sep 17 00:00:00 2001 From: Todor Minchev Date: Tue, 13 Dec 2016 14:56:49 -0800 Subject: rmc: add support for alternative EFI bootloaders RMC was previously configured to work only with the systemd-boot EFI bootloader. With this commit we can specify alternative bootloaders by setting the RMC_BOOTLOADER variable in local.conf. If RMC_BOOTLOADER is not set systemd-boot will be used by default. Signed-off-by: Todor Minchev Signed-off-by: California Sullivan --- classes/rmc-boot.bbclass | 13 +++++++++++++ classes/rmc-systemd-boot.bbclass | 12 ------------ conf/machine/include/meta-intel.inc | 2 +- documentation/rmc/README | 16 +++++++++++++--- 4 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 classes/rmc-boot.bbclass delete mode 100644 classes/rmc-systemd-boot.bbclass diff --git a/classes/rmc-boot.bbclass b/classes/rmc-boot.bbclass new file mode 100644 index 00000000..a1f2093f --- /dev/null +++ b/classes/rmc-boot.bbclass @@ -0,0 +1,13 @@ +# rmc-boot bbclass +# Deploy central RMC database file to ESP + +IMAGE_INSTALL_append = " rmc" +RMC_BOOTLOADER ?= "systemd-boot" + +inherit ${RMC_BOOTLOADER} + +do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy" + +efi_populate_append() { + install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db +} diff --git a/classes/rmc-systemd-boot.bbclass b/classes/rmc-systemd-boot.bbclass deleted file mode 100644 index ad2cf106..00000000 --- a/classes/rmc-systemd-boot.bbclass +++ /dev/null @@ -1,12 +0,0 @@ -# rmc-systemd-boot bbclass -# Deploy central RMC database file to ESP - -IMAGE_INSTALL_append = " rmc" - -inherit systemd-boot - -do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy" - -efi_populate_append() { - install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db -} diff --git a/conf/machine/include/meta-intel.inc b/conf/machine/include/meta-intel.inc index c7555ce9..fd0a792a 100644 --- a/conf/machine/include/meta-intel.inc +++ b/conf/machine/include/meta-intel.inc @@ -32,7 +32,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "${@bb.utils.contains('MACHINE_FEATURE # merge the microcode data in the final initrd image. INITRD_LIVE_prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}" -EFI_PROVIDER ?= "rmc-systemd-boot" +EFI_PROVIDER ?= "rmc-boot" # Add general MACHINEOVERRIDE for meta-intel MACHINEOVERRIDES =. "intel-x86-common:" diff --git a/documentation/rmc/README b/documentation/rmc/README index 2427ffd2..dbee6b6d 100644 --- a/documentation/rmc/README +++ b/documentation/rmc/README @@ -165,14 +165,24 @@ steps still can override results from this hook for boot entries and KBOOTPARAM. Enable RMC Feature -------------------------------------------------------------------------------- -To Enable RMC feature in build, add the below lines in a conf file: +To enable the RMC feature please add the following variables to your local.conf. + DISTRO_FEATURES_append = " rmc" -EFI_PROVIDER = "rmc-systemd-boot" +EFI_PROVIDER = "rmc-boot" + +The default EFI bootloader used with RMC is systemd-boot. To change the default +bootloader please overwrite the RMC_BOOTLOADER variable in your local.conf Note: Image could be still bootable if you only have either of two lines, but RMC feature won't be fully functional. +To install only the RMC client with the systemd-boot bootloader without +including a default RMC database file, add the following lines to your +local.conf: + +EFI_PROVIDER = "systemd-boot" +IMAGE_INSTALL_append = " rmc" Examples @@ -190,7 +200,7 @@ EXAMPLE 1: Support a new board type: (1) enable the feature and do a build to get a live-boot image by adding these lines in conf/local.conf: DISTRO_FEATURES_append = " rmc" - EFI_PROVIDER = "rmc-systemd-boot" + EFI_PROVIDER = "rmc-boot" (2) flash the image to a USB stick and boot it on your board -- cgit v1.2.3-54-g00ecf