Commit cd227fbffa9e971ee80065de772d3201c73e1670

Authored by Sascha Hauer
Committed by Russell King
1 parent 60aac93283

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 <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff

arch/arm/boot/Makefile
... ... @@ -78,7 +78,16 @@
78 78  
79 79 $(obj)/uImage: STARTADDR=$(LOADADDR)
80 80  
  81 +check_for_multiple_loadaddr = \
  82 +if [ $(words $(LOADADDR)) -gt 1 ]; then \
  83 + echo 'multiple load addresses: $(LOADADDR)'; \
  84 + echo 'This is incompatible with uImages'; \
  85 + echo 'Specify LOADADDR on the commandline to build an uImage'; \
  86 + false; \
  87 +fi
  88 +
81 89 $(obj)/uImage: $(obj)/zImage FORCE
  90 + @$(check_for_multiple_loadaddr)
82 91 $(call if_changed,uimage)
83 92 @echo ' Image $@ is ready'
84 93