From 5c1105d2a149f80386dbaeb6f52af7ccbdc48adc Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 2 Jun 2014 14:56:41 +0000 Subject: [PATCH] ar71xx: add profile and build image for HiWiFi HC6361. Signed-off-by: Yousong Zhou SVN-Revision: 40975 --- .../linux/ar71xx/generic/profiles/hiwifi.mk | 19 +++++++++++++++++++ target/linux/ar71xx/image/Makefile | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 target/linux/ar71xx/generic/profiles/hiwifi.mk diff --git a/target/linux/ar71xx/generic/profiles/hiwifi.mk b/target/linux/ar71xx/generic/profiles/hiwifi.mk new file mode 100644 index 0000000000..5bd247630a --- /dev/null +++ b/target/linux/ar71xx/generic/profiles/hiwifi.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2012-2013 Hiwifi Wireless +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/HIWIFI_HC6361 + NAME:=HiWiFi HC6361 + PACKAGES:= kmod-usb-core kmod-usb2 kmod-usb-storage \ + kmod-crypto-deflate kmod-fs-ext4 kmod-ledtrig-gpio \ + kmod-nls-iso8859-1 e2fsprogs +endef + +define Profile/HIWIFI_HC6361/description + Package set optimized for the HiWiFi HC6361. +endef +$(eval $(call Profile,HIWIFI_HC6361)) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 38f9e72a20..12275570dc 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -269,6 +269,7 @@ ew-dorin_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(fir dlrtdev_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware),64k(caldata)ro,640k(certs),960k(unknown)ro,64k@0x7f0000(caldata_copy) dlrtdev_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7168k(firmware),640k(certs),64k(caldata)ro,64k@0x660000(caldata_orig),6208k@0x50000(firmware_orig) dragino2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro +hiwifi_hc6361_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(bdinfo)ro,1280k(kernel),14848k(rootfs),64k(backup)ro,64k(art)ro,16128k@0x20000(firmware) pb92_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware) planex_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7744k(firmware),128k(art)ro ubntxm_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro @@ -479,6 +480,21 @@ Image/Build/AthLzma/buildkernel=$(call MkuImageLzma,$(2),$(3) $(4)) Image/Build/AthLzma=$(call Image/Build/Ath,$(1),$(2),$(3),$(4),$(5),$(6),$(7)) Image/Build/AthLzma/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(4)) +define MkuImageHiWiFi + # Field ih_name needs to start with "tw150v1" + mkimage -A mips -O linux -T kernel -a 0x80060000 -C $(1) $(2) \ + -e 0x80060000 -n 'tw150v1 MIPS OpenWrt Linux-$(LINUX_VERSION)' \ + -d $(3) $(4) +endef + +define MkuImageLzmaHiWiFi + $(call PatchKernelLzma,$(1),$(2),$(3),$(4)) + $(call MkuImageHiWiFi,lzma,$(5),$(KDIR_TMP)/vmlinux$(4)-$(1).bin.lzma,$(KDIR_TMP)/vmlinux$(4)-$(1).uImage) +endef + +Image/Build/HiWiFi/buildkernel=$(call MkuImageLzmaHiWiFi,$(2),$(3) $(4)) +Image/Build/HiWiFi=$(call Image/Build/Ath,$(1),$(2),$(3),$(4),$(5),$(6),$(7)) +Image/Build/HiWiFi/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(4)) Image/Build/PB4X/buildkernel=$(call PatchKernelLzma,$(2),$(3)) @@ -1051,6 +1067,8 @@ $(eval $(call SingleProfile,CameoAP94,64kraw,DIR825B1,dir-825-b1,DIR-825-B1,ttyS $(eval $(call SingleProfile,CameoAP94,64kraw,TEW673GRU,tew-673gru,TEW-673GRU,ttyS0,115200,$$(cameo_ap94_mtdlayout),$$(cameo_ap94_mtdlayout_fat),01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01)) $(eval $(call SingleProfile,CameoAP94,64kraw,DLRTDEV01,dlrtdev01,DIR-825-B1,ttyS0,115200,$$(dlrtdev_mtdlayout),$$(dlrtdev_mtdlayout_fat),01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00)) +$(eval $(call SingleProfile,HiWiFi,64k,HIWIFI_HC6361,hiwifi-hc6361,HiWiFi-HC6361,ttyATH0,115200,$$(hiwifi_hc6361_mtdlayout),KRuImage)) + $(eval $(call SingleProfile,MyLoader,64k,WP543_2M,wp543,,ttyS0,115200,0x200000,2M)) $(eval $(call SingleProfile,MyLoader,64k,WP543_4M,wp543,,ttyS0,115200,0x400000,4M)) $(eval $(call SingleProfile,MyLoader,64k,WP543_8M,wp543,,ttyS0,115200,0x800000,8M)) -- 2.30.2