ipq-wifi: drop custom board-2.bins
[openwrt/openwrt.git] / target / linux / ipq40xx / image / Makefile
1 include $(TOPDIR)/rules.mk
2 include $(INCLUDE_DIR)/image.mk
3
4 DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
5
6 define Device/Default
7 PROFILES := Default
8 KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
9 KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
10 KERNEL_PREFIX := $$(IMAGE_PREFIX)
11 KERNEL_LOADADDR := 0x80208000
12 SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
13 IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
14 IMAGE/sysupgrade.bin/squashfs :=
15 endef
16
17 define Device/FitImage
18 KERNEL_SUFFIX := -fit-uImage.itb
19 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
20 KERNEL_NAME := Image
21 endef
22
23 define Device/FitImageLzma
24 KERNEL_SUFFIX := -fit-uImage.itb
25 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
26 KERNEL_NAME := Image
27 endef
28
29 define Device/UbiFit
30 KERNEL_IN_UBI := 1
31 IMAGES := nand-factory.ubi nand-sysupgrade.bin
32 IMAGE/nand-factory.ubi := append-ubi
33 IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
34 endef
35
36 define Device/DniImage
37 KERNEL_SUFFIX := -fit-uImage.itb
38 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
39 KERNEL_NAME := Image
40 NETGEAR_BOARD_ID :=
41 NETGEAR_HW_ID :=
42 IMAGES := factory.img sysupgrade.bin
43 IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | netgear-dni
44 IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
45 endef
46 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
47
48
49 define Device/8dev_jalapeno
50 $(call Device/FitImage)
51 $(call Device/UbiFit)
52 DEVICE_DTS := qcom-ipq4018-jalapeno
53 BLOCKSIZE := 128k
54 PAGESIZE := 2048
55 DEVICE_TITLE := 8devices Jalapeno
56 endef
57 TARGET_DEVICES += 8dev_jalapeno
58
59 define Device/asus_rt-ac58u
60 $(call Device/FitImageLzma)
61 DEVICE_DTS := qcom-ipq4018-rt-ac58u
62 BLOCKSIZE := 128k
63 PAGESIZE := 2048
64 DTB_SIZE := 65536
65 DEVICE_TITLE := Asus RT-AC58U
66 IMAGE_SIZE := 20439364
67 FILESYSTEMS := squashfs
68 # Someone - in their infinite wisdom - decided to put the firmware
69 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
70 # Since u-boot works with strings we either need another fixup step
71 # to add a version... or we are very careful not to add '\0' into that
72 # string and call it a day.... Yeah, we do the latter!
73 UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
74 IMAGES := sysupgrade.bin
75 DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
76 endef
77 TARGET_DEVICES += asus_rt-ac58u
78
79 define Device/avm_fritzbox-4040
80 $(call Device/FitImageLzma)
81 DEVICE_DTS := qcom-ipq4018-fritz4040
82 BOARD_NAME := fritz4040
83 DEVICE_TITLE := AVM Fritz!Box 4040
84 IMAGE_SIZE := 29753344
85 UBOOT_PATH := $$(BIN_DIR)/u-boot-fritz4040/uboot-fritz4040.bin
86 UBOOT_PARTITION_SIZE := 524288
87 IMAGES = eva.bin sysupgrade.bin
88 IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs
89 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
90 DEVICE_PACKAGES := fritz-tffs fritz-caldata u-boot-fritz4040
91 endef
92 TARGET_DEVICES += avm_fritzbox-4040
93
94 define Device/compex_wpj428
95 $(call Device/FitImage)
96 DEVICE_DTS := qcom-ipq4028-wpj428
97 DEVICE_DTS_CONFIG := config@4
98 BLOCKSIZE := 64k
99 DEVICE_TITLE := Compex WPJ428
100 IMAGE_SIZE := 31232k
101 KERNEL_SIZE := 4096k
102 IMAGES = sysupgrade.bin
103 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
104 DEVICE_PACKAGES := kmod-gpio-beeper
105 endef
106 TARGET_DEVICES += compex_wpj428
107
108 define Device/glinet_gl-b1300
109 $(call Device/FitImage)
110 DEVICE_TITLE := GL.iNet GL-B1300
111 BOARD_NAME := gl-b1300
112 DEVICE_DTS := qcom-ipq4029-gl-b1300
113 KERNEL_SIZE := 4096k
114 IMAGE_SIZE := 26624k
115 IMAGES := sysupgrade.bin
116 IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
117 endef
118 TARGET_DEVICES += glinet_gl-b1300
119
120 define Device/meraki_mr33
121 $(call Device/FitImage)
122 DEVICE_DTS := qcom-ipq4029-mr33
123 BLOCKSIZE := 131072
124 PAGESIZE := 2048
125 DEVICE_TITLE := Cisco Meraki MR33
126 IMAGES = sysupgrade.bin
127 DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct
128 endef
129 TARGET_DEVICES += meraki_mr33
130
131 define Device/netgear_ex61x0v2
132 $(call Device/DniImage)
133 KERNEL_SIZE := 3080192
134 DEVICE_DTS_CONFIG := config@4
135 NETGEAR_BOARD_ID := EX6150v2series
136 NETGEAR_HW_ID := 29765285+16+0+128+2x2
137 endef
138
139 define Device/netgear_ex6100v2
140 $(call Device/netgear_ex61x0v2)
141 DEVICE_DTS := qcom-ipq4018-ex6100v2
142 DEVICE_TITLE := Netgear EX6100v2
143 endef
144 TARGET_DEVICES += netgear_ex6100v2
145
146 define Device/netgear_ex6150v2
147 $(call Device/netgear_ex61x0v2)
148 DEVICE_DTS := qcom-ipq4018-ex6150v2
149 DEVICE_TITLE := Netgear EX6150v2
150 endef
151 TARGET_DEVICES += netgear_ex6150v2
152
153 define Device/openmesh_a42
154 $(call Device/FitImageLzma)
155 DEVICE_DTS := qcom-ipq4018-a42
156 DEVICE_DTS_CONFIG := config@om.a42
157 BLOCKSIZE := 64k
158 DEVICE_TITLE := OpenMesh A42
159 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
160 IMAGE_SIZE := 15616k
161 IMAGES = factory.bin sysupgrade.bin
162 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
163 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
164 DEVICE_PACKAGES := uboot-envtools
165 endef
166 TARGET_DEVICES += openmesh_a42
167
168 define Device/openmesh_a62
169 $(call Device/FitImageLzma)
170 DEVICE_DTS := qcom-ipq4019-a62
171 DEVICE_DTS_CONFIG := config@om.a62
172 BLOCKSIZE := 64k
173 DEVICE_TITLE := OpenMesh A62
174 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
175 IMAGE_SIZE := 15552k
176 IMAGES = factory.bin sysupgrade.bin
177 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
178 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
179 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct uboot-envtools
180 endef
181
182 TARGET_DEVICES += openmesh_a62
183
184 define Device/qcom_ap-dk01.1-c1
185 DEVICE_TITLE := QCA AP-DK01.1-C1
186 BOARD_NAME := ap-dk01.1-c1
187 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
188 KERNEL_INSTALL := 1
189 KERNEL_SIZE := 4096k
190 IMAGE_SIZE := 26624k
191 $(call Device/FitImage)
192 IMAGES := sysupgrade.bin
193 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
194 endef
195 TARGET_DEVICES += qcom_ap-dk01.1-c1
196
197 define Device/qcom_ap-dk04.1-c1
198 $(call Device/FitImage)
199 $(call Device/UbiFit)
200 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
201 KERNEL_INSTALL := 1
202 KERNEL_SIZE := 4048k
203 BLOCKSIZE := 128k
204 PAGESIZE := 2048
205 BOARD_NAME := ap-dk04.1-c1
206 DEVICE_TITLE := QCA AP-DK04.1-C1
207 endef
208 TARGET_DEVICES += qcom_ap-dk04.1-c1
209
210 define Device/zyxel_nbg6617
211 $(call Device/FitImageLzma)
212 DEVICE_DTS := qcom-ipq4018-nbg6617
213 DEVICE_TITLE := ZyXEL NBG6617
214 ROOTFS_SIZE := 24960k
215 RAS_BOARD := NBG6617
216 RAS_ROOTFS_SIZE := 19840k
217 RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
218 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
219 IMAGES := sysupgrade.bin factory.bin
220 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
221 # at least as large as the one of the initial firmware image (not the current
222 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
223 # this minimum-size. However, the larger image can be flashed both ways.
224 IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel
225 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
226 DEVICE_PACKAGES := uboot-envtools
227 endef
228 TARGET_DEVICES += zyxel_nbg6617
229
230 define Device/zyxel_wre6606
231 $(call Device/FitImage)
232 DEVICE_TITLE := ZyXEL WRE6606
233 DEVICE_DTS_CONFIG := config@4
234 DEVICE_DTS := qcom-ipq4018-wre6606
235 IMAGES := sysupgrade.bin
236 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
237 endef
238 TARGET_DEVICES += zyxel_wre6606
239
240 $(eval $(call BuildImage))