generic.mk 40 KB

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