Makefile 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/image.mk
  9. USB1_PACKAGES := kmod-usb-ohci
  10. USB2_PACKAGES := $(USB1_PACKAGES) kmod-usb2
  11. define Build/Clean
  12. $(MAKE) -C lzma-loader clean
  13. endef
  14. define Image/Prepare
  15. # Optimized LZMA compression (with dictionary), handled by lzma-loader.
  16. cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
  17. # Less optimal LZMA compression (no dictionary), handled by CFE.
  18. $(STAGING_DIR_HOST)/bin/lzma e -so -d16 $(KDIR)/vmlinux > $(KDIR)/vmlinux-nodictionary.lzma
  19. gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
  20. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  21. cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
  22. $(STAGING_DIR_HOST)/bin/lzma e -so -d16 $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs-nodictionary.lzma
  23. endif
  24. rm -f $(KDIR)/loader.gz
  25. $(MAKE) -C lzma-loader \
  26. BUILD_DIR="$(KDIR)" \
  27. TARGET="$(KDIR)" \
  28. clean install
  29. echo -ne "\\x00" >> $(KDIR)/loader.gz
  30. rm -f $(KDIR)/fs_mark
  31. echo -ne '\xde\xad\xc0\xde' > $(KDIR)/fs_mark
  32. $(call prepare_generic_squashfs,$(KDIR)/fs_mark)
  33. endef
  34. define trxalign/jffs2-128k
  35. -a 0x20000 -f $(KDIR)/root.$(1)
  36. endef
  37. define trxalign/jffs2-64k
  38. -a 0x10000 -f $(KDIR)/root.$(1)
  39. endef
  40. define trxalign/squashfs
  41. -a 1024 -f $(1) $(if $(2),-f $(2)) -a 0x10000 -A $(KDIR)/fs_mark
  42. endef
  43. #################################################
  44. # Images
  45. #################################################
  46. define Build/trx-with-loader
  47. $(STAGING_DIR_HOST)/bin/trx \
  48. -m 33554432 \
  49. -o $@.new \
  50. -f $(KDIR)/loader.gz \
  51. -f $(IMAGE_KERNEL) \
  52. $(call trxalign/$(FILESYSTEM),$@)
  53. mv $@.new $@
  54. endef
  55. define Build/trx-v2-with-loader
  56. $(STAGING_DIR_HOST)/bin/trx \
  57. -2 \
  58. -m 33554432 \
  59. -o $@.new \
  60. -f $(KDIR)/loader.gz \
  61. -f $(KDIR)/vmlinux.lzma \
  62. $(call trxalign/$(FILESYSTEM),$@,$@.pattern)
  63. mv $@.new $@
  64. endef
  65. define Build/trx-without-loader
  66. $(STAGING_DIR_HOST)/bin/trx \
  67. -m 33554432 \
  68. -o $@.new \
  69. -f $(IMAGE_KERNEL) \
  70. $(call trxalign/$(FILESYSTEM),$@)
  71. mv $@.new $@
  72. endef
  73. define Build/asus-trx
  74. $(STAGING_DIR_HOST)/bin/asustrx -p $(PRODUCTID) -i $@ -o $@.new
  75. mv $@.new $@
  76. endef
  77. define Build/edimax-bin
  78. $(STAGING_DIR_HOST)/bin/trx2edips $@ $@.new
  79. mv $@.new $@
  80. endef
  81. define Build/huawei-bin
  82. dd if=/dev/zero of=$@.new bs=92 count=1
  83. echo -ne 'HDR0\x08\x00\x00\x00' >> $@.new
  84. cat $@ >> $@.new
  85. mv $@.new $@
  86. endef
  87. define Build/linksys-bin
  88. $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(DEVICE_ID) -v v$(VERSION) $(if $(SERIAL),-s $(SERIAL)) -i $@ -o $@.new
  89. mv $@.new $@
  90. endef
  91. define Build/linksys-pattern-partition
  92. $(STAGING_DIR_HOST)/bin/addpattern -5 -p $(DEVICE_ID) -v v$(VERSION) $(if $(SERIAL),-s $(SERIAL)) -i /dev/null -o $@.pattern
  93. endef
  94. define Build/motorola-bin
  95. $(STAGING_DIR_HOST)/bin/motorola-bin -$(MOTOROLA_DEVICE) $@ $@.new
  96. mv $@.new $@
  97. endef
  98. define Build/prepend-with-elf
  99. mv $@ $@.old
  100. dd if=$(KDIR)/loader.elf of=$@ bs=131072 conv=sync
  101. cat $@.old >> $@
  102. endef
  103. define Build/tailed-bin
  104. echo $(BIN_TAIL) >> $@
  105. endef
  106. define Build/usrobotics-bin
  107. $(STAGING_DIR_HOST)/bin/trx2usr $@ $@.new
  108. mv $@.new $@
  109. endef
  110. #################################################
  111. # Devices
  112. #################################################
  113. DEVICE_VARS += PRODUCTID
  114. DEVICE_VARS += DEVICE_ID VERSION SERIAL
  115. DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION
  116. DEVICE_VARS += MOTOROLA_DEVICE
  117. DEVICE_VARS += BIN_TAIL
  118. define Device/Default
  119. KERNEL := kernel-bin
  120. IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)
  121. KERNEL_NAME = vmlinux.lzma
  122. KERNEL_INITRAMFS_NAME = vmlinux-initramfs.lzma
  123. FILESYSTEMS := $(FS_64K)
  124. IMAGES := trx
  125. IMAGE/trx := append-rootfs | trx-with-loader
  126. endef
  127. define Device/standard
  128. DEVICE_TITLE := Image with LZMA loader and LZMA compressed kernel
  129. endef
  130. define Device/standard-noloader-gz
  131. DEVICE_TITLE := Image with gzipped kernel
  132. KERNEL_NAME = vmlinux.gz
  133. IMAGE/trx := append-rootfs | trx-without-loader
  134. endef
  135. define Device/standard-noloader-nodictionarylzma
  136. DEVICE_TITLE := Image with LZMA compressed kernel matching CFE decompressor
  137. KERNEL_NAME = vmlinux-nodictionary.lzma
  138. IMAGE/trx := append-rootfs | trx-without-loader
  139. endef
  140. define Device/asus
  141. IMAGES := trx
  142. IMAGE/trx := append-rootfs | trx-with-loader | asus-trx
  143. endef
  144. define Device/linksys
  145. IMAGES := bin
  146. IMAGE/bin := append-rootfs | trx-with-loader | linksys-bin
  147. endef
  148. define Device/motorola
  149. IMAGES := bin
  150. IMAGE/bin := append-rootfs | trx-with-loader | motorola-bin
  151. endef
  152. define Device/netgear
  153. IMAGES := chk
  154. IMAGE/chk := append-rootfs | trx-with-loader | netgear-chk
  155. endef
  156. #################################################
  157. # Subtarget generic
  158. #################################################
  159. ifeq ($(SUBTARGET),generic)
  160. # BCM4705 with tg3
  161. define Device/linksys-wrt300n-v1.1
  162. DEVICE_TITLE := Linksys WRT300N v1.1
  163. DEVICE_PACKAGES := kmod-tg3 kmod-b43
  164. $(Device/linksys)
  165. DEVICE_ID := EWC2
  166. VERSION := 1.51.2
  167. endef
  168. TARGET_DEVICES += linksys-wrt300n-v1.1
  169. define Device/linksys-wrt310n-v1
  170. DEVICE_TITLE := Linksys WRT310N v1
  171. DEVICE_PACKAGES := kmod-tg3 kmod-b43
  172. $(Device/linksys)
  173. DEVICE_ID := 310N
  174. VERSION := 1.0.10
  175. endef
  176. TARGET_DEVICES += linksys-wrt310n-v1
  177. define Device/linksys-wrt350n-v1
  178. DEVICE_TITLE := Linksys WRT350N v1
  179. DEVICE_PACKAGES := kmod-tg3 kmod-b43 $(USB2_PACKAGES)
  180. $(Device/linksys)
  181. DEVICE_ID := EWCG
  182. VERSION := 1.04.1
  183. endef
  184. TARGET_DEVICES += linksys-wrt350n-v1
  185. define Device/linksys-wrt610n-v1
  186. DEVICE_TITLE := Linksys WRT610N v1
  187. DEVICE_PACKAGES := kmod-tg3 kmod-b43 $(USB2_PACKAGES)
  188. $(Device/linksys)
  189. DEVICE_ID := 610N
  190. VERSION := 1.0.1
  191. endef
  192. TARGET_DEVICES += linksys-wrt610n-v1
  193. # BCMA SoC with SSB WiFi
  194. define Device/linksys-wrt610n-v2
  195. DEVICE_TITLE := Linksys WRT610N v2
  196. DEVICE_PACKAGES := kmod-bgmac kmod-b43 $(USB2_PACKAGES)
  197. $(Device/linksys)
  198. DEVICE_ID := 610N
  199. VERSION := 2.0.0
  200. endef
  201. TARGET_DEVICES += linksys-wrt610n-v2
  202. define Device/linksys-e3000-v1
  203. DEVICE_TITLE := Linksys E3000 v1
  204. DEVICE_PACKAGES := kmod-bgmac kmod-b43 $(USB2_PACKAGES)
  205. $(Device/linksys)
  206. DEVICE_ID := 61XN
  207. VERSION := 1.0.3
  208. endef
  209. TARGET_DEVICES += linksys-e3000-v1
  210. # generic has Ethernet drivers as modules so overwrite standard image
  211. define Device/standard
  212. DEVICE_TITLE := Image with LZMA loader and LZMA compressed kernel
  213. DEVICE_PACKAGES := kmod-b44 kmod-bgmac kmod-tg3
  214. endef
  215. TARGET_DEVICES += standard
  216. endif
  217. #################################################
  218. # Subtarget legacy
  219. #################################################
  220. ifeq ($(SUBTARGET),legacy)
  221. define Device/asus-wl-300g
  222. DEVICE_TITLE := Asus WL-300g
  223. DEVICE_PACKAGES := kmod-b43 kmod-b43legacy
  224. $(Device/asus)
  225. PRODUCTID := "WL300g "
  226. endef
  227. TARGET_DEVICES += asus-wl-300g
  228. define Device/asus-wl-320gp
  229. DEVICE_TITLE := Asus WL-320gP
  230. DEVICE_PACKAGES := kmod-b43
  231. $(Device/asus)
  232. PRODUCTID := "WL320gP "
  233. endef
  234. TARGET_DEVICES += asus-wl-320gp
  235. define Device/asus-wl-330ge
  236. DEVICE_TITLE := Asus WL-330gE
  237. DEVICE_PACKAGES := kmod-b43
  238. $(Device/asus)
  239. PRODUCTID := "WL-330gE "
  240. endef
  241. TARGET_DEVICES += asus-wl-330ge
  242. define Device/asus-wl-500gd
  243. DEVICE_TITLE := Asus WL-500g Deluxe
  244. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  245. $(Device/asus)
  246. PRODUCTID := "WL500gx "
  247. endef
  248. TARGET_DEVICES += asus-wl-500gd
  249. define Device/asus-wl-500gp-v1
  250. DEVICE_TITLE := Asus WL-500gP v1
  251. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  252. $(Device/asus)
  253. PRODUCTID := "WL500gp "
  254. endef
  255. TARGET_DEVICES += asus-wl-500gp-v1
  256. define Device/asus-wl-500gp-v2
  257. DEVICE_TITLE := Asus WL-500gP v2
  258. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  259. $(Device/asus)
  260. PRODUCTID := "WL500gpv2 "
  261. endef
  262. TARGET_DEVICES += asus-wl-500gp-v2
  263. define Device/asus-wl-500w
  264. DEVICE_TITLE := Asus WL-500W
  265. DEVICE_PACKAGES := kmod-b43 kmod-usb-uhci kmod-usb2-pci
  266. $(Device/asus)
  267. PRODUCTID := "WL500W "
  268. endef
  269. TARGET_DEVICES += asus-wl-500w
  270. define Device/asus-wl-520gu
  271. DEVICE_TITLE := Asus WL-520gU
  272. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  273. $(Device/asus)
  274. PRODUCTID := "WL520gu "
  275. endef
  276. TARGET_DEVICES += asus-wl-520gu
  277. define Device/asus-wl-550ge
  278. DEVICE_TITLE := Asus WL-550gE
  279. DEVICE_PACKAGES := kmod-b43
  280. $(Device/asus)
  281. PRODUCTID := "WL550gE "
  282. endef
  283. TARGET_DEVICES += asus-wl-550ge
  284. define Device/asus-wl-hdd25
  285. DEVICE_TITLE := Asus WL-HDD25
  286. DEVICE_PACKAGES := kmod-b43 kmod-b43legacy $(USB1_PACKAGES)
  287. $(Device/asus)
  288. PRODUCTID := "WLHDD "
  289. endef
  290. TARGET_DEVICES += asus-wl-hdd25
  291. define Device/dlink-dwl-3150
  292. DEVICE_TITLE := D-Link DWL-3150
  293. IMAGES := bin
  294. IMAGE/bin := append-rootfs | trx-with-loader | tailed-bin
  295. BIN_TAIL := BCM-5352-2050-0000000-01
  296. endef
  297. TARGET_DEVICES += dlink-dwl-3150
  298. define Device/edimax-ps1208-mfg
  299. DEVICE_TITLE := Edimax PS-1208MFg
  300. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  301. IMAGES := bin
  302. IMAGE/bin := append-rootfs | trx-with-loader | edimax-bin
  303. endef
  304. TARGET_DEVICES += edimax-ps1208-mfg
  305. define Device/huawei-e970
  306. DEVICE_TITLE := Huawei E970
  307. DEVICE_PACKAGES := kmod-b43
  308. KERNEL_NAME = vmlinux.gz
  309. IMAGES := bin
  310. IMAGE/bin := append-rootfs | trx-without-loader | huawei-bin
  311. endef
  312. TARGET_DEVICES += huawei-e970
  313. define Device/linksys-wrt54g3g
  314. DEVICE_TITLE := Linksys WRT54G3G
  315. DEVICE_PACKAGES := kmod-b43
  316. $(Device/linksys)
  317. DEVICE_ID := W54F
  318. VERSION := 2.20.1
  319. endef
  320. TARGET_DEVICES += linksys-wrt54g3g
  321. define Device/linksys-wrt54g3g-em
  322. DEVICE_TITLE := Linksys WRT54G3G-EM
  323. $(Device/linksys)
  324. DEVICE_ID := W3GN
  325. VERSION := 2.20.1
  326. endef
  327. TARGET_DEVICES += linksys-wrt54g3g-em
  328. define Device/linksys-wrt54g3gv2-vf
  329. DEVICE_TITLE := Linksys WRT54G3GV2-VF
  330. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  331. FILESYSTEMS := $(FS_128K)
  332. IMAGES := noheader.bin bin
  333. IMAGE/noheader.bin := linksys-pattern-partition | append-rootfs | trx-v2-with-loader
  334. IMAGE/bin := linksys-pattern-partition | append-rootfs | trx-v2-with-loader | linksys-bin
  335. DEVICE_ID := 3G2V
  336. VERSION := 3.00.24
  337. SERIAL := 6
  338. endef
  339. TARGET_DEVICES += linksys-wrt54g3gv2-vf
  340. define Device/linksys-wrt54g
  341. DEVICE_TITLE := Linksys WRT54G
  342. DEVICE_PACKAGES := kmod-b43 kmod-b43legacy
  343. $(Device/linksys)
  344. DEVICE_ID := W54G
  345. VERSION := 4.71.1
  346. endef
  347. TARGET_DEVICES += linksys-wrt54g
  348. define Device/linksys-wrt54gs
  349. DEVICE_TITLE := Linksys WRT54GS
  350. DEVICE_PACKAGES := kmod-b43
  351. $(Device/linksys)
  352. FILESYSTEMS := $(FS_128K)
  353. DEVICE_ID := W54S
  354. VERSION := 4.80.1
  355. endef
  356. TARGET_DEVICES += linksys-wrt54gs
  357. define Device/linksys-wrt54gs-v4
  358. DEVICE_TITLE := Linksys WRT54GS v4
  359. DEVICE_PACKAGES := kmod-b43
  360. $(Device/linksys)
  361. DEVICE_ID := W54s
  362. VERSION := 1.09.1
  363. endef
  364. TARGET_DEVICES += linksys-wrt54gs-v4
  365. define Device/linksys-wrtsl54gs
  366. DEVICE_TITLE := Linksys WRTSL54GS
  367. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  368. $(Device/linksys)
  369. FILESYSTEMS := $(FS_128K)
  370. DEVICE_ID := W54U
  371. VERSION := 2.08.1
  372. endef
  373. TARGET_DEVICES += linksys-wrtsl54gs
  374. define Device/linksys-wrt150n
  375. DEVICE_TITLE := Linksys WRT150N
  376. DEVICE_PACKAGES := kmod-b43
  377. $(Device/linksys)
  378. DEVICE_ID := N150
  379. VERSION := 1.51.3
  380. endef
  381. TARGET_DEVICES += linksys-wrt150n
  382. define Device/linksys-wrt160n-v1
  383. DEVICE_TITLE := Linksys WRT160N v1
  384. DEVICE_PACKAGES := kmod-b43
  385. $(Device/linksys)
  386. DEVICE_ID := N150
  387. VERSION := 1.50.1
  388. endef
  389. TARGET_DEVICES += linksys-wrt160n-v1
  390. define Device/linksys-wrt300n-v1
  391. DEVICE_TITLE := Linksys WRT300N v1
  392. DEVICE_PACKAGES := kmod-b43
  393. $(Device/linksys)
  394. IMAGES := bin trx
  395. DEVICE_ID := EWCB
  396. VERSION := 1.03.6
  397. endef
  398. TARGET_DEVICES += linksys-wrt300n-v1
  399. define Device/motorola-wa840g
  400. DEVICE_TITLE := Motorola WA840G
  401. DEVICE_PACKAGES := kmod-b43 kmod-b43legacy
  402. $(Device/motorola)
  403. MOTOROLA_DEVICE := 2
  404. endef
  405. TARGET_DEVICES += motorola-wa840g
  406. define Device/motorola-we800g
  407. DEVICE_TITLE := Motorola WE800G
  408. DEVICE_PACKAGES := kmod-b43 kmod-b43legacy
  409. $(Device/motorola)
  410. MOTOROLA_DEVICE := 3
  411. endef
  412. TARGET_DEVICES += motorola-we800g
  413. define Device/motorola-wr850g
  414. DEVICE_TITLE := Motorola WR850G
  415. DEVICE_PACKAGES := kmod-b43 kmod-b43legacy
  416. $(Device/motorola)
  417. MOTOROLA_DEVICE := 1
  418. endef
  419. TARGET_DEVICES += motorola-wr850g
  420. define Device/netgear-wgr614-v8
  421. DEVICE_TITLE := Netgear WGR614 v8
  422. DEVICE_PACKAGES := kmod-b43
  423. $(Device/netgear)
  424. NETGEAR_BOARD_ID := U12H072T00_NETGEAR
  425. NETGEAR_REGION := 2
  426. endef
  427. TARGET_DEVICES += netgear-wgr614-v8
  428. define Device/netgear-wgt634u
  429. DEVICE_TITLE := Netgear WGT634U
  430. DEVICE_PACKAGES := kmod-ath5k $(USB2_PACKAGES)
  431. FILESYSTEMS := $(FS_128K)
  432. IMAGES := bin
  433. IMAGE/bin := append-rootfs | trx-with-loader | prepend-with-elf
  434. endef
  435. TARGET_DEVICES += netgear-wgt634u
  436. define Device/netgear-wndr3300-v1
  437. DEVICE_TITLE := Netgear WNDR3300 v1
  438. DEVICE_PACKAGES := kmod-b43
  439. $(Device/netgear)
  440. NETGEAR_BOARD_ID := U12H093T00_NETGEAR
  441. NETGEAR_REGION := 2
  442. endef
  443. TARGET_DEVICES += netgear-wndr3300-v1
  444. define Device/netgear-wnr834b-v2
  445. DEVICE_TITLE := Netgear WNR834B v2
  446. DEVICE_PACKAGES := kmod-b43
  447. $(Device/netgear)
  448. NETGEAR_BOARD_ID := U12H081T00_NETGEAR
  449. NETGEAR_REGION := 2
  450. endef
  451. TARGET_DEVICES += netgear-wnr834b-v2
  452. define Device/usrobotics-usr5461
  453. DEVICE_TITLE := USRobotics USR5461
  454. DEVICE_PACKAGES := kmod-b43 $(USB1_PACKAGES)
  455. IMAGES := bin
  456. IMAGE/bin := append-rootfs | trx-with-loader | usrobotics-bin
  457. endef
  458. TARGET_DEVICES += usrobotics-usr5461
  459. TARGET_DEVICES += standard standard-noloader-gz
  460. endif
  461. #################################################
  462. # Subtarget mips74k
  463. #################################################
  464. ifeq ($(SUBTARGET),mips74k)
  465. define Device/asus-rt-ac53u
  466. DEVICE_TITLE := Asus RT-AC53U
  467. DEVICE_PACKAGES := $(USB2_PACKAGES)
  468. $(Device/asus)
  469. PRODUCTID := RT-AC53U
  470. endef
  471. TARGET_DEVICES += asus-rt-ac53u
  472. define Device/asus-rt-ac66u
  473. DEVICE_TITLE := Asus RT-AC66U
  474. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  475. $(Device/asus)
  476. PRODUCTID := RT-AC66U
  477. endef
  478. # TARGET_DEVICES += asus-rt-ac66u
  479. define Device/asus-rt-n10
  480. DEVICE_TITLE := Asus RT-N10
  481. DEVICE_PACKAGES := kmod-b43
  482. $(Device/asus)
  483. PRODUCTID := "RT-N10 "
  484. endef
  485. TARGET_DEVICES += asus-rt-n10
  486. define Device/asus-rt-n10p
  487. DEVICE_TITLE := Asus RT-N10P
  488. DEVICE_PACKAGES := kmod-b43
  489. $(Device/asus)
  490. PRODUCTID := RT-N10P
  491. endef
  492. TARGET_DEVICES += asus-rt-n10p
  493. define Device/asus-rt-n10p-v2
  494. DEVICE_TITLE := Asus RT-N10P v2
  495. $(Device/asus)
  496. PRODUCTID := RT-N10PV2
  497. endef
  498. TARGET_DEVICES += asus-rt-n10p-v2
  499. define Device/asus-rt-n10u
  500. DEVICE_TITLE := Asus RT-N10U
  501. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  502. $(Device/asus)
  503. PRODUCTID := RT-N10U
  504. endef
  505. TARGET_DEVICES += asus-rt-n10u
  506. define Device/asus-rt-n10u-b
  507. DEVICE_TITLE := Asus RT-N10U B
  508. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  509. $(Device/asus)
  510. PRODUCTID := RT-N10U
  511. endef
  512. TARGET_DEVICES += asus-rt-n10u-b
  513. define Device/asus-rt-n12
  514. DEVICE_TITLE := Asus RT-N12
  515. DEVICE_PACKAGES := kmod-b43
  516. $(Device/asus)
  517. PRODUCTID := "RT-N12 "
  518. endef
  519. TARGET_DEVICES += asus-rt-n12
  520. define Device/asus-rt-n12-b1
  521. DEVICE_TITLE := Asus RT-N12 B1
  522. $(Device/asus)
  523. PRODUCTID := RT-N12B1
  524. endef
  525. TARGET_DEVICES += asus-rt-n12-b1
  526. define Device/asus-rt-n12-c1
  527. DEVICE_TITLE := Asus RT-N12 C1
  528. $(Device/asus)
  529. PRODUCTID := RT-N12C1
  530. endef
  531. TARGET_DEVICES += asus-rt-n12-c1
  532. define Device/asus-rt-n12-d1
  533. DEVICE_TITLE := Asus RT-N12 D1
  534. $(Device/asus)
  535. PRODUCTID := RT-N12D1
  536. endef
  537. TARGET_DEVICES += asus-rt-n12-d1
  538. define Device/asus-rt-n12hp
  539. DEVICE_TITLE := Asus RT-N12HP
  540. $(Device/asus)
  541. PRODUCTID := RT-N12HP
  542. endef
  543. TARGET_DEVICES += asus-rt-n12hp
  544. define Device/asus-rt-n14uhp
  545. DEVICE_TITLE := Asus RT-N14UHP
  546. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  547. $(Device/asus)
  548. PRODUCTID := RT-N14UHP
  549. endef
  550. TARGET_DEVICES += asus-rt-n14uhp
  551. define Device/asus-rt-n15u
  552. DEVICE_TITLE := Asus RT-N15U
  553. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  554. $(Device/asus)
  555. PRODUCTID := RT-N15U
  556. endef
  557. TARGET_DEVICES += asus-rt-n15u
  558. define Device/asus-rt-n16
  559. DEVICE_TITLE := Asus RT-N16
  560. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  561. $(Device/asus)
  562. PRODUCTID := RT-N16
  563. endef
  564. TARGET_DEVICES += asus-rt-n16
  565. define Device/asus-rt-n53
  566. DEVICE_TITLE := Asus RT-N53
  567. DEVICE_PACKAGES := kmod-b43
  568. $(Device/asus)
  569. PRODUCTID := RT-N53
  570. endef
  571. TARGET_DEVICES += asus-rt-n53
  572. define Device/asus-rt-n66u
  573. DEVICE_TITLE := Asus RT-N66U
  574. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  575. $(Device/asus)
  576. PRODUCTID := RT-N66U
  577. endef
  578. TARGET_DEVICES += asus-rt-n66u
  579. define Device/asus-rt-n66w
  580. DEVICE_TITLE := Asus RT-N66W
  581. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  582. $(Device/asus)
  583. PRODUCTID := RT-N66U
  584. endef
  585. TARGET_DEVICES += asus-rt-n66w
  586. define Device/linksys-wrt160n-v3
  587. DEVICE_TITLE := Linksys WRT160N v3
  588. DEVICE_PACKAGES := kmod-b43
  589. $(Device/linksys)
  590. DEVICE_ID := N150
  591. VERSION := 3.0.3
  592. endef
  593. TARGET_DEVICES += linksys-wrt160n-v3
  594. define Device/linksys-wrt310n-v2
  595. DEVICE_TITLE := Linksys WRT310N v2
  596. DEVICE_PACKAGES := kmod-b43
  597. $(Device/linksys)
  598. DEVICE_ID := 310N
  599. VERSION := 2.0.1
  600. endef
  601. TARGET_DEVICES += linksys-wrt310n-v2
  602. define Device/linksys-wrt320n-v1
  603. DEVICE_TITLE := Linksys WRT320N v1
  604. DEVICE_PACKAGES := kmod-b43
  605. $(Device/linksys)
  606. DEVICE_ID := 320N
  607. VERSION := 1.0.5
  608. endef
  609. TARGET_DEVICES += linksys-wrt320n-v1
  610. define Device/linksys-e900-v1
  611. DEVICE_TITLE := Linksys E900 v1
  612. $(Device/linksys)
  613. DEVICE_ID := E900
  614. VERSION := 1.0.4
  615. endef
  616. TARGET_DEVICES += linksys-e900-v1
  617. define Device/linksys-e1000-v1-v2-v2.1
  618. DEVICE_TITLE := Linksys E1000 v1 v2 v2.1
  619. DEVICE_PACKAGES := kmod-b43
  620. $(Device/linksys)
  621. DEVICE_ID := E100
  622. VERSION := 1.1.3
  623. endef
  624. TARGET_DEVICES += linksys-e1000-v1-v2-v2.1
  625. define Device/linksys-e1200-v1
  626. DEVICE_TITLE := Linksys E1200 v1
  627. $(Device/linksys)
  628. DEVICE_ID := E120
  629. VERSION := 1.0.3
  630. endef
  631. TARGET_DEVICES += linksys-e1200-v1
  632. define Device/linksys-e1200-v2
  633. DEVICE_TITLE := Linksys E1200 v2
  634. $(Device/linksys)
  635. DEVICE_ID := E122
  636. VERSION := 1.0.4
  637. endef
  638. TARGET_DEVICES += linksys-e1200-v2
  639. define Device/linksys-e1500-v1
  640. DEVICE_TITLE := Linksys E1500 v1
  641. $(Device/linksys)
  642. DEVICE_ID := E150
  643. VERSION := 1.0.5
  644. endef
  645. TARGET_DEVICES += linksys-e1500-v1
  646. define Device/linksys-e1550-v1
  647. DEVICE_TITLE := Linksys E1550 v1
  648. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  649. $(Device/linksys)
  650. DEVICE_ID := 1550
  651. VERSION := 1.0.3
  652. endef
  653. TARGET_DEVICES += linksys-e1550-v1
  654. define Device/linksys-e2000-v1
  655. DEVICE_TITLE := Linksys E2000 v1
  656. DEVICE_PACKAGES := kmod-b43
  657. $(Device/linksys)
  658. DEVICE_ID := 32XN
  659. VERSION := 1.0.4
  660. endef
  661. TARGET_DEVICES += linksys-e2000-v1
  662. define Device/linksys-e2500-v1
  663. DEVICE_TITLE := Linksys E2500 v1
  664. DEVICE_PACKAGES := kmod-b43
  665. $(Device/linksys)
  666. DEVICE_ID := E25X
  667. VERSION := 1.0.7
  668. endef
  669. TARGET_DEVICES += linksys-e2500-v1
  670. define Device/linksys-e2500-v2
  671. DEVICE_TITLE := Linksys E2500 v2
  672. DEVICE_PACKAGES := kmod-b43
  673. $(Device/linksys)
  674. DEVICE_ID := E25X
  675. VERSION := 2.0.0
  676. endef
  677. TARGET_DEVICES += linksys-e2500-v2
  678. define Device/linksys-e2500-v2.1
  679. DEVICE_TITLE := Linksys E2500 v2.1
  680. DEVICE_PACKAGES := kmod-b43
  681. $(Device/linksys)
  682. DEVICE_ID := 25RU
  683. VERSION := 2.1.0
  684. endef
  685. TARGET_DEVICES += linksys-e2500-v2.1
  686. define Device/linksys-e2500-v3
  687. DEVICE_TITLE := Linksys E2500 v3
  688. DEVICE_PACKAGES := kmod-b43
  689. $(Device/linksys)
  690. DEVICE_ID := 25V3
  691. VERSION := 3.0.0
  692. endef
  693. TARGET_DEVICES += linksys-e2500-v3
  694. define Device/linksys-e3200-v1
  695. DEVICE_TITLE := Linksys E3200 v1
  696. DEVICE_PACKAGES := kmod-b43
  697. $(Device/linksys)
  698. DEVICE_ID := 3200
  699. VERSION := 1.0.1
  700. endef
  701. TARGET_DEVICES += linksys-e3200-v1
  702. define Device/linksys-e4200-v1
  703. DEVICE_TITLE := Linksys E4200 v1
  704. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  705. $(Device/linksys)
  706. DEVICE_ID := 4200
  707. VERSION := 1.0.5
  708. endef
  709. TARGET_DEVICES += linksys-e4200-v1
  710. define Device/netgear-wgr614-v10_north-america
  711. DEVICE_TITLE := Netgear WGR614 v10 North America
  712. $(Device/netgear)
  713. NETGEAR_BOARD_ID := U12H139T01_NETGEAR
  714. NETGEAR_REGION := 2
  715. endef
  716. TARGET_DEVICES += netgear-wgr614-v10_north-america
  717. define Device/netgear-wgr614-v10_other-regions
  718. DEVICE_TITLE := Netgear WGR614 v10 Other Regions
  719. $(Device/netgear)
  720. NETGEAR_BOARD_ID := U12H139T01_NETGEAR
  721. NETGEAR_REGION := 1
  722. endef
  723. TARGET_DEVICES += netgear-wgr614-v10_other-regions
  724. define Device/netgear-wn2500rp-v1
  725. DEVICE_TITLE := Netgear WN2500RP v1
  726. DEVICE_PACKAGES := kmod-b43
  727. $(Device/netgear)
  728. NETGEAR_BOARD_ID := U12H197T00_NETGEAR
  729. NETGEAR_REGION := 1
  730. endef
  731. TARGET_DEVICES += netgear-wn2500rp-v1
  732. define Device/netgear-wn3000rp
  733. DEVICE_TITLE := Netgear WN3000RP
  734. $(Device/netgear)
  735. NETGEAR_BOARD_ID := U12H163T01_NETGEAR
  736. NETGEAR_REGION := 1
  737. endef
  738. TARGET_DEVICES += netgear-wn3000rp
  739. define Device/netgear-wndr3400-v1
  740. DEVICE_TITLE := Netgear WNDR3400 v1
  741. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  742. $(Device/netgear)
  743. NETGEAR_BOARD_ID := U12H155T00_NETGEAR
  744. NETGEAR_REGION := 2
  745. endef
  746. TARGET_DEVICES += netgear-wndr3400-v1
  747. define Device/netgear-wndr3400-v2
  748. DEVICE_TITLE := Netgear WNDR3400 v2
  749. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  750. $(Device/netgear)
  751. NETGEAR_BOARD_ID := U12H187T00_NETGEAR
  752. NETGEAR_REGION := 2
  753. endef
  754. TARGET_DEVICES += netgear-wndr3400-v2
  755. define Device/netgear-wndr3400-v3
  756. DEVICE_TITLE := Netgear WNDR3400 v3
  757. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  758. $(Device/netgear)
  759. NETGEAR_BOARD_ID := U12H208T00_NETGEAR
  760. NETGEAR_REGION := 1
  761. endef
  762. TARGET_DEVICES += netgear-wndr3400-v3
  763. define Device/netgear-wndr3700-v3
  764. DEVICE_TITLE := Netgear WNDR3700 v3
  765. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  766. $(Device/netgear)
  767. NETGEAR_BOARD_ID := U12H194T00_NETGEAR
  768. NETGEAR_REGION := 2
  769. endef
  770. TARGET_DEVICES += netgear-wndr3700-v3
  771. define Device/netgear-wndr3400-vcna
  772. DEVICE_TITLE := Netgear WNDR3400 vcna
  773. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  774. $(Device/netgear)
  775. NETGEAR_BOARD_ID := U12H155T01_NETGEAR
  776. NETGEAR_REGION := 2
  777. endef
  778. # TARGET_DEVICES += netgear-wndr3400-vcna
  779. define Device/netgear-wndr4000
  780. DEVICE_TITLE := Netgear WNDR4000
  781. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  782. $(Device/netgear)
  783. NETGEAR_BOARD_ID := U12H181T00_NETGEAR
  784. NETGEAR_REGION := 2
  785. endef
  786. TARGET_DEVICES += netgear-wndr4000
  787. define Device/netgear-wnr1000-v3
  788. DEVICE_TITLE := Netgear WNR1000 v3
  789. $(Device/netgear)
  790. NETGEAR_BOARD_ID := U12H139T00_NETGEAR
  791. NETGEAR_REGION := 2
  792. endef
  793. TARGET_DEVICES += netgear-wnr1000-v3
  794. define Device/netgear-wnr2000v2
  795. DEVICE_TITLE := Netgear WNR2000 v2
  796. DEVICE_PACKAGES := kmod-b43
  797. $(Device/netgear)
  798. NETGEAR_BOARD_ID := U12H114T00_NETGEAR
  799. NETGEAR_REGION := 2
  800. endef
  801. TARGET_DEVICES += netgear-wnr2000v2
  802. define Device/netgear-wnr3500l-v1-north-america
  803. DEVICE_TITLE := Netgear WNR3500L v1 North America
  804. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  805. $(Device/netgear)
  806. NETGEAR_BOARD_ID := U12H136T99_NETGEAR
  807. NETGEAR_REGION := 2
  808. endef
  809. TARGET_DEVICES += netgear-wnr3500l-v1-north-america
  810. define Device/netgear-wnr3500l-v1-other-regions
  811. DEVICE_TITLE := Netgear WNR3500L v1 Other Regions
  812. DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
  813. $(Device/netgear)
  814. NETGEAR_BOARD_ID := U12H136T99_NETGEAR
  815. NETGEAR_REGION := 1
  816. endef
  817. TARGET_DEVICES += netgear-wnr3500l-v1-other-regions
  818. define Device/netgear-wnr3500l-v2
  819. DEVICE_TITLE := Netgear WNR3500L v2
  820. DEVICE_PACKAGES := $(USB2_PACKAGES)
  821. $(Device/netgear)
  822. NETGEAR_BOARD_ID := U12H172T00_NETGEAR
  823. NETGEAR_REGION := 1
  824. endef
  825. TARGET_DEVICES += netgear-wnr3500l-v2
  826. define Device/netgear-wnr3500u
  827. DEVICE_TITLE := Netgear WNR3500U
  828. DEVICE_PACKAGES := $(USB2_PACKAGES)
  829. $(Device/netgear)
  830. NETGEAR_BOARD_ID := U12H136T00_NETGEAR
  831. NETGEAR_REGION := 2
  832. endef
  833. # TARGET_DEVICES += netgear-wnr3500u
  834. define Device/netgear-wnr3500-v2
  835. DEVICE_TITLE := Netgear WNR3500 v2
  836. DEVICE_PACKAGES := kmod-b43
  837. $(Device/netgear)
  838. NETGEAR_BOARD_ID := U12H127T00_NETGEAR
  839. NETGEAR_REGION := 2
  840. endef
  841. TARGET_DEVICES += netgear-wnr3500-v2
  842. define Device/netgear-wnr3500-v2-vc
  843. DEVICE_TITLE := Netgear WNR3500 v2 vc
  844. DEVICE_PACKAGES := kmod-b43
  845. $(Device/netgear)
  846. NETGEAR_BOARD_ID := U12H127T70_NETGEAR
  847. NETGEAR_REGION := 2
  848. endef
  849. # TARGET_DEVICES += netgear-wnr3500-v2-vc
  850. TARGET_DEVICES += standard standard-noloader-nodictionarylzma
  851. endif
  852. #################################################
  853. # Shared BuildImage defines
  854. #################################################
  855. define Image/Build/Initramfs
  856. $(STAGING_DIR_HOST)/bin/trx \
  857. -m 33554432 \
  858. -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs.trx \
  859. -f $(KDIR)/loader.gz \
  860. -f $(KDIR)/vmlinux-initramfs.lzma
  861. $(STAGING_DIR_HOST)/bin/trx \
  862. -m 33554432 \
  863. -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs-noloader-nodictionary.trx \
  864. -f $(KDIR)/vmlinux-initramfs-nodictionary.lzma
  865. endef
  866. # $(1): filesystem type.
  867. define Image/Build
  868. # TODO: Move it to Device/*
  869. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  870. $(call Image/Build/Initramfs)
  871. endif
  872. endef
  873. $(eval $(call BuildImage))