summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image/Makefile
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-19 15:36:13 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-19 15:36:13 +0000
commitdf4fde55c55063d1902f17fc3bf679a59c093a4a (patch)
tree7c5fc3a653a6eed1a4b8d3ccc399413151783646 /target/linux/ramips/image/Makefile
parent642826aa78dbc35094e07e8ef247c89ad4a763ad (diff)
ramips: use MkImage for Hauppauge Broadway, Netcore NW718 and Tenda W306R V2.0
These targets need custom image names specified in the uImage header. MkImage accepts an optional 4th argument to do exactly that. Reuse the facility to generate factory images. Compile-tested, the generated files inspected with "file" utility. [juhosg: - keep the factory.bin images to avoid users confusion, - use GENERIC_4M template for the W306R V2.0 - update commit log] Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35243 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/image/Makefile')
-rw-r--r--target/linux/ramips/image/Makefile26
1 files changed, 3 insertions, 23 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 1c86b9c46..bf64b7669 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -168,11 +168,8 @@ mtdlayout_broadway=192k(bootloader)ro,64k(config)ro,64k(factory)ro,1024k(kernel)
mtd_broadway_kernel_part_size=1048576
mtd_broadway_rootfs_part_size=6881280
define BuildFirmware/BROADWAY
+ $(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_broadway)),$(mtd_broadway_kernel_part_size),$(mtd_broadway_rootfs_part_size),Broadway Kernel Image,factory.bin)
$(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_broadway)),$(mtd_broadway_kernel_part_size),$(mtd_broadway_rootfs_part_size))
- mkimage -A mips -O linux -T kernel -C lzma $(call kernel_entry)\
- -n 'Broadway Kernel Image' \
- -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage
- $(call CatFiles,$(KDIR)/vmlinux-$(2).uImage,$(mtd_broadway_kernel_part_size),$(KDIR)/root.$(1),$(mtd_broadway_rootfs_part_size),$(call imgname,$(1),$(2))-factory.bin)
endef
define BuildFirmware/BROADWAY/initramfs
@@ -290,13 +287,8 @@ kernel_size_nw718=917504
rootfs_size_nw718=2883584
cmdline_nw718=$(call mkcmdline,NW718,ttyS1,57600) $(call mkmtd/spi,$(mtdlayout_nw718))
define BuildFirmware/NW718
+ $(call BuildFirmware/Generic,$(1),$(2),$(cmdline_nw718),$(kernel_size_nw718),$(rootfs_size_nw718),ARA1B4NCRNW718;1,factory.bin)
$(call BuildFirmware/Generic,$(1),$(2),$(cmdline_nw718),$(kernel_size_nw718),$(rootfs_size_nw718))
- $(call PatchKernelLzma,$(2),$(cmdline_nw718))
- mkimage -A mips -O linux -T kernel -C lzma $(call kernel_entry) \
- -n "ARA1B4NCRNW718;1" \
- -d "$(KDIR)/vmlinux-$(2).bin.lzma" \
- "$(KDIR)/vmlinux-$(2).uImage"
- $(call CatFiles,$(KDIR)/vmlinux-$(2).uImage,$(kernel_size_nw718),$(KDIR)/root.$(1),$(rootfs_size_nw718),$(call imgname,$(1),$(2))-factory.bin)
endef
mtdlayout_rtg32b1=192k(u-boot)ro,64k(devdata)ro,64k(devconf)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware)
@@ -366,18 +358,6 @@ define BuildFirmware/UMedia/initramfs
$(call BuildFirmware/GENERIC_8M/initramfs,$(1),$(2),$(3),ttyS1,57600,phys)
endef
-define BuildFirmware/W306R_4M
- $(call BuildFirmware/w306r,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_4M)),917504,2949120)
-endef
-
-define BuildFirmware/w306r
- $(call PatchKernelLzma,$(2),$(3))
- mkimage -A mips -O linux -T kernel -C lzma $(call kernel_entry)\
- -n 'linkn Kernel Image' \
- -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage
- $(call CatFiles,$(KDIR)/vmlinux-$(2).uImage,$(4),$(KDIR)/root.$(1),$(5),$(call imgname,$(1),$(2))-factory.bin)
-endef
-
mtdlayout_whrg300n=192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,960k(kernel),2752k(rootfs),64k(user)ro,3712k@0x50000(firmware)
define BuildFirmware/WHRG300N
$(call Image/Build/Template/GENERIC_4M,$(1),whr-g300n,WHR-G300N,ttyS1,57600,phys)
@@ -600,8 +580,8 @@ define Image/Build/Profile/V22RW2X2
endef
define Image/Build/Profile/W306R_V20
+ $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,w306r-v20,W306R_V20,ttyS1,57600,phys,linkn Kernel Image,factory.bin)
$(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,w306r-v20,W306R_V20,ttyS1,57600,phys)
- $(call Image/Build/Template/$(fs_squash)/$(1),W306R_4M,w306r-v20,W306R_V20,ttyS1,57600,phys)
endef
define Image/Build/Profile/W502U