Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68133 )
Change subject: util/chromeos/gen_test_hwid.sh: Replace usage of hexdump ......................................................................
util/chromeos/gen_test_hwid.sh: Replace usage of hexdump
Hexdump command is not available in coreboot-sdk. Replace it with equivalent implementation using commands that are present in the container.
TEST=Passed "VP46XX" as prefix variable and it produced the same crc32 result before and after the change.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: Icad93933335b8c5ebd8fee74cc9aaed36bb56482 --- M util/chromeos/gen_test_hwid.sh 1 file changed, 18 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/68133/1
diff --git a/util/chromeos/gen_test_hwid.sh b/util/chromeos/gen_test_hwid.sh index 9dfbce5..5599806 100755 --- a/util/chromeos/gen_test_hwid.sh +++ b/util/chromeos/gen_test_hwid.sh @@ -13,7 +13,7 @@ local prefix="$(echo "${board}" | tr a-z A-Z) TEST" # gzip has second-to-last 4 bytes in CRC32. local crc32="$(printf "${prefix}" | gzip -1 | tail -c 8 | head -c 4 | \ - hexdump -e '1/4 "%04u" ""' | tail -c 4)" + od -An -vtu4 | xargs | tr -d '\n' | tail -c 4)"
echo "${prefix}" "${crc32}" }