diff --git a/src/make/makestg1 b/src/make/makestg1
index 592c2339d270256d55b82175fb748084c4a4c7ac..622ff112bbf34b4dc8a458c35744771171cc675f 100644 (file)
--- a/src/make/makestg1
+++ b/src/make/makestg1
#*
#* DESCRIPTION: Builds the Intermediate Boot Loader (IBL)
#*
-#* Usage: make c6455 | c6472 | c6474 | c6474l | c6457 [DEBUG=yes] [ETH=no] [NAND=no] \
+#* Usage: make c6455 | c6472 | c6474 | c6457 | c661x [DEBUG=yes] [ETH=no] [NAND=no] \
#* [BIS=no] [COFF=no] [BLOB=no] [ELF=no] [ENDIAN= both | big | little] [I2C_BUS_ADDR= 0x50 | 0x51] \
-#* [COMPACT_I2C=yes]
+#* [COMPACT_I2C=yes] [I2C_SIZE_BYTES=..]
#*******************************************************************************************
-IBLS_C6X= c6455 c6472 c6474 c6474l c6457
+IBLS_C6X= c6455 c6472 c6474 c6474l c6457 c661x
+
# Excluding functions from the build reduces the I2C eeprom memory used and
# speeds the initial boot time. Note that boot table cannot be excluded
endif
endif
-# The i2c ROM bus address. The code will advance accross I2C bus address boundaries (the code must
-# be blocked so that a single block doesn't cross a boundary, however).
-ifndef I2C_BUS_ADDR
- I2C_BUS_ADDR=0x50
+EXCLUDES= $(CEXCLUDES)
+
+
+# The default i2c size. This is used only for the i2c writer utility
+ifndef I2C_SIZE_BYTES
+ I2C_SIZE_BYTES=0x20000
+endif
+
+# exclusions based on device capability
+ifeq ($(TARGET),c6455)
+ C64X_EXCLUDES=yes
endif
+ifeq ($(TARGET),c6457)
+ C64X_EXCLUDES=yes
+endif
+
+ifeq ($(TARGET),c6472)
+ C64X_EXCLUDES=yes
+endif
+
+ifeq ($(TARGET),c6474)
+ C64X_EXCLUDES=yes
+endif
+
+ifeq ($(C64X_EXCLUDES),yes)
+
+ ifeq (,$(findstring SPI, $(EXCLUDES)))
+ EXCLUDES+= SPI
+ endif
+
+ ifeq (,$(findstring NOR_SPI, $(EXCLUDES)))
+ EXCLUDES+= NOR_SPI
+ endif
+
+ ifeq (,$(findstring NOR_EMIF, $(EXCLUDES)))
+ EXCLUDES+= NOR_EMIF
+ endif
+
+ ifeq (,$(findstring NAND_SPI, $(EXCLUDES)))
+ EXCLUDES+= NAND_SPI
+ endif
+
+ ifeq (,$(findstring NAND_EMIF, $(EXCLUDES)))
+ EXCLUDES+= NAND_EMIF
+ endif
+
+endif
+
+ifeq ($(TARGET),c661x)
+ EXCLUDES+= NAND_GPIO
+endif
+
+
+# Prevent I2C/SPI rom creation based on defines
+ROMS=
+
+ifeq (,$(findstring I2C, $(EXCLUDES)))
+ ROMS+= i2crom
+endif
+
+ifeq (,$(findstring SPI, $(EXCLUDES)))
+ ROMS+= spiRom
+endif
+
+
# Excludes identify which components are not part of the build
export EXCLUDES
+.PHONY: all be_target le_target compare $(IBLS_C6X)
+
all:
@echo must specify a target [ $(IBLS_C6X) ]
be_target:
- make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=big I2C_BUS_ADDR=$(I2C_BUS_ADDR) $(TARGET)
+ @echo EXCLUDES= $(EXCLUDES)
+ make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=big I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) SPI_DEFS='$(SPI_DEFS)' utils
+ make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=big I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) SPI_DEFS='$(SPI_DEFS)' $(TARGET)
le_target:
- make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=little I2C_BUS_ADDR=$(I2C_BUS_ADDR) $(TARGET)
+ make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=little I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) SPI_DEFS='$(SPI_DEFS)' utils
+ make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=little I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) SPI_DEFS='$(SPI_DEFS)' $(TARGET)
compare:
make -f makestg2 ARCH=c64x TARGET=$(TARGET) compare
$(IBLS_C6X): $(STAGE1_TARGET)
- make -f makestg2 ARCH=c64x TARGET=$@ I2CROM=$(I2CROM) I2C_BUS_ADDR=$(I2C_BUS_ADDR) COMPACT_I2C=$(COMPACT_I2C) i2cRom
+ make -f makestg2 ARCH=c64x TARGET=$@ I2CROM=$(I2CROM) I2C_BUS_ADDR=$(I2C_BUS_ADDR) I2C_MAP_ADDRESS=$(I2C_MAP_ADDRESS) COMPACT_I2C=$(COMPACT_I2C) SPI_DEFS='$(SPI_DEFS)' $(ROMS)