8f9234901ad09fc7b31413cd5cdd58b00137b5ac
[openwrt/openwrt.git] / target / linux / ar71xx / image / mikrotik.mk
1 define Device/mikrotik
2 PROFILES := Default
3 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
4 BOARD_NAME := routerboard
5 LOADER_TYPE := elf
6 KERNEL_NAME := vmlinux.bin.lzma
7 KERNEL := kernel-bin | loader-kernel
8 KERNEL_INITRAMFS_NAME := vmlinux-initramfs.bin.lzma
9 MIKROTIK_CHUNKSIZE :=
10 IMAGE/sysupgrade.bin/squashfs :=
11 endef
12 DEVICE_VARS += MIKROTIK_CHUNKSIZE
13
14 define Device/mikrotik-nand
15 $(Device/mikrotik)
16 IMAGE/sysupgrade.bin/squashfs = append-kernel | \
17 kernel2minor -s $$(MIKROTIK_CHUNKSIZE) -e -c | sysupgrade-tar kernel=$$$$@
18 endef
19
20 define Device/nand-64m
21 $(Device/mikrotik-nand)
22 MIKROTIK_CHUNKSIZE := 512
23 DEVICE_TITLE := MikroTik RouterBoard (64 MB NAND)
24 endef
25 TARGET_DEVICES += nand-64m
26
27 define Device/nand-large
28 $(Device/mikrotik-nand)
29 MIKROTIK_CHUNKSIZE := 2048
30 DEVICE_TITLE := MikroTik RouterBoard (>= 128 MB NAND)
31 endef
32 TARGET_DEVICES += nand-large
33
34 define Device/nand-large-ac
35 $(Device/mikrotik-nand)
36 MIKROTIK_CHUNKSIZE := 2048
37 DEVICE_TITLE := MikroTik RouterBoard (>= 128 MB NAND, 802.11ac)
38 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
39 SUPPORTED_DEVICES := rb-921gs-5hpacd-r2
40 endef
41 TARGET_DEVICES += nand-large-ac
42
43 define Device/rb-nor-flash-16M
44 $(Device/mikrotik)
45 DEVICE_TITLE := MikroTik RouterBoard (16 MB SPI NOR)
46 DEVICE_PACKAGES := rbcfg rssileds -nand-utils kmod-ledtrig-gpio
47 IMAGE_SIZE := 16000k
48 KERNEL_INSTALL := 1
49 SUPPORTED_DEVICES := rb-750-r2 rb-750up-r2 rb-750p-pbr2 rb-911-2hn rb-911-5hn rb-931-2nd rb-941-2nd rb-951ui-2nd rb-952ui-5ac2nd rb-962uigs-5hact2hnt rb-lhg-5nd rb-map-2nd rb-mapl-2nd rb-wap-2nd rb-wapr-2nd
50 IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | pad-to $$$$(BLOCKSIZE) | \
51 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
52 endef
53 TARGET_DEVICES += rb-nor-flash-16M
54
55 define Device/rb-nor-flash-16M-ac
56 $(Device/rb-nor-flash-16M)
57 DEVICE_TITLE := MikroTik RouterBoard (16 MB SPI NOR, 802.11ac)
58 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct ath10k-firmware-qca9887-ct kmod-usb-ehci
59 SUPPORTED_DEVICES += rb-wapg-5hact2hnd
60 endef
61 TARGET_DEVICES += rb-nor-flash-16M-ac