diff options
author | Jonathan Liu <net147@gmail.com> | 2013-07-20 22:11:20 +1000 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2013-07-23 07:22:38 -0700 |
commit | 1928f46e8e9f281e3e64f916048cc9314e125150 (patch) | |
tree | e0f46218d8f68e46ab48537e780e9815ef2dc9d6 /meta/classes/boot-directdisk.bbclass | |
parent | 4bd98157f1d7a96741d036e67b04819ccbc9a9c6 (diff) | |
download | openembedded-core-1928f46e8e9f281e3e64f916048cc9314e125150.tar.gz openembedded-core-1928f46e8e9f281e3e64f916048cc9314e125150.tar.bz2 openembedded-core-1928f46e8e9f281e3e64f916048cc9314e125150.zip |
boot-directdisk: use awk instead of echo -ne for dash compatibility
The echo command is a dash shell built-in and does not support the
-n and -e options so use awk instead.
This fixes the partition table being corrupted when writing the MBR
disk signature into the image.
[YOCTO #4859]
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/boot-directdisk.bbclass')
-rw-r--r-- | meta/classes/boot-directdisk.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass index 182957b106..8a55aae6a3 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass @@ -81,7 +81,7 @@ build_boot_dd() { parted $IMAGE set 1 boot on parted $IMAGE print - echo -ne "$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')" | \ + awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \ dd of=$IMAGE bs=1 seek=440 conv=notrunc OFFSET=`expr $END2 / 512` |