diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-08-17 17:56:07 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-08-17 17:56:07 +0000 |
commit | 67e6461ad70d367fbd182911abe384a0b6f68a9a (patch) | |
tree | 867fac867359476865424cf2dd81e44d5069b502 /target/linux/ramips/image | |
parent | 89606b61b1feaf9e9ba5b7344883a6bae30f8485 (diff) | |
download | upstream-67e6461ad70d367fbd182911abe384a0b6f68a9a.tar.gz upstream-67e6461ad70d367fbd182911abe384a0b6f68a9a.tar.bz2 upstream-67e6461ad70d367fbd182911abe384a0b6f68a9a.zip |
ramips: add board alias for the ALL0239-3G
Generate image for the ALL0239-3G which can be flashed through the
chipset-vendor SDK based firmware's web-interface and bootloader.
The bootloader seems to ignore uImage checksum errors, but does complain about
them once the 0xDEADC0DE was replaced by an actual JFFS2 page.
I'm working on implementing fixtrx for uImage in the mtd package to solve this.
Signed-off-by: Daniel Golle <dgolle@allnet.de>
SVN-Revision: 33206
Diffstat (limited to 'target/linux/ramips/image')
-rw-r--r-- | target/linux/ramips/image/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 344186361d..e7f4074786 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -60,6 +60,18 @@ define MkImageLzma $(call MkImage,lzma,$(KDIR)/vmlinux-$(1).bin.lzma,$(KDIR)/vmlinux-$(1).uImage,$(3)) endef +define MkCombineduImage + $(call PatchKernelLzma,$(2),$(3)) + if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt `expr $(4) - 64` ]; then \ + echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \ + else if [ `stat -c%s "$(KDIR)/root.$(1)"` -gt $(5) ]; then \ + echo "Warning: $(KDIR)/root.$(1) is too big"; \ + else \ + ( dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=`expr $(4) - 64` conv=sync ; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/vmlinux-$(2).bin.lzma.combined ; \ + fi ; fi + $(call MkImage,lzma,$(KDIR)/vmlinux-$(2).bin.lzma.combined,$(call sysupname,$(1),$(2)),$(6)) +endef + define CatFiles if [ `stat -c%s "$(1)"` -gt $(2) ]; then \ echo "Warning: $(1) is too big"; \ @@ -125,6 +137,10 @@ define BuildFirmware/GENERIC_8M/initramfs $(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M))) endef +define BuildFirmware/UIMAGE_8M + $(call MkCombineduImage,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M)),$(kernel_size_8M),$(rootfs_size_8M),$(7)) +endef + mtdlayout_edimax_3g6200n=192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2752k(rootfs),128k@0x3e0000(cimage)ro,3648k@0x50000(firmware) define BuildFirmware/3G6200N $(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_edimax_3g6200n)),917504,2818048) @@ -367,6 +383,10 @@ define Image/Build/Profile/3G6200N $(call Image/Build/Template/$(fs_squash)/$(1),3G6200N,3g-6200n,3G-6200N,ttyS1,57600,phys) endef +define Image/Build/Profile/ALL02393G + $(call Image/Build/Template/$(fs_squash)/$(1),UIMAGE_8M,all0239-3g,ALL0239-3G,ttyS1,57600,phys) +endef + define Image/Build/Profile/ALL0256N $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,all0256n,ALL0256N,ttyS1,57600,spi) endef @@ -513,6 +533,7 @@ endef ifeq ($(CONFIG_RALINK_RT305X),y) define Image/Build/Profile/Default $(call Image/Build/Profile/3G6200N,$(1)) + $(call Image/Build/Profile/ALL02393G,$(1)) $(call Image/Build/Profile/ALL0256N,$(1)) $(call Image/Build/Profile/ALL5002,$(1)) $(call Image/Build/Profile/ARGUS_ATP52B,$(1)) |