From aa215c12d729c001ad3b8b98a7e203a9ad192211 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Wed, 25 May 2016 13:31:52 -0700 Subject: wic: bootimg-efi: include startup.nsh if it's available 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 Signed-off-by: Ross Burton --- scripts/lib/wic/plugins/source/bootimg-efi.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/lib/wic/plugins/source/bootimg-efi.py') diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index a4734c9b36..ec13f6d2e5 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]) -- cgit 1.2.3-korg