generic.mk 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  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. TARGET_DEVICES += glinet_gl-s1300
  590. define Device/kernel-size-6350-8300
  591. DEVICE_COMPAT_VERSION := 2.0
  592. DEVICE_COMPAT_MESSAGE := Kernel partition size must be increased for \
  593. this OpenWrt version. Before continuing, you MUST issue either the \
  594. command "fw_setenv kernsize 500000" from the OpenWrt command line, \
  595. or "setenv kernsize 500000 ; saveenv" from the U-Boot serial console. \
  596. Instead of the sysupgrade image, you must then install the OpenWrt \
  597. factory image, setting the force flag and wiping the configuration. \
  598. (e.g. "sysupgrade -n -F openwrt-squashfs-factory.bin" on command line)
  599. endef
  600. define Device/linksys_ea6350v3
  601. # The Linksys EA6350v3 has a uboot bootloader that does not
  602. # support either booting lzma kernel images nor booting UBI
  603. # partitions. This uboot, however, supports raw kernel images and
  604. # gzipped images.
  605. #
  606. # As configured by the OEM factory, the device will boot the kernel
  607. # from a fixed address with a fixed length of 3 MiB. Also, the
  608. # device has a hard-coded kernel command line that requires the
  609. # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
  610. # Oh... and the kernel partition overlaps with the rootfs
  611. # partition (the same for alt_kernel and alt_rootfs).
  612. #
  613. # If you are planing re-partitioning the device, you may want to
  614. # keep these details in mind:
  615. # 1. The kernel addresses you should honor are 0x00000000 and
  616. # 0x02800000 respectively.
  617. # 2. The kernel size (plus the dtb) cannot exceed 3 MiB in size
  618. # unless the uboot environment variable "kernsize" is increased.
  619. # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
  620. # 4. The kernel command line from uboot is harcoded to boot with
  621. # rootfs either in mtd11 or mtd13.
  622. $(call Device/FitzImage)
  623. $(call Device/kernel-size-6350-8300)
  624. DEVICE_VENDOR := Linksys
  625. DEVICE_MODEL := EA6350
  626. DEVICE_VARIANT := v3
  627. SOC := qcom-ipq4018
  628. BLOCKSIZE := 128k
  629. PAGESIZE := 2048
  630. KERNEL_SIZE := 5120k
  631. IMAGE_SIZE := 35840k
  632. NAND_SIZE := 128m
  633. UBINIZE_OPTS := -E 5
  634. IMAGES += factory.bin
  635. IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
  636. endef
  637. TARGET_DEVICES += linksys_ea6350v3
  638. define Device/linksys_ea8300
  639. $(call Device/FitzImage)
  640. $(call Device/kernel-size-6350-8300)
  641. DEVICE_VENDOR := Linksys
  642. DEVICE_MODEL := EA8300
  643. SOC := qcom-ipq4019
  644. KERNEL_SIZE := 5120k
  645. IMAGE_SIZE := 84992k
  646. NAND_SIZE := 256m
  647. BLOCKSIZE := 128k
  648. PAGESIZE := 2048
  649. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  650. IMAGES += factory.bin
  651. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
  652. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
  653. endef
  654. TARGET_DEVICES += linksys_ea8300
  655. define Device/linksys_mr8300
  656. $(call Device/FitzImage)
  657. $(call Device/kernel-size-6350-8300)
  658. DEVICE_VENDOR := Linksys
  659. DEVICE_MODEL := MR8300
  660. SOC := qcom-ipq4019
  661. KERNEL_SIZE := 5120k
  662. IMAGE_SIZE := 84992k
  663. NAND_SIZE := 256m
  664. BLOCKSIZE := 128k
  665. PAGESIZE := 2048
  666. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  667. IMAGES += factory.bin
  668. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
  669. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
  670. endef
  671. TARGET_DEVICES += linksys_mr8300
  672. define Device/linksys_whw03
  673. $(call Device/FitzImage)
  674. DEVICE_VENDOR := Linksys
  675. DEVICE_MODEL := WHW03
  676. SOC := qcom-ipq4019
  677. KERNEL_SIZE := 8192k
  678. IMAGE_SIZE := 131072k
  679. IMAGES += factory.bin
  680. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | linksys-image type=WHW03
  681. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-hci-uart \
  682. kmod-fs-ext4 e2fsprogs kmod-fs-f2fs mkf2fs losetup ipq-wifi-linksys_whw03
  683. endef
  684. TARGET_DEVICES += linksys_whw03
  685. define Device/linksys_whw03v2
  686. $(call Device/FitzImage)
  687. DEVICE_VENDOR := Linksys
  688. DEVICE_MODEL := WHW03
  689. DEVICE_VARIANT := V2
  690. SOC := qcom-ipq4019
  691. KERNEL_SIZE := 6144k
  692. IMAGE_SIZE := 158720k
  693. NAND_SIZE := 512m
  694. BLOCKSIZE := 128k
  695. PAGESIZE := 2048
  696. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  697. IMAGES += factory.bin
  698. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW03v2
  699. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-hci-uart
  700. endef
  701. TARGET_DEVICES += linksys_whw03v2
  702. define Device/linksys_whw01
  703. $(call Device/FitzImage)
  704. DEVICE_VENDOR := Linksys
  705. DEVICE_MODEL := WHW01
  706. KERNEL_SIZE := 6144k
  707. IMAGE_SIZE := 75776k
  708. NAND_SIZE := 256m
  709. SOC := qcom-ipq4018
  710. BLOCKSIZE := 128k
  711. PAGESIZE := 2048
  712. UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
  713. IMAGES += factory.bin
  714. IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW01
  715. DEVICE_PACKAGES := uboot-envtools kmod-leds-pca963x
  716. endef
  717. TARGET_DEVICES += linksys_whw01
  718. define Device/luma_wrtq-329acn
  719. $(call Device/FitImage)
  720. DEVICE_VENDOR := Luma Home
  721. DEVICE_MODEL := WRTQ-329ACN
  722. SOC := qcom-ipq4018
  723. DEVICE_PACKAGES := kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio
  724. IMAGE_SIZE := 76632k
  725. BLOCKSIZE := 128k
  726. PAGESIZE := 2048
  727. endef
  728. TARGET_DEVICES += luma_wrtq-329acn
  729. define Device/meraki_common
  730. $(call Device/FitImage)
  731. DEVICE_VENDOR := Cisco Meraki
  732. SOC := qcom-ipq4029
  733. BLOCKSIZE := 128k
  734. PAGESIZE := 2048
  735. DEVICE_DTS_LOADADDR := 0x89000000
  736. DEVICE_PACKAGES := ath10k-firmware-qca9887-ct
  737. endef
  738. define Device/meraki_mr33
  739. $(call Device/meraki_common)
  740. DEVICE_MODEL := MR33
  741. endef
  742. TARGET_DEVICES += meraki_mr33
  743. define Device/meraki_mr74
  744. $(call Device/meraki_common)
  745. DEVICE_MODEL := MR74
  746. DEVICE_DTS_CONFIG := config@3
  747. endef
  748. TARGET_DEVICES += meraki_mr74
  749. define Device/mobipromo_cm520-79f
  750. $(call Device/FitzImage)
  751. $(call Device/UbiFit)
  752. DEVICE_VENDOR := MobiPromo
  753. DEVICE_MODEL := CM520-79F
  754. SOC := qcom-ipq4019
  755. BLOCKSIZE := 128k
  756. PAGESIZE := 2048
  757. DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
  758. endef
  759. TARGET_DEVICES += mobipromo_cm520-79f
  760. define Device/netgear_ex61x0v2
  761. $(call Device/DniImage)
  762. DEVICE_VENDOR := NETGEAR
  763. DEVICE_DTS_CONFIG := config@4
  764. NETGEAR_BOARD_ID := EX6150v2series
  765. NETGEAR_HW_ID := 29765285+16+0+128+2x2
  766. IMAGE_SIZE := 14400k
  767. SOC := qcom-ipq4018
  768. endef
  769. define Device/netgear_ex6100v2
  770. $(call Device/netgear_ex61x0v2)
  771. DEVICE_MODEL := EX6100
  772. DEVICE_VARIANT := v2
  773. endef
  774. TARGET_DEVICES += netgear_ex6100v2
  775. define Device/netgear_ex6150v2
  776. $(call Device/netgear_ex61x0v2)
  777. DEVICE_MODEL := EX6150
  778. DEVICE_VARIANT := v2
  779. endef
  780. TARGET_DEVICES += netgear_ex6150v2
  781. define Device/netgear_orbi
  782. $(call Device/DniImage)
  783. SOC := qcom-ipq4019
  784. DEVICE_VENDOR := NETGEAR
  785. IMAGE/factory.img := append-kernel | pad-offset 128k 64 | \
  786. append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
  787. append-rootfs | pad-rootfs | netgear-dni
  788. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | \
  789. sysupgrade-tar rootfs=$$$$@ | append-metadata
  790. DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
  791. endef
  792. define Device/netgear_lbr20
  793. $(call Device/netgear_orbi)
  794. DEVICE_MODEL := LBR20
  795. NETGEAR_BOARD_ID := LBR20
  796. NETGEAR_HW_ID := 29766182+0+256+512+2x2+2x2+2x2+1
  797. KERNEL_SIZE := 7340032
  798. BLOCKSIZE := 128k
  799. PAGESIZE := 2048
  800. UBINIZE_OPTS := -E 5
  801. IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  802. append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
  803. append-ubi | netgear-dni
  804. IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  805. append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
  806. append-metadata
  807. DEVICE_PACKAGES := ipq-wifi-netgear_lbr20 ath10k-firmware-qca9888-ct kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  808. endef
  809. TARGET_DEVICES += netgear_lbr20
  810. define Device/netgear_rbx40
  811. $(call Device/netgear_orbi)
  812. NETGEAR_HW_ID := 29765515+0+4096+512+2x2+2x2+2x2
  813. KERNEL_SIZE := 3932160
  814. ROOTFS_SIZE := 32243712
  815. IMAGE_SIZE := 36175872
  816. endef
  817. define Device/netgear_rbr40
  818. $(call Device/netgear_rbx40)
  819. DEVICE_MODEL := RBR40
  820. DEVICE_VARIANT := v1
  821. NETGEAR_BOARD_ID := RBR40
  822. endef
  823. TARGET_DEVICES += netgear_rbr40
  824. define Device/netgear_rbs40
  825. $(call Device/netgear_rbx40)
  826. DEVICE_MODEL := RBS40
  827. DEVICE_VARIANT := v1
  828. NETGEAR_BOARD_ID := RBS40
  829. endef
  830. TARGET_DEVICES += netgear_rbs40
  831. define Device/netgear_rbx50
  832. $(call Device/netgear_orbi)
  833. NETGEAR_HW_ID := 29765352+0+4000+512+2x2+2x2+4x4
  834. KERNEL_SIZE := 3932160
  835. ROOTFS_SIZE := 32243712
  836. IMAGE_SIZE := 36175872
  837. endef
  838. define Device/netgear_rbr50
  839. $(call Device/netgear_rbx50)
  840. DEVICE_MODEL := RBR50
  841. DEVICE_VARIANT := v1
  842. NETGEAR_BOARD_ID := RBR50
  843. endef
  844. TARGET_DEVICES += netgear_rbr50
  845. define Device/netgear_rbs50
  846. $(call Device/netgear_rbx50)
  847. DEVICE_MODEL := RBS50
  848. DEVICE_VARIANT := v1
  849. NETGEAR_BOARD_ID := RBS50
  850. endef
  851. TARGET_DEVICES += netgear_rbs50
  852. define Device/netgear_srx60
  853. $(call Device/netgear_orbi)
  854. NETGEAR_HW_ID := 29765352+0+4096+512+2x2+2x2+4x4
  855. KERNEL_SIZE := 3932160
  856. ROOTFS_SIZE := 32243712
  857. IMAGE_SIZE := 36175872
  858. endef
  859. define Device/netgear_srr60
  860. $(call Device/netgear_srx60)
  861. DEVICE_MODEL := SRR60
  862. NETGEAR_BOARD_ID := SRR60
  863. endef
  864. TARGET_DEVICES += netgear_srr60
  865. define Device/netgear_srs60
  866. $(call Device/netgear_srx60)
  867. DEVICE_MODEL := SRS60
  868. NETGEAR_BOARD_ID := SRS60
  869. endef
  870. TARGET_DEVICES += netgear_srs60
  871. define Device/netgear_wac510
  872. $(call Device/FitImage)
  873. $(call Device/UbiFit)
  874. DEVICE_VENDOR := Netgear
  875. DEVICE_MODEL := WAC510
  876. SOC := qcom-ipq4018
  877. DEVICE_DTS_CONFIG := config@5
  878. BLOCKSIZE := 128k
  879. PAGESIZE := 2048
  880. IMAGES += factory.tar
  881. IMAGE/factory.tar := append-ubi | wac5xx-netgear-tar
  882. DEVICE_PACKAGES := uboot-envtools
  883. endef
  884. TARGET_DEVICES += netgear_wac510
  885. define Device/openmesh_a42
  886. $(call Device/FitImageLzma)
  887. DEVICE_VENDOR := OpenMesh
  888. DEVICE_MODEL := A42
  889. SOC := qcom-ipq4018
  890. DEVICE_DTS_CONFIG := [email protected]
  891. BLOCKSIZE := 64k
  892. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  893. IMAGE_SIZE := 15616k
  894. IMAGES += factory.bin
  895. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
  896. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  897. endef
  898. TARGET_DEVICES += openmesh_a42
  899. define Device/openmesh_a62
  900. $(call Device/FitImageLzma)
  901. DEVICE_VENDOR := OpenMesh
  902. DEVICE_MODEL := A62
  903. SOC := qcom-ipq4019
  904. DEVICE_DTS_CONFIG := [email protected]
  905. BLOCKSIZE := 64k
  906. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  907. IMAGE_SIZE := 15552k
  908. IMAGES += factory.bin
  909. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
  910. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  911. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
  912. endef
  913. TARGET_DEVICES += openmesh_a62
  914. define Device/p2w_r619ac
  915. $(call Device/FitzImage)
  916. $(call Device/UbiFit)
  917. DEVICE_VENDOR := P&W
  918. DEVICE_MODEL := R619AC
  919. SOC := qcom-ipq4019
  920. DEVICE_DTS_CONFIG := config@10
  921. BLOCKSIZE := 128k
  922. PAGESIZE := 2048
  923. endef
  924. define Device/p2w_r619ac-64m
  925. $(call Device/p2w_r619ac)
  926. DEVICE_VARIANT := 64M NAND
  927. IMAGES += factory.bin
  928. IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
  929. endef
  930. TARGET_DEVICES += p2w_r619ac-64m
  931. define Device/p2w_r619ac-128m
  932. $(call Device/p2w_r619ac)
  933. DEVICE_VARIANT := 128M NAND
  934. endef
  935. TARGET_DEVICES += p2w_r619ac-128m
  936. define Device/pakedge_wr-1
  937. $(call Device/FitImageLzma)
  938. DEVICE_VENDOR := Pakedge
  939. DEVICE_MODEL := WR-1
  940. DEVICE_DTS_CONFIG := [email protected]
  941. SOC := qcom-ipq4018
  942. BLOCKSIZE := 64k
  943. IMAGE_SIZE := 31232k
  944. IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata
  945. endef
  946. TARGET_DEVICES += pakedge_wr-1
  947. define Device/plasmacloud_pa1200
  948. $(call Device/FitImageLzma)
  949. DEVICE_VENDOR := Plasma Cloud
  950. DEVICE_MODEL := PA1200
  951. SOC := qcom-ipq4018
  952. DEVICE_DTS_CONFIG := [email protected]
  953. BLOCKSIZE := 64k
  954. KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
  955. IMAGE_SIZE := 15616k
  956. IMAGES += factory.bin
  957. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
  958. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  959. endef
  960. TARGET_DEVICES += plasmacloud_pa1200
  961. define Device/plasmacloud_pa2200
  962. $(call Device/FitImageLzma)
  963. DEVICE_VENDOR := Plasma Cloud
  964. DEVICE_MODEL := PA2200
  965. SOC := qcom-ipq4019
  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 := 15552k
  970. IMAGES += factory.bin
  971. IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
  972. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
  973. DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
  974. endef
  975. TARGET_DEVICES += plasmacloud_pa2200
  976. define Device/qxwlan_e2600ac-c1
  977. $(call Device/FitImage)
  978. DEVICE_VENDOR := Qxwlan
  979. DEVICE_MODEL := E2600AC
  980. DEVICE_VARIANT := C1
  981. BOARD_NAME := e2600ac-c1
  982. SOC := qcom-ipq4019
  983. IMAGE_SIZE := 31232k
  984. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  985. endef
  986. TARGET_DEVICES += qxwlan_e2600ac-c1
  987. define Device/qxwlan_e2600ac-c2
  988. $(call Device/FitImage)
  989. $(call Device/UbiFit)
  990. DEVICE_VENDOR := Qxwlan
  991. DEVICE_MODEL := E2600AC
  992. DEVICE_VARIANT := C2
  993. SOC := qcom-ipq4019
  994. KERNEL_INSTALL := 1
  995. BLOCKSIZE := 128k
  996. PAGESIZE := 2048
  997. endef
  998. TARGET_DEVICES += qxwlan_e2600ac-c2
  999. define Device/skspruce_wia3300-20
  1000. $(call Device/FitzImage)
  1001. BLOCKSIZE := 64k
  1002. IMAGE_SIZE := 55104k
  1003. SOC := qcom-ipq4019
  1004. DEVICE_VENDOR := SKSpruce
  1005. DEVICE_MODEL := WIA3300-20
  1006. DEVICE_PACKAGES := -ath10k-board-qca4019 ipq-wifi-skspruce_wia3300-20
  1007. IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
  1008. append-rootfs | pad-rootfs | check-size | append-metadata
  1009. endef
  1010. TARGET_DEVICES +=skspruce_wia3300-20
  1011. define Device/sony_ncp-hg100-cellular
  1012. $(call Device/FitImage)
  1013. DEVICE_VENDOR := Sony
  1014. DEVICE_MODEL := NCP-HG100/Cellular
  1015. DEVICE_DTS_CONFIG := [email protected]
  1016. SOC := qcom-ipq4019
  1017. KERNEL_SIZE := 8192k
  1018. IMAGE_SIZE := 128m
  1019. DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 uqmi
  1020. endef
  1021. TARGET_DEVICES += sony_ncp-hg100-cellular
  1022. define Device/teltonika_rutx10
  1023. $(call Device/FitImage)
  1024. $(call Device/UbiFit)
  1025. DEVICE_VENDOR := Teltonika
  1026. DEVICE_MODEL := RUTX10
  1027. SOC := qcom-ipq4018
  1028. DEVICE_DTS_CONFIG := config@5
  1029. KERNEL_INSTALL := 1
  1030. BLOCKSIZE := 128k
  1031. PAGESIZE := 2048
  1032. FILESYSTEMS := squashfs
  1033. IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
  1034. DEVICE_PACKAGES := kmod-btusb
  1035. endef
  1036. # Missing DSA Setup
  1037. #TARGET_DEVICES += teltonika_rutx10
  1038. define Device/teltonika_rutx50
  1039. $(call Device/FitImage)
  1040. $(call Device/UbiFit)
  1041. DEVICE_VENDOR := Teltonika
  1042. DEVICE_MODEL := RUTX50
  1043. SOC := qcom-ipq4018
  1044. DEVICE_DTS_CONFIG := config@5
  1045. KERNEL_INSTALL := 1
  1046. BLOCKSIZE := 128k
  1047. PAGESIZE := 2048
  1048. FILESYSTEMS := squashfs
  1049. IMAGE/factory.ubi := append-ubi
  1050. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1051. endef
  1052. TARGET_DEVICES += teltonika_rutx50
  1053. define Device/tel_x1pro
  1054. $(call Device/FitImage)
  1055. DEVICE_VENDOR := Telco
  1056. DEVICE_MODEL := X1 Pro
  1057. SOC := qcom-ipq4019
  1058. KERNEL_SIZE := 4096k
  1059. IMAGE_SIZE := 31232k
  1060. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1061. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1062. DEFAULT := n
  1063. endef
  1064. # Missing DSA Setup
  1065. #TARGET_DEVICES += tel_x1pro
  1066. define Device/unielec_u4019-32m
  1067. $(call Device/FitImage)
  1068. DEVICE_VENDOR := Unielec
  1069. DEVICE_MODEL := U4019
  1070. DEVICE_VARIANT := 32M
  1071. BOARD_NAME := u4019-32m
  1072. SOC := qcom-ipq4019
  1073. KERNEL_SIZE := 4096k
  1074. IMAGE_SIZE := 31232k
  1075. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1076. DEFAULT := n
  1077. endef
  1078. # Missing DSA Setup
  1079. #TARGET_DEVICES += unielec_u4019-32m
  1080. define Device/wallys_dr40x9
  1081. $(call Device/FitImage)
  1082. $(call Device/UbiFit)
  1083. DEVICE_VENDOR := Wallys
  1084. DEVICE_MODEL := DR40X9
  1085. SOC := qcom-ipq40x9
  1086. DEVICE_DTS_CONFIG := [email protected]
  1087. BLOCKSIZE := 128k
  1088. PAGESIZE := 2048
  1089. DEVICE_PACKAGES := ipq-wifi-wallys_dr40x9
  1090. endef
  1091. TARGET_DEVICES += wallys_dr40x9
  1092. define Device/yyets_le1
  1093. $(call Device/FitzImage)
  1094. DEVICE_VENDOR := YYeTs
  1095. DEVICE_MODEL := LE1
  1096. SOC := qcom-ipq4019
  1097. KERNEL_SIZE := 4096k
  1098. IMAGE_SIZE := 31232k
  1099. IMAGES += factory.bin
  1100. IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
  1101. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1102. DEVICE_PACKAGES := ipq-wifi-yyets_le1 kmod-usb-ledtrig-usbport
  1103. endef
  1104. TARGET_DEVICES += yyets_le1
  1105. define Device/zte_mf18a
  1106. $(call Device/FitImage)
  1107. DEVICE_VENDOR := ZTE
  1108. DEVICE_MODEL := MF18A
  1109. SOC := qcom-ipq4019
  1110. DEVICE_DTS_CONFIG := [email protected]
  1111. BLOCKSIZE := 128k
  1112. PAGESIZE := 2048
  1113. KERNEL_IN_UBI := 1
  1114. DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
  1115. endef
  1116. TARGET_DEVICES += zte_mf18a
  1117. define Device/zte_mf28x_common
  1118. $(call Device/FitzImage)
  1119. DEVICE_VENDOR := ZTE
  1120. SOC := qcom-ipq4019
  1121. DEVICE_DTS_CONFIG := [email protected]
  1122. BLOCKSIZE := 128k
  1123. PAGESIZE := 2048
  1124. KERNEL_IN_UBI := 1
  1125. DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
  1126. endef
  1127. define Device/zte_mf282plus
  1128. $(call Device/zte_mf28x_common)
  1129. DEVICE_MODEL := MF282Plus
  1130. # The recovery image is used to return back to stock (an initramfs-based image
  1131. # that can be flashed to the device via sysupgrade
  1132. # The factory image is used to install from the stock firmware by using an
  1133. # exploit for the web interface
  1134. IMAGES += factory.bin recovery.bin
  1135. IMAGE/factory.bin := append-ubi
  1136. IMAGE/recovery.bin := append-squashfs4-fakeroot | sysupgrade-tar kernel=$$$$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) rootfs=$$$$@ | append-metadata
  1137. DEVICE_PACKAGES := kmod-usb-acm kmod-usb-net-rndis
  1138. endef
  1139. TARGET_DEVICES += zte_mf282plus
  1140. define Device/zte_mf286d
  1141. $(call Device/zte_mf28x_common)
  1142. DEVICE_MODEL := MF286D
  1143. endef
  1144. TARGET_DEVICES += zte_mf286d
  1145. define Device/zte_mf287_common
  1146. $(call Device/zte_mf28x_common)
  1147. SOC := qcom-ipq4018
  1148. # The recovery image is used to return back to stock (an initramfs-based image
  1149. # that can be flashed to the device via sysupgrade
  1150. # The factory image is used to install from the stock firmware by using an
  1151. # exploit for the web interface
  1152. IMAGES += factory.bin recovery.bin
  1153. IMAGE/factory.bin := append-ubi
  1154. IMAGE/recovery.bin := append-squashfs4-fakeroot | sysupgrade-tar kernel=$$$$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) rootfs=$$$$@ | append-metadata
  1155. endef
  1156. define Device/zte_mf287plus
  1157. $(call Device/zte_mf287_common)
  1158. DEVICE_PACKAGES += ipq-wifi-zte_mf287plus
  1159. DEVICE_DTS_CONFIG := [email protected]
  1160. DEVICE_MODEL := MF287Plus
  1161. endef
  1162. TARGET_DEVICES += zte_mf287plus
  1163. define Device/zte_mf287
  1164. $(call Device/zte_mf287_common)
  1165. DEVICE_PACKAGES += ipq-wifi-zte_mf287
  1166. DEVICE_DTS_CONFIG := [email protected]
  1167. DEVICE_MODEL := MF287
  1168. endef
  1169. TARGET_DEVICES += zte_mf287
  1170. define Device/zte_mf287pro
  1171. $(call Device/zte_mf287_common)
  1172. DEVICE_PACKAGES += ipq-wifi-zte_mf287plus
  1173. DEVICE_DTS_CONFIG := [email protected]
  1174. DEVICE_MODEL := MF287Pro
  1175. endef
  1176. TARGET_DEVICES += zte_mf287pro
  1177. define Device/zte_mf289f
  1178. $(call Device/zte_mf28x_common)
  1179. DEVICE_MODEL := MF289F
  1180. DEVICE_PACKAGES += ath10k-firmware-qca9984-ct
  1181. endef
  1182. TARGET_DEVICES += zte_mf289f
  1183. define Device/zyxel_nbg6617
  1184. $(call Device/FitImageLzma)
  1185. DEVICE_VENDOR := Zyxel
  1186. DEVICE_MODEL := NBG6617
  1187. SOC := qcom-ipq4018
  1188. KERNEL_SIZE := 4096k
  1189. ROOTFS_SIZE := 24960k
  1190. RAS_BOARD := NBG6617
  1191. RAS_ROOTFS_SIZE := 19840k
  1192. RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
  1193. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
  1194. IMAGES += factory.bin
  1195. # The Zyxel firmware allows flashing thru the web-gui only when the rootfs is
  1196. # at least as large as the one of the initial firmware image (not the current
  1197. # one on the device). This only applies to the Web-UI, the bootlaoder ignores
  1198. # this minimum-size. However, the larger image can be flashed both ways.
  1199. IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel
  1200. IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
  1201. DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
  1202. endef
  1203. TARGET_DEVICES += zyxel_nbg6617
  1204. define Device/zyxel_wre6606
  1205. $(call Device/FitImage)
  1206. DEVICE_VENDOR := Zyxel
  1207. DEVICE_MODEL := WRE6606
  1208. DEVICE_DTS_CONFIG := config@4
  1209. SOC := qcom-ipq4018
  1210. IMAGE_SIZE := 13184k
  1211. IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
  1212. DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
  1213. endef
  1214. # Missing DSA Setup
  1215. #TARGET_DEVICES += zyxel_wre6606