aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-04-26 18:27:58 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-04-26 18:27:58 +0000
commit74b79f32db3c69a13021d14cc9602cba38c9cbe5 (patch)
tree7cde7e2eb4b3c6efa19edd7e41245aae3d6741be
parent6e8078fb7fd698511ef3365c1641ad00be69fab9 (diff)
downloadupstream-74b79f32db3c69a13021d14cc9602cba38c9cbe5.tar.gz
upstream-74b79f32db3c69a13021d14cc9602cba38c9cbe5.tar.bz2
upstream-74b79f32db3c69a13021d14cc9602cba38c9cbe5.zip
ar71xx: build different firmware images for the DIR-825-Bx boards
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21171 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar71xx/image/Makefile28
1 files changed, 21 insertions, 7 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index adb4002de3..42d67ca838 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -90,17 +90,31 @@ endef
dir825b1_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,1600k(unknown)ro,6208k@0x50000(firmware)
define Image/Build/DIR825B1
$(call PatchKernelLzma,$(2),$(3) $(dir825b1_mtdlayout))
- $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(call imgname,$(1),$(2)).bin)
- if [ `stat -c%s "$(call imgname,$(1),$(2)).bin"` -gt 1048576 ]; then \
+ if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 1048576 ]; then \
echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
- rm -f $(call imgname,$(1),$(2)).bin; \
else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 5308416 ]; then \
echo "Warning: $(KDIR)/root.$(1) is too big"; \
- rm -f $(call imgname,$(1),$(2)).bin; \
else \
- dd if=$(KDIR)/root.$(1) of=$(call imgname,$(1),$(2)).bin bs=1k seek=1024; \
- cp $(call imgname,$(1),$(2)).bin $(call imgname,$(1),$(2))-backup-loader.bin; \
- echo -n "01AP94-AR7161-RT-080619-00" >> $(call imgname,$(1),$(2))-backup-loader.bin; \
+ mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
+ 0x80060000 \
+ -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
+ -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
+ ( \
+ dd if=$(KDIR)/vmlinux-$(2).uImage bs=1024k conv=sync; \
+ dd if=$(KDIR)/root.$(1) \
+ ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+ ( \
+ dd if=$(call imgname,$(1),$(2))-sysupgrade.bin; \
+ echo -n "01AP94-AR7161-RT-080619-00"; \
+ ) > $(call imgname,$(1),$(2))-backup-loader.bin; \
+ if [ `stat -c%s $(call imgname,$(1),$(2))-sysupgrade.bin` -gt 4194304 ]; then \
+ echo "Warning: $(call imgname,$(1),$(2))-sysupgrade.bin is too big"; \
+ else \
+ ( \
+ dd if=$(call imgname,$(1),$(2))-sysupgrade.bin bs=4096k conv=sync; \
+ echo -n "00AP94-AR7161-RT-080619-00"; \
+ ) > $(call imgname,$(1),$(2))-factory.bin; \
+ fi; \
fi; fi
endef