diff options
author | Jonathan Liu <net147@gmail.com> | 2017-06-08 21:07:54 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 15:04:08 +0100 |
commit | a58e53f55259acd79a98a0f8b8a435d2a5aef36e (patch) | |
tree | 5cb24159fcc373c982bfbb65b9c802366adacd8b | |
parent | a1af526e43cb476472a6203882c12deef297f542 (diff) | |
download | openembedded-core-a58e53f55259acd79a98a0f8b8a435d2a5aef36e.tar.gz openembedded-core-a58e53f55259acd79a98a0f8b8a435d2a5aef36e.tar.bz2 openembedded-core-a58e53f55259acd79a98a0f8b8a435d2a5aef36e.zip |
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>
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/classes/image-vm.bbclass | 2 |
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() { 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` |