Skip to contentSkip to conversation

Fix NAND_SPL and ONENAND_IPL in Makefile

PATCH New Haiying.Wang at freescale.com 2 participants 3 messages Jan 27, 2011 – Mar 16, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix NAND_SPL and ONENAND_IPL in Makefile

From: Haiying Wang <[email protected]>

---
 Makefile |   30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)
Makefile +14 -16
index 5f93646..0d1ea5d 100644
@@ -287,17 +287,6 @@ LDPPFLAGS += \
 	$(shell $(LD) --version | \
 	  sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
 
-ifeq ($(CONFIG_NAND_U_BOOT),y)
-NAND_SPL = nand_spl
-U_BOOT_NAND = $(obj)u-boot-nand.bin
-endif
-
-ifeq ($(CONFIG_ONENAND_U_BOOT),y)
-ONENAND_IPL = onenand_ipl
-U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
-ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
-endif
-
 __OBJS := $(subst $(obj),,$(OBJS))
 __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
 
@@ -320,7 +309,16 @@ BOARD_SIZE_CHECK =
 endif
 
 # Always append ALL so that arch config.mk's can add custom ones
-ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
+ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
+
+ifeq ($(CONFIG_NAND_U_BOOT),y)
+ALL += $(obj)u-boot-nand.bin
+endif
+
+ifeq ($(CONFIG_ONENAND_U_BOOT),y)
+ALL += $(obj)u-boot-onenand.bin
+ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
+endif
 
 all:		$(ALL)
 
@@ -401,16 +399,16 @@ $(LDSCRIPT):	depend
 $(obj)u-boot.lds: $(LDSCRIPT)
 		$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
-$(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
+nand_spl:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
-$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin
+$(obj)u-boot-nand.bin:	nand_spl $(obj)u-boot.bin
 		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
 
-$(ONENAND_IPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+onenand_ipl:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
 
-$(U_BOOT_ONENAND):	$(ONENAND_IPL) $(obj)u-boot.bin
+$(obj)u-boot-onenand.bin:	onenand_ipl $(obj)u-boot.bin
 		cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
 
 $(VERSION_FILE):
Signature · 1 line
1.7.3.1.50.g1e633
#1 lore raw

PATCH 1/1 Fix NAND_SPL and ONENAND_IPL in Makefile

Dear Wolfgang,

Quoted 60 lines · Haiying.Wang at freescale.com

From: Haiying Wang <[email protected]>

---
 Makefile |   30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)
Makefile +12 -14
index 5f93646..0d1ea5d 100644
@@ -287,17 +287,6 @@ LDPPFLAGS += \
 	$(shell $(LD) --version | \
 	  sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
 
-ifeq ($(CONFIG_NAND_U_BOOT),y)
-NAND_SPL = nand_spl
-U_BOOT_NAND = $(obj)u-boot-nand.bin
-endif
-
-ifeq ($(CONFIG_ONENAND_U_BOOT),y)
-ONENAND_IPL = onenand_ipl
-U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
-ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
-endif
-
 __OBJS := $(subst $(obj),,$(OBJS))
 __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
 
@@ -320,7 +309,16 @@ BOARD_SIZE_CHECK =
 endif
 
 # Always append ALL so that arch config.mk's can add custom ones
-ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
+ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
+
+ifeq ($(CONFIG_NAND_U_BOOT),y)
+ALL += $(obj)u-boot-nand.bin
+endif
+
+ifeq ($(CONFIG_ONENAND_U_BOOT),y)
+ALL += $(obj)u-boot-onenand.bin
+ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
+endif
 
 all:		$(ALL)
 
@@ -401,16 +399,16 @@ $(LDSCRIPT):	depend
 $(obj)u-boot.lds: $(LDSCRIPT)
 		$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
-$(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
+nand_spl:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
-$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin
+$(obj)u-boot-nand.bin:	nand_spl $(obj)u-boot.bin
 		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin

Makefile $(LDSCRIPT): depend · line 414

Quoted 10 lines
Makefile +2 -2
 
-$(ONENAND_IPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+onenand_ipl:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
 
-$(U_BOOT_ONENAND):	$(ONENAND_IPL) $(obj)u-boot.bin
+$(obj)u-boot-onenand.bin:	onenand_ipl $(obj)u-boot.bin
 		cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
 
 $(VERSION_FILE):

Do you have any comments on this patch? Based on your reply at
http://lists.denx.de/pipermail/u-boot/2011-January/086285.html , I added the changes for ONENAND_IPL as well.

Thanks.

Haiying

#2 lore raw

PATCH 1/1 Fix NAND_SPL and ONENAND_IPL in Makefile

In reply to Haiying.Wang at freescale.com
Quoted 4 lines · On Thu, 27 Jan 2011 09:44:59 -0500 <[email protected]> wrote:

From: Haiying Wang <[email protected]>

Applied to u-boot-nand-flash next, except:

Makefile $(LDSCRIPT): depend · line 403

Quoted 3 lines

-$(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) depend

Makefile +1 -0
+nand_spl:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C nand_spl/board/$(BOARDDIR) all

You're reverting commit f0fee6a6469509a6cf1df88a81a73735f74b5a5d here.

I've dropped that bit.

Makefile $(LDSCRIPT): depend · line 409

Quoted 3 lines

-$(ONENAND_IPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk

Makefile +1 -0
+onenand_ipl:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all

I wonder if this should be "depend" as well?

-Scott