]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: bootimg-efi: include startup.nsh if it's available
authorChristopher Larson <chris_larson@mentor.com>
Wed, 25 May 2016 20:31:52 +0000 (13:31 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 30 May 2016 08:30:31 +0000 (09:30 +0100)
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>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/plugins/source/bootimg-efi.py

index a4734c9b36635328a219c4f260d255e2d110dacc..ec13f6d2e50e458264608a310d98dd619a2db53a 100644 (file)
@@ -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])