generic.mk 35 KB

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