ipq40xx: use upstream board-2.bin
[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 define Device/DniImage
35 KERNEL_SUFFIX := -fit-uImage.itb
36 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
37 KERNEL_NAME := Image
38 NETGEAR_BOARD_ID :=
39 NETGEAR_HW_ID :=
40 IMAGES := factory.img sysupgrade.bin
41 IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | netgear-dni
42 IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
43 endef
44 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
45
46
47 define Device/8dev_jalapeno
48 $(call Device/FitImage)
49 $(call Device/UbiFit)
50 DEVICE_DTS := qcom-ipq4018-jalapeno
51 BLOCKSIZE := 128k
52 PAGESIZE := 2048
53 DEVICE_TITLE := 8devices Jalapeno
54 endef
55 TARGET_DEVICES += 8dev_jalapeno
56
57 define Device/asus_rt-ac58u
58 $(call Device/FitImageLzma)
59 DEVICE_DTS := qcom-ipq4018-rt-ac58u
60 BLOCKSIZE := 128k
61 PAGESIZE := 2048
62 DTB_SIZE := 65536
63 DEVICE_TITLE := Asus RT-AC58U
64 IMAGE_SIZE := 20439364
65 FILESYSTEMS := squashfs
66 # Someone - in their infinite wisdom - decided to put the firmware
67 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
68 # Since u-boot works with strings we either need another fixup step
69 # to add a version... or we are very careful not to add '\0' into that
70 # string and call it a day.... Yeah, we do the latter!
71 UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
72 IMAGES := sysupgrade.bin
73 DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
74 endef
75 TARGET_DEVICES += asus_rt-ac58u
76
77 define Device/avm_fritzbox-4040
78 $(call Device/FitImageLzma)
79 DEVICE_DTS := qcom-ipq4018-fritz4040
80 BOARD_NAME := fritz4040
81 DEVICE_TITLE := AVM Fritz!Box 4040
82 IMAGE_SIZE := 29753344
83 IMAGES = sysupgrade.bin
84 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
85 DEVICE_PACKAGES := fritz-tffs fritz-caldata u-boot-fritz4040
86 endef
87 TARGET_DEVICES += avm_fritzbox-4040
88
89 define Device/compex_wpj428
90 $(call Device/FitImage)
91 DEVICE_DTS := qcom-ipq4028-wpj428
92 DEVICE_DTS_CONFIG := config@4
93 BLOCKSIZE := 64k
94 DEVICE_TITLE := Compex WPJ428
95 IMAGE_SIZE := 31232k
96 KERNEL_SIZE := 4096k
97 IMAGES = sysupgrade.bin
98 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
99 DEVICE_PACKAGES := kmod-gpio-beeper
100 endef
101 TARGET_DEVICES += compex_wpj428
102
103 define Device/glinet_gl-b1300
104 $(call Device/FitImage)
105 DEVICE_TITLE := GL.iNet GL-B1300
106 BOARD_NAME := gl-b1300
107 DEVICE_DTS := qcom-ipq4029-gl-b1300
108 KERNEL_SIZE := 4096k
109 IMAGE_SIZE := 26624k
110 IMAGES := sysupgrade.bin
111 IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
112 endef
113 TARGET_DEVICES += glinet_gl-b1300
114
115 define Device/meraki_mr33
116 $(call Device/FitImage)
117 DEVICE_DTS := qcom-ipq4029-mr33
118 BLOCKSIZE := 131072
119 PAGESIZE := 2048
120 DEVICE_TITLE := Cisco Meraki MR33
121 IMAGES = sysupgrade.bin
122 DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887
123 endef
124 TARGET_DEVICES += meraki_mr33
125
126 define Device/netgear_ex61x0v2
127 $(call Device/DniImage)
128 KERNEL_SIZE := 3080192
129 DEVICE_DTS_CONFIG := config@4
130 NETGEAR_BOARD_ID := EX6150v2series
131 NETGEAR_HW_ID := 29765285+16+0+128+2x2
132 endef
133
134 define Device/netgear_ex6100v2
135 $(call Device/netgear_ex61x0v2)
136 DEVICE_DTS := qcom-ipq4018-ex6100v2
137 DEVICE_TITLE := Netgear EX6100v2
138 endef
139 TARGET_DEVICES += netgear_ex6100v2
140
141 define Device/netgear_ex6150v2
142 $(call Device/netgear_ex61x0v2)
143 DEVICE_DTS := qcom-ipq4018-ex6150v2
144 DEVICE_TITLE := Netgear EX6150v2
145 endef
146 TARGET_DEVICES += netgear_ex6150v2
147
148 define Device/openmesh_a42
149 $(call Device/FitImageLzma)
150 DEVICE_DTS := qcom-ipq4018-a42
151 DEVICE_DTS_CONFIG := config@om.a42
152 BLOCKSIZE := 64k
153 DEVICE_TITLE := OpenMesh A42
154 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
155 IMAGE_SIZE := 15616k
156 IMAGES = factory.bin sysupgrade.bin
157 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
158 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
159 DEVICE_PACKAGES := uboot-envtools
160 endef
161 TARGET_DEVICES += openmesh_a42
162
163 define Device/qcom_ap-dk01.1-c1
164 DEVICE_TITLE := QCA AP-DK01.1-C1
165 BOARD_NAME := ap-dk01.1-c1
166 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
167 KERNEL_INSTALL := 1
168 KERNEL_SIZE := 4096k
169 IMAGE_SIZE := 26624k
170 $(call Device/FitImage)
171 IMAGES := sysupgrade.bin
172 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
173 endef
174 TARGET_DEVICES += qcom_ap-dk01.1-c1
175
176 define Device/qcom_ap-dk04.1-c1
177 $(call Device/FitImage)
178 $(call Device/UbiFit)
179 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
180 KERNEL_INSTALL := 1
181 KERNEL_SIZE := 4048k
182 BLOCKSIZE := 128k
183 PAGESIZE := 2048
184 BOARD_NAME := ap-dk04.1-c1
185 DEVICE_TITLE := QCA AP-DK04.1-C1
186 endef
187 TARGET_DEVICES += qcom_ap-dk04.1-c1
188
189 $(eval $(call BuildImage))