From 9e72ea7a006cd0931913dd958746963961479a4a Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 19 Feb 2019 13:10:17 +0100 Subject: images: pbl: verify CONFIG_BAREBOX_MAX_IMAGE_SIZE is not exceeded For platforms such as the at91, the boot ROM imposes an upper limit on barebox file size. Prior to 5a1a5ed253 ("ARM: images: use piggydata"), BAREBOX_MAX_PBLX_SIZE seems to have been the way to go for limiting the size of the final barebox binary when using the PBL. With pblx removed, this variable is of no use, so have the existing BAREBOX_MAX_IMAGE_SIZE replace its functionality. Currently BAREBOX_MAX_IMAGE_SIZE is only checked against in the non-PBL case, so add a check in the PBL case as well. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- images/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'images/Makefile') diff --git a/images/Makefile b/images/Makefile index 4e82dc92ee..59b81f9b6d 100644 --- a/images/Makefile +++ b/images/Makefile @@ -66,6 +66,7 @@ $(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o FORCE $(obj)/%.pblb: $(obj)/%.pbl FORCE $(call if_changed,objcopy_bin,$(*F)) + $(call cmd,check_file_size,$@,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE)) $(obj)/%.s: $(obj)/% FORCE $(call if_changed,disasm) -- cgit v1.2.3