difos/target/linux/siflower/sf21/base-files/lib/upgrade/platform.sh
Daniel Golle 29ec74b8c7 treewide: validate unified uImage.FIT images before flashing
Prevent flashing truncated or otherwise corrupted uImage.FIT images
by verifying checksums and hashes of all sub-images before flashing
using the newly packaged fit_check_sign tool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-04-21 16:12:42 +01:00

32 lines
413 B
Bash

REQUIRE_IMAGE_METADATA=1
RAMFS_COPY_BIN='fitblk fit_check_sign'
platform_do_upgrade() {
local board=$(board_name)
case "$board" in
bananapi,bpi-rv2-nand)
fit_do_upgrade "$1"
;;
*)
default_do_upgrade "$1"
;;
esac
}
PART_NAME=firmware
platform_check_image() {
local board=$(board_name)
[ "$#" -gt 1 ] && return 1
case "$board" in
*)
fit_check_image "$1"
return $?
;;
esac
return 0
}