]> code.ossystems Code Review - openembedded-core.git/commitdiff
grub-efi.bbclass: take into consideration of multilib
authorChen Qi <Qi.Chen@windriver.com>
Thu, 4 Jul 2019 02:38:37 +0000 (10:38 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 Jul 2019 11:00:15 +0000 (12:00 +0100)
When enabling multilib and building lib32-IMAGE which
uses grub-efi, the build fails with the following error.

  install: cannot stat '/PROJ_DIR/build/tmp-glibc/deploy/images/intel-x86-64/grub-efi-bootia32.efi': No such file or directory

The grub-efi is in NON_MULTILIB_SCRIPTS. That means we
will use 64bit grub-efi for lib32-IMAGE.

So take into consideration of multilib to fix this problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/grub-efi.bbclass

index 90badc03a0e58dd99945f73e482cc9a972571c45..ec692f1646f3411b1e79ee25a49f610ed602eaf8 100644 (file)
@@ -9,9 +9,16 @@ efi_populate() {
 
        GRUB_IMAGE="grub-efi-bootia32.efi"
        DEST_IMAGE="bootia32.efi"
-       if [ "${TARGET_ARCH}" = "x86_64" ]; then
-               GRUB_IMAGE="grub-efi-bootx64.efi"
-               DEST_IMAGE="bootx64.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}
        EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')