From: Sascha Hauer Date: Wed, 17 Aug 2011 13:23:46 +0000 (+0100) Subject: ARM: 7021/1: Check for multiple load addresses before building a uImage X-Git-Tag: next-20110913~103^2~1^4~21 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=06733b778792c94f890e9215b25f5190b6c48515;p=karo-tx-linux.git ARM: 7021/1: Check for multiple load addresses before building a uImage uImages need a load address specified. This makes them incompatible with multiple zreladdrs. Catch this error before building an uImage so that we do not end up with broken uImages. The load address can still be specified with LOADADDR= on the command line. Signed-off-by: Sascha Hauer Signed-off-by: Russell King --- diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index a1edfd5a129a..176062ac7f07 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -78,7 +78,16 @@ endif $(obj)/uImage: STARTADDR=$(LOADADDR) +check_for_multiple_loadaddr = \ +if [ $(words $(LOADADDR)) -gt 1 ]; then \ + echo 'multiple load addresses: $(LOADADDR)'; \ + echo 'This is incompatible with uImages'; \ + echo 'Specify LOADADDR on the commandline to build an uImage'; \ + false; \ +fi + $(obj)/uImage: $(obj)/zImage FORCE + @$(check_for_multiple_loadaddr) $(call if_changed,uimage) @echo ' Image $@ is ready'