diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2014-04-13 08:29:09 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2014-04-13 08:29:09 +0000 |
commit | 48316a1c91aa92f3130a940359b06a6415e3d5d6 (patch) | |
tree | d93f9f5605a3c59cdc5b9b282fd61b232f82230f /target/linux/ar71xx/image | |
parent | ca99aed1c4f3b2a2b5ba99c6863468204c009e13 (diff) | |
download | master-187ad058-48316a1c91aa92f3130a940359b06a6415e3d5d6.tar.gz master-187ad058-48316a1c91aa92f3130a940359b06a6415e3d5d6.tar.bz2 master-187ad058-48316a1c91aa92f3130a940359b06a6415e3d5d6.zip |
ar71xx: add profile and build image for the ZyXEL NBG6716 board
Signed-off-by: André Valentin <avalentin@marcant.net>
Patchwork: http://patchwork.openwrt.org/patch/5101/
[juhosg: remove the non-existing zyxelnand subtarget specific stuff]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40502 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/image')
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 41 | ||||
-rw-r--r-- | target/linux/ar71xx/image/ubinize-nbg6716.ini | 29 |
2 files changed, 70 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 9295699e31..8234f88eaa 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -285,6 +285,8 @@ wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(ca zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k@0x50000(firmware) mynet_n600_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro,6848k@0x130000(filesystem) +zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k(zyxel_rfsd),2048k(romd),1024k(header),2048k(kernel),-(ubiroot) + define Image/BuildKernel cp $(KDIR)/vmlinux.elf $(VMLINUX).elf @@ -881,6 +883,43 @@ ifdef CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh endif +define Image/Build/ZyXELNAND/buildkernel + $(eval kernelsize=$(call mtdpartsize,kernel,$(5))) + $(call MkuImageLzma,$(2),$(3) $(5) $(6)) + mkdir -p $(KDIR_TMP)/$(2)/image/boot + cp $(KDIR_TMP)/vmlinux-$(2).uImage $(KDIR_TMP)/$(2)/image/boot/vmlinux.lzma.uImage + $(STAGING_DIR_HOST)/bin/mkfs.jffs2 \ + --pad=$(kernelsize) --big-endian --squash-uids -v -e 128KiB \ + -o $(KDIR_TMP)/$(2)-kernel.jffs2 \ + -d $(KDIR_TMP)/$(2)/image \ + 2>&1 1>/dev/null | awk '/^.+$$$$/' + -rm -rf $(KDIR_TMP)/$(2) +endef + +define Image/Build/ZyXELNAND + if [ "$(1)" != "squashfs" ]; then \ + echo Only squashfs is supported; \ + return 0; \ + fi + $(eval firmwaresize=$(call mtdpartsize,firmware,$(4))) + $(eval kernelsize=$(call mtdpartsize,kernel,$(4))) + $(eval imageraw=$(KDIR_TMP)/$(2)-raw.img) + $(CP) $(KDIR)/root.$(1) $(KDIR_TMP)/ubi_root.img + echo -ne '\xde\xad\xc0\xde' > $(KDIR_TMP)/jffs2.eof + $(call ubinize,ubinize-$(2).ini,$(KDIR_TMP),$(KDIR_TMP)/$(2)-root.ubi,128KiB,2048,-E 5) + ( \ + dd if=$(KDIR_TMP)/$(2)-kernel.jffs2; \ + dd if=$(KDIR_TMP)/$(2)-root.ubi \ + ) > $(imageraw) + dd if=$(imageraw) of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory.bin \ + bs=128k conv=sync + ( \ + dd if=$(KDIR_TMP)/$(2)-kernel.jffs2; \ + dd if=$(KDIR)/root.$(1) bs=128k conv=sync \ + ) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.bin +endef + + Image/Build/OpenMesh/buildkernel=$(call MkuImageLzma,$(2)) define Image/Build/OpenMesh @@ -1180,6 +1219,8 @@ ifeq ($(SUBTARGET),nand) $(eval $(call SingleProfile,NetgearNAND,64k,WNDR3700V4,wndr3700v4,WNDR4300,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR3700V4,"",-H 29763948+128+128,wndr4300)) $(eval $(call SingleProfile,NetgearNAND,64k,WNDR4300V1,wndr4300,WNDR4300,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR4300,"",-H 29763948+0+128+128+2x2+3x3,wndr4300)) +$(eval $(call SingleProfile,ZyXELNAND,128k,NBG6716,nbg6716,NBG6716,ttyS0,115200,NBG6716,$$(zyx_nbg6716_mtdlayout),ubi.mtd=ubiroot mem=256M)) + $(eval $(call MultiProfile,WNDR4300,WNDR3700V4 WNDR4300V1)) endif # ifeq ($(SUBTARGET),nand) diff --git a/target/linux/ar71xx/image/ubinize-nbg6716.ini b/target/linux/ar71xx/image/ubinize-nbg6716.ini new file mode 100644 index 0000000000..ec8d7c7fc6 --- /dev/null +++ b/target/linux/ar71xx/image/ubinize-nbg6716.ini @@ -0,0 +1,29 @@ +[rootfs] +# Volume mode (other option is static) +mode=ubi +# Source image +image=ubi_root.img +# Volume ID in UBI image +vol_id=0 +# Allow for dynamic resize +vol_type=dynamic +# Volume name +vol_name=rootfs +# Autoresize volume at first mount +# vol_flags=autoresize +vol_size=40MiB + +[rootfs_data] +# Volume mode (other option is static) +mode=ubi +# Source image +image=jffs2.eof +# Volume ID in UBI image +vol_id=1 +# Allow for dynamic resize +vol_type=dynamic +# Volume name +vol_name=rootfs_data +# Autoresize volume at first mount +vol_size=100MiB +#vol_flags=autoresize |