ar71xx: build images for the ALFA Network N2/N5 boards
authorGabor Juhos <juhosg@openwrt.org>
Sun, 1 Jan 2012 19:30:28 +0000 (19:30 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 1 Jan 2012 19:30:28 +0000 (19:30 +0000)
SVN-Revision: 29636

target/linux/ar71xx/generic/profiles/alfa.mk [new file with mode: 0644]
target/linux/ar71xx/image/Makefile

diff --git a/target/linux/ar71xx/generic/profiles/alfa.mk b/target/linux/ar71xx/generic/profiles/alfa.mk
new file mode 100644 (file)
index 0000000..6f56c45
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/ALFANX
+       NAME:=ALFA Network N2/N5 board
+       PACKAGES:=
+endef
+
+define Profile/ALFANX/Description
+       Package set optimized for the ALFA Network N2/N5 boards.
+endef
+
+$(eval $(call Profile,ALFANX))
index 88e6aad129f62d34c9d1afeda7c3a4a0c250344c..ebb1257468dfa4b7ec7ab8af5c965132f5c9f807 100644 (file)
@@ -302,6 +302,24 @@ define Image/Build/Planex
        fi
 endef
 
+define Image/Build/ALFA
+       $(call MkuImageLzma,$(2),$(3) $($(4)))
+       $(call Sysupgrade/RK,$(1),$(2),$(5),$(6))
+       if [ -e "$(call sysupname,$(1),$(2))" ]; then \
+               rm -rf $(KDIR)/$(1); \
+               mkdir -p $(KDIR)/$(1); \
+               cd $(KDIR)/$(1); \
+               cp $(KDIR)/vmlinux-$(2).uImage $(KDIR)/$(1)/vmlinux.gz.uImage; \
+               cp $(KDIR)/root.$(1) $(KDIR)/$(1)/pb9x-2.6.31-jffs2; \
+               $(TAR) zcf $(call factoryname,$(1),$(2)) -C $(KDIR)/$(1) \
+                       vmlinux.gz.uImage pb9x-2.6.31-jffs2; \
+               ( \
+                       echo $(7) | dd bs=32 count=1 conv=sync; \
+                       echo -ne '\xfe'; \
+               ) >> $(call factoryname,$(1),$(2)); \
+       fi
+endef
+
 define Image/Build/TPLINKOLD
        $(call Image/BuildLoaderAlone,$(2),gz,$(3),0x22000,0)
        $(call MkuImageOKLI,$(2))
@@ -564,6 +582,11 @@ define Image/Build/Template/128k/jffs2-128k
        $(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
 endef
 
+alfa_nx_cmdline=board=ALFA-NX console=ttyS0,115200
+alfa_nx_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
+define Image/Build/Profile/ALFANX
+       $(call Image/Build/Template/$(fs_64k)/$(1),ALFA,alfa-nx,$(alfa_nx_cmdline),alfa_nx_mtdlayout,1638400,6291456,WRM7222C)
+endef
 
 ap121_mtdlayout_2M=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware)
 ap121_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware)
@@ -887,6 +910,7 @@ define Image/Build/Profile/ALL0258N
 endef
 
 define Image/Build/Profile/Default
+       $(call Image/Build/Profile/ALFANX,$(1))
        $(call Image/Build/Profile/ALL0258N,$(1))
        $(call Image/Build/Profile/AP121,$(1))
        $(call Image/Build/Profile/AP121MINI,$(1))