diff options
author | Jonathan Liu <net147@gmail.com> | 2013-07-20 22:11:20 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-24 11:35:36 +0100 |
commit | 1d5d93101e4d4e14d37f75f8a4d2bef0a96b2a4e (patch) | |
tree | d1fa3972420a5e7c83d038bdaddf2c97a67cc5a6 /meta/classes/boot-directdisk.bbclass | |
parent | 1b01e392e1f8c9b2056587a8593cb077a4a08b0f (diff) | |
download | poky-1d5d93101e4d4e14d37f75f8a4d2bef0a96b2a4e.tar.gz |
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]
(From OE-Core rev: 1928f46e8e9f281e3e64f916048cc9314e125150)
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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() { | |||
81 | parted $IMAGE set 1 boot on | 81 | parted $IMAGE set 1 boot on |
82 | parted $IMAGE print | 82 | parted $IMAGE print |
83 | 83 | ||
84 | echo -ne "$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')" | \ | 84 | awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \ |
85 | dd of=$IMAGE bs=1 seek=440 conv=notrunc | 85 | dd of=$IMAGE bs=1 seek=440 conv=notrunc |
86 | 86 | ||
87 | OFFSET=`expr $END2 / 512` | 87 | OFFSET=`expr $END2 / 512` |