rockchip: rv1126: make fit: add uncompressed data hash node

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I80545daf9b42c1154a929afc601318d66ad76c86
This commit is contained in:
Joseph Chen 2020-07-27 19:50:52 +08:00
parent 6c625d1e8c
commit 83cb3f6b8a
1 changed files with 18 additions and 0 deletions

View File

@ -8,11 +8,16 @@
# Process args and auto set variables
source ./${srctree}/arch/arm/mach-rockchip/make_fit_args.sh
rm -f ${srctree}/mcu.digest ${srctree}/u-boot-nodtb.digest ${srctree}/tee.digest
if [ "${COMPRESSION}" == "gzip" ]; then
openssl dgst -sha256 -binary -out ${srctree}/u-boot-nodtb.digest ${srctree}/u-boot-nodtb.bin
openssl dgst -sha256 -binary -out ${srctree}/tee.digest ${srctree}/tee.bin
gzip -k -f -9 ${srctree}/u-boot-nodtb.bin
gzip -k -f -9 ${srctree}/tee.bin
SUFFIX=".gz"
else
touch ${srctree}/u-boot-nodtb.digest ${srctree}/tee.digest
COMPRESSION="none"
SUFFIX=
fi
@ -20,6 +25,7 @@ fi
# mcu
if [ ! -z "${MCU_LOAD_ADDR}" ]; then
if [ "${COMPRESSION}" == "gzip" ]; then
openssl dgst -sha256 -binary -out ${srctree}/mcu.digest ${srctree}/mcu.bin
gzip -k -f -9 ${srctree}/mcu.bin
fi
fi
@ -54,6 +60,10 @@ cat << EOF
hash {
algo = "sha256";
};
digest { /* uncompressed data hash */
value = /incbin/("./u-boot-nodtb.digest");
algo = "sha256";
};
};
optee {
description = "OP-TEE";
@ -71,6 +81,10 @@ cat << EOF
hash {
algo = "sha256";
};
digest {
value = /incbin/("./tee.digest");
algo = "sha256";
};
};
fdt {
description = "U-Boot dtb";
@ -99,6 +113,10 @@ cat << EOF
hash {
algo = "sha256";
};
digest {
value = /incbin/("./mcu.digest");
algo = "sha256";
};
};
EOF
fi