1
2CFG_LITTLE ?= 0
3CFG_RELOC ?= 1
4CFG_UNCACHED ?= 0
5CFG_VAPI ?= 0
6CFG_BOOTRAM ?= 0
7CFG_OPTIONS ?=
8CFG_BOARDNAME = "BCM91480B"
9CFG_PCI ?= 1
10CFG_LDT ?= 1
11CFG_L2_RAM ?= 0
12TOP = ../../../cfe
13ARCH = mips
14CPU = bcm1480
15CHIPSET = sibyte
16BOARD = bcm91480b
17
18ifeq ($(strip ${CFG_RELOC}),0)
19  CFG_DATA_START ?= 0x8FE00000
20endif
21
22ifeq ($(strip ${CFG_L2_RAM}),1)
23  CFG_DATA_START = 0x00300000
24  CFG_BOOTRAM = 0
25endif
26
27include ${TOP}/main/cfe.mk
28
29ifeq ($(strip ${CFG_L2_RAM}),1)
30  CFLAGS += -DCFG_L2_RAM=1
31endif
32
33#
34# Don't clean these object files if building bi-endian.
35# To build a clean bi-endian flash image, use "gmake clean cfe-biendian.flash"
36#
37
38ifeq ($(strip ${CFG_BIENDIAN}),0)
39CLEANOBJS += cfe.bin.le cfe.bin.be
40endif
41
42#
43# Uncomment to make things happy under the functional simulator.
44#
45#CFLAGS += -D_FUNCSIM_ -D_FASTEMUL_
46
47#
48# For now, we might do BCM1480 magic at compile time, not at run-time
49# So, define this symbol to say what we're doing.
50#
51CFLAGS += -D_SB14XX_
52CFLAGS += -DSIBYTE_HDR_FEATURES="(SIBYTE_HDR_FMASK_1480_ALL)"
53
54#
55# Main target for normal builds
56#
57
58ALL : cfe cfe.flash
59	echo done
60
61#
62# Special targets for bi-endian builds
63#
64
65cfe.bin.le :
66	${MAKE} clean all CFG_BIENDIAN=1 CFG_LITTLE=1 CFG_RELOC=1
67	cp cfe.bin cfe.bin.le
68
69cfe.bin.be :
70	${MAKE} clean all CFG_BIENDIAN=1 CFG_LITTLE=0 CFG_RELOC=1
71	cp cfe.bin cfe.bin.be
72
73biend : cfe-biendian.flash cfe-biendian.srec
74	echo done
75
76cfe-biendian.flash : cfe.bin.le cfe.bin.be mkflashimage
77	./mkflashimage -v -EX -B ${CFG_BOARDNAME} -V ${CFE_VER_MAJ}.${CFE_VER_MIN}.${CFE_VER_ECO} cfe.bin.be cfe.bin.le cfe-biendian.flash
78
79cfe-biendian.srec : cfe-biendian.flash
80	dd if=cfe-biendian.flash of=cfe-biendian.bin bs=64 skip=1
81	$(OBJCOPY) --input-target=binary --output-target=srec cfe-biendian.bin cfe-biendian.srec
82
83
84include ${TOP}/main/cfe_link.mk
85
86
87