Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] mkefidsk: fix bash/dash shell quoting problem
@ 2017-06-29 20:46 Saul Wold
  0 siblings, 0 replies; only message in thread
From: Saul Wold @ 2017-06-29 20:46 UTC (permalink / raw)
  To: openembedded-core, richard.purdie

mkefidsk currently writes a startup.nsh with embedded control characters.
This happens because \b etc are control sequences to the shell echo
command when using dash. The resulting startup.nsh causes the bootup
to fail, and the user is dropped into the EFI shell to manually run
startup.nsh.

Patch originally provided by Troy D. Hanson <troy.hanson@jhuapl.edu>

[YOCTO #9665]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
Tested with both bash and dash

 scripts/contrib/mkefidisk.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index 800733f..ac4ec9c 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -444,7 +444,7 @@ if [ -d $ROOTFS_MNT/etc/udev/ ] ; then
 fi
 
 # Add startup.nsh script for automated boot
-echo "fs0:\EFI\BOOT\bootx64.efi" > $BOOTFS_MNT/startup.nsh
+printf "fs0:\%s\BOOT\%s\n" "EFI" "bootx64.efi" > $BOOTFS_MNT/startup.nsh
 
 
 # Call cleanup to unmount devices and images and remove the TMPDIR
-- 
2.7.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-29 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-29 20:46 [PATCH] mkefidsk: fix bash/dash shell quoting problem Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox