]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/make/makestg1
Refix c64x: uart API and null_uart
[keystone-rtos/ibl.git] / src / make / makestg1
1 #*******************************************************************************************
2 #* FILE PURPOSE: Top level make for the IBL
3 #*******************************************************************************************
4 #* FILE NAME: Makefile
5 #*
6 #* DESCRIPTION: Builds the Intermediate Boot Loader (IBL)
7 #*
8 #*  Usage:  make c6455 | c6472 | c6474 | c6457 | c66x [DEBUG=yes] [ETH=no] [NAND=no]  \
9 #*          [BIS=no] [COFF=no] [BLOB=no] [ELF=no] [ENDIAN= both | big | little] [I2C_BUS_ADDR= 0x50 | 0x51] \
10 #*                      [COMPACT_I2C=yes] [I2C_SIZE_BYTES=..]
11 #*******************************************************************************************
13 IBLS_C6X= c6455 c6472 c6474 c6474l c6457 c66x
16 # Excluding functions from the build reduces the I2C eeprom memory used and
17 # speeds the initial boot time. Note that boot table cannot be excluded
18 # because it is required for the two stage I2C load process
20 # The endian of the build. The default target builds a single ROM image with both endians present
21 ifeq ($(ENDIAN_MODE),big)
22  I2CROM=        big_endian
23  STAGE1_TARGET= be_target
24 else
25  ifeq ($(ENDIAN_MODE),little)
26   I2CROM=        little_endian
27   STAGE1_TARGET= le_target
28  else
29   I2CROM=        both
30   STAGE1_TARGET= be_target le_target compare
31  endif
32 endif
34 EXCLUDES= $(CEXCLUDES)
37 # The default i2c size. This is used only for the i2c writer utility
38 ifndef I2C_SIZE_BYTES
39  I2C_SIZE_BYTES=0x20000
40 endif
42 # exclusions based on device capability
43 ifeq ($(TARGET),c6455)
44  C64X_EXCLUDES=yes
45 endif
47 ifeq ($(TARGET),c6457)
48  C64X_EXCLUDES=yes
49 endif
50  
51 ifeq ($(TARGET),c6472)
52  C64X_EXCLUDES=yes
53 endif
55 ifeq ($(TARGET),c6474)
56  C64X_EXCLUDES=yes
57 endif
59 ifeq ($(TARGET),c6474l)
60  C64X_EXCLUDES=yes
61 endif
63 ifeq ($(C64X_EXCLUDES),yes)
65  ifeq (,$(findstring SPI, $(EXCLUDES)))
66   EXCLUDES+= SPI
67  endif
69  ifeq (,$(findstring NOR_SPI, $(EXCLUDES)))
70   EXCLUDES+= NOR_SPI
71  endif
73  ifeq (,$(findstring NOR_EMIF, $(EXCLUDES)))
74   EXCLUDES+= NOR_EMIF
75  endif
77  ifeq (,$(findstring NAND_SPI, $(EXCLUDES)))
78   EXCLUDES+= NAND_SPI
79  endif
81  ifeq (,$(findstring NAND_EMIF, $(EXCLUDES)))
82   EXCLUDES+= NAND_EMIF
83  endif
85 endif
87 # Prevent I2C/SPI rom creation based on defines
88 ROMS=
90 ifeq (,$(findstring I2C, $(EXCLUDES)))
91  ROMS+= i2crom
92 endif
94 ifeq (,$(findstring SPI, $(EXCLUDES)))
95  ROMS+= spiRom
96 endif
99 # Excludes identify which components are not part of the build
100 export EXCLUDES
102 .PHONY: all be_target le_target compare $(IBLS_C6X)
104 all:
105         @echo must specify a target [ $(IBLS_C6X) ]
109 be_target:
110         @echo EXCLUDES= $(EXCLUDES)
111         make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=big    I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) INTERNAL_UTILS=$(INTERNAL_UTILS) SPI_DEFS='$(SPI_DEFS)' utils
112         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)
114 le_target:
115         make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=little I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) INTERNAL_UTILS=$(INTERNAL_UTILS) SPI_DEFS='$(SPI_DEFS)' utils
116         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)
118 compare:
119         make -f makestg2 ARCH=c64x TARGET=$(TARGET) compare
122 $(IBLS_C6X): $(STAGE1_TARGET)
123         make -f makestg2 ARCH=c64x TARGET=$@ I2CROM=$(I2CROM) I2C_BUS_ADDR=$(I2C_BUS_ADDR) I2C_MAP_ADDRESS=$(I2C_MAP_ADDRESS) EVM=$(EVM) COMPACT_I2C=$(COMPACT_I2C) SPI_DEFS='$(SPI_DEFS)' $(ROMS)