mirror of
https://git.yoctoproject.org/poky
synced 2026-02-05 16:28:43 +01:00
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: a58e53f55259acd79a98a0f8b8a435d2a5aef36e) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
253660a139
commit
d2390c0646
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user