summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2015-12-19 14:25:14 +0000
committerroot <root@lamia.panaceas.james.local>2015-12-19 14:25:14 +0000
commit9ed232b2cfcbea2faf0cfda2d580fdafd6a0f875 (patch)
tree0f34f0b887c581780a19e2671357b62793526310
parent3c177c70dabf9c4d45dac6c9d5366ce786299e89 (diff)
downloadbootloader-9ed232b2cfcbea2faf0cfda2d580fdafd6a0f875.tar.gz
bootloader-9ed232b2cfcbea2faf0cfda2d580fdafd6a0f875.tar.bz2
bootloader-9ed232b2cfcbea2faf0cfda2d580fdafd6a0f875.zip
replace buildcfe.sh with Makefile
-rwxr-xr-xMakefile30
-rwxr-xr-xbuildcfe.sh21
-rwxr-xr-xcfe/build/broadcom/bcm63xx_rom/Makefile2
3 files changed, 31 insertions, 22 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..fcb9fb3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+TOP=${PWD}
+ROM=cfe/build/broadcom/bcm63xx_rom
+BIN=cfe/build/broadcom/bcm63xx_rom/cfe6328.bin
+TOOLS=${TOP}/uclibc-crosstools-gcc-4.4.2-1/usr/bin/mips-linux-
+
+default: cfe6328.bin cfe6328_ram cfe6328-nvr.bin hostTools/nvramembed
+
+cfe6328-nvr.bin:cfe6328.bin hostTools/nvramembed
+ hostTools/nvramembed -b "TG582N" -n 2 -m 00:11:22:33:44:55 -i cfe6328.bin -o cfe6328-nvr.bin
+
+
+${BIN}:
+ make -C ${ROM} BRCM_CHIP=6328 TOOLS=${TOOLS}
+
+cfe6328.bin:${BIN}
+ cp $< $@
+
+cfe6328_ram:${BIN}
+ cp ${ROM}/../bcm63xx_ram/cfe6328 cfe6328_ram
+
+
+hostTools/nvramembed: hostTools/nvramembed.c shared/opensource/boardparms/bcm963xx/boardparms.c
+ ${CC} -m32 -D _BCM96328_ -I shared/opensource/include/bcm963xx/ -o hostTools/nvramembed hostTools/nvramembed.c shared/opensource/boardparms/bcm963xx/boardparms.c
+
+
+clean:
+ rm -f cfe6328.bin cfe6328_ram cfe6328-nvr.bin
+ make -C ${ROM} clean
+ make -C hostTools clean
+ rm -f hostTools/nvramembed
diff --git a/buildcfe.sh b/buildcfe.sh
deleted file mode 100755
index 654718b..0000000
--- a/buildcfe.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-currdir=`pwd`
-
-#CLEAN
-rm cfe*
-cd cfe/build/broadcom/bcm63xx_rom
-make clean
-
-
-#BUILD
-#USAGE: make BRCM_CHIP=[6328|6362|6368|6816] BLD_NAND=1
-#BLD_NAND=1 <--- build with NAND flash support
-
-make BRCM_CHIP=6328
-#make BRCM_CHIP=6328 BLD_NAND=1
-
-cp cfe6328.bin $currdir
-cp ../bcm63xx_ram/cfe6328 $currdir/cfe6328_ram
-
-
-echo DONE
diff --git a/cfe/build/broadcom/bcm63xx_rom/Makefile b/cfe/build/broadcom/bcm63xx_rom/Makefile
index 819cb21..1277f1d 100755
--- a/cfe/build/broadcom/bcm63xx_rom/Makefile
+++ b/cfe/build/broadcom/bcm63xx_rom/Makefile
@@ -30,7 +30,7 @@ BOOT_DIR = ${ARCH_TOP}/board/$(BOARD)/src
ASM_FILE = flashimg.S
RAM_BUILD = ../bcm63xx_ram
-TOOLS=../../../../uclibc-crosstools-gcc-4.4.2-1/usr/bin/mips-linux-
+#TOOLS=../../../../uclibc-crosstools-gcc-4.4.2-1/usr/bin/mips-linux-
include $(TOP)/arch/mips/board/$(BOARD)/src/rom_cfe.mk