dbb7b69f94735ffe148e851fabd7d2b837f47532
[openwrt/openwrt.git] / target / linux / ar71xx / image / generic-senao.mk
1 define Build/senao-factory-image
2 $(eval board=$(word 1,$(1)))
3 $(eval rootfs=$(word 2,$(1)))
4
5 mkdir -p $@.senao
6
7 touch $@.senao/FWINFO-OpenWrt-$(REVISION)-$(board)
8 $(CP) $(IMAGE_KERNEL) $@.senao/openwrt-senao-$(board)-uImage-lzma.bin
9 $(CP) $(rootfs) $@.senao/openwrt-senao-$(board)-root.squashfs
10
11 $(TAR) -c \
12 --numeric-owner --owner=0 --group=0 --sort=name \
13 $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
14 -C $@.senao . | gzip -9nc > $@
15
16 rm -rf $@.senao
17 endef
18
19
20 define Device/ens202ext
21 DEVICE_TITLE := EnGenius ENS202EXT
22 BOARDNAME := ENS202EXT
23 DEVICE_PACKAGES := rssileds
24 KERNEL_SIZE := 1536k
25 IMAGE_SIZE := 13632k
26 IMAGES += factory.bin
27 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)
28 IMAGE/factory.bin/squashfs := append-rootfs | pad-rootfs | senao-factory-image ens202ext $$$$@
29 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
30 endef
31 TARGET_DEVICES += ens202ext