generic.mk 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328
  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. define Build/netgear-fit-padding
  5. ./netgear-fit-padding.py $@ [email protected]
  6. mv [email protected] $@
  7. endef
  8. define Device/FitImage
  9. KERNEL_SUFFIX := -uImage.itb
  10. KERNEL = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
  11. KERNEL_NAME := Image
  12. endef
  13. define Device/FitImageLzma
  14. KERNEL_SUFFIX := -uImage.itb
  15. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
  16. KERNEL_NAME := Image
  17. endef
  18. define Device/FitzImage
  19. KERNEL_SUFFIX := -zImage.itb
  20. KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb
  21. KERNEL_NAME := zImage
  22. endef
  23. define Device/UbiFit
  24. KERNEL_IN_UBI := 1
  25. IMAGES := factory.ubi sysupgrade.bin
  26. IMAGE/factory.ubi := append-ubi
  27. IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  28. endef
  29. define Device/DniImage
  30. $(call Device/FitzImage)
  31. NETGEAR_BOARD_ID :=
  32. NETGEAR_HW_ID :=
  33. IMAGES += factory.img
  34. IMAGE/factory.img := append-kernel | netgear-fit-padding | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni
  35. IMAGE/sysupgrade.bin := append-kernel | netgear-fit-padding | append-uImage-fakehdr filesystem | \
  36. append-rootfs | pad-rootfs | check-size | append-metadata
  37. endef
  38. define Build/append-rootfshdr
  39. mkimage -A $(LINUX_KARCH) \
  40. -O linux -T filesystem \
  41. -C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
  42. -n root.squashfs -d $(IMAGE_ROOTFS) [email protected]
  43. cat $(IMAGE_KERNEL) > $@.$1
  44. dd [email protected] bs=64 count=1 >> $@.$1
  45. endef
  46. define Build/append-rutx-metadata
  47. echo \
  48. '{ \
  49. "device_code": [".*"], \
  50. "hwver": [".*"], \
  51. "batch": [".*"], \
  52. "serial": [".*"], \
  53. "supported_devices":["teltonika,rutx"] \
  54. }' | fwtool -I - $@
  55. endef
  56. define Build/copy-file
  57. cat "$(1)" > "$@"
  58. endef
  59. define Build/mkmylofw_32m
  60. $(eval device_id=$(word 1,$(1)))
  61. $(eval revision=$(word 2,$(1)))
  62. let \
  63. size="$$(stat -c%s $@)" \
  64. pad="$(call exp_units,$(BLOCKSIZE))" \
  65. pad="(pad - (size % pad)) % pad" \
  66. newsize='size + pad'; \
  67. $(STAGING_DIR_HOST)/bin/mkmylofw \
  68. -B WPE72 -i 0x11f6:$(device_id):0x11f6:$(device_id) -r $(revision) \
  69. -s 0x2000000 -p0x180000:$$newsize:al:0x80208000:"OpenWrt":$@ \
  70. [email protected]
  71. @mv [email protected] $@
  72. endef
  73. define Build/wac5xx-netgear-tar
  74. mkdir [email protected]
  75. mv $@ [email protected]/wac5xx-ubifs-root.img
  76. md5sum [email protected]/wac5xx-ubifs-root.img > [email protected]/wac5xx-ubifs-root.md5sum
  77. echo "WAC505 WAC510" > [email protected]/metadata.txt
  78. echo "WAC505_V9.9.9.9" > [email protected]/version
  79. tar -C [email protected]/ -cf $@ .
  80. rm -rf [email protected]
  81. endef
  82. define Build/qsdk-ipq-factory-nand-askey
  83. $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh [email protected]\
  84. askey_kernel $@.$1 \
  85. askey_fs $(IMAGE_ROOTFS) \
  86. ubifs $@
  87. PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f [email protected] [email protected]
  88. @mv [email protected] $@
  89. endef
  90. define Build/qsdk-ipq-app-gpt
  91. cp $@ [email protected] 2>/dev/null || true
  92. ptgen -g -o [email protected] -a 1 -l 1024 \
  93. -t 0x2e -N 0:HLOS -r -p 32M \
  94. -t 0x83 -N rootfs -r -p 128M \
  95. -N rootfs_data -p 512M
  96. cat [email protected] >> $@
  97. rm [email protected]
  98. endef
  99. define Build/SenaoFW
  100. -$(STAGING_DIR_HOST)/bin/mksenaofw \
  101. -n $(BOARD_NAME) -r $(VENDOR_ID) -p $(1) \
  102. -c $(DATECODE) -w $(2) -x $(CW_VER) -t 0 \
  103. -e $@ \
  104. -o [email protected]
  105. @cp [email protected] $@
  106. endef
  107. define Build/wrgg-image
  108. mkwrggimg -i $@ \
  109. -o [email protected] \
  110. -d "$(WRGG_DEVNAME)" \
  111. -s "$(WRGG_SIGNATURE)" \
  112. -v "" -m "" -B ""
  113. mv [email protected] $@
  114. endef
  115. define Device/8dev_habanero-dvk
  116. $(call Device/FitImageLzma)
  117. DEVICE_VENDOR := 8devices
  118. DEVICE_MODEL := Habanero DVK
  119. IMAGE_SIZE := 30976k
  120. SOC := qcom-ipq4019
  121. IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata
  122. endef
  123. TARGET_DEVICES += 8dev_habanero-dvk
  124. define Device/8dev_jalapeno-common
  125. $(call Device/FitImage)
  126. $(call Device/UbiFit)
  127. BLOCKSIZE := 128k
  128. PAGESIZE := 2048
  129. SOC := qcom-ipq4018
  130. endef
  131. define Device/8dev_jalapeno
  132. $(call Device/8dev_jalapeno-common)
  133. DEVICE_VENDOR := 8devices
  134. DEVICE_MODEL := Jalapeno
  135. endef
  136. TARGET_DEVICES += 8dev_jalapeno
  137. define Device/alfa-network_ap120c-ac
  138. $(call Device/FitImage)
  139. $(call Device/UbiFit)
  140. DEVICE_VENDOR := ALFA Network
  141. DEVICE_MODEL := AP120C-AC
  142. SOC := qcom-ipq4018
  143. DEVICE_PACKAGES := kmod-usb-acm kmod-tpm-i2c-atmel
  144. BLOCKSIZE := 128k
  145. PAGESIZE := 2048
  146. IMAGE_SIZE := 65536k
  147. IMAGES := factory.bin sysupgrade.bin
  148. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  149. endef
  150. TARGET_DEVICES += alfa-network_ap120c-ac
  151. define Device/aruba_glenmorangie
  152. $(call Device/FitImageLzma)
  153. DEVICE_VENDOR := Aruba
  154. SOC := qcom-ipq4029
  155. endef
  156. define Device/aruba_ap-303
  157. $(call Device/aruba_glenmorangie)
  158. DEVICE_MODEL := AP-303
  159. DEVICE_DTS_CONFIG := Glenmorangie@1
  160. endef
  161. TARGET_DEVICES += aruba_ap-303
  162. define Device/aruba_ap-303h
  163. $(call Device/aruba_glenmorangie)
  164. DEVICE_MODEL := AP-303H
  165. DEVICE_DTS_CONFIG := Aberlour@1
  166. endef
  167. TARGET_DEVICES += aruba_ap-303h
  168. define Device/aruba_ap-365
  169. $(call Device/aruba_glenmorangie)
  170. DEVICE_MODEL := AP-365
  171. DEVICE_PACKAGES := kmod-hwmon-ad7418
  172. DEVICE_DTS_CONFIG := Bunker@1
  173. endef
  174. TARGET_DEVICES += aruba_ap-365
  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. endef
  423. TARGET_DEVICES += engenius_eap1300
  424. define Device/engenius_eap2200
  425. $(call Device/FitImage)
  426. $(call Device/UbiFit)
  427. DEVICE_VENDOR := EnGenius
  428. DEVICE_MODEL := EAP2200
  429. SOC := qcom-ipq4019
  430. BLOCKSIZE := 128k
  431. PAGESIZE := 2048
  432. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
  433. endef
  434. # Missing DSA Setup
  435. #TARGET_DEVICES += engenius_eap2200
  436. define Device/engenius_emd1
  437. $(call Device/FitImage)
  438. DEVICE_VENDOR := EnGenius
  439. DEVICE_MODEL := EMD1
  440. DEVICE_DTS_CONFIG := config@4
  441. SOC := qcom-ipq4018
  442. IMAGE_SIZE := 30720k
  443. IMAGES += factory.bin
  444. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  445. IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
  446. endef
  447. # Missing DSA Setup
  448. #TARGET_DEVICES += engenius_emd1
  449. define Device/engenius_emr3500
  450. $(call Device/FitImage)
  451. DEVICE_VENDOR := EnGenius
  452. DEVICE_MODEL := EMR3500
  453. DEVICE_DTS_CONFIG := config@4
  454. SOC := qcom-ipq4018
  455. KERNEL_SIZE := 4096k
  456. IMAGE_SIZE := 30720k
  457. IMAGES += factory.bin
  458. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  459. IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
  460. DEFAULT := n
  461. endef
  462. # Missing DSA Setup
  463. #TARGET_DEVICES += engenius_emr3500
  464. define Device/engenius_ens620ext
  465. $(call Device/FitImage)
  466. DEVICE_VENDOR := EnGenius
  467. DEVICE_MODEL := ENS620EXT
  468. SOC := qcom-ipq4018
  469. DEVICE_DTS_CONFIG := config@4
  470. BLOCKSIZE := 64k
  471. PAGESIZE := 256
  472. BOARD_NAME := ENS620EXT
  473. VENDOR_ID := 0x0101
  474. PRODUCT_ID := 0x79
  475. PRODUCT_ID_NEW := 0xA4
  476. DATECODE := 190507
  477. FW_VER := 3.1.2
  478. FW_VER_NEW := 3.5.6
  479. CW_VER := 1.8.99
  480. IMAGE_SIZE := 21312k
  481. KERNEL_SIZE := 5120k
  482. FILESYSTEMS := squashfs
  483. IMAGES += factory_30.bin factory_35.bin
  484. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  485. IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER)
  486. IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW)
  487. endef
  488. # Missing DSA Setup
  489. #TARGET_DEVICES += engenius_ens620ext
  490. define Device/extreme-networks_ws-ap3915i
  491. $(call Device/FitImage)
  492. DEVICE_VENDOR := Extreme Networks
  493. DEVICE_MODEL := WS-AP3915i
  494. IMAGE_SIZE := 30080k
  495. SOC := qcom-ipq4029
  496. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  497. endef
  498. TARGET_DEVICES += extreme-networks_ws-ap3915i
  499. define Device/extreme-networks_ws-ap391x
  500. $(call Device/FitImage)
  501. DEVICE_VENDOR := Extreme Networks
  502. DEVICE_MODEL := WS-AP391x
  503. IMAGE_SIZE := 15040k
  504. SOC := qcom-ipq4029
  505. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  506. endef
  507. TARGET_DEVICES += extreme-networks_ws-ap391x
  508. define Device/ezviz_cs-w3-wd1200g-eup
  509. $(call Device/FitImage)
  510. DEVICE_VENDOR := EZVIZ
  511. DEVICE_MODEL := CS-W3-WD1200G
  512. DEVICE_VARIANT := EUP
  513. IMAGE_SIZE := 14848k
  514. KERNEL_SIZE = 6m
  515. SOC := qcom-ipq4018
  516. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
  517. append-metadata
  518. DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
  519. DEVICE_COMPAT_VERSION := 2.0
  520. DEVICE_COMPAT_MESSAGE := uboot's bootcmd has to be updated (see wiki). \
  521. Upgrade via sysupgrade mechanism is not possible.
  522. endef
  523. TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup
  524. define Device/glinet_gl-a1300
  525. $(call Device/FitImage)
  526. $(call Device/UbiFit)
  527. DEVICE_VENDOR := GL.iNet
  528. DEVICE_MODEL := GL-A1300
  529. SOC := qcom-ipq4018
  530. DEVICE_DTS_CONFIG := [email protected]
  531. BLOCKSIZE := 128k
  532. PAGESIZE := 2048
  533. IMAGE_SIZE := 131072k
  534. endef
  535. TARGET_DEVICES += glinet_gl-a1300
  536. define Device/glinet_gl-ap1300
  537. $(call Device/FitImage)
  538. $(call Device/UbiFit)
  539. DEVICE_VENDOR := GL.iNet
  540. DEVICE_MODEL := GL-AP1300
  541. SOC := qcom-ipq4018
  542. DEVICE_DTS_CONFIG := [email protected]
  543. BLOCKSIZE := 128k
  544. PAGESIZE := 2048
  545. IMAGE_SIZE := 131072k
  546. KERNEL_INSTALL := 1
  547. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  548. endef
  549. TARGET_DEVICES += glinet_gl-ap1300
  550. define Device/glinet_gl-b1300
  551. $(call Device/FitzImage)
  552. DEVICE_VENDOR := GL.iNet
  553. DEVICE_MODEL := GL-B1300
  554. BOARD_NAME := gl-b1300
  555. SOC := qcom-ipq4029
  556. KERNEL_SIZE := 4096k
  557. IMAGE_SIZE := 26624k
  558. IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
  559. endef
  560. TARGET_DEVICES += glinet_gl-b1300
  561. define Device/glinet_gl-b2200
  562. $(call Device/FitzImage)
  563. DEVICE_VENDOR := GL.iNet
  564. DEVICE_MODEL := GL-B2200
  565. SOC := qcom-ipq4019
  566. DEVICE_DTS_CONFIG := [email protected]
  567. KERNEL_INITRAMFS_SUFFIX := -recovery.itb
  568. IMAGES := emmc.img.gz sysupgrade.bin
  569. IMAGE/emmc.img.gz := qsdk-ipq-app-gpt |\
  570. pad-to 1024k | append-kernel |\
  571. pad-to 33792k | append-rootfs |\
  572. append-metadata | gzip
  573. IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  574. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct \
  575. kmod-fs-ext4 kmod-mmc kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs
  576. endef
  577. TARGET_DEVICES += glinet_gl-b2200
  578. define Device/glinet_gl-s1300
  579. $(call Device/FitzImage)
  580. DEVICE_VENDOR := GL.iNet
  581. DEVICE_MODEL := GL-S1300
  582. SOC := qcom-ipq4029
  583. KERNEL_SIZE := 4096k
  584. IMAGE_SIZE := 26624k
  585. IMAGES := sysupgrade.bin
  586. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  587. DEVICE_PACKAGES := kmod-fs-ext4 kmod-mmc kmod-spi-dev
  588. endef
  589. # Missing DSA Setup
  590. #TARGET_DEVICES += glinet_gl-s1300
  591. define Device/kernel-size-6350-8300
  592. DEVICE_COMPAT_VERSION := 2.0
  593. DEVICE_COMPAT_MESSAGE := Kernel partition size must be increased for \
  594. this OpenWrt version. Before continuing, you MUST issue either the \
  595. command "fw_setenv kernsize 500000" from the OpenWrt command line, \
  596. or "setenv kernsize 500000 ; saveenv" from the U-Boot serial console. \
  597. Instead of the sysupgrade image, you must then install the OpenWrt \
  598. factory image, setting the force flag and wiping the configuration. \
  599. (e.g. "sysupgrade -n -F openwrt-squashfs-factory.bin" on command line)
  600. endef
  601. define Device/linksys_ea6350v3
  602. # The Linksys EA6350v3 has a uboot bootloader that does not
  603. # support either booting lzma kernel images nor booting UBI
  604. # partitions. This uboot, however, supports raw kernel images and
  605. # gzipped images.
  606. #
  607. # As configured by the OEM factory, the device will boot the kernel
  608. # from a fixed address with a fixed length of 3 MiB. Also, the
  609. # device has a hard-coded kernel command line that requires the
  610. # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
  611. # Oh... and the kernel partition overlaps with the rootfs
  612. # partition (the same for alt_kernel and alt_rootfs).
  613. #
  614. # If you are planing re-partitioning the device, you may want to
  615. # keep these details in mind:
  616. # 1. The kernel addresses you should honor are 0x00000000 and
  617. # 0x02800000 respectively.
  618. # 2. The kernel size (plus the dtb) cannot exceed 3 MiB in size
  619. # unless the uboot environment variable "kernsize" is increased.
  620. # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
  621. # 4. The kernel command line from uboot is harcoded to boot with
  622. # rootfs either in mtd11 or mtd13.
  623. $(call Device/FitzImage)
  624. $(call Device/kernel-size-6350-8300)
  625. DEVICE_VENDOR := Linksys
  626. DEVICE_MODEL := EA6350
  627. DEVICE_VARIANT := v3
  628. SOC := qcom-ipq4018
  629. BLOCKSIZE := 128k
  630. PAGESIZE := 2048
  631. KERNEL_SIZE := 5120k
  632. IMAGE_SIZE := 35840k
  633. NAND_SIZE := 128m
  634. UBINIZE_OPTS := -E 5
  635. IMAGES += factory.bin
  636. IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
  637. endef
  638. TARGET_DEVICES += linksys_ea6350v3
  639. define Device/linksys_ea8300
  640. $(call Device/FitzImage)
  641. $(call Device/kernel-size-6350-8300)
  642. DEVICE_VENDOR := Linksys
  643. DEVICE_MODEL := EA8300
  644. SOC := qcom-ipq4019
  645. KERNEL_SIZE := 5120k
  646. IMAGE_SIZE := 84992k
  647. NAND_SIZE := 256m
  648. BLOCKSIZE := 128k
  649. PAGESIZE := 2048
  650. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  651. IMAGES += factory.bin
  652. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
  653. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
  654. endef
  655. TARGET_DEVICES += linksys_ea8300
  656. define Device/linksys_mr8300
  657. $(call Device/FitzImage)
  658. $(call Device/kernel-size-6350-8300)
  659. DEVICE_VENDOR := Linksys
  660. DEVICE_MODEL := MR8300
  661. SOC := qcom-ipq4019
  662. KERNEL_SIZE := 5120k
  663. IMAGE_SIZE := 84992k
  664. NAND_SIZE := 256m
  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=MR8300
  670. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
  671. endef
  672. TARGET_DEVICES += linksys_mr8300
  673. define Device/linksys_whw01
  674. $(call Device/FitzImage)
  675. DEVICE_VENDOR := Linksys
  676. DEVICE_MODEL := WHW01
  677. KERNEL_SIZE := 6144k
  678. IMAGE_SIZE := 75776k
  679. NAND_SIZE := 256m
  680. SOC := qcom-ipq4018
  681. BLOCKSIZE := 128k
  682. PAGESIZE := 2048
  683. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  684. IMAGES += factory.bin
  685. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW01
  686. DEVICE_PACKAGES := uboot-envtools kmod-leds-pca963x
  687. endef
  688. TARGET_DEVICES += linksys_whw01
  689. define Device/linksys_whw03
  690. $(call Device/FitzImage)
  691. DEVICE_VENDOR := Linksys
  692. DEVICE_MODEL := WHW03
  693. SOC := qcom-ipq4019
  694. KERNEL_SIZE := 8192k
  695. IMAGE_SIZE := 131072k
  696. IMAGES += factory.bin
  697. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | linksys-image type=WHW03
  698. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-bluetooth \
  699. kmod-fs-ext4 e2fsprogs kmod-fs-f2fs mkf2fs losetup ipq-wifi-linksys_whw03
  700. endef
  701. TARGET_DEVICES += linksys_whw03
  702. define Device/linksys_whw03v2
  703. $(call Device/FitzImage)
  704. DEVICE_VENDOR := Linksys
  705. DEVICE_MODEL := WHW03
  706. DEVICE_VARIANT := V2
  707. SOC := qcom-ipq4019
  708. KERNEL_SIZE := 6144k
  709. IMAGE_SIZE := 158720k
  710. NAND_SIZE := 512m
  711. BLOCKSIZE := 128k
  712. PAGESIZE := 2048
  713. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  714. IMAGES += factory.bin
  715. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW03v2
  716. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-bluetooth
  717. endef
  718. TARGET_DEVICES += linksys_whw03v2
  719. define Device/luma_wrtq-329acn
  720. $(call Device/FitImage)
  721. DEVICE_VENDOR := Luma Home
  722. DEVICE_MODEL := WRTQ-329ACN
  723. SOC := qcom-ipq4018
  724. DEVICE_PACKAGES := kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio
  725. IMAGE_SIZE := 76632k
  726. BLOCKSIZE := 128k
  727. PAGESIZE := 2048
  728. endef
  729. TARGET_DEVICES += luma_wrtq-329acn
  730. define Device/meraki_common
  731. $(call Device/FitImage)
  732. DEVICE_VENDOR := Cisco Meraki
  733. SOC := qcom-ipq4029
  734. BLOCKSIZE := 128k
  735. PAGESIZE := 2048
  736. DEVICE_DTS_LOADADDR := 0x89000000
  737. DEVICE_PACKAGES := ath10k-firmware-qca9887-ct
  738. endef
  739. define Device/meraki_mr33
  740. $(call Device/meraki_common)
  741. DEVICE_MODEL := MR33
  742. endef
  743. TARGET_DEVICES += meraki_mr33
  744. define Device/meraki_mr74
  745. $(call Device/meraki_common)
  746. DEVICE_MODEL := MR74
  747. DEVICE_DTS_CONFIG := config@3
  748. endef
  749. TARGET_DEVICES += meraki_mr74
  750. define Device/mobipromo_cm520-79f
  751. $(call Device/FitzImage)
  752. $(call Device/UbiFit)
  753. DEVICE_VENDOR := MobiPromo
  754. DEVICE_MODEL := CM520-79F
  755. SOC := qcom-ipq4019
  756. BLOCKSIZE := 128k
  757. PAGESIZE := 2048
  758. DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
  759. endef
  760. TARGET_DEVICES += mobipromo_cm520-79f
  761. define Device/netgear_ex61x0v2
  762. $(call Device/DniImage)
  763. DEVICE_VENDOR := NETGEAR
  764. DEVICE_DTS_CONFIG := config@4
  765. NETGEAR_BOARD_ID := EX6150v2series
  766. NETGEAR_HW_ID := 29765285+16+0+128+2x2
  767. IMAGE_SIZE := 14400k
  768. SOC := qcom-ipq4018
  769. endef
  770. define Device/netgear_ex6100v2
  771. $(call Device/netgear_ex61x0v2)
  772. DEVICE_MODEL := EX6100
  773. DEVICE_VARIANT := v2
  774. endef
  775. TARGET_DEVICES += netgear_ex6100v2
  776. define Device/netgear_ex6150v2
  777. $(call Device/netgear_ex61x0v2)
  778. DEVICE_MODEL := EX6150
  779. DEVICE_VARIANT := v2
  780. endef
  781. TARGET_DEVICES += netgear_ex6150v2
  782. define Device/netgear_orbi
  783. $(call Device/DniImage)
  784. SOC := qcom-ipq4019
  785. DEVICE_VENDOR := NETGEAR
  786. IMAGE/factory.img := append-kernel | pad-offset 128k 64 | \
  787. append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
  788. append-rootfs | pad-rootfs | netgear-dni
  789. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | \
  790. sysupgrade-tar rootfs=$$$$@ | append-metadata
  791. DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
  792. endef
  793. define Device/netgear_lbr20
  794. $(call Device/netgear_orbi)
  795. DEVICE_MODEL := LBR20
  796. NETGEAR_BOARD_ID := LBR20
  797. NETGEAR_HW_ID := 29766182+0+256+512+2x2+2x2+2x2+1
  798. KERNEL_SIZE := 7340032
  799. BLOCKSIZE := 128k
  800. PAGESIZE := 2048
  801. UBINIZE_OPTS := -E 5
  802. IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  803. append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
  804. append-ubi | netgear-dni
  805. IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  806. append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
  807. append-metadata
  808. DEVICE_PACKAGES := ipq-wifi-netgear_lbr20 ath10k-firmware-qca9888-ct kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  809. endef
  810. TARGET_DEVICES += netgear_lbr20
  811. define Device/netgear_rbx40
  812. $(call Device/netgear_orbi)
  813. NETGEAR_HW_ID := 29765515+0+4096+512+2x2+2x2+2x2
  814. KERNEL_SIZE := 3932160
  815. ROOTFS_SIZE := 32243712
  816. IMAGE_SIZE := 36175872
  817. endef
  818. define Device/netgear_rbr40
  819. $(call Device/netgear_rbx40)
  820. DEVICE_MODEL := RBR40
  821. DEVICE_VARIANT := v1
  822. NETGEAR_BOARD_ID := RBR40
  823. endef
  824. TARGET_DEVICES += netgear_rbr40
  825. define Device/netgear_rbs40
  826. $(call Device/netgear_rbx40)
  827. DEVICE_MODEL := RBS40
  828. DEVICE_VARIANT := v1
  829. NETGEAR_BOARD_ID := RBS40
  830. endef
  831. TARGET_DEVICES += netgear_rbs40
  832. define Device/netgear_rbx50
  833. $(call Device/netgear_orbi)
  834. NETGEAR_HW_ID := 29765352+0+4000+512+2x2+2x2+4x4
  835. KERNEL_SIZE := 3932160
  836. ROOTFS_SIZE := 32243712
  837. IMAGE_SIZE := 36175872
  838. endef
  839. define Device/netgear_rbr50
  840. $(call Device/netgear_rbx50)
  841. DEVICE_MODEL := RBR50
  842. DEVICE_VARIANT := v1
  843. NETGEAR_BOARD_ID := RBR50
  844. endef
  845. TARGET_DEVICES += netgear_rbr50
  846. define Device/netgear_rbs50
  847. $(call Device/netgear_rbx50)
  848. DEVICE_MODEL := RBS50
  849. DEVICE_VARIANT := v1
  850. NETGEAR_BOARD_ID := RBS50
  851. endef
  852. TARGET_DEVICES += netgear_rbs50
  853. define Device/netgear_srx60
  854. $(call Device/netgear_orbi)
  855. NETGEAR_HW_ID := 29765352+0+4096+512+2x2+2x2+4x4
  856. KERNEL_SIZE := 3932160
  857. ROOTFS_SIZE := 32243712
  858. IMAGE_SIZE := 36175872
  859. endef
  860. define Device/netgear_srr60
  861. $(call Device/netgear_srx60)
  862. DEVICE_MODEL := SRR60
  863. NETGEAR_BOARD_ID := SRR60
  864. endef
  865. TARGET_DEVICES += netgear_srr60
  866. define Device/netgear_srs60
  867. $(call Device/netgear_srx60)
  868. DEVICE_MODEL := SRS60
  869. NETGEAR_BOARD_ID := SRS60
  870. endef
  871. TARGET_DEVICES += netgear_srs60
  872. define Device/netgear_wac510
  873. $(call Device/FitImage)
  874. $(call Device/UbiFit)
  875. DEVICE_VENDOR := Netgear
  876. DEVICE_MODEL := WAC510
  877. SOC := qcom-ipq4018
  878. DEVICE_DTS_CONFIG := config@5
  879. BLOCKSIZE := 128k
  880. PAGESIZE := 2048
  881. IMAGES += factory.tar
  882. IMAGE/factory.tar := append-ubi | wac5xx-netgear-tar
  883. DEVICE_PACKAGES := uboot-envtools
  884. endef
  885. TARGET_DEVICES += netgear_wac510
  886. define Device/openmesh_a42
  887. $(call Device/FitImageLzma)
  888. DEVICE_VENDOR := OpenMesh
  889. DEVICE_MODEL := A42
  890. SOC := qcom-ipq4018
  891. DEVICE_DTS_CONFIG := [email protected]
  892. BLOCKSIZE := 64k
  893. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  894. IMAGE_SIZE := 15616k
  895. IMAGES += factory.bin
  896. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
  897. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  898. endef
  899. TARGET_DEVICES += openmesh_a42
  900. define Device/openmesh_a62
  901. $(call Device/FitImageLzma)
  902. DEVICE_VENDOR := OpenMesh
  903. DEVICE_MODEL := A62
  904. SOC := qcom-ipq4019
  905. DEVICE_DTS_CONFIG := [email protected]
  906. BLOCKSIZE := 64k
  907. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  908. IMAGE_SIZE := 15552k
  909. IMAGES += factory.bin
  910. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
  911. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  912. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
  913. endef
  914. TARGET_DEVICES += openmesh_a62
  915. define Device/p2w_r619ac
  916. $(call Device/FitzImage)
  917. $(call Device/UbiFit)
  918. DEVICE_VENDOR := P&W
  919. DEVICE_MODEL := R619AC
  920. SOC := qcom-ipq4019
  921. DEVICE_DTS_CONFIG := config@10
  922. BLOCKSIZE := 128k
  923. PAGESIZE := 2048
  924. endef
  925. define Device/p2w_r619ac-64m
  926. $(call Device/p2w_r619ac)
  927. DEVICE_VARIANT := 64M NAND
  928. IMAGES += factory.bin
  929. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  930. endef
  931. TARGET_DEVICES += p2w_r619ac-64m
  932. define Device/p2w_r619ac-128m
  933. $(call Device/p2w_r619ac)
  934. DEVICE_VARIANT := 128M NAND
  935. endef
  936. TARGET_DEVICES += p2w_r619ac-128m
  937. define Device/pakedge_wr-1
  938. $(call Device/FitImageLzma)
  939. DEVICE_VENDOR := Pakedge
  940. DEVICE_MODEL := WR-1
  941. DEVICE_DTS_CONFIG := [email protected]
  942. SOC := qcom-ipq4018
  943. BLOCKSIZE := 64k
  944. IMAGE_SIZE := 31232k
  945. IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata
  946. endef
  947. TARGET_DEVICES += pakedge_wr-1
  948. define Device/plasmacloud_pa1200
  949. $(call Device/FitImageLzma)
  950. DEVICE_VENDOR := Plasma Cloud
  951. DEVICE_MODEL := PA1200
  952. SOC := qcom-ipq4018
  953. DEVICE_DTS_CONFIG := [email protected]
  954. BLOCKSIZE := 64k
  955. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  956. IMAGE_SIZE := 15616k
  957. IMAGES += factory.bin
  958. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
  959. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  960. endef
  961. TARGET_DEVICES += plasmacloud_pa1200
  962. define Device/plasmacloud_pa2200
  963. $(call Device/FitImageLzma)
  964. DEVICE_VENDOR := Plasma Cloud
  965. DEVICE_MODEL := PA2200
  966. SOC := qcom-ipq4019
  967. DEVICE_DTS_CONFIG := [email protected]
  968. BLOCKSIZE := 64k
  969. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  970. IMAGE_SIZE := 15552k
  971. IMAGES += factory.bin
  972. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
  973. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  974. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
  975. endef
  976. TARGET_DEVICES += plasmacloud_pa2200
  977. define Device/qxwlan_e2600ac-c1
  978. $(call Device/FitImage)
  979. DEVICE_VENDOR := Qxwlan
  980. DEVICE_MODEL := E2600AC
  981. DEVICE_VARIANT := C1
  982. BOARD_NAME := e2600ac-c1
  983. SOC := qcom-ipq4019
  984. IMAGE_SIZE := 31232k
  985. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  986. endef
  987. TARGET_DEVICES += qxwlan_e2600ac-c1
  988. define Device/qxwlan_e2600ac-c2
  989. $(call Device/FitImage)
  990. $(call Device/UbiFit)
  991. DEVICE_VENDOR := Qxwlan
  992. DEVICE_MODEL := E2600AC
  993. DEVICE_VARIANT := C2
  994. SOC := qcom-ipq4019
  995. KERNEL_INSTALL := 1
  996. BLOCKSIZE := 128k
  997. PAGESIZE := 2048
  998. endef
  999. TARGET_DEVICES += qxwlan_e2600ac-c2
  1000. define Device/skspruce_wia3300-20
  1001. $(call Device/FitzImage)
  1002. BLOCKSIZE := 64k
  1003. IMAGE_SIZE := 55104k
  1004. SOC := qcom-ipq4019
  1005. DEVICE_VENDOR := SKSpruce
  1006. DEVICE_MODEL := WIA3300-20
  1007. DEVICE_PACKAGES := -ath10k-board-qca4019 ipq-wifi-skspruce_wia3300-20
  1008. IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
  1009. append-rootfs | pad-rootfs | check-size | append-metadata
  1010. endef
  1011. TARGET_DEVICES +=skspruce_wia3300-20
  1012. define Device/sony_ncp-hg100-cellular
  1013. $(call Device/FitImage)
  1014. DEVICE_VENDOR := Sony
  1015. DEVICE_MODEL := NCP-HG100/Cellular
  1016. DEVICE_DTS_CONFIG := [email protected]
  1017. SOC := qcom-ipq4019
  1018. KERNEL_SIZE := 8192k
  1019. IMAGE_SIZE := 128m
  1020. DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 uqmi
  1021. endef
  1022. TARGET_DEVICES += sony_ncp-hg100-cellular
  1023. define Device/teltonika_rutx10
  1024. $(call Device/FitImage)
  1025. $(call Device/UbiFit)
  1026. DEVICE_VENDOR := Teltonika
  1027. DEVICE_MODEL := RUTX10
  1028. SOC := qcom-ipq4018
  1029. DEVICE_DTS_CONFIG := config@5
  1030. KERNEL_INSTALL := 1
  1031. BLOCKSIZE := 128k
  1032. PAGESIZE := 2048
  1033. FILESYSTEMS := squashfs
  1034. IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
  1035. DEVICE_PACKAGES := kmod-bluetooth
  1036. endef
  1037. # Missing DSA Setup
  1038. #TARGET_DEVICES += teltonika_rutx10
  1039. define Device/teltonika_rutx50
  1040. $(call Device/FitImage)
  1041. $(call Device/UbiFit)
  1042. DEVICE_VENDOR := Teltonika
  1043. DEVICE_MODEL := RUTX50
  1044. SOC := qcom-ipq4018
  1045. DEVICE_DTS_CONFIG := config@5
  1046. KERNEL_INSTALL := 1
  1047. BLOCKSIZE := 128k
  1048. PAGESIZE := 2048
  1049. FILESYSTEMS := squashfs
  1050. IMAGE/factory.ubi := append-ubi
  1051. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1052. endef
  1053. TARGET_DEVICES += teltonika_rutx50
  1054. define Device/tel_x1pro
  1055. $(call Device/FitImage)
  1056. DEVICE_VENDOR := Telco
  1057. DEVICE_MODEL := X1 Pro
  1058. SOC := qcom-ipq4019
  1059. KERNEL_SIZE := 4096k
  1060. IMAGE_SIZE := 31232k
  1061. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1062. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1063. DEFAULT := n
  1064. endef
  1065. # Missing DSA Setup
  1066. #TARGET_DEVICES += tel_x1pro
  1067. define Device/unielec_u4019-32m
  1068. $(call Device/FitImage)
  1069. DEVICE_VENDOR := Unielec
  1070. DEVICE_MODEL := U4019
  1071. DEVICE_VARIANT := 32M
  1072. BOARD_NAME := u4019-32m
  1073. SOC := qcom-ipq4019
  1074. KERNEL_SIZE := 4096k
  1075. IMAGE_SIZE := 31232k
  1076. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1077. DEFAULT := n
  1078. endef
  1079. # Missing DSA Setup
  1080. #TARGET_DEVICES += unielec_u4019-32m
  1081. define Device/wallys_dr40x9
  1082. $(call Device/FitImage)
  1083. $(call Device/UbiFit)
  1084. DEVICE_VENDOR := Wallys
  1085. DEVICE_MODEL := DR40X9
  1086. SOC := qcom-ipq40x9
  1087. DEVICE_DTS_CONFIG := [email protected]
  1088. BLOCKSIZE := 128k
  1089. PAGESIZE := 2048
  1090. DEVICE_PACKAGES := ipq-wifi-wallys_dr40x9
  1091. endef
  1092. TARGET_DEVICES += wallys_dr40x9
  1093. define Device/yyets_le1
  1094. $(call Device/FitzImage)
  1095. DEVICE_VENDOR := YYeTs
  1096. DEVICE_MODEL := LE1
  1097. SOC := qcom-ipq4019
  1098. KERNEL_SIZE := 4096k
  1099. IMAGE_SIZE := 31232k
  1100. IMAGES += factory.bin
  1101. IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
  1102. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1103. DEVICE_PACKAGES := ipq-wifi-yyets_le1 kmod-usb-ledtrig-usbport
  1104. endef
  1105. TARGET_DEVICES += yyets_le1
  1106. define Device/zte_mf18a
  1107. $(call Device/FitImage)
  1108. DEVICE_VENDOR := ZTE
  1109. DEVICE_MODEL := MF18A
  1110. SOC := qcom-ipq4019
  1111. DEVICE_DTS_CONFIG := [email protected]
  1112. BLOCKSIZE := 128k
  1113. PAGESIZE := 2048
  1114. KERNEL_IN_UBI := 1
  1115. DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
  1116. endef
  1117. TARGET_DEVICES += zte_mf18a
  1118. define Device/zte_mf28x_common
  1119. $(call Device/FitzImage)
  1120. DEVICE_VENDOR := ZTE
  1121. SOC := qcom-ipq4019
  1122. DEVICE_DTS_CONFIG := [email protected]
  1123. BLOCKSIZE := 128k
  1124. PAGESIZE := 2048
  1125. KERNEL_IN_UBI := 1
  1126. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1127. endef
  1128. define Device/zte_mf282plus
  1129. $(call Device/zte_mf28x_common)
  1130. DEVICE_MODEL := MF282Plus
  1131. # The recovery image is used to return back to stock (an initramfs-based image
  1132. # that can be flashed to the device via sysupgrade
  1133. # The factory image is used to install from the stock firmware by using an
  1134. # exploit for the web interface
  1135. IMAGES += factory.bin recovery.bin
  1136. IMAGE/factory.bin := append-ubi
  1137. IMAGE/recovery.bin := append-squashfs4-fakeroot | sysupgrade-tar kernel=$$$$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) rootfs=$$$$@ | append-metadata
  1138. DEVICE_PACKAGES := kmod-usb-acm kmod-usb-net-rndis
  1139. endef
  1140. TARGET_DEVICES += zte_mf282plus
  1141. define Device/zte_mf286d
  1142. $(call Device/zte_mf28x_common)
  1143. DEVICE_MODEL := MF286D
  1144. endef
  1145. TARGET_DEVICES += zte_mf286d
  1146. define Device/zte_mf287_common
  1147. $(call Device/zte_mf28x_common)
  1148. SOC := qcom-ipq4018
  1149. # The recovery image is used to return back to stock (an initramfs-based image
  1150. # that can be flashed to the device via sysupgrade
  1151. # The factory image is used to install from the stock firmware by using an
  1152. # exploit for the web interface
  1153. IMAGES += factory.bin recovery.bin
  1154. IMAGE/factory.bin := append-ubi
  1155. IMAGE/recovery.bin := append-squashfs4-fakeroot | sysupgrade-tar kernel=$$$$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) rootfs=$$$$@ | append-metadata
  1156. endef
  1157. define Device/zte_mf287plus
  1158. $(call Device/zte_mf287_common)
  1159. DEVICE_PACKAGES += ipq-wifi-zte_mf287plus
  1160. DEVICE_DTS_CONFIG := [email protected]
  1161. DEVICE_MODEL := MF287Plus
  1162. endef
  1163. TARGET_DEVICES += zte_mf287plus
  1164. define Device/zte_mf287
  1165. $(call Device/zte_mf287_common)
  1166. DEVICE_PACKAGES += ipq-wifi-zte_mf287
  1167. DEVICE_DTS_CONFIG := [email protected]
  1168. DEVICE_MODEL := MF287
  1169. endef
  1170. TARGET_DEVICES += zte_mf287
  1171. define Device/zte_mf287pro
  1172. $(call Device/zte_mf287_common)
  1173. DEVICE_PACKAGES += ipq-wifi-zte_mf287plus
  1174. DEVICE_DTS_CONFIG := [email protected]
  1175. DEVICE_MODEL := MF287Pro
  1176. endef
  1177. TARGET_DEVICES += zte_mf287pro
  1178. define Device/zte_mf289f
  1179. $(call Device/zte_mf28x_common)
  1180. DEVICE_MODEL := MF289F
  1181. DEVICE_PACKAGES += ath10k-firmware-qca9984-ct
  1182. endef
  1183. TARGET_DEVICES += zte_mf289f
  1184. define Device/zyxel_nbg6617
  1185. $(call Device/FitImageLzma)
  1186. DEVICE_VENDOR := Zyxel
  1187. DEVICE_MODEL := NBG6617
  1188. SOC := qcom-ipq4018
  1189. KERNEL_SIZE := 4096k
  1190. ROOTFS_SIZE := 24960k
  1191. RAS_BOARD := NBG6617
  1192. RAS_ROOTFS_SIZE := 19840k
  1193. RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
  1194. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1195. IMAGES += factory.bin
  1196. # The Zyxel firmware allows flashing thru the web-gui only when the rootfs is
  1197. # at least as large as the one of the initial firmware image (not the current
  1198. # one on the device). This only applies to the Web-UI, the bootlaoder ignores
  1199. # this minimum-size. However, the larger image can be flashed both ways.
  1200. IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel
  1201. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
  1202. DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
  1203. endef
  1204. TARGET_DEVICES += zyxel_nbg6617
  1205. define Device/zyxel_wre6606
  1206. $(call Device/FitImage)
  1207. DEVICE_VENDOR := Zyxel
  1208. DEVICE_MODEL := WRE6606
  1209. DEVICE_DTS_CONFIG := config@4
  1210. SOC := qcom-ipq4018
  1211. IMAGE_SIZE := 13184k
  1212. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  1213. DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
  1214. endef
  1215. # Missing DSA Setup
  1216. #TARGET_DEVICES += zyxel_wre6606