summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-31 22:53:47 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-31 22:53:47 +0000
commit269c6430d734fa76d87a04c9df85ae8a4dcab03b (patch)
treeb89a8501190ecec9802608bb6eaaf925521d2ba0 /target
parent165010d573b7ce7c19c7cce90d25b135509a47d7 (diff)
ar71xx: build images for the AP121 boards
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27070 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/image/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index a4ea554e8..f13be29dc 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -276,6 +276,28 @@ define Image/Build/DB120
fi
endef
+define Image/Build/AP121
+ $(call PatchKernelLzma,$(2),$(3) $($(4)))
+ $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage)
+ if [ `stat -c%s $(KDIR)/vmlinux-$(2).uImage` -gt $(5) ]; then \
+ echo "Warning: $(KDIR)/vmlinux-$(2).uImage is too big"; \
+ elif [ `stat -c%s $(BIN_DIR)/$(IMG_PREFIX)-root.$(1)` -gt $(6) ]; then \
+ echo "Warning: $(KDIR)/root.$(1) is too big"; \
+ else \
+ cp $(KDIR)/vmlinux-$(2).uImage $(call imgname,kernel,$(2)).bin; \
+ cp $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) $(call imgname,$(1),$(2)-rootfs).bin; \
+ ( \
+ dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=$(6) conv=sync; \
+ dd if=$(KDIR)/vmlinux-$(2).uImage; \
+ ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+ fi
+endef
+
+define Image/Build/AP121/initramfs
+ $(call PatchKernelLzma,$(2),$(3) $($(4)))
+ $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(call imgname,$(1),$(2))-uImage.bin)
+endef
+
define Image/Build/MyLoader
-$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(3) \
-p0x030000:0xe0000:al:0x80060000:kernel:$(KDIR)/vmlinux.bin.lzma \
@@ -497,6 +519,18 @@ define Image/Build/Template/128k/jffs2-128k
$(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
+ap121_cmdline=board=AP121 console=ttyATH0,115200
+ap121_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware)
+define Image/Build/Profile/AP121
+ $(call Image/Build/Template/$(fs_4k)/$(1),AP121,ap121,$(ap121_cmdline),ap121_mtdlayout,720896,1245184)
+endef
+
+ap121_mini_cmdline=board=AP121-MINI console=ttyATH0,115200
+ap121_mini_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)
+define Image/Build/Profile/AP121MINI
+ $(call Image/Build/Template/$(fs_4k)/$(1),AP121,ap121-mini,$(ap121_mini_cmdline),ap121_mini_mtdlayout,917504,2818048)
+endef
+
ap81_cmdline=board=AP81 console=ttyS0,115200
define Image/Build/Profile/AP81
$(call Image/Build/Template/$(fs_64k)/$(1),AP83,ap81,$(ap81_cmdline))
@@ -757,6 +791,8 @@ define Image/Build/Profile/ZCN1523H516
endef
define Image/Build/Profile/Default
+ $(call Image/Build/Profile/AP121,$(1))
+ $(call Image/Build/Profile/AP121MINI,$(1))
$(call Image/Build/Profile/AP81,$(1))
$(call Image/Build/Profile/AP83,$(1))
$(call Image/Build/Profile/A02RBW300N,$(1))