ar71xx: image: rework EnGenius ENS202EXT factory image
[openwrt/openwrt.git] / target / linux / ar71xx / image / generic-senao.mk
1 define Build/senao-factory-image
2 mkdir -p $@.senao
3
4 touch $@.senao/FWINFO-OpenWrt-$(REVISION)-$(1)
5 $(CP) $(IMAGE_KERNEL) $@.senao/openwrt-senao-$(1)-uImage-lzma.bin
6 $(CP) $@ $@.senao/openwrt-senao-$(1)-root.squashfs
7
8 $(TAR) -c \
9 --numeric-owner --owner=0 --group=0 --sort=name \
10 $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
11 -C $@.senao . | gzip -9nc > $@
12
13 rm -rf $@.senao
14 endef
15
16
17 define Device/ens202ext
18 DEVICE_TITLE := EnGenius ENS202EXT
19 BOARDNAME := ENS202EXT
20 DEVICE_PACKAGES := rssileds
21 KERNEL_SIZE := 1536k
22 IMAGE_SIZE := 13632k
23 IMAGES += factory.bin
24 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe)ro,64k(art)ro,13632k@0xa0000(firmware)
25 IMAGE/factory.bin := append-rootfs | pad-rootfs | senao-factory-image ens202ext
26 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
27 endef
28 TARGET_DEVICES += ens202ext