From bebb3d36f857c50992d45813e2f6e87e4e7449e2 Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Thu, 8 Jun 2017 21:07:54 +1000 Subject: 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 (From OE-Core rev: 5527af688f6ccaacd7ec24d29425d0c007d5341c) Signed-off-by: Jonathan Liu Signed-off-by: Richard Purdie --- meta/classes/image-vm.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() { parted $IMAGE print - awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \ + awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/')\" }" | \ dd of=$IMAGE bs=1 seek=440 conv=notrunc OFFSET=`expr $END2 / 512` -- cgit v1.2.3-54-g00ecf