blob: c11ff6a2574f74e04dd9ce1e5d2155e479e91aad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# attention: only zlib compression is allowed for the boot fs
define Build/zyxel-buildkerneljffs
rm -rf $(KDIR_TMP)/zyxelnbg6716
mkdir -p $(KDIR_TMP)/zyxelnbg6716/image/boot
cp $@ $(KDIR_TMP)/zyxelnbg6716/image/boot/vmlinux.lzma.uImage
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
--big-endian --squash-uids -v -e 128KiB -q -f -n -x lzma -x rtime \
-o $@ \
-d $(KDIR_TMP)/zyxelnbg6716/image
rm -rf $(KDIR_TMP)/zyxelnbg6716
endef
define Build/zyxel-factory
let \
maxsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
let size="$$(stat -c%s $@)"; \
if [ $$size -lt $$maxsize ]; then \
$(STAGING_DIR_HOST)/bin/mkrasimage \
-b $(RAS_BOARD) \
-v $(RAS_VERSION) \
-r $@ \
-s $$maxsize \
-o $@.new \
-l 131072 \
&& mv $@.new $@ ; \
fi
endef
define Device/aerohive_hiveap-121
ATH_SOC := ar9344
DEVICE_VENDOR := Aerohive
DEVICE_MODEL := HiveAP 121
DEVICE_PACKAGES := kmod-usb2
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 116m
KERNEL_SIZE := 5120k
UBINIZE_OPTS := -E 5
SUPPORTED_DEVICES += hiveap-121
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += aerohive_hiveap-121
define Device/glinet_gl-ar300m-nand
ATH_SOC := qca9531
DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-AR300M
DEVICE_VARIANT := NAND
DEVICE_PACKAGES := kmod-usb2 kmod-usb-storage kmod-usb-ledtrig-usbport
KERNEL_SIZE := 2048k
BLOCKSIZE := 128k
PAGESIZE := 2048
VID_HDR_OFFSET := 512
IMAGES += factory.ubi
IMAGE/sysupgrade.bin := sysupgrade-tar
IMAGE/factory.ubi := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
endef
TARGET_DEVICES += glinet_gl-ar300m-nand
define Device/zyxel_nbg6716
ATH_SOC := qca9558
DEVICE_VENDOR := ZyXEL
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
RAS_BOARD := NBG6716
RAS_ROOTFS_SIZE := 29696k
RAS_VERSION := "OpenWrt Linux-$(LINUX_VERSION)"
KERNEL_SIZE := 4096k
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL := kernel-bin | append-dtb | uImage none | \
zyxel-buildkerneljffs | check-size 4096k
IMAGES := sysupgrade.tar sysupgrade-4M-Kernel.bin factory.bin
IMAGE/sysupgrade.tar/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata
IMAGE/sysupgrade-4M-Kernel.bin/squashfs := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to 263192576 | gzip
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | zyxel-factory
UBINIZE_OPTS := -E 5
endef
TARGET_DEVICES += zyxel_nbg6716
DEVICE_VARS += RAS_ROOTFS_SIZE RAS_BOARD RAS_VERSION
|