diff mbox

[v4,2/4] ARM: make mach-xyz/Makefile.boot optional for !ARCH_MULTIPLATFORM

Message ID 1383562853-17202-2-git-send-email-u.kleine-koenig@pengutronix.de
State New
Headers show

Commit Message

Uwe Kleine-König Nov. 4, 2013, 11 a.m. UTC
Makefile.boot is supposed to define zreladdr-y, params_phys-y and
initrd_phys-y. The first one is only needed in the absence of AUTO_ZRELADDR
and when building a zImage. The latters are only needed for bootp stuff.
So ignore errors on including Makefile.boot and error out in the targets
that need the corresponding settings.

This makes it unnecessary to create dummy Makefile.boot files.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/arm/boot/Makefile | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Olof Johansson Nov. 11, 2013, 7:35 p.m. UTC | #1
On Mon, Nov 04, 2013 at 12:00:51PM +0100, Uwe Kleine-König wrote:
> Makefile.boot is supposed to define zreladdr-y, params_phys-y and
> initrd_phys-y. The first one is only needed in the absence of AUTO_ZRELADDR
> and when building a zImage. The latters are only needed for bootp stuff.
> So ignore errors on including Makefile.boot and error out in the targets
> that need the corresponding settings.
> 
> This makes it unnecessary to create dummy Makefile.boot files.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Olof Johansson <olof@lixom.net>

Please send it to Russell's patch tracker.


-Olof
Uwe Kleine-König Jan. 30, 2015, 9:32 a.m. UTC | #2
Hello Olof, hello Russell,

On Mon, Nov 11, 2013 at 11:35:26AM -0800, Olof Johansson wrote:
> On Mon, Nov 04, 2013 at 12:00:51PM +0100, Uwe Kleine-König wrote:
> > Makefile.boot is supposed to define zreladdr-y, params_phys-y and
> > initrd_phys-y. The first one is only needed in the absence of AUTO_ZRELADDR
> > and when building a zImage. The latters are only needed for bootp stuff.
> > So ignore errors on including Makefile.boot and error out in the targets
> > that need the corresponding settings.
> > 
> > This makes it unnecessary to create dummy Makefile.boot files.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Acked-by: Olof Johansson <olof@lixom.net>
> 
> Please send it to Russell's patch tracker.
I did that and it waits for being applied there since November 2013.

Russell, is there a problem with the patch?

Having this patch would allow to get rid of
arch/arm/mach-efm32/Makefile.boot.

Thanks
Uwe
diff mbox

Patch

diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index 84aa2ca..44203b3 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -12,7 +12,7 @@ 
 #
 
 ifneq ($(MACHINE),)
-include $(srctree)/$(MACHINE)/Makefile.boot
+sinclude $(srctree)/$(MACHINE)/Makefile.boot
 endif
 
 # Note: the following conditions must always be true:
@@ -51,10 +51,19 @@  $(obj)/Image: vmlinux FORCE
 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
 	$(Q)$(MAKE) $(build)=$(obj)/compressed $@
 
+ifneq ($(CONFIG_AUTO_ZRELADDR)$(ZRELADDR),)
+
 $(obj)/zImage:	$(obj)/compressed/vmlinux FORCE
 	$(call if_changed,objcopy)
 	@$(kecho) '  Kernel: $@ is ready'
 
+else
+
+$(obj)/zImage: FORCE
+	@echo 'Either enable CONFIG_AUTO_ZRELADDR or provide zreladdr-y in Makefile.boot'
+	@false
+
+endif
 endif
 
 ifneq ($(LOADADDR),)
@@ -81,6 +90,8 @@  $(obj)/uImage:	$(obj)/zImage FORCE
 	@$(kecho) '  Image $@ is ready'
 
 $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
+	@test -n "$(PARAMS_PHYS)" || \
+	(echo This machine does not support BOOTP; exit -1)
 	$(Q)$(MAKE) $(build)=$(obj)/bootp $@
 	@: