ipq40xx: add support for 8devices Jalapeno
[openwrt/openwrt.git] / target / linux / ipq40xx / image / Makefile
1 include $(TOPDIR)/rules.mk
2 include $(INCLUDE_DIR)/image.mk
3
4 define Device/Default
5 PROFILES := Default
6 KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
7 KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
8 KERNEL_PREFIX := $$(IMAGE_PREFIX)
9 KERNEL_LOADADDR := 0x80208000
10 SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
11 IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
12 IMAGE/sysupgrade.bin/squashfs :=
13 endef
14
15 define Device/FitImage
16 KERNEL_SUFFIX := -fit-uImage.itb
17 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
18 KERNEL_NAME := Image
19 endef
20
21 define Device/FitImageLzma
22 KERNEL_SUFFIX := -fit-uImage.itb
23 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
24 KERNEL_NAME := Image
25 endef
26
27 define Device/UbiFit
28 KERNEL_IN_UBI := 1
29 IMAGES := nand-factory.ubi nand-sysupgrade.bin
30 IMAGE/nand-factory.ubi := append-ubi
31 IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
32 endef
33
34
35 define Device/8dev_jalapeno
36 $(call Device/FitImage)
37 $(call Device/UbiFit)
38 DEVICE_DTS := qcom-ipq4018-jalapeno
39 BLOCKSIZE := 128k
40 PAGESIZE := 2048
41 DEVICE_TITLE := 8devices Jalapeno
42 DEVICE_PACKAGES := ath10k-firmware-qca4019
43 endef
44 TARGET_DEVICES += 8dev_jalapeno
45
46 define Device/asus_rt-ac58u
47 $(call Device/FitImageLzma)
48 DEVICE_DTS := qcom-ipq4018-rt-ac58u
49 BLOCKSIZE := 128k
50 PAGESIZE := 2048
51 DTB_SIZE := 65536
52 DEVICE_TITLE := Asus RT-AC58U
53 IMAGE_SIZE := 20439364
54 FILESYSTEMS := squashfs
55 # Someone - in their infinite wisdom - decided to put the firmware
56 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
57 # Since u-boot works with strings we either need another fixup step
58 # to add a version... or we are very careful not to add '\0' into that
59 # string and call it a day.... Yeah, we do the latter!
60 UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
61 IMAGES := sysupgrade.bin
62 DEVICE_PACKAGES := ipq-wifi-asus_rt-ac58u kmod-usb-ledtrig-usbport
63 endef
64 TARGET_DEVICES += asus_rt-ac58u
65
66 define Device/avm_fritzbox-4040
67 $(call Device/FitImageLzma)
68 DEVICE_DTS := qcom-ipq4018-fritz4040
69 BOARD_NAME := fritz4040
70 DEVICE_TITLE := AVM Fritz!Box 4040
71 IMAGE_SIZE := 29753344
72 IMAGES = sysupgrade.bin
73 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
74 DEVICE_PACKAGES := ipq-wifi-avm_fritzbox-4040 fritz-tffs fritz-caldata u-boot-fritz4040
75 endef
76 TARGET_DEVICES += avm_fritzbox-4040
77
78 define Device/compex_wpj428
79 $(call Device/FitImage)
80 DEVICE_DTS := qcom-ipq4028-wpj428
81 DEVICE_DTS_CONFIG := config@4
82 BLOCKSIZE := 64k
83 DEVICE_TITLE := Compex WPJ428
84 IMAGE_SIZE := 31232k
85 KERNEL_SIZE := 4096k
86 IMAGES = sysupgrade.bin
87 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
88 DEVICE_PACKAGES := ath10k-firmware-qca4019 kmod-gpio-beeper
89 endef
90 TARGET_DEVICES += compex_wpj428
91
92 define Device/glinet_gl-b1300
93 $(call Device/FitImage)
94 DEVICE_TITLE := GL.iNet GL-B1300
95 BOARD_NAME := gl-b1300
96 DEVICE_DTS := qcom-ipq4029-gl-b1300
97 KERNEL_SIZE := 4096k
98 IMAGE_SIZE := 26624k
99 IMAGES := sysupgrade.bin
100 IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
101 DEVICE_PACKAGES := ipq-wifi-glinet_gl-b1300
102 endef
103 TARGET_DEVICES += glinet_gl-b1300
104
105 define Device/meraki_mr33
106 $(call Device/FitImage)
107 DEVICE_DTS := qcom-ipq4029-mr33
108 BLOCKSIZE := 131072
109 PAGESIZE := 2048
110 DEVICE_TITLE := Cisco Meraki MR33
111 IMAGES = sysupgrade.bin
112 DEVICE_PACKAGES := -swconfig ipq-wifi-meraki_mr33 ath10k-firmware-qca9887
113 endef
114 TARGET_DEVICES += meraki_mr33
115
116 define Device/openmesh_a42
117 $(call Device/FitImageLzma)
118 DEVICE_DTS := qcom-ipq4018-a42
119 DEVICE_DTS_CONFIG := config@om.a42
120 BLOCKSIZE := 64k
121 DEVICE_TITLE := OpenMesh A42
122 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
123 IMAGE_SIZE := 15616k
124 IMAGES = factory.bin sysupgrade.bin
125 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
126 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
127 DEVICE_PACKAGES := ath10k-firmware-qca4019 uboot-envtools
128 endef
129 TARGET_DEVICES += openmesh_a42
130
131 define Device/qcom_ap-dk01.1-c1
132 DEVICE_TITLE := QCA AP-DK01.1-C1
133 BOARD_NAME := ap-dk01.1-c1
134 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
135 KERNEL_INSTALL := 1
136 KERNEL_SIZE := 4096k
137 IMAGE_SIZE := 26624k
138 $(call Device/FitImage)
139 IMAGES := sysupgrade.bin
140 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
141 DEVICE_PACKAGES := ath10k-firmware-qca4019
142 endef
143 TARGET_DEVICES += qcom_ap-dk01.1-c1
144
145 define Device/qcom_ap-dk04.1-c1
146 $(call Device/FitImage)
147 $(call Device/UbiFit)
148 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
149 KERNEL_INSTALL := 1
150 KERNEL_SIZE := 4048k
151 BLOCKSIZE := 128k
152 PAGESIZE := 2048
153 BOARD_NAME := ap-dk04.1-c1
154 DEVICE_TITLE := QCA AP-DK04.1-C1
155 endef
156 TARGET_DEVICES += qcom_ap-dk04.1-c1
157
158 $(eval $(call BuildImage))