All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Belal, Awais" <Awais_Belal@mentor.com>
To: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v2 2/2]	grub-efi/live-vm-common:	allow	grub	as	EFI_PROVIDER
Date: Thu, 30 Mar 2017 13:02:33 +0000	[thread overview]
Message-ID: <1490878952938.54033@mentor.com> (raw)
In-Reply-To: <1485782741272.36101@mentor.com>

ping!

BR,
Awais

________________________________________
From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-bounces@lists.openembedded.org> on behalf of Belal, Awais
Sent: Monday, January 30, 2017 6:25 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/2]   grub-efi/live-vm-common:        allow   grub    as      EFI_PROVIDER

ping!

BR,
Awais

________________________________________
From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-bounces@lists.openembedded.org> on behalf of Belal, Awais
Sent: Tuesday, January 10, 2017 5:19 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common:  allow   grub    as      EFI_PROVIDER

ping!

BR,
Awais

________________________________________
From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-bounces@lists.openembedded.org> on behalf of Belal, Awais
Sent: Tuesday, January 3, 2017 5:34 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allow    grub    as      EFI_PROVIDER

ping!

BR,
Awais

________________________________________
From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-bounces@lists.openembedded.org> on behalf of Belal, Awais
Sent: Tuesday, December 27, 2016 5:15 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allow grub       as      EFI_PROVIDER

Ping!

BR,
Awais

________________________________________
From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-bounces@lists.openembedded.org> on behalf of Belal, Awais
Sent: Friday, December 16, 2016 5:19 PM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allow grub as        EFI_PROVIDER

This allows grub to be used as EFI_PROVIDER and
extends the grub-efi class so it can be used as is
when EFI_PROVIDER is grub.
Currently this can only be leveraged if you are
using the grub_git recipe and GRUBPLATFORM plus
EFI_PROVIDER are set correctly.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 meta/classes/grub-efi.bbclass       | 23 +++++++++++++++++------
 meta/classes/live-vm-common.bbclass |  2 +-
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 17417ba..c847645 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -16,8 +16,8 @@
 # ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
 # ${GRUB_ROOT} - grub's root device.

-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
+do_bootimg[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"
+do_bootdirectdisk[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"

 GRUB_SERIAL ?= "console=ttyS0,115200"
 GRUB_CFG_VM = "${S}/grub_vm.cfg"
@@ -40,10 +40,21 @@ efi_populate() {

        install -d ${DEST}${EFIDIR}

-       GRUB_IMAGE="bootia32.efi"
-       if [ "${TARGET_ARCH}" = "x86_64" ]; then
-               GRUB_IMAGE="bootx64.efi"
-       fi
+    if [ "${EFI_PROVIDER}" = "grub" ]; then
+           GRUB_IMAGE="bootia32.${GRUBPLATFORM}"
+           if [ "${TARGET_ARCH}" = "x86_64" ]; then
+                   GRUB_IMAGE="bootx64.${GRUBPLATFORM}"
+           elif [ "${TARGET_ARCH}" = "arm" ]; then
+            grubimage = "bootarm.${GRUBPLATFORM}"
+           elif [ "${TARGET_ARCH}" = "aarch64" ]; then
+            grubimage = "bootaa64.${GRUBPLATFORM}"
+        fi
+    else
+        GRUB_IMAGE="bootia32.efi"
+           if [ "${TARGET_ARCH}" = "x86_64" ]; then
+                   GRUB_IMAGE="bootx64.efi"
+        fi
+    fi
        install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
        EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
        printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh
diff --git a/meta/classes/live-vm-common.bbclass b/meta/classes/live-vm-common.bbclass
index 734697f..0af228b 100644
--- a/meta/classes/live-vm-common.bbclass
+++ b/meta/classes/live-vm-common.bbclass
@@ -13,7 +13,7 @@ def set_live_vm_vars(d, suffix):

 EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
 EFI_PROVIDER ?= "grub-efi"
-EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
+EFI_CLASS = "${@bb.utils.contains("EFI_PROVIDER", "grub", "grub-efi", "${EFI_PROVIDER}", d)}"

 # Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
 # contain "efi". This way legacy is supported by default if neither is
--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


  reply	other threads:[~2017-03-30 13:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 12:19 [PATCH v2 1/2] grub_git: extend recipe for proper target deployment Awais Belal
2016-12-16 12:19 ` [PATCH v2 2/2] grub-efi/live-vm-common: allow grub as EFI_PROVIDER Awais Belal
2016-12-27 12:15   ` Belal, Awais
2017-01-03 12:34     ` Belal, Awais
2017-01-10 12:19       ` Belal, Awais
2017-01-30 13:25         ` Belal, Awais
2017-03-30 13:02           ` Belal, Awais [this message]
2016-12-27 12:15 ` [PATCH v2 1/2] grub_git: extend recipe for proper target deployment Belal, Awais
2017-01-03 12:34   ` Belal, Awais
2017-01-10 10:14     ` Belal, Awais
2017-01-30 13:25       ` Belal, Awais
2017-03-30 13:02         ` Belal, Awais
2017-03-30 16:02           ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490878952938.54033@mentor.com \
    --to=awais_belal@mentor.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.