summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2017-06-08 21:07:54 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 17:02:36 +0100
commitbebb3d36f857c50992d45813e2f6e87e4e7449e2 (patch)
treeb417a1ca6621dbfc2f6444eec6b833c45301f021
parent607bd9ec3981e23ea09fe01290f9a3af8c77de27 (diff)
downloadpoky-bebb3d36f857c50992d45813e2f6e87e4e7449e2.tar.gz
image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE
These commands are not whitelisted by the HOSTTOOLS variable which silently prevents the MBR disk signature from being written to the image. Reported-by: Michael Davis <michael.davis@essvote.com> (From OE-Core rev: 5527af688f6ccaacd7ec24d29425d0c007d5341c) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image-vm.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index 35c9244e9b..98bd92000e 100644
--- a/meta/classes/image-vm.bbclass
+++ b/meta/classes/image-vm.bbclass
@@ -93,7 +93,7 @@ build_boot_dd() {
93 93
94 parted $IMAGE print 94 parted $IMAGE print
95 95
96 awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \ 96 awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/')\" }" | \
97 dd of=$IMAGE bs=1 seek=440 conv=notrunc 97 dd of=$IMAGE bs=1 seek=440 conv=notrunc
98 98
99 OFFSET=`expr $END2 / 512` 99 OFFSET=`expr $END2 / 512`