diff options
author | Joel Kitching <kitching@google.com> | 2018-08-09 17:49:52 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-11-16 09:47:35 +0000 |
commit | 21fdd89b0c9b0c135c0febeacbae5f83e33a3c70 (patch) | |
tree | 4fda2132c0f9f03d873dc63c5975e529e669ea7a /util/testing | |
parent | 73bbcee9327a25da8117a4caf864f8e3162a55c8 (diff) |
cbfstool: add unprocessed flag for file exporting
Add an unprocessed flag (-U) which modifies how files are exported.
In the case of a compressed raw file, extract without decompressing.
In the case of a stage or payload, extract without decompressing or
converting to an ELF.
This can be useful for verifying the integrity of a stage or payload,
since converting to an ELF may not be a deterministic process on
different platforms or coreboot versions.
BUG=b:111577108
TEST=USE=cb_legacy_tianocore emerge-eve edk2 coreboot-utils chromeos-bootimage
cd /build/eve/firmware
/build/eve/usr/bin/cbfstool image.bin extract -r RW_LEGACY \
-n payload -f /tmp/payload_1 -U
START=$((16#`xxd -s 20 -l 4 -p tianocore.cbfs`))
SIZE=$((16#`xxd -s 8 -l 4 -p tianocore.cbfs`))
dd if=tianocore.cbfs skip=$START count=$SIZE bs=1 > /tmp/payload_2
diff /tmp/payload_1 /tmp/payload_2
rm /tmp/payload_1 /tmp/payload_2
Change-Id: I351d471d699daedd51adf4a860661877f25607e6
Signed-off-by: Joel Kitching <kitching@chromium.org>
Reviewed-on: https://review.coreboot.org/29616
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'util/testing')
0 files changed, 0 insertions, 0 deletions