diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2011-04-27 10:27:19 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-04-27 10:27:19 +0200 |
commit | 8f4b5ed938071262638928deaf18552040360f4a (patch) | |
tree | 2352258b6acc18ac31d5480c1706131e98a36241 /target/mips | |
parent | 63c6929d36e5b5802c0983932a3d69e23f330bb5 (diff) | |
parent | 82fe4e6759930f69f6ae08cf85f74ae233c6bab9 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'target/mips')
-rw-r--r-- | target/mips/Makefile | 57 | ||||
-rw-r--r-- | target/mips/sys-available/broadcom-bcm47xx (renamed from target/mips/sys-available/linksys-wrt54g) | 9 | ||||
-rw-r--r-- | target/mips/sys-available/linksys-wrt54gs | 14 |
3 files changed, 59 insertions, 21 deletions
diff --git a/target/mips/Makefile b/target/mips/Makefile index 02eced887..abb98a107 100644 --- a/target/mips/Makefile +++ b/target/mips/Makefile @@ -15,9 +15,40 @@ endif OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id +tools-compile: + $(MAKE) -C ../tools/trx all + $(MAKE) -C ../tools/addpattern all + $(MAKE) -C ../tools/srec2bin all + $(MAKE) -C ../tools/squashfs all + +ifeq ($(ADK_TARGET_SYSTEM_BROADCOM_BCM47XX),y) +kernel-install: tools-compile + ${TARGET_CROSS}objcopy ${OSTRIP} -S ${LINUX_DIR}/vmlinuz.elf \ + ${BUILD_DIR}/${TARGET_KERNEL} + +${BUILD_DIR}/${ROOTFSSQUASHFS}: ${BUILD_DIR}/root.squashfs + ${TARGET_CROSS}objcopy -O binary ${BUILD_DIR}/${TARGET_KERNEL} \ + ${BUILD_DIR}/${TARGET_KERNEL}.bin + gzip -n9 <${BUILD_DIR}/${TARGET_KERNEL}.bin \ + >${BUILD_DIR}/${TARGET_KERNEL}.bin.gz + printf '\0' >>${BUILD_DIR}/${TARGET_KERNEL}.bin.gz + PATH='${TARGET_PATH}' trx -o $@~ -f ${BUILD_DIR}/${TARGET_KERNEL}.bin.gz -a 1024 -f ${BUILD_DIR}/root.squashfs + PATH='${TARGET_PATH}' addpattern -4 ${ADK_TOOLS_ADDPATTERN_ARGS} -g -i $@~ -o $@ +endif + +ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_AG241),y) +kernel-install: tools-compile + ${TARGET_CROSS}objcopy -S -O srec $(KERNEL) $(LINUX_DIR)/vmlinux.srec + PATH='${TARGET_PATH}' srec2bin $(LINUX_DIR)/vmlinux.srec $(LINUX_DIR)/vmlinux.bin + (dd if=/dev/zero bs=16 count=1; cat $(LINUX_DIR)/vmlinux.bin) > $(LINUX_DIR)/vmlinux.tmp + PATH='${TARGET_PATH}' addpattern -p AG3B -b -r 2.0 -i $(LINUX_DIR)/vmlinux.tmp \ + -o $(BUILD_DIR)/$(TARGET_KERNEL) 2>/dev/null +endif + +ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y) kernel-install: - $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) \ - $(TARGET_DIR)/boot/kernel + $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) +endif ifeq ($(ADK_TARGET_FS),nfsroot) imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSUSERTARBALL) @@ -65,3 +96,25 @@ ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y) @echo "PMON> g console=tty no_auto_cmd" endif endif +ifeq ($(ADK_TARGET_FS),cf) +imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSUSERTARBALL) + @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(BIN_DIR)/$(TARGET_KERNEL) + @echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}' + @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSUSERTARBALL)" + @echo "Boot the board via network (tftp+nfsroot) and use adkinstall." + @echo "If you just want to update, use adkupdate." +endif +ifeq ($(ADK_TARGET_FS),squashfs) +imageinstall: kernel-install ${BUILD_DIR}/${ROOTFSSQUASHFS} + @if [ $$($(STATCMD) ${BUILD_DIR}/${ROOTFSSQUASHFS}) -gt 3801088 ];then \ + echo 'Image is too big!'; \ + else \ + ${CP} ${BUILD_DIR}/${ROOTFSSQUASHFS} ${BIN_DIR}/${ROOTFSSQUASHFS}; \ + echo The image file is $(ROOTFSSQUASHFS); \ + echo 'You can flash the image via tftp:'; \ + echo 'tftp 192.168.1.1'; \ + echo 'tftp> binary'; \ + echo "tftp> put $(ROOTFSSQUASHFS) upgrade_code.bin"; \ + fi +endif + diff --git a/target/mips/sys-available/linksys-wrt54g b/target/mips/sys-available/broadcom-bcm47xx index 4a48a2c08..5a8df9df2 100644 --- a/target/mips/sys-available/linksys-wrt54g +++ b/target/mips/sys-available/broadcom-bcm47xx @@ -1,14 +1,13 @@ -config ADK_TARGET_SYSTEM_LINKSYS_WRT54G - bool "Linksys WRT54G" +config ADK_TARGET_SYSTEM_BROADCOM_BCM47XX + bool "Broadcom BCM47XX" select ADK_mips select ADK_little - select ADK_linksys_wrt54g + select ADK_broadcom_bcm47xx select ADK_KERNEL_BCM47XX select ADK_KERNEL_KERNEL_LZMA select ADK_TARGET_WITH_MTD select ADK_TARGET_WITH_SSB select ADK_TARGET_WITH_WATCHDOG help - Linksys WRT54G WLAN router. - (Broadcom BCM47xx platform) + Broadcom BCM47xx systems. diff --git a/target/mips/sys-available/linksys-wrt54gs b/target/mips/sys-available/linksys-wrt54gs deleted file mode 100644 index 0ad417828..000000000 --- a/target/mips/sys-available/linksys-wrt54gs +++ /dev/null @@ -1,14 +0,0 @@ -config ADK_TARGET_SYSTEM_LINKSYS_WRT54GS - bool "Linksys WRT54GS" - select ADK_mips - select ADK_little - select ADK_linksys_wrt54gs - select ADK_KERNEL_BCM47XX - select ADK_KERNEL_KERNEL_LZMA - select ADK_TARGET_WITH_MTD - select ADK_TARGET_WITH_SSB - select ADK_TARGET_WITH_WATCHDOG - help - Linksys WRT54GS WLAN router. - (Broadcom BCM47xx platform) - |