[OpenWrt-Devel] [PATCH] ramips: upgrade: Enable checking of image metadata
Mathias Kresin
dev at kresin.me
Fri Nov 30 06:47:52 EST 2018
29/11/2018 10:36, Petr Štetiar:
> Checking metadata in image before flashing is nice for a good user
> experience and bricking protection as well, so enable it by default for
> all boards but the four legacy ones.
>
> Cc: Mathias Kresin <dev at kresin.me>
> Signed-off-by: Petr Štetiar <ynezz at true.cz>
> ---
> target/linux/ramips/base-files/lib/upgrade/platform.sh | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index e28f066..9f36c47 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -4,6 +4,23 @@
>
> PART_NAME=firmware
>
> +enable_image_metadata_check() {
> + local board=$(board_name)
> +
> + case "$board" in
> + all0239-3g|\
> + dcs-930|\
> + dcs-930l-b1|\
> + wl-341v3)
> + REQUIRE_IMAGE_METADATA=0
> + ;;
> + *)
> + REQUIRE_IMAGE_METADATA=1
> + ;;
> + esac
> +}
> +enable_image_metadata_check
> +
> platform_check_image() {
> local board=$(board_name)
> local magic="$(get_magic_long "$1")"
>
Hey Petr,
I've just send a patch series which drops the remaining legacy images,
enables the image metadata verification for all images and gets rid of
the old image checks.
As long as no one opposes, I would like to go with my patches.
Mathias
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list