[OpenWrt-Devel] [PATCH] image: ignore usign build errors

Felix Fietkau nbd at nbd.name
Fri Oct 5 06:09:56 EDT 2018


On 2018-10-02 22:50, Hauke Mehrtens wrote:
> The tl-wa850re-v2 images from the ar71xx/tiny target are getting too big
> with the default packages. The size check is done before the meta data
> is added so there is no file to add meta data to or to sign. Originally
> errors in Build/append-metadata were getting ignored, but if the signing
> fails the error is not ignored.
> This patch makes make ignore errors in the signing which is the case for
> too big images because then the needed file is not created in the
> previous process.
> 
> Fixes: 848b455d2e94 ("image: use ucert to append signature")
> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
>  include/image-commands.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/image-commands.mk b/include/image-commands.mk
> index ae01706b14..9f5876bccd 100644
> --- a/include/image-commands.mk
> +++ b/include/image-commands.mk
> @@ -332,7 +332,7 @@ metadata_json = \
>  
>  define Build/append-metadata
>  	$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
> -	[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" ] || { \
> +	-[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" ] || { \

How about this instead?

[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || ...

- Felix

_______________________________________________
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