generic.mk 38 KB

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