Add support for AMCC Sequoia PPC440EPx eval board
- Add support for PPC440EPx & PPC440GRx
- Add support for PPC440EP(x)/GR(x) NAND controller
in cpu/ppc4xx directory
- Add NAND boot functionality for Sequoia board,
please see doc/README.nand-boot-ppc440 for details
- This Sequoia NAND image doesn't support environment
in NAND for now. This will be added in a short while.
Patch by Stefan Roese, 07 Sep 2006
diff --git a/Makefile b/Makefile
index fc7b117..a63aaef 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@
#
# U-boot build supports producing a object files to the separate external
# directory. Two use cases are supported:
-#
+#
# 1) Add O= to the make command line
# 'make O=/tmp/build all'
#
@@ -59,12 +59,12 @@
# The second approach can also be used with a MAKEALL script
# 'export BUILD_DIR=/tmp/build'
# './MAKEALL'
-#
+#
# Command line 'O=' setting overrides BUILD_DIR environent variable.
-#
+#
# When none of the above methods is used the local build is performed and
# the object files are placed in the source directory.
-#
+#
ifdef O
ifeq ("$(origin O)", "command line")
@@ -101,7 +101,7 @@
else
obj :=
src :=
-endif
+endif
export obj src
#########################################################################
@@ -214,13 +214,18 @@
post/cpu
.PHONY : $(SUBDIRS)
+ifeq ($(CONFIG_NAND_U_BOOT),y)
+NAND_SPL = nand_spl
+U_BOOT_NAND = $(obj)u-boot-nand.bin
+endif
+
__OBJS := $(subst $(obj),,$(OBJS))
__LIBS := $(subst $(obj),,$(LIBS))
#########################################################################
#########################################################################
-ALL = $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
+ALL = $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND)
all: $(ALL)
@@ -258,6 +263,12 @@
$(SUBDIRS):
$(MAKE) -C $@ all
+$(NAND_SPL): version
+ $(MAKE) -C nand_spl all
+
+$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin
+ cat nand_spl/u-boot-spl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
+
version:
@echo -n "#define U_BOOT_VERSION \"U-Boot " > $(VERSION_FILE); \
echo -n "$(U_BOOT_VERSION)" >> $(VERSION_FILE); \
@@ -309,7 +320,8 @@
#########################################################################
unconfig:
- @rm -f $(obj)include/config.h $(obj)include/config.mk $(obj)board/*/config.tmp
+ @rm -f $(obj)include/config.h $(obj)include/config.mk \
+ $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp
#========================================================================
# PowerPC
@@ -1128,6 +1140,17 @@
sbc405_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx sbc405
+sequoia_config: unconfig
+ @$(MKCONFIG) $(@:_config=) ppc ppc4xx sequoia amcc
+
+sequoia_nand_config: unconfig
+ @ln -s board/amcc/sequoia/Makefile nand_spl/Makefile
+ @echo "#define CONFIG_NAND_U_BOOT" >include/config.h
+ @echo "Compile NAND boot image for sequoia"
+ @$(MKCONFIG) -a sequoia ppc ppc4xx sequoia amcc
+ @echo "TEXT_BASE = 0x01000000" >board/amcc/sequoia/config.tmp
+ @echo "CONFIG_NAND_U_BOOT = y" >> include/config.mk
+
sycamore_config: unconfig
@echo "Configuring for sycamore board as subset of walnut..."
@$(MKCONFIG) -a walnut ppc ppc4xx walnut amcc
@@ -2195,6 +2218,8 @@
rm -f $(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom
rm -f $(obj)board/integratorap/u-boot.lds $(obj)board/integratorcp/u-boot.lds
rm -f $(obj)include/bmp_logo.h
+ find nand_spl -lname "*" -print | xargs rm -f
+ rm -f nand_spl/u-boot-spl nand_spl/u-boot-spl.map
clobber: clean
find $(OBJTREE) -type f \( -name .depend \