generic.mk 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412
  1. DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
  2. DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
  3. DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE
  4. DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
  5. DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
  6. define Build/netgear-fit-padding
  7. ./netgear-fit-padding.py $@ [email protected]
  8. mv [email protected] $@
  9. endef
  10. define Device/FitImage
  11. KERNEL_SUFFIX := -uImage.itb
  12. KERNEL = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
  13. KERNEL_NAME := Image
  14. endef
  15. define Device/FitImageLzma
  16. KERNEL_SUFFIX := -uImage.itb
  17. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
  18. KERNEL_NAME := Image
  19. endef
  20. define Device/FitzImage
  21. KERNEL_SUFFIX := -zImage.itb
  22. KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb
  23. KERNEL_NAME := zImage
  24. endef
  25. define Device/UbiFit
  26. KERNEL_IN_UBI := 1
  27. IMAGES := factory.ubi sysupgrade.bin
  28. IMAGE/factory.ubi := append-ubi
  29. IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  30. endef
  31. define Device/DniImage
  32. $(call Device/FitzImage)
  33. NETGEAR_BOARD_ID :=
  34. NETGEAR_HW_ID :=
  35. IMAGES += factory.img
  36. IMAGE/factory.img := append-kernel | netgear-fit-padding | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni
  37. IMAGE/sysupgrade.bin := append-kernel | netgear-fit-padding | append-uImage-fakehdr filesystem | \
  38. append-rootfs | pad-rootfs | check-size | append-metadata
  39. endef
  40. define Build/append-rootfshdr
  41. mkimage -A $(LINUX_KARCH) \
  42. -O linux -T filesystem \
  43. -C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
  44. -n root.squashfs -d $(IMAGE_ROOTFS) [email protected]
  45. cat $(IMAGE_KERNEL) > $@.$1
  46. dd [email protected] bs=64 count=1 >> $@.$1
  47. endef
  48. define Build/copy-file
  49. cat "$(1)" > "$@"
  50. endef
  51. define Build/mkmylofw_32m
  52. $(eval device_id=$(word 1,$(1)))
  53. $(eval revision=$(word 2,$(1)))
  54. let \
  55. size="$$(stat -c%s $@)" \
  56. pad="$(call exp_units,$(BLOCKSIZE))" \
  57. pad="(pad - (size % pad)) % pad" \
  58. newsize='size + pad'; \
  59. $(STAGING_DIR_HOST)/bin/mkmylofw \
  60. -B WPE72 -i 0x11f6:$(device_id):0x11f6:$(device_id) -r $(revision) \
  61. -s 0x2000000 -p0x180000:$$newsize:al:0x80208000:"OpenWrt":$@ \
  62. [email protected]
  63. @mv [email protected] $@
  64. endef
  65. define Build/wac5xx-netgear-tar
  66. mkdir [email protected]
  67. mv $@ [email protected]/wac5xx-ubifs-root.img
  68. md5sum [email protected]/wac5xx-ubifs-root.img > [email protected]/wac5xx-ubifs-root.md5sum
  69. echo "WAC505 WAC510" > [email protected]/metadata.txt
  70. echo "WAC505_V9.9.9.9" > [email protected]/version
  71. tar -C [email protected]/ -cf $@ .
  72. rm -rf [email protected]
  73. endef
  74. define Build/qsdk-ipq-factory-nand-askey
  75. $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh [email protected]\
  76. askey_kernel $@.$1 \
  77. askey_fs $(IMAGE_ROOTFS) \
  78. ubifs $@
  79. PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f [email protected] [email protected]
  80. @mv [email protected] $@
  81. endef
  82. define Build/qsdk-ipq-app-gpt
  83. cp $@ [email protected] 2>/dev/null || true
  84. ptgen -g -o [email protected] -a 1 -l 1024 \
  85. -t 0x2e -N 0:HLOS -r -p 32M \
  86. -t 0x83 -N rootfs -r -p 128M \
  87. -N rootfs_data -p 512M
  88. cat [email protected] >> $@
  89. rm [email protected]
  90. endef
  91. define Build/SenaoFW
  92. -$(STAGING_DIR_HOST)/bin/mksenaofw \
  93. -n $(BOARD_NAME) -r $(VENDOR_ID) -p $(1) \
  94. -c $(DATECODE) -w $(2) -x $(CW_VER) -t 0 \
  95. -e $@ \
  96. -o [email protected]
  97. @cp [email protected] $@
  98. endef
  99. define Build/wrgg-image
  100. mkwrggimg -i $@ \
  101. -o [email protected] \
  102. -d "$(WRGG_DEVNAME)" \
  103. -s "$(WRGG_SIGNATURE)" \
  104. -v "" -m "" -B ""
  105. mv [email protected] $@
  106. endef
  107. define Device/8dev_habanero-dvk
  108. $(call Device/FitImageLzma)
  109. DEVICE_VENDOR := 8devices
  110. DEVICE_MODEL := Habanero DVK
  111. IMAGE_SIZE := 30976k
  112. SOC := qcom-ipq4019
  113. IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata
  114. endef
  115. TARGET_DEVICES += 8dev_habanero-dvk
  116. define Device/8dev_jalapeno-common
  117. $(call Device/FitImage)
  118. $(call Device/UbiFit)
  119. BLOCKSIZE := 128k
  120. PAGESIZE := 2048
  121. SOC := qcom-ipq4018
  122. endef
  123. define Device/8dev_jalapeno
  124. $(call Device/8dev_jalapeno-common)
  125. DEVICE_VENDOR := 8devices
  126. DEVICE_MODEL := Jalapeno
  127. endef
  128. TARGET_DEVICES += 8dev_jalapeno
  129. define Device/alfa-network_ap120c-ac
  130. $(call Device/FitImage)
  131. $(call Device/UbiFit)
  132. DEVICE_VENDOR := ALFA Network
  133. DEVICE_MODEL := AP120C-AC
  134. SOC := qcom-ipq4018
  135. DEVICE_PACKAGES := kmod-usb-acm kmod-tpm-i2c-atmel
  136. BLOCKSIZE := 128k
  137. PAGESIZE := 2048
  138. IMAGE_SIZE := 65536k
  139. IMAGES := factory.bin sysupgrade.bin
  140. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  141. endef
  142. TARGET_DEVICES += alfa-network_ap120c-ac
  143. define Device/aruba_glenmorangie
  144. $(call Device/FitImageLzma)
  145. DEVICE_VENDOR := Aruba
  146. SOC := qcom-ipq4029
  147. endef
  148. define Device/aruba_ap-303
  149. $(call Device/aruba_glenmorangie)
  150. DEVICE_MODEL := AP-303
  151. DEVICE_DTS_CONFIG := Glenmorangie@1
  152. endef
  153. TARGET_DEVICES += aruba_ap-303
  154. define Device/aruba_ap-303h
  155. $(call Device/aruba_glenmorangie)
  156. DEVICE_MODEL := AP-303H
  157. DEVICE_DTS_CONFIG := Aberlour@1
  158. endef
  159. TARGET_DEVICES += aruba_ap-303h
  160. define Device/aruba_ap-365
  161. $(call Device/aruba_glenmorangie)
  162. DEVICE_MODEL := AP-365
  163. DEVICE_PACKAGES := kmod-hwmon-ad7418
  164. DEVICE_DTS_CONFIG := Bunker@1
  165. endef
  166. TARGET_DEVICES += aruba_ap-365
  167. define Device/asus_map-ac1300
  168. $(call Device/FitImageLzma)
  169. DEVICE_VENDOR := ASUS
  170. DEVICE_MODEL := Lyra Mini (MAP-AC1300)
  171. SOC := qcom-ipq4018
  172. DEVICE_PACKAGES := kmod-ath3k
  173. endef
  174. TARGET_DEVICES += asus_map-ac1300
  175. define Device/asus_map-ac2200
  176. $(call Device/FitImageLzma)
  177. DEVICE_VENDOR := ASUS
  178. DEVICE_MODEL := Lyra (MAP-AC2200)
  179. SOC := qcom-ipq4019
  180. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-ath3k
  181. endef
  182. TARGET_DEVICES += asus_map-ac2200
  183. # WARNING: this is an initramfs image that gets you half of the way there
  184. # you need to delete the jffs2 ubi volume and sysupgrade to the final image
  185. # to get a "trx" you can flash via web UI for ac42u/ac58u:
  186. # - change call Device/FitImageLzma to Device/FitImage
  187. # - add the following below UIMAGE_NAME
  188. # UIMAGE_MAGIC := 0x27051956
  189. # IMAGES += factory.trx
  190. # IMAGE/factory.trx := copy-file $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) | uImage none
  191. define Device/asus_rt-ac42u
  192. $(call Device/FitImageLzma)
  193. DEVICE_VENDOR := ASUS
  194. DEVICE_MODEL := RT-AC42U
  195. DEVICE_ALT0_VENDOR := ASUS
  196. DEVICE_ALT0_MODEL := RT-ACRH17
  197. DEVICE_ALT1_VENDOR := ASUS
  198. DEVICE_ALT1_MODEL := RT-AC2200
  199. SOC := qcom-ipq4019
  200. BLOCKSIZE := 128k
  201. PAGESIZE := 2048
  202. IMAGE_SIZE := 20439364
  203. FILESYSTEMS := squashfs
  204. # RT-AC82U is nowhere to be found online
  205. # Rather, this device is a/k/a RT-AC42U
  206. # But we'll go with what the vendor firmware has...
  207. UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC82U')
  208. DEVICE_PACKAGES := ath10k-firmware-qca9984-ct kmod-usb-ledtrig-usbport
  209. endef
  210. TARGET_DEVICES += asus_rt-ac42u
  211. define Device/asus_rt-ac58u
  212. $(call Device/FitImageLzma)
  213. DEVICE_VENDOR := ASUS
  214. DEVICE_MODEL := RT-AC58U
  215. DEVICE_ALT0_VENDOR := ASUS
  216. DEVICE_ALT0_MODEL := RT-ACRH13
  217. SOC := qcom-ipq4018
  218. BLOCKSIZE := 128k
  219. PAGESIZE := 2048
  220. IMAGE_SIZE := 20439364
  221. FILESYSTEMS := squashfs
  222. # Someone - in their infinite wisdom - decided to put the firmware
  223. # version in front of the image name \03\00\00\04 => Version 3.0.0.4
  224. # Since u-boot works with strings we either need another fixup step
  225. # to add a version... or we are very careful not to add '\0' into that
  226. # string and call it a day.... Yeah, we do the latter!
  227. UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
  228. DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
  229. kmod-usb-ledtrig-usbport
  230. endef
  231. TARGET_DEVICES += asus_rt-ac58u
  232. define Device/avm_fritzbox-4040
  233. $(call Device/FitImageLzma)
  234. DEVICE_VENDOR := AVM
  235. DEVICE_MODEL := FRITZ!Box 4040
  236. SOC := qcom-ipq4018
  237. BOARD_NAME := fritz4040
  238. IMAGE_SIZE := 29056k
  239. UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-fritz4040.bin
  240. UBOOT_PARTITION_SIZE := 524288
  241. IMAGES += eva.bin
  242. IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs
  243. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  244. DEVICE_PACKAGES := fritz-tffs fritz-caldata
  245. endef
  246. TARGET_DEVICES += avm_fritzbox-4040
  247. define Device/avm_fritzbox-7530
  248. $(call Device/FitImageLzma)
  249. DEVICE_VENDOR := AVM
  250. DEVICE_MODEL := FRITZ!Box 7530
  251. DEVICE_ALT0_VENDOR := AVM
  252. DEVICE_ALT0_MODEL := FRITZ!Box 7520
  253. SOC := qcom-ipq4019
  254. DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand ltq-vdsl-vr11-app
  255. endef
  256. TARGET_DEVICES += avm_fritzbox-7530
  257. define Device/avm_fritzrepeater-1200
  258. $(call Device/FitImageLzma)
  259. DEVICE_VENDOR := AVM
  260. DEVICE_MODEL := FRITZ!Repeater 1200
  261. SOC := qcom-ipq4019
  262. DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand
  263. endef
  264. TARGET_DEVICES += avm_fritzrepeater-1200
  265. define Device/avm_fritzrepeater-3000
  266. $(call Device/FitImageLzma)
  267. DEVICE_VENDOR := AVM
  268. DEVICE_MODEL := FRITZ!Repeater 3000
  269. SOC := qcom-ipq4019
  270. DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
  271. endef
  272. TARGET_DEVICES += avm_fritzrepeater-3000
  273. define Device/buffalo_wtr-m2133hp
  274. $(call Device/FitImage)
  275. $(call Device/UbiFit)
  276. DEVICE_VENDOR := Buffalo
  277. DEVICE_MODEL := WTR-M2133HP
  278. SOC := qcom-ipq4019
  279. DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
  280. BLOCKSIZE := 128k
  281. PAGESIZE := 2048
  282. endef
  283. TARGET_DEVICES += buffalo_wtr-m2133hp
  284. define Device/cellc_rtl30vw
  285. KERNEL_SUFFIX := -zImage.itb
  286. KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
  287. KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048
  288. KERNEL_NAME := zImage
  289. KERNEL_IN_UBI :=
  290. IMAGES := factory.bin sysupgrade.bin
  291. IMAGE/factory.bin := append-rootfshdr kernel | append-ubi | qsdk-ipq-factory-nand-askey kernel
  292. IMAGE/sysupgrade.bin := append-rootfshdr kernel | sysupgrade-tar [email protected] | append-metadata
  293. DEVICE_VENDOR := Cell C
  294. DEVICE_MODEL := RTL30VW
  295. SOC := qcom-ipq4019
  296. DEVICE_DTS_CONFIG := config@5
  297. KERNEL_INSTALL := 1
  298. KERNEL_SIZE := 4096k
  299. IMAGE_SIZE := 57344k
  300. BLOCKSIZE := 128k
  301. PAGESIZE := 2048
  302. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  303. endef
  304. TARGET_DEVICES += cellc_rtl30vw
  305. define Device/cilab_meshpoint-one
  306. $(call Device/8dev_jalapeno-common)
  307. DEVICE_VENDOR := Crisis Innovation Lab
  308. DEVICE_MODEL := MeshPoint.One
  309. DEVICE_PACKAGES += kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
  310. endef
  311. # Missing DSA Setup
  312. #TARGET_DEVICES += cilab_meshpoint-one
  313. define Device/compex_wpj419
  314. $(call Device/FitImage)
  315. $(call Device/UbiFit)
  316. DEVICE_VENDOR := Compex
  317. DEVICE_MODEL := WPJ419
  318. SOC := qcom-ipq4019
  319. DEVICE_DTS_CONFIG := config@12
  320. KERNEL_INSTALL := 1
  321. BLOCKSIZE := 128k
  322. PAGESIZE := 2048
  323. FILESYSTEMS := squashfs
  324. endef
  325. # Missing DSA Setup
  326. #TARGET_DEVICES += compex_wpj419
  327. define Device/compex_wpj428
  328. $(call Device/FitzImage)
  329. DEVICE_VENDOR := Compex
  330. DEVICE_MODEL := WPJ428
  331. SOC := qcom-ipq4028
  332. DEVICE_DTS_CONFIG := config@4
  333. BLOCKSIZE := 64k
  334. IMAGE_SIZE := 31232k
  335. KERNEL_SIZE := 4096k
  336. IMAGES += cpximg-6a04.bin
  337. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  338. IMAGE/cpximg-6a04.bin := append-kernel | append-rootfs | pad-rootfs | mkmylofw_32m 0x8A2 3
  339. DEVICE_PACKAGES := kmod-gpio-beeper
  340. DEFAULT := n
  341. endef
  342. TARGET_DEVICES += compex_wpj428
  343. define Device/devolo_magic-2-wifi-next
  344. $(call Device/FitzImage)
  345. DEVICE_VENDOR := devolo
  346. DEVICE_MODEL := Magic 2 WiFi next
  347. SOC := qcom-ipq4018
  348. KERNEL_SIZE := 4096k
  349. # If the bootloader sees 0xDEADC0DE and this trailer at the 64k boundary of a TFTP image
  350. # it will bootm it, just like we want for the initramfs.
  351. KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to 64k |\
  352. append-string -e '\xDE\xAD\xC0\xDE{"fl_initramfs":""}\x00'
  353. IMAGE_SIZE := 26624k
  354. IMAGES := sysupgrade.bin
  355. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  356. DEFAULT := n
  357. endef
  358. TARGET_DEVICES += devolo_magic-2-wifi-next
  359. define Device/dlink_dap-2610
  360. $(call Device/FitImageLzma)
  361. DEVICE_VENDOR := D-Link
  362. DEVICE_MODEL := DAP-2610
  363. SOC := qcom-ipq4018
  364. DEVICE_DTS_CONFIG := [email protected]
  365. BLOCKSIZE := 64k
  366. WRGG_DEVNAME := /dev/mtdblock/8
  367. WRGG_SIGNATURE := wapac30_dkbs_dap2610
  368. IMAGE_SIZE := 14080k
  369. IMAGES += factory.bin
  370. # Bootloader expects a special 160 byte header which is added by
  371. # wrgg-image.
  372. # Factory image size must be larger than 6MB, and size in wrgg header must
  373. # match actual factory image size to be flashable from D-Link http server.
  374. # Bootloader verifies checksum of wrgg image before booting, thus jffs2
  375. # cannot be part of the wrgg image. This is solved in the factory image by
  376. # having the rootfs at the end of the image (without pad-rootfs). And in
  377. # the sysupgrade image only the kernel is included in the wrgg checksum,
  378. # but this is not flashable from the D-link http server.
  379. # append-rootfs must start on an erase block boundary.
  380. IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size
  381. IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
  382. endef
  383. TARGET_DEVICES += dlink_dap-2610
  384. define Device/edgecore_ecw5211
  385. $(call Device/FitImage)
  386. $(call Device/UbiFit)
  387. DEVICE_VENDOR := Edgecore
  388. DEVICE_MODEL := ECW5211
  389. SOC := qcom-ipq4018
  390. BLOCKSIZE := 128k
  391. PAGESIZE := 2048
  392. DEVICE_DTS_CONFIG := [email protected]
  393. DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-usb-acm
  394. endef
  395. TARGET_DEVICES += edgecore_ecw5211
  396. define Device/edgecore_oap100
  397. $(call Device/FitImage)
  398. $(call Device/UbiFit)
  399. DEVICE_VENDOR := Edgecore
  400. DEVICE_MODEL := OAP100
  401. SOC := qcom-ipq4019
  402. BLOCKSIZE := 128k
  403. PAGESIZE := 2048
  404. IMAGES := sysupgrade.bin
  405. DEVICE_DTS_CONFIG := [email protected]
  406. DEVICE_PACKAGES := kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-qmi uqmi
  407. endef
  408. # Missing DSA Setup
  409. #TARGET_DEVICES += edgecore_oap100
  410. define Device/engenius_eap1300
  411. $(call Device/FitImage)
  412. DEVICE_VENDOR := EnGenius
  413. DEVICE_MODEL := EAP1300
  414. DEVICE_ALT0_VENDOR := EnGenius
  415. DEVICE_ALT0_MODEL := EAP1300EXT
  416. DEVICE_DTS_CONFIG := config@4
  417. BOARD_NAME := eap1300
  418. SOC := qcom-ipq4018
  419. KERNEL_SIZE := 5120k
  420. IMAGE_SIZE := 25344k
  421. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  422. DEFAULT := n
  423. endef
  424. TARGET_DEVICES += engenius_eap1300
  425. define Device/engenius_eap2200
  426. $(call Device/FitImage)
  427. $(call Device/UbiFit)
  428. DEVICE_VENDOR := EnGenius
  429. DEVICE_MODEL := EAP2200
  430. SOC := qcom-ipq4019
  431. BLOCKSIZE := 128k
  432. PAGESIZE := 2048
  433. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
  434. endef
  435. # Missing DSA Setup
  436. #TARGET_DEVICES += engenius_eap2200
  437. define Device/engenius_emd1
  438. $(call Device/FitImage)
  439. DEVICE_VENDOR := EnGenius
  440. DEVICE_MODEL := EMD1
  441. DEVICE_DTS_CONFIG := config@4
  442. SOC := qcom-ipq4018
  443. IMAGE_SIZE := 30720k
  444. IMAGES += factory.bin
  445. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  446. IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
  447. endef
  448. # Missing DSA Setup
  449. #TARGET_DEVICES += engenius_emd1
  450. define Device/engenius_emr3500
  451. $(call Device/FitImage)
  452. DEVICE_VENDOR := EnGenius
  453. DEVICE_MODEL := EMR3500
  454. DEVICE_DTS_CONFIG := config@4
  455. SOC := qcom-ipq4018
  456. KERNEL_SIZE := 4096k
  457. IMAGE_SIZE := 30720k
  458. IMAGES += factory.bin
  459. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  460. IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
  461. DEFAULT := n
  462. endef
  463. # Missing DSA Setup
  464. #TARGET_DEVICES += engenius_emr3500
  465. define Device/engenius_ens620ext
  466. $(call Device/FitImage)
  467. DEVICE_VENDOR := EnGenius
  468. DEVICE_MODEL := ENS620EXT
  469. SOC := qcom-ipq4018
  470. DEVICE_DTS_CONFIG := config@4
  471. BLOCKSIZE := 64k
  472. PAGESIZE := 256
  473. BOARD_NAME := ENS620EXT
  474. VENDOR_ID := 0x0101
  475. PRODUCT_ID := 0x79
  476. PRODUCT_ID_NEW := 0xA4
  477. DATECODE := 190507
  478. FW_VER := 3.1.2
  479. FW_VER_NEW := 3.5.6
  480. CW_VER := 1.8.99
  481. IMAGE_SIZE := 21312k
  482. KERNEL_SIZE := 5120k
  483. FILESYSTEMS := squashfs
  484. IMAGES += factory_30.bin factory_35.bin
  485. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  486. IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER)
  487. IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW)
  488. DEFAULT := n
  489. endef
  490. # Missing DSA Setup
  491. #TARGET_DEVICES += engenius_ens620ext
  492. define Device/extreme-networks_ws-ap3915i
  493. $(call Device/FitImage)
  494. DEVICE_VENDOR := Extreme Networks
  495. DEVICE_MODEL := WS-AP3915i
  496. IMAGE_SIZE := 30080k
  497. SOC := qcom-ipq4029
  498. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  499. endef
  500. TARGET_DEVICES += extreme-networks_ws-ap3915i
  501. define Device/extreme-networks_ws-ap391x
  502. $(call Device/FitImage)
  503. DEVICE_VENDOR := Extreme Networks
  504. DEVICE_MODEL := WS-AP391x
  505. IMAGE_SIZE := 15040k
  506. SOC := qcom-ipq4029
  507. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  508. endef
  509. TARGET_DEVICES += extreme-networks_ws-ap391x
  510. define Device/ezviz_cs-w3-wd1200g-eup
  511. $(call Device/FitImage)
  512. DEVICE_VENDOR := EZVIZ
  513. DEVICE_MODEL := CS-W3-WD1200G
  514. DEVICE_VARIANT := EUP
  515. IMAGE_SIZE := 14848k
  516. KERNEL_SIZE = 6m
  517. SOC := qcom-ipq4018
  518. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
  519. append-metadata
  520. DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
  521. DEVICE_COMPAT_VERSION := 2.0
  522. DEVICE_COMPAT_MESSAGE := uboot's bootcmd has to be updated (see wiki). \
  523. Upgrade via sysupgrade mechanism is not possible.
  524. endef
  525. TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup
  526. define Device/glinet_gl-a1300
  527. $(call Device/FitImage)
  528. $(call Device/UbiFit)
  529. DEVICE_VENDOR := GL.iNet
  530. DEVICE_MODEL := GL-A1300
  531. SOC := qcom-ipq4018
  532. DEVICE_DTS_CONFIG := [email protected]
  533. BLOCKSIZE := 128k
  534. PAGESIZE := 2048
  535. IMAGE_SIZE := 131072k
  536. endef
  537. TARGET_DEVICES += glinet_gl-a1300
  538. define Device/glinet_gl-ap1300
  539. $(call Device/FitImage)
  540. $(call Device/UbiFit)
  541. DEVICE_VENDOR := GL.iNet
  542. DEVICE_MODEL := GL-AP1300
  543. SOC := qcom-ipq4018
  544. DEVICE_DTS_CONFIG := [email protected]
  545. BLOCKSIZE := 128k
  546. PAGESIZE := 2048
  547. IMAGE_SIZE := 131072k
  548. KERNEL_INSTALL := 1
  549. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  550. endef
  551. TARGET_DEVICES += glinet_gl-ap1300
  552. define Device/glinet_gl-b1300
  553. $(call Device/FitzImage)
  554. DEVICE_VENDOR := GL.iNet
  555. DEVICE_MODEL := GL-B1300
  556. BOARD_NAME := gl-b1300
  557. SOC := qcom-ipq4029
  558. KERNEL_SIZE := 4096k
  559. IMAGE_SIZE := 26624k
  560. IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
  561. endef
  562. TARGET_DEVICES += glinet_gl-b1300
  563. define Device/glinet_gl-b2200
  564. $(call Device/FitzImage)
  565. DEVICE_VENDOR := GL.iNet
  566. DEVICE_MODEL := GL-B2200
  567. SOC := qcom-ipq4019
  568. DEVICE_DTS_CONFIG := [email protected]
  569. KERNEL_INITRAMFS_SUFFIX := -recovery.itb
  570. IMAGES := emmc.img.gz sysupgrade.bin
  571. IMAGE/emmc.img.gz := qsdk-ipq-app-gpt |\
  572. pad-to 1024k | append-kernel |\
  573. pad-to 33792k | append-rootfs |\
  574. append-metadata | gzip
  575. IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  576. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct \
  577. kmod-fs-ext4 kmod-mmc kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs
  578. endef
  579. TARGET_DEVICES += glinet_gl-b2200
  580. define Device/glinet_gl-s1300
  581. $(call Device/FitzImage)
  582. DEVICE_VENDOR := GL.iNet
  583. DEVICE_MODEL := GL-S1300
  584. SOC := qcom-ipq4029
  585. KERNEL_SIZE := 4096k
  586. IMAGE_SIZE := 26624k
  587. IMAGES := sysupgrade.bin
  588. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  589. DEVICE_PACKAGES := kmod-fs-ext4 kmod-mmc kmod-spi-dev
  590. endef
  591. TARGET_DEVICES += glinet_gl-s1300
  592. define Device/kernel-size-6350-8300
  593. DEVICE_COMPAT_VERSION := 2.0
  594. DEVICE_COMPAT_MESSAGE := Kernel partition size must be increased for \
  595. this OpenWrt version. Before continuing, you MUST issue either the \
  596. command "fw_setenv kernsize 500000" from the OpenWrt command line, \
  597. or "setenv kernsize 500000 ; saveenv" from the U-Boot serial console. \
  598. Instead of the sysupgrade image, you must then install the OpenWrt \
  599. factory image, setting the force flag and wiping the configuration. \
  600. (e.g. "sysupgrade -n -F openwrt-squashfs-factory.bin" on command line)
  601. endef
  602. define Device/linksys_ea6350v3
  603. # The Linksys EA6350v3 has a uboot bootloader that does not
  604. # support either booting lzma kernel images nor booting UBI
  605. # partitions. This uboot, however, supports raw kernel images and
  606. # gzipped images.
  607. #
  608. # As configured by the OEM factory, the device will boot the kernel
  609. # from a fixed address with a fixed length of 3 MiB. Also, the
  610. # device has a hard-coded kernel command line that requires the
  611. # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
  612. # Oh... and the kernel partition overlaps with the rootfs
  613. # partition (the same for alt_kernel and alt_rootfs).
  614. #
  615. # If you are planing re-partitioning the device, you may want to
  616. # keep these details in mind:
  617. # 1. The kernel addresses you should honor are 0x00000000 and
  618. # 0x02800000 respectively.
  619. # 2. The kernel size (plus the dtb) cannot exceed 3 MiB in size
  620. # unless the uboot environment variable "kernsize" is increased.
  621. # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
  622. # 4. The kernel command line from uboot is harcoded to boot with
  623. # rootfs either in mtd11 or mtd13.
  624. $(call Device/FitzImage)
  625. $(call Device/kernel-size-6350-8300)
  626. DEVICE_VENDOR := Linksys
  627. DEVICE_MODEL := EA6350
  628. DEVICE_VARIANT := v3
  629. SOC := qcom-ipq4018
  630. BLOCKSIZE := 128k
  631. PAGESIZE := 2048
  632. KERNEL_SIZE := 5120k
  633. IMAGE_SIZE := 35840k
  634. NAND_SIZE := 128m
  635. UBINIZE_OPTS := -E 5
  636. IMAGES += factory.bin
  637. IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
  638. endef
  639. TARGET_DEVICES += linksys_ea6350v3
  640. define Device/linksys_ea8300
  641. $(call Device/FitzImage)
  642. $(call Device/kernel-size-6350-8300)
  643. DEVICE_VENDOR := Linksys
  644. DEVICE_MODEL := EA8300
  645. SOC := qcom-ipq4019
  646. KERNEL_SIZE := 5120k
  647. IMAGE_SIZE := 84992k
  648. NAND_SIZE := 256m
  649. BLOCKSIZE := 128k
  650. PAGESIZE := 2048
  651. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  652. IMAGES += factory.bin
  653. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
  654. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
  655. endef
  656. TARGET_DEVICES += linksys_ea8300
  657. define Device/linksys_mr6350
  658. $(call Device/FitzImage)
  659. $(call Device/kernel-size-6350-8300)
  660. DEVICE_VENDOR := Linksys
  661. DEVICE_MODEL := MR6350
  662. SOC := qcom-ipq4019
  663. KERNEL_SIZE := 5120k
  664. IMAGE_SIZE := 84992k
  665. BLOCKSIZE := 128k
  666. PAGESIZE := 2048
  667. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  668. IMAGES += factory.bin
  669. IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | linksys-image type=MR6350
  670. DEVICE_PACKAGES := ipq-wifi-linksys_mr6350 kmod-usb-ledtrig-usbport
  671. endef
  672. TARGET_DEVICES += linksys_mr6350
  673. define Device/linksys_mr8300
  674. $(call Device/FitzImage)
  675. $(call Device/kernel-size-6350-8300)
  676. DEVICE_VENDOR := Linksys
  677. DEVICE_MODEL := MR8300
  678. SOC := qcom-ipq4019
  679. KERNEL_SIZE := 5120k
  680. IMAGE_SIZE := 84992k
  681. NAND_SIZE := 256m
  682. BLOCKSIZE := 128k
  683. PAGESIZE := 2048
  684. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  685. IMAGES += factory.bin
  686. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
  687. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
  688. endef
  689. TARGET_DEVICES += linksys_mr8300
  690. define Device/linksys_whw01
  691. $(call Device/FitzImage)
  692. DEVICE_VENDOR := Linksys
  693. DEVICE_MODEL := WHW01
  694. DEVICE_ALT0_VENDOR := Linksys
  695. DEVICE_ALT0_MODEL := VLP01
  696. KERNEL_SIZE := 6144k
  697. IMAGE_SIZE := 75776k
  698. NAND_SIZE := 256m
  699. SOC := qcom-ipq4018
  700. BLOCKSIZE := 128k
  701. PAGESIZE := 2048
  702. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  703. IMAGES += factory.bin
  704. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW01
  705. DEVICE_PACKAGES := uboot-envtools kmod-leds-pca963x
  706. endef
  707. TARGET_DEVICES += linksys_whw01
  708. define Device/linksys_whw03
  709. $(call Device/FitzImage)
  710. DEVICE_VENDOR := Linksys
  711. DEVICE_MODEL := WHW03
  712. SOC := qcom-ipq4019
  713. KERNEL_SIZE := 8192k
  714. IMAGE_SIZE := 131072k
  715. IMAGES += factory.bin
  716. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | linksys-image type=WHW03
  717. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-hci-uart \
  718. kmod-fs-ext4 e2fsprogs kmod-fs-f2fs mkf2fs losetup ipq-wifi-linksys_whw03
  719. endef
  720. TARGET_DEVICES += linksys_whw03
  721. define Device/linksys_whw03v2
  722. $(call Device/FitzImage)
  723. DEVICE_VENDOR := Linksys
  724. DEVICE_MODEL := WHW03
  725. DEVICE_VARIANT := V2
  726. SOC := qcom-ipq4019
  727. KERNEL_SIZE := 6144k
  728. IMAGE_SIZE := 158720k
  729. NAND_SIZE := 512m
  730. BLOCKSIZE := 128k
  731. PAGESIZE := 2048
  732. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  733. IMAGES += factory.bin
  734. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW03v2
  735. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-hci-uart
  736. endef
  737. TARGET_DEVICES += linksys_whw03v2
  738. define Device/luma_wrtq-329acn
  739. $(call Device/FitImage)
  740. DEVICE_VENDOR := Luma Home
  741. DEVICE_MODEL := WRTQ-329ACN
  742. SOC := qcom-ipq4018
  743. DEVICE_PACKAGES := kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio
  744. IMAGE_SIZE := 76632k
  745. BLOCKSIZE := 128k
  746. PAGESIZE := 2048
  747. endef
  748. TARGET_DEVICES += luma_wrtq-329acn
  749. define Device/meraki_common
  750. $(call Device/FitImage)
  751. DEVICE_VENDOR := Cisco Meraki
  752. SOC := qcom-ipq4029
  753. BLOCKSIZE := 128k
  754. PAGESIZE := 2048
  755. DEVICE_DTS_LOADADDR := 0x89000000
  756. DEVICE_PACKAGES := ath10k-firmware-qca9887-ct
  757. endef
  758. define Device/meraki_mr30h
  759. $(call Device/meraki_common)
  760. DEVICE_MODEL := MR30H
  761. DEVICE_DTS_CONFIG := config@2
  762. DEVICE_PACKAGES += ipq-wifi-meraki_mr30h
  763. endef
  764. TARGET_DEVICES += meraki_mr30h
  765. define Device/meraki_mr33
  766. $(call Device/meraki_common)
  767. DEVICE_MODEL := MR33
  768. endef
  769. TARGET_DEVICES += meraki_mr33
  770. define Device/meraki_mr74
  771. $(call Device/meraki_common)
  772. DEVICE_MODEL := MR74
  773. DEVICE_DTS_CONFIG := config@3
  774. endef
  775. TARGET_DEVICES += meraki_mr74
  776. define Device/meraki_z3
  777. $(call Device/meraki_common)
  778. DEVICE_MODEL := Z3
  779. DEVICE_DTS_CONFIG := config@1
  780. DEVICE_PACKAGES := -ath10k-firmware-qca9887-ct ipq-wifi-meraki_z3
  781. endef
  782. TARGET_DEVICES += meraki_z3
  783. define Device/meraki_gx20
  784. $(call Device/meraki_common)
  785. DEVICE_MODEL := GX20
  786. DEVICE_DTS_CONFIG := config@2
  787. DEVICE_PACKAGES := -ath10k-board-qca4019 -ath10k-firmware-qca9887-ct
  788. endef
  789. TARGET_DEVICES += meraki_gx20
  790. define Device/mobipromo_cm520-79f
  791. $(call Device/FitzImage)
  792. $(call Device/UbiFit)
  793. DEVICE_VENDOR := MobiPromo
  794. DEVICE_MODEL := CM520-79F
  795. SOC := qcom-ipq4019
  796. BLOCKSIZE := 128k
  797. PAGESIZE := 2048
  798. DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
  799. endef
  800. TARGET_DEVICES += mobipromo_cm520-79f
  801. define Device/netgear_ex61x0v2
  802. $(call Device/DniImage)
  803. DEVICE_VENDOR := NETGEAR
  804. DEVICE_DTS_CONFIG := config@4
  805. NETGEAR_BOARD_ID := EX6150v2series
  806. NETGEAR_HW_ID := 29765285+16+0+128+2x2
  807. IMAGE_SIZE := 14400k
  808. SOC := qcom-ipq4018
  809. endef
  810. define Device/netgear_ex6100v2
  811. $(call Device/netgear_ex61x0v2)
  812. DEVICE_MODEL := EX6100
  813. DEVICE_VARIANT := v2
  814. endef
  815. TARGET_DEVICES += netgear_ex6100v2
  816. define Device/netgear_ex6150v2
  817. $(call Device/netgear_ex61x0v2)
  818. DEVICE_MODEL := EX6150
  819. DEVICE_VARIANT := v2
  820. endef
  821. TARGET_DEVICES += netgear_ex6150v2
  822. define Device/netgear_orbi
  823. $(call Device/DniImage)
  824. SOC := qcom-ipq4019
  825. DEVICE_VENDOR := NETGEAR
  826. IMAGE/factory.img := append-kernel | pad-offset 128k 64 | \
  827. append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
  828. append-rootfs | pad-rootfs | netgear-dni
  829. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | \
  830. sysupgrade-tar rootfs=$$$$@ | append-metadata
  831. DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 losetup
  832. endef
  833. define Device/netgear_lbr20
  834. $(call Device/DniImage)
  835. SOC := qcom-ipq4019
  836. DEVICE_VENDOR := NETGEAR
  837. DEVICE_MODEL := LBR20
  838. NETGEAR_BOARD_ID := LBR20
  839. NETGEAR_HW_ID := 29766182+0+256+512+2x2+2x2+2x2+1
  840. KERNEL_SIZE := 7340032
  841. BLOCKSIZE := 128k
  842. PAGESIZE := 2048
  843. UBINIZE_OPTS := -E 5
  844. IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  845. append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
  846. append-ubi | netgear-dni
  847. IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  848. append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
  849. append-metadata
  850. DEVICE_PACKAGES := ipq-wifi-netgear_lbr20 ath10k-firmware-qca9888-ct kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  851. endef
  852. TARGET_DEVICES += netgear_lbr20
  853. define Device/netgear_rbx20
  854. $(call Device/DniImage)
  855. SOC := qcom-ipq4019
  856. DEVICE_VENDOR := NETGEAR
  857. KERNEL_SIZE := 7340032
  858. BLOCKSIZE := 128k
  859. PAGESIZE := 2048
  860. UBINIZE_OPTS := -E 5
  861. IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  862. append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
  863. append-ubi | netgear-dni
  864. IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  865. append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
  866. append-metadata
  867. DEVICE_PACKAGES := ipq-wifi-netgear_rbk20 ath10k-firmware-qca9888-ct
  868. endef
  869. define Device/netgear_rbr20
  870. $(call Device/netgear_rbx20)
  871. DEVICE_MODEL := RBR20
  872. NETGEAR_BOARD_ID := RBR20
  873. NETGEAR_HW_ID := 29765641+0+256+512+2x2+2x2+2x2
  874. endef
  875. TARGET_DEVICES += netgear_rbr20
  876. define Device/netgear_rbs20
  877. $(call Device/netgear_rbx20)
  878. DEVICE_MODEL := RBS20
  879. NETGEAR_BOARD_ID := RBS20
  880. NETGEAR_HW_ID := 29765641+0+128+512+2x2+2x2+2x2
  881. endef
  882. TARGET_DEVICES += netgear_rbs20
  883. define Device/netgear_rbx40
  884. $(call Device/netgear_orbi)
  885. NETGEAR_HW_ID := 29765515+0+4096+512+2x2+2x2+2x2
  886. KERNEL_SIZE := 3932160
  887. ROOTFS_SIZE := 32243712
  888. IMAGE_SIZE := 36175872
  889. DEVICE_PACKAGES += ipq-wifi-netgear_rbk40 ath10k-firmware-qca9888-ct
  890. endef
  891. define Device/netgear_rbr40
  892. $(call Device/netgear_rbx40)
  893. DEVICE_MODEL := RBR40
  894. DEVICE_VARIANT := v1
  895. NETGEAR_BOARD_ID := RBR40
  896. endef
  897. TARGET_DEVICES += netgear_rbr40
  898. define Device/netgear_rbs40
  899. $(call Device/netgear_rbx40)
  900. DEVICE_MODEL := RBS40
  901. DEVICE_VARIANT := v1
  902. NETGEAR_BOARD_ID := RBS40
  903. endef
  904. TARGET_DEVICES += netgear_rbs40
  905. define Device/netgear_rbx50
  906. $(call Device/netgear_orbi)
  907. NETGEAR_HW_ID := 29765352+0+4000+512+2x2+2x2+4x4
  908. KERNEL_SIZE := 3932160
  909. ROOTFS_SIZE := 32243712
  910. IMAGE_SIZE := 36175872
  911. DEVICE_PACKAGES += ath10k-firmware-qca9984-ct
  912. endef
  913. define Device/netgear_rbr50
  914. $(call Device/netgear_rbx50)
  915. DEVICE_MODEL := RBR50
  916. DEVICE_VARIANT := v1
  917. NETGEAR_BOARD_ID := RBR50
  918. endef
  919. TARGET_DEVICES += netgear_rbr50
  920. define Device/netgear_rbs50
  921. $(call Device/netgear_rbx50)
  922. DEVICE_MODEL := RBS50
  923. DEVICE_VARIANT := v1
  924. NETGEAR_BOARD_ID := RBS50
  925. endef
  926. TARGET_DEVICES += netgear_rbs50
  927. define Device/netgear_srx60
  928. $(call Device/netgear_orbi)
  929. NETGEAR_HW_ID := 29765352+0+4096+512+2x2+2x2+4x4
  930. KERNEL_SIZE := 3932160
  931. ROOTFS_SIZE := 32243712
  932. IMAGE_SIZE := 36175872
  933. DEVICE_PACKAGES += ath10k-firmware-qca9984-ct
  934. endef
  935. define Device/netgear_srr60
  936. $(call Device/netgear_srx60)
  937. DEVICE_MODEL := SRR60
  938. NETGEAR_BOARD_ID := SRR60
  939. endef
  940. TARGET_DEVICES += netgear_srr60
  941. define Device/netgear_srs60
  942. $(call Device/netgear_srx60)
  943. DEVICE_MODEL := SRS60
  944. NETGEAR_BOARD_ID := SRS60
  945. endef
  946. TARGET_DEVICES += netgear_srs60
  947. define Device/netgear_wac510
  948. $(call Device/FitImage)
  949. $(call Device/UbiFit)
  950. DEVICE_VENDOR := Netgear
  951. DEVICE_MODEL := WAC510
  952. SOC := qcom-ipq4018
  953. DEVICE_DTS_CONFIG := config@5
  954. BLOCKSIZE := 128k
  955. PAGESIZE := 2048
  956. IMAGES += factory.tar
  957. IMAGE/factory.tar := append-ubi | wac5xx-netgear-tar
  958. DEVICE_PACKAGES := uboot-envtools
  959. endef
  960. TARGET_DEVICES += netgear_wac510
  961. define Device/openmesh_a42
  962. $(call Device/FitImageLzma)
  963. DEVICE_VENDOR := OpenMesh
  964. DEVICE_MODEL := A42
  965. SOC := qcom-ipq4018
  966. DEVICE_DTS_CONFIG := [email protected]
  967. BLOCKSIZE := 64k
  968. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  969. IMAGE_SIZE := 15616k
  970. IMAGES += factory.bin
  971. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
  972. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  973. endef
  974. TARGET_DEVICES += openmesh_a42
  975. define Device/openmesh_a62
  976. $(call Device/FitImageLzma)
  977. DEVICE_VENDOR := OpenMesh
  978. DEVICE_MODEL := A62
  979. SOC := qcom-ipq4019
  980. DEVICE_DTS_CONFIG := [email protected]
  981. BLOCKSIZE := 64k
  982. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  983. IMAGE_SIZE := 15552k
  984. IMAGES += factory.bin
  985. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
  986. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  987. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
  988. endef
  989. TARGET_DEVICES += openmesh_a62
  990. define Device/p2w_r619ac
  991. $(call Device/FitzImage)
  992. $(call Device/UbiFit)
  993. DEVICE_VENDOR := P&W
  994. DEVICE_MODEL := R619AC
  995. SOC := qcom-ipq4019
  996. DEVICE_DTS_CONFIG := config@10
  997. BLOCKSIZE := 128k
  998. PAGESIZE := 2048
  999. endef
  1000. define Device/p2w_r619ac-64m
  1001. $(call Device/p2w_r619ac)
  1002. DEVICE_VARIANT := 64M NAND
  1003. IMAGES += factory.bin
  1004. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  1005. endef
  1006. TARGET_DEVICES += p2w_r619ac-64m
  1007. define Device/p2w_r619ac-128m
  1008. $(call Device/p2w_r619ac)
  1009. DEVICE_VARIANT := 128M NAND
  1010. endef
  1011. TARGET_DEVICES += p2w_r619ac-128m
  1012. define Device/pakedge_wr-1
  1013. $(call Device/FitImageLzma)
  1014. DEVICE_VENDOR := Pakedge
  1015. DEVICE_MODEL := WR-1
  1016. DEVICE_DTS_CONFIG := [email protected]
  1017. SOC := qcom-ipq4018
  1018. BLOCKSIZE := 64k
  1019. IMAGE_SIZE := 31232k
  1020. IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata
  1021. endef
  1022. TARGET_DEVICES += pakedge_wr-1
  1023. define Device/plasmacloud_pa1200
  1024. $(call Device/FitImageLzma)
  1025. DEVICE_VENDOR := Plasma Cloud
  1026. DEVICE_MODEL := PA1200
  1027. SOC := qcom-ipq4018
  1028. DEVICE_DTS_CONFIG := [email protected]
  1029. BLOCKSIZE := 64k
  1030. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  1031. IMAGE_SIZE := 15616k
  1032. IMAGES += factory.bin
  1033. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
  1034. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  1035. endef
  1036. TARGET_DEVICES += plasmacloud_pa1200
  1037. define Device/plasmacloud_pa2200
  1038. $(call Device/FitImageLzma)
  1039. DEVICE_VENDOR := Plasma Cloud
  1040. DEVICE_MODEL := PA2200
  1041. SOC := qcom-ipq4019
  1042. DEVICE_DTS_CONFIG := [email protected]
  1043. BLOCKSIZE := 64k
  1044. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  1045. IMAGE_SIZE := 15552k
  1046. IMAGES += factory.bin
  1047. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
  1048. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  1049. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
  1050. endef
  1051. TARGET_DEVICES += plasmacloud_pa2200
  1052. define Device/qxwlan_e2600ac-c1
  1053. $(call Device/FitImage)
  1054. DEVICE_VENDOR := Qxwlan
  1055. DEVICE_MODEL := E2600AC
  1056. DEVICE_VARIANT := C1
  1057. BOARD_NAME := e2600ac-c1
  1058. SOC := qcom-ipq4019
  1059. IMAGE_SIZE := 31232k
  1060. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1061. endef
  1062. TARGET_DEVICES += qxwlan_e2600ac-c1
  1063. define Device/qxwlan_e2600ac-c2
  1064. $(call Device/FitImage)
  1065. $(call Device/UbiFit)
  1066. DEVICE_VENDOR := Qxwlan
  1067. DEVICE_MODEL := E2600AC
  1068. DEVICE_VARIANT := C2
  1069. SOC := qcom-ipq4019
  1070. KERNEL_INSTALL := 1
  1071. BLOCKSIZE := 128k
  1072. PAGESIZE := 2048
  1073. endef
  1074. TARGET_DEVICES += qxwlan_e2600ac-c2
  1075. define Device/skspruce_wia3300-20
  1076. $(call Device/FitzImage)
  1077. BLOCKSIZE := 64k
  1078. IMAGE_SIZE := 55104k
  1079. SOC := qcom-ipq4019
  1080. DEVICE_VENDOR := SKSpruce
  1081. DEVICE_MODEL := WIA3300-20
  1082. DEVICE_PACKAGES := -ath10k-board-qca4019 ipq-wifi-skspruce_wia3300-20
  1083. IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
  1084. append-rootfs | pad-rootfs | check-size | append-metadata
  1085. endef
  1086. TARGET_DEVICES +=skspruce_wia3300-20
  1087. define Device/sony_ncp-hg100-cellular
  1088. $(call Device/FitImage)
  1089. DEVICE_VENDOR := Sony
  1090. DEVICE_MODEL := NCP-HG100/Cellular
  1091. DEVICE_DTS_CONFIG := [email protected]
  1092. SOC := qcom-ipq4019
  1093. KERNEL_SIZE := 8192k
  1094. IMAGE_SIZE := 128m
  1095. DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 uqmi
  1096. endef
  1097. TARGET_DEVICES += sony_ncp-hg100-cellular
  1098. define Device/teltonika_rutx10
  1099. $(call Device/FitImage)
  1100. $(call Device/UbiFit)
  1101. DEVICE_VENDOR := Teltonika
  1102. DEVICE_MODEL := RUTX10
  1103. SUPPORTED_TELTONIKA_DEVICES := teltonika,rutx
  1104. SUPPORTED_TELTONIKA_HW_MODS := W25N02KV NAND_GD5F2GXX EG060K RUTX_V12
  1105. SOC := qcom-ipq4018
  1106. DEVICE_DTS_CONFIG := config@5
  1107. KERNEL_INSTALL := 1
  1108. BLOCKSIZE := 128k
  1109. PAGESIZE := 2048
  1110. FILESYSTEMS := squashfs
  1111. IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-teltonika-metadata
  1112. DEVICE_PACKAGES := kmod-btusb
  1113. endef
  1114. # Missing DSA Setup
  1115. #TARGET_DEVICES += teltonika_rutx10
  1116. define Device/teltonika_rutx50
  1117. $(call Device/FitImage)
  1118. $(call Device/UbiFit)
  1119. DEVICE_VENDOR := Teltonika
  1120. DEVICE_MODEL := RUTX50
  1121. SOC := qcom-ipq4018
  1122. DEVICE_DTS_CONFIG := config@5
  1123. KERNEL_INSTALL := 1
  1124. BLOCKSIZE := 128k
  1125. PAGESIZE := 2048
  1126. FILESYSTEMS := squashfs
  1127. IMAGE/factory.ubi := append-ubi
  1128. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1129. endef
  1130. TARGET_DEVICES += teltonika_rutx50
  1131. define Device/tel_x1pro
  1132. $(call Device/FitImage)
  1133. DEVICE_VENDOR := Telco
  1134. DEVICE_MODEL := X1 Pro
  1135. SOC := qcom-ipq4019
  1136. KERNEL_SIZE := 4096k
  1137. IMAGE_SIZE := 31232k
  1138. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1139. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1140. DEFAULT := n
  1141. endef
  1142. # Missing DSA Setup
  1143. #TARGET_DEVICES += tel_x1pro
  1144. define Device/unielec_u4019-32m
  1145. $(call Device/FitImage)
  1146. DEVICE_VENDOR := Unielec
  1147. DEVICE_MODEL := U4019
  1148. DEVICE_VARIANT := 32M
  1149. BOARD_NAME := u4019-32m
  1150. SOC := qcom-ipq4019
  1151. KERNEL_SIZE := 4096k
  1152. IMAGE_SIZE := 31232k
  1153. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1154. DEFAULT := n
  1155. endef
  1156. # Missing DSA Setup
  1157. #TARGET_DEVICES += unielec_u4019-32m
  1158. define Device/wallys_dr40x9
  1159. $(call Device/FitImage)
  1160. $(call Device/UbiFit)
  1161. DEVICE_VENDOR := Wallys
  1162. DEVICE_MODEL := DR40X9
  1163. SOC := qcom-ipq40x9
  1164. DEVICE_DTS_CONFIG := [email protected]
  1165. BLOCKSIZE := 128k
  1166. PAGESIZE := 2048
  1167. DEVICE_PACKAGES := ipq-wifi-wallys_dr40x9
  1168. endef
  1169. TARGET_DEVICES += wallys_dr40x9
  1170. define Device/yyets_le1
  1171. $(call Device/FitzImage)
  1172. DEVICE_VENDOR := YYeTs
  1173. DEVICE_MODEL := LE1
  1174. SOC := qcom-ipq4019
  1175. KERNEL_SIZE := 4096k
  1176. IMAGE_SIZE := 31232k
  1177. IMAGES += factory.bin
  1178. IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
  1179. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1180. DEVICE_PACKAGES := ipq-wifi-yyets_le1 kmod-usb-ledtrig-usbport
  1181. endef
  1182. TARGET_DEVICES += yyets_le1
  1183. define Device/zte_mf18a
  1184. $(call Device/FitImage)
  1185. DEVICE_VENDOR := ZTE
  1186. DEVICE_MODEL := MF18A
  1187. SOC := qcom-ipq4019
  1188. DEVICE_DTS_CONFIG := [email protected]
  1189. BLOCKSIZE := 128k
  1190. PAGESIZE := 2048
  1191. KERNEL_IN_UBI := 1
  1192. DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
  1193. endef
  1194. TARGET_DEVICES += zte_mf18a
  1195. define Device/zte_mf28x_common
  1196. $(call Device/FitzImage)
  1197. DEVICE_VENDOR := ZTE
  1198. SOC := qcom-ipq4019
  1199. DEVICE_DTS_CONFIG := [email protected]
  1200. BLOCKSIZE := 128k
  1201. PAGESIZE := 2048
  1202. KERNEL_IN_UBI := 1
  1203. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1204. endef
  1205. define Device/zte_mf282plus
  1206. $(call Device/zte_mf28x_common)
  1207. DEVICE_MODEL := MF282Plus
  1208. # The recovery image is used to return back to stock (an initramfs-based image
  1209. # that can be flashed to the device via sysupgrade
  1210. # The factory image is used to install from the stock firmware by using an
  1211. # exploit for the web interface
  1212. IMAGES += factory.bin recovery.bin
  1213. IMAGE/factory.bin := append-ubi
  1214. IMAGE/recovery.bin := append-squashfs4-fakeroot | sysupgrade-tar kernel=$$$$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) rootfs=$$$$@ | append-metadata
  1215. DEVICE_PACKAGES := kmod-usb-acm kmod-usb-net-rndis
  1216. endef
  1217. TARGET_DEVICES += zte_mf282plus
  1218. define Device/zte_mf286d
  1219. $(call Device/zte_mf28x_common)
  1220. DEVICE_MODEL := MF286D
  1221. endef
  1222. TARGET_DEVICES += zte_mf286d
  1223. define Device/zte_mf287_common
  1224. $(call Device/zte_mf28x_common)
  1225. SOC := qcom-ipq4018
  1226. # The recovery image is used to return back to stock (an initramfs-based image
  1227. # that can be flashed to the device via sysupgrade
  1228. # The factory image is used to install from the stock firmware by using an
  1229. # exploit for the web interface
  1230. IMAGES += factory.bin recovery.bin
  1231. IMAGE/factory.bin := append-ubi
  1232. IMAGE/recovery.bin := append-squashfs4-fakeroot | sysupgrade-tar kernel=$$$$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) rootfs=$$$$@ | append-metadata
  1233. endef
  1234. define Device/zte_mf287plus
  1235. $(call Device/zte_mf287_common)
  1236. DEVICE_PACKAGES += ipq-wifi-zte_mf287plus
  1237. DEVICE_DTS_CONFIG := [email protected]
  1238. DEVICE_MODEL := MF287Plus
  1239. endef
  1240. TARGET_DEVICES += zte_mf287plus
  1241. define Device/zte_mf287
  1242. $(call Device/zte_mf287_common)
  1243. DEVICE_PACKAGES += ipq-wifi-zte_mf287
  1244. DEVICE_DTS_CONFIG := [email protected]
  1245. DEVICE_MODEL := MF287
  1246. endef
  1247. TARGET_DEVICES += zte_mf287
  1248. define Device/zte_mf287pro
  1249. $(call Device/zte_mf287_common)
  1250. DEVICE_PACKAGES += ipq-wifi-zte_mf287plus
  1251. DEVICE_DTS_CONFIG := [email protected]
  1252. DEVICE_MODEL := MF287Pro
  1253. endef
  1254. TARGET_DEVICES += zte_mf287pro
  1255. define Device/zte_mf289f
  1256. $(call Device/zte_mf28x_common)
  1257. DEVICE_MODEL := MF289F
  1258. DEVICE_PACKAGES += ath10k-firmware-qca9984-ct
  1259. endef
  1260. TARGET_DEVICES += zte_mf289f
  1261. define Device/zyxel_nbg6617
  1262. $(call Device/FitImageLzma)
  1263. DEVICE_VENDOR := Zyxel
  1264. DEVICE_MODEL := NBG6617
  1265. SOC := qcom-ipq4018
  1266. KERNEL_SIZE := 4096k
  1267. ROOTFS_SIZE := 24960k
  1268. RAS_BOARD := NBG6617
  1269. RAS_ROOTFS_SIZE := 19840k
  1270. RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
  1271. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1272. IMAGES += factory.bin
  1273. # The Zyxel firmware allows flashing thru the web-gui only when the rootfs is
  1274. # at least as large as the one of the initial firmware image (not the current
  1275. # one on the device). This only applies to the Web-UI, the bootlaoder ignores
  1276. # this minimum-size. However, the larger image can be flashed both ways.
  1277. IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel
  1278. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
  1279. DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
  1280. endef
  1281. TARGET_DEVICES += zyxel_nbg6617
  1282. define Device/zyxel_wre6606
  1283. $(call Device/FitImage)
  1284. DEVICE_VENDOR := Zyxel
  1285. DEVICE_MODEL := WRE6606
  1286. DEVICE_DTS_CONFIG := config@4
  1287. SOC := qcom-ipq4018
  1288. IMAGE_SIZE := 13184k
  1289. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  1290. DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
  1291. endef
  1292. # Missing DSA Setup
  1293. #TARGET_DEVICES += zyxel_wre6606