generic.mk 39 KB

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