summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>2019-09-18 16:12:44 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-19 10:54:26 +0100
commit8d15c015d2498d541a6e52fc4e7553e692ff3ac5 (patch)
treec2ae04e33cb8f9d609b5e243fcf04370832fdf8d
parente6bb6d31c4285a62b3e9e324c36b2baf439e7bae (diff)
downloadopenembedded-core-contrib-8d15c015d2498d541a6e52fc4e7553e692ff3ac5.tar.gz
openembedded-core-contrib-8d15c015d2498d541a6e52fc4e7553e692ff3ac5.tar.bz2
openembedded-core-contrib-8d15c015d2498d541a6e52fc4e7553e692ff3ac5.zip
grub-efi.bbclass: switch to image-uefi.conf
Use variables from image-uefi.conf instead of hardcoding them in the class. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/grub-efi-cfg.bbclass1
-rw-r--r--meta/classes/grub-efi.bbclass20
2 files changed, 4 insertions, 17 deletions
diff --git a/meta/classes/grub-efi-cfg.bbclass b/meta/classes/grub-efi-cfg.bbclass
index f661a69f83..8b5ff20c72 100644
--- a/meta/classes/grub-efi-cfg.bbclass
+++ b/meta/classes/grub-efi-cfg.bbclass
@@ -23,7 +23,6 @@ GRUB_TIMEOUT ?= "10"
#FIXME: build this from the machine config
GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
-EFIDIR = "/EFI/BOOT"
GRUB_ROOT ?= "${ROOT}"
APPEND ?= ""
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index ec692f1646..724bbe8684 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -1,4 +1,5 @@
inherit grub-efi-cfg
+require conf/image-uefi.conf
efi_populate() {
# DEST must be the root of the image so that EFIDIR is not
@@ -7,22 +8,9 @@ efi_populate() {
install -d ${DEST}${EFIDIR}
- GRUB_IMAGE="grub-efi-bootia32.efi"
- DEST_IMAGE="bootia32.efi"
- if [ -n "${MLPREFIX}" ]; then
- if [ "${TARGET_ARCH_MULTILIB_ORIGINAL}" = "x86_64" ]; then
- GRUB_IMAGE="grub-efi-bootx64.efi"
- DEST_IMAGE="bootx64.efi"
- fi
- else
- if [ "${TARGET_ARCH}" = "x86_64" ]; then
- GRUB_IMAGE="grub-efi-bootx64.efi"
- DEST_IMAGE="bootx64.efi"
- fi
- fi
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}/${DEST_IMAGE}
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/grub-efi-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh
+ printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh
install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
}
@@ -35,7 +23,7 @@ efi_iso_populate() {
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
cp $iso_dir/${KERNEL_IMAGETYPE} ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
+ printf 'fs0:%s\%s\n' "$EFIPATH" "grub-efi-${EFI_BOOT_IMAGE}" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then
cp $iso_dir/initrd ${EFIIMGDIR}
fi