All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin
@ 2016-05-25 20:31 Christopher Larson
  2016-05-25 20:31 ` [PATCH 1/3] grub-efi.bbclass: also write startup.nsh for non-iso Christopher Larson
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Christopher Larson @ 2016-05-25 20:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Currently, wic EFI images don't end up with startup.nsh, so the user has to
type in the correct bits into the EFI command-line, which isn't very
user-friendly. mkefidisk.sh in oe-core writes it for us, but we don't get it
for wic images.

Alter grub-efi.bbclass and gummiboot.bbclass to write it for the non-iso case,
not only iso, so wic can grab and use it, and alter wic's bootimg-efi plugin to
do so.

The following changes since commit bb4ead9b7b1400c37a72d148d9775bdf4210ec37:

  linux-yocto/4.4: integrate v4.4.11 (2016-05-25 07:49:55 +0100)

are available in the git repository at:

  git://github.com/kergoth/openembedded-core yocto-9556
  https://github.com/kergoth/openembedded-core/tree/yocto-9556

Christopher Larson (3):
  grub-efi.bbclass: also write startup.nsh for non-iso
  gummiboot.bbclass: also write startup.nsh for non-iso
  wic: bootimg-efi: include startup.nsh if it's available

 meta/classes/grub-efi.bbclass                 | 2 ++
 meta/classes/gummiboot.bbclass                | 2 ++
 scripts/lib/wic/plugins/source/bootimg-efi.py | 5 +++++
 3 files changed, 9 insertions(+)

-- 
2.8.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] grub-efi.bbclass: also write startup.nsh for non-iso
  2016-05-25 20:31 [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
@ 2016-05-25 20:31 ` Christopher Larson
  2016-05-25 20:31 ` [PATCH 2/3] gummiboot.bbclass: " Christopher Larson
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Christopher Larson @ 2016-05-25 20:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

wic will be needing this for its bootimg-efi plugin.

[YOCTO #9556]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/grub-efi.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index d0ae6c9..b8c20dd 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -45,6 +45,8 @@ efi_populate() {
 		GRUB_IMAGE="bootx64.efi"
 	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
 
 	install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
 }
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] gummiboot.bbclass: also write startup.nsh for non-iso
  2016-05-25 20:31 [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
  2016-05-25 20:31 ` [PATCH 1/3] grub-efi.bbclass: also write startup.nsh for non-iso Christopher Larson
@ 2016-05-25 20:31 ` Christopher Larson
  2016-05-25 20:31 ` [PATCH 3/3] wic: bootimg-efi: include startup.nsh if it's available Christopher Larson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Christopher Larson @ 2016-05-25 20:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

wic will be needing this for its bootimg-efi plugin.

[YOCTO #9556]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/gummiboot.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/gummiboot.bbclass b/meta/classes/gummiboot.bbclass
index 1ebb946..14fa4cf 100644
--- a/meta/classes/gummiboot.bbclass
+++ b/meta/classes/gummiboot.bbclass
@@ -34,6 +34,8 @@ efi_populate() {
         install -d ${DEST}/loader
         install -d ${DEST}/loader/entries
         install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
+        EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
+        printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh
         install -m 0644 ${GUMMIBOOT_CFG} ${DEST}/loader/loader.conf
         for i in ${GUMMIBOOT_ENTRIES}; do
             install -m 0644 ${i} ${DEST}/loader/entries
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] wic: bootimg-efi: include startup.nsh if it's available
  2016-05-25 20:31 [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
  2016-05-25 20:31 ` [PATCH 1/3] grub-efi.bbclass: also write startup.nsh for non-iso Christopher Larson
  2016-05-25 20:31 ` [PATCH 2/3] gummiboot.bbclass: " Christopher Larson
@ 2016-05-25 20:31 ` Christopher Larson
  2016-05-25 20:33 ` [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
  2016-05-30 12:33 ` Ed Bartosh
  4 siblings, 0 replies; 7+ messages in thread
From: Christopher Larson @ 2016-05-25 20:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

We want the system to boot on its own, rather than the user having to manually
input the correct file at the EFI prompt.

[YOCTO #9556]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index a4734c9..ec13f6d 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -197,6 +197,11 @@ class BootimgEFIPlugin(SourcePlugin):
         except KeyError:
             msger.error("bootimg-efi requires a loader, none specified")
 
+        startup = os.path.join(bootimg_dir, "startup.nsh")
+        if os.path.exists(startup):
+            cp_cmd = "cp %s %s/" % (startup, hdddir)
+            exec_cmd(cp_cmd, True)
+
         du_cmd = "du -bks %s" % hdddir
         out = exec_cmd(du_cmd)
         blocks = int(out.split()[0])
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin
  2016-05-25 20:31 [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
                   ` (2 preceding siblings ...)
  2016-05-25 20:31 ` [PATCH 3/3] wic: bootimg-efi: include startup.nsh if it's available Christopher Larson
@ 2016-05-25 20:33 ` Christopher Larson
  2016-05-25 20:35   ` Christopher Larson
  2016-05-30 12:33 ` Ed Bartosh
  4 siblings, 1 reply; 7+ messages in thread
From: Christopher Larson @ 2016-05-25 20:33 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

On Wed, May 25, 2016 at 1:31 PM, Christopher Larson <kergoth@gmail.com>
wrote:

> From: Christopher Larson <chris_larson@mentor.com>
>
> Currently, wic EFI images don't end up with startup.nsh, so the user has to
> type in the correct bits into the EFI command-line, which isn't very
> user-friendly. mkefidisk.sh in oe-core writes it for us, but we don't get
> it
> for wic images.
>
> Alter grub-efi.bbclass and gummiboot.bbclass to write it for the non-iso
> case,
> not only iso, so wic can grab and use it, and alter wic's bootimg-efi
> plugin to
> do so.


I tested this with success on the MinnowMax board, but that's the only EFI
device I have to test it on, so would appreciate testing from others on
this, if possible.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1354 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin
  2016-05-25 20:33 ` [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
@ 2016-05-25 20:35   ` Christopher Larson
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher Larson @ 2016-05-25 20:35 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

On Wed, May 25, 2016 at 1:33 PM, Christopher Larson <chris_larson@mentor.com
> wrote:

> On Wed, May 25, 2016 at 1:31 PM, Christopher Larson <kergoth@gmail.com>
> wrote:
>
>> From: Christopher Larson <chris_larson@mentor.com>
>>
>> Currently, wic EFI images don't end up with startup.nsh, so the user has
>> to
>> type in the correct bits into the EFI command-line, which isn't very
>> user-friendly. mkefidisk.sh in oe-core writes it for us, but we don't get
>> it
>> for wic images.
>>
>> Alter grub-efi.bbclass and gummiboot.bbclass to write it for the non-iso
>> case,
>> not only iso, so wic can grab and use it, and alter wic's bootimg-efi
>> plugin to
>> do so.
>
>
> I tested this with success on the MinnowMax board, but that's the only EFI
> device I have to test it on, so would appreciate testing from others on
> this, if possible.
>

I do think a better approach than this would be to make bootimg-efi
directly pull from DEPLOY_DIR_IMAGE rather than HDDDIR, since it duplicates
the bootloader config writing logic anyway, rather than using some but not
all the artifacts from image-live / HDDDIR. Either that, or it should stop
writing the bootloader config and rely entirely on the bbclass to set it
up. Currently it's partially one and partially the other, which isn't
ideal, in my opinion.

That said, I think this patch series is worthwhile for now, and we can
improve bootimg-efi further from there.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 2339 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin
  2016-05-25 20:31 [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
                   ` (3 preceding siblings ...)
  2016-05-25 20:33 ` [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
@ 2016-05-30 12:33 ` Ed Bartosh
  4 siblings, 0 replies; 7+ messages in thread
From: Ed Bartosh @ 2016-05-30 12:33 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Christopher Larson, openembedded-core

On Wed, May 25, 2016 at 01:31:40PM -0700, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> Currently, wic EFI images don't end up with startup.nsh, so the user has to
> type in the correct bits into the EFI command-line, which isn't very
> user-friendly. mkefidisk.sh in oe-core writes it for us, but we don't get it
> for wic images.
> 
> Alter grub-efi.bbclass and gummiboot.bbclass to write it for the non-iso case,
> not only iso, so wic can grab and use it, and alter wic's bootimg-efi plugin to
> do so.
> 
> The following changes since commit bb4ead9b7b1400c37a72d148d9775bdf4210ec37:
> 
>   linux-yocto/4.4: integrate v4.4.11 (2016-05-25 07:49:55 +0100)
> 
> are available in the git repository at:
> 
>   git://github.com/kergoth/openembedded-core yocto-9556
>   https://github.com/kergoth/openembedded-core/tree/yocto-9556
> 
> Christopher Larson (3):
>   grub-efi.bbclass: also write startup.nsh for non-iso
>   gummiboot.bbclass: also write startup.nsh for non-iso
>   wic: bootimg-efi: include startup.nsh if it's available
> 
>  meta/classes/grub-efi.bbclass                 | 2 ++
>  meta/classes/gummiboot.bbclass                | 2 ++
>  scripts/lib/wic/plugins/source/bootimg-efi.py | 5 +++++
>  3 files changed, 9 insertions(+)
> 

+1
The patchset looks good to me.

--
Regards,
Ed


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-30 12:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-25 20:31 [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
2016-05-25 20:31 ` [PATCH 1/3] grub-efi.bbclass: also write startup.nsh for non-iso Christopher Larson
2016-05-25 20:31 ` [PATCH 2/3] gummiboot.bbclass: " Christopher Larson
2016-05-25 20:31 ` [PATCH 3/3] wic: bootimg-efi: include startup.nsh if it's available Christopher Larson
2016-05-25 20:33 ` [PATCH 0/3] Deploy startup.nsh for wic's bootimg-efi plugin Christopher Larson
2016-05-25 20:35   ` Christopher Larson
2016-05-30 12:33 ` Ed Bartosh

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.