[OE-core] [PATCH 3/3] wic: bootimg-efi: include startup.nsh if it's available

Christopher Larson kergoth at gmail.com
Wed May 25 20:31:52 UTC 2016


From: Christopher Larson <chris_larson at 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 at 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




More information about the Openembedded-core mailing list