[ramips] D-Link DAP-1350 initial support
[openwrt/svn-archive/archive.git] / target / linux / ramips / image / Makefile
index 1330fa318b2331d9f16030b7b843fdf7c5c684e3..5675201bceca7ffdfc083621f7116285a19c5fe1 100644 (file)
@@ -124,6 +124,20 @@ define BuildFirmware/GENERIC_8M/initramfs
        $(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M)))
 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)
+endef
+
+mtdlayout_allnet_all5002=192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,1024k(kernel),31424k(rootfs),32448k@0x50000(firmware)
+define BuildFirmware/ALL5002
+       $(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_allnet_all5002)),1048576,32178176)
+endef
+
+define BuildFirmware/ALL5002/initramfs
+       $(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_allnet_all5002)))
+endef
+
 mtdlayout_argus_atp52b=192k(bootloader)ro,64k(config),64k(factory),1152k(kernel),6656k(rootfs),7808k@0x50000(firmware)
 mtd_argus_atp52b_kernel_part_size=1179648
 mtd_argus_atp52b_rootfs_part_size=6815744
@@ -158,14 +172,28 @@ mtdlayout_dir300b1=192k(u-boot)ro,64k(devdata)ro,64k(devconf)ro,896k(kernel),288
 mtd_dir300b1_kernel_part_size=917504
 mtd_dir300b1_rootfs_part_size=2949120
 define BuildFirmware/DIR300B1
-       $(call BuildFirmware/Generic,$(1),$(2),board=$(3) $(call mkmtd/phys,$(mtdlayout_dir300b1)),$(mtd_dir300b1_kernel_part_size),$(mtd_dir300b1_rootfs_part_size))
+       $(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),ttyS1,57600) $(call mkmtd/phys,$(mtdlayout_dir300b1)),$(mtd_dir300b1_kernel_part_size),$(mtd_dir300b1_rootfs_part_size))
        mkwrgimg -s $(4) -d /dev/mtdblock/2 \
                -i $(call sysupname,$(1),$(2)) \
                -o $(call imgname,$(1),$(2))-factory.bin
 endef
 
 define BuildFirmware/DIR300B1/initramfs
-       $(call BuildFirmware/Generic/initramfs,$(1),$(2),board=$(3) $(call mkmtd/phys,$(mtdlayout_dir300b1)),$(mtd_dir300b1_kernel_part_size),$(mtd_dir300b1_rootfs_part_size))
+       $(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),ttyS1,57600) $(call mkmtd/phys,$(mtdlayout_dir300b1)),$(mtd_dir300b1_kernel_part_size),$(mtd_dir300b1_rootfs_part_size))
+endef
+
+mtdlayout_dap1350=192k(u-boot)ro,64k(devdata)ro,192k(devconf)ro,256k(devlang)ro,1088k(kernel),6400k(rootfs),7488k@0xb0000(firmware)
+mtd_dap1350_kernel_part_size=1114112
+mtd_dap1350_rootfs_part_size=6553600
+define BuildFirmware/DAP1350
+       $(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),ttyS1,115200) $(call mkmtd/phys,$(mtdlayout_dap1350)),$(mtd_dap1350_kernel_part_size),$(mtd_dap1350_rootfs_part_size))
+       mkdapimg -s $(4) \
+               -i $(call sysupname,$(1),$(2)) \
+               -o $(call imgname,$(1),$(2))-factory.bin
+endef
+
+define BuildFirmware/DAP1350/initramfs
+       $(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),ttyS1,115200) $(call mkmtd/phys,$(mtdlayout_dap1350)),$(mtd_dap1350_kernel_part_size),$(mtd_dap1350_rootfs_part_size))
 endef
 
 define BuildFirmware/Edimax
@@ -220,6 +248,18 @@ define BuildFirmware/RTN10PLUS
        $(call BuildFirmware/Generic,$(1),$(2),board=$(3) $(call mkmtd/phys,$(mtdlayout_rtn10plus)),$(mtd_rtn10plus_kernel_part_size),$(mtd_rtn10plus_rootfs_part_size))
 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)
@@ -300,10 +340,18 @@ endif
 #
 # RT305X Profiles
 #
+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/ALL0256N
        $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,all0256n,ALL0256N,ttyS1,57600,spi)
 endef
 
+define Image/Build/Profile/ALL5002
+       $(call Image/Build/Template/$(fs_squash)/$(1),ALL5002,all5002,ALL5002,ttyS1,57600,spi)
+endef
+
 define Image/Build/Profile/ARGUS_ATP52B
        $(call Image/Build/Template/$(fs_squash)/$(1),ARGUS_ATP52B,argus_atp52b,ARGUS_ATP52B)
 endef
@@ -319,6 +367,10 @@ define Image/Build/Profile/DIR300B1
        $(call Image/Build/Template/$(fs_squash)/$(1),DIR300B1,dir-615-d,DIR-615-D,wrgn23_dlwbr_dir615d)
 endef
 
+define Image/Build/Profile/DAP1350
+       $(call Image/Build/Template/$(fs_squash)/$(1),DAP1350,dap-1350,DAP-1350,RT3052-AP-DAP1350-3)
+endef
+
 define Image/Build/Profile/ESR9753
        $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,esr-9753,ESR-9753,ttyS1,57600,phys)
 endef
@@ -355,6 +407,10 @@ define Image/Build/Profile/OMNIEMB
        $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,omni-emb,OMNI-EMB,ttyS1,57600,phys)
 endef
 
+define Image/Build/Profile/PSR680W
+       $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,psr-680w,PSR-680W,ttyS1,115200,phys)
+endef
+
 define Image/Build/Profile/PWH2004
        $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,pwh2004,PWH2004,ttyS1,57600,phys)
 endef
@@ -377,6 +433,7 @@ endef
 
 define Image/Build/Profile/W306R_V20
        $(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
@@ -395,6 +452,10 @@ define Image/Build/Profile/WL_330N
        $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,wl-330n,WL_330N,ttyS1,57600,spi)
 endef
 
+define Image/Build/Profile/WL_330N3G
+       $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,wl-330n3g,WL_330N3G,ttyS1,57600,spi)
+endef
+
 define Image/Build/Profile/WL341V3
        $(call Image/Build/Template/$(fs_squash)/$(1),WL341V3,wl341v3,WL341V3)
 endef
@@ -408,6 +469,11 @@ define Image/Build/Profile/WR5123GN
        $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,wr512-3gn-8M,WR512-3GN,ttyS1,57600,phys)
 endef
 
+
+define Image/Build/Profile/UPVEL
+       $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,ur-336un,UR-336UN,ttyS1,57600,phys)
+endef
+
 define Image/Build/Profile/WR6202
        $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,wr6202,WR6202,ttyS1,115200,phys)
 endef
@@ -418,10 +484,13 @@ endef
 
 ifeq ($(CONFIG_RALINK_RT305X),y)
 define Image/Build/Profile/Default
+       $(call Image/Build/Profile/3G6200N,$(1))
        $(call Image/Build/Profile/ALL0256N,$(1))
+       $(call Image/Build/Profile/ALL5002,$(1))
        $(call Image/Build/Profile/ARGUS_ATP52B,$(1))
        $(call Image/Build/Profile/BC2,$(1))
        $(call Image/Build/Profile/DIR300B1,$(1))
+       $(call Image/Build/Profile/DAP1350,$(1))
        $(call Image/Build/Profile/ESR9753,$(1))
        $(call Image/Build/Profile/F5D8235V2,$(1))
        $(call Image/Build/Profile/RTN10PLUS,$(1))
@@ -432,6 +501,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/NBG419N,$(1))
        $(call Image/Build/Profile/NW718,$(1))
        $(call Image/Build/Profile/OMNIEMB,$(1))
+       $(call Image/Build/Profile/PSR680W,$(1))
        $(call Image/Build/Profile/PWH2004,$(1))
        $(call Image/Build/Profile/RTG32B1,$(1))
        $(call Image/Build/Profile/SLR7205,$(1))
@@ -441,6 +511,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/WCR150GN,$(1))
        $(call Image/Build/Profile/WHRG300N,$(1))
        $(call Image/Build/Profile/WL_330N,$(1))
+       $(call Image/Build/Profile/WL_330N3G,$(1))
        $(call Image/Build/Profile/WL341V3,$(1))
        $(call Image/Build/Profile/WL351,$(1))
        $(call Image/Build/Profile/WR5123GN,$(1))