Makefile 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. #
  2. # Copyright (C) 2006-2015 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. LOADADDR = 0x80010000 # RAM start + 64K
  10. KERNEL_ENTRY = $(LOADADDR) # Newer kernels add a jmp to the kernel_entry at the start of the binary
  11. LOADER_ENTRY = 0x80a00000 # RAM start + 10M, for relocate
  12. RAMSIZE = 0x02000000 # 32MB
  13. LZMA_TEXT_START = 0x81800000 # 32MB - 8MB
  14. LOADER_MAKEOPTS= \
  15. KDIR=$(KDIR) \
  16. LOADADDR=$(LOADADDR) \
  17. KERNEL_ENTRY=$(KERNEL_ENTRY) \
  18. RAMSIZE=$(RAMSIZE) \
  19. LZMA_TEXT_START=$(LZMA_TEXT_START) \
  20. RELOCATE_MAKEOPTS= \
  21. CACHELINE_SIZE=16 \
  22. KERNEL_ADDR=$(KERNEL_ENTRY) \
  23. CROSS_COMPILE=$(TARGET_CROSS) \
  24. LZMA_TEXT_START=$(LOADER_ENTRY)
  25. define Build/Compile
  26. rm -rf $(KDIR)/relocate
  27. $(CP) ../../generic/image/relocate $(KDIR)
  28. $(MAKE) -C $(KDIR)/relocate $(RELOCATE_MAKEOPTS)
  29. endef
  30. ### Kernel scripts ###
  31. define Build/append-dtb
  32. $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,[email protected])
  33. cat [email protected] >> $@
  34. endef
  35. define Build/hcs-initramfs
  36. $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_bytes=$(HCS_MAGIC_BYTES) \
  37. --rev_maj=$(HCS_REV_MAJ) --rev_min=$(HCS_REV_MIN) --input_file=$@ \
  38. [email protected] --ldaddress=$(LOADADDR)
  39. mv [email protected] $@
  40. endef
  41. define Build/loader-lzma
  42. rm -rf [email protected]
  43. $(MAKE) -C lzma-loader \
  44. $(LOADER_MAKEOPTS) \
  45. PKG_BUILD_DIR="[email protected]" \
  46. TARGET_DIR="$(dir $@)" \
  47. LOADER_DATA="$@" \
  48. LOADER_NAME="$(notdir $@)" \
  49. compile loader.$(1)
  50. mv "$@.$(1)" "$@"
  51. rm -rf [email protected]
  52. endef
  53. define Build/lzma
  54. # CFE is a LZMA nazi! It took me hours to find out the parameters!
  55. # Also I think lzma has a bug cause it generates different output depending on
  56. # if you use stdin / stdout or not. Use files instead of stdio here, cause
  57. # otherwise CFE will complain and not boot the image.
  58. $(STAGING_DIR_HOST)/bin/lzma e $@ -d22 -fb64 -a1 [email protected]
  59. mv [email protected] $@
  60. endef
  61. define Build/lzma-cfe
  62. # Strip out the length, CFE doesn't like this
  63. dd if=$@ [email protected] bs=5 count=1
  64. dd if=$@ [email protected] ibs=13 obs=5 skip=1 seek=1 conv=notrunc
  65. mv [email protected] $@
  66. endef
  67. define Build/relocate-kernel
  68. # CFE only allows ~4 MiB for the uncompressed kernels, but uncompressed
  69. # kernel might get larger than that, so let CFE unpack and load at a
  70. # higher address and make the kernel relocate itself to the expected
  71. # location.
  72. ( \
  73. dd if=$(KDIR)/relocate/loader.bin bs=32 conv=sync && \
  74. perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
  75. cat $@ \
  76. ) > [email protected]
  77. mv [email protected] $@
  78. endef
  79. ### Image scripts ###
  80. define rootfspad/jffs2-128k
  81. --align-rootfs
  82. endef
  83. define rootfspad/jffs2-64k
  84. --align-rootfs
  85. endef
  86. define rootfspad/squashfs
  87. endef
  88. define Image/LimitName16
  89. $(shell expr substr "$(1)" 1 16)
  90. endef
  91. define Image/FileSystemStrip
  92. $(subst root.,,$(notdir $(1)))
  93. endef
  94. define Build/cfe-bin
  95. $(STAGING_DIR_HOST)/bin/imagetag -i $(word 1,$^) -f $(word 2,$^) \
  96. --output $@ --boardid $(CFE_BOARD_ID) --chipid $(CFE_CHIP_ID) \
  97. --entry $(LOADER_ENTRY) --load-addr $(LOADER_ENTRY) \
  98. --info1 "$(call Image/LimitName16,$(DEVICE_NAME))" \
  99. --info2 "$(call Image/FileSystemStrip,$(word 2,$^))" \
  100. $(call rootfspad/$(call Image/FileSystemStrip,$(word 2,$^))) \
  101. $(CFE_EXTRAS) $(1)
  102. endef
  103. define Build/cfe-old-bin
  104. $(TOPDIR)/scripts/brcmImage.pl -t -p \
  105. -o $@ -b $(CFE_BOARD_ID) -c $(CFE_CHIP_ID) \
  106. -e $(LOADER_ENTRY) -a $(LOADER_ENTRY) \
  107. -k $(word 1,$^) -r $(word 2,$^) \
  108. $(CFE_EXTRAS)
  109. endef
  110. define Build/cfe-spw303v-bin
  111. $(STAGING_DIR_HOST)/bin/imagetag -i $(word 1,$^) -f $(word 2,$^) \
  112. --output $@ --boardid $(CFE_BOARD_ID) --chipid $(CFE_CHIP_ID) \
  113. --entry $(LOADER_ENTRY) --load-addr $(LOADER_ENTRY) \
  114. $(call rootfspad/$(call Image/FileSystemStrip,$(word 2,$^))) \
  115. $(CFE_EXTRAS)
  116. endef
  117. define Build/spw303v-bin
  118. $(STAGING_DIR_HOST)/bin/spw303v -i $@ -o [email protected]
  119. mv [email protected] $@
  120. endef
  121. define Build/xor-image
  122. $(STAGING_DIR_HOST)/bin/xorimage -i $@ -o [email protected]
  123. mv [email protected] $@
  124. endef
  125. define Build/zyxel-bin
  126. $(STAGING_DIR_HOST)/bin/zyxbcm -i $@ -o [email protected]
  127. mv [email protected] $@
  128. endef
  129. define Build/redboot-bin
  130. # Prepare kernel and rootfs
  131. dd if=$(word 1,$^) of=$(BIN_DIR)/$(REDBOOT_PREFIX)-vmlinux.gz bs=65536 conv=sync
  132. dd if=$(word 2,$^) of=$(BIN_DIR)/$(REDBOOT_PREFIX)-$(notdir $(word 2,$^)) bs=64k conv=sync
  133. echo -ne \\xDE\\xAD\\xC0\\xDE >> $(BIN_DIR)/$(REDBOOT_PREFIX)-$(notdir $(word 2,$^))
  134. # Generate the scripted image
  135. $(TOPDIR)/scripts/redboot-script.pl \
  136. -k $(BIN_DIR)/$(REDBOOT_PREFIX)-vmlinux.gz \
  137. -r $(BIN_DIR)/$(REDBOOT_PREFIX)-$(notdir $(word 2,$^)) \
  138. -a $(strip $(LOADADDR)) -f 0xbe430000 -l 0x7c0000 \
  139. -s 0x1000 -t 20 -o [email protected]
  140. dd if="[email protected]" of="[email protected]" bs=4096 conv=sync
  141. cat \
  142. "[email protected]" \
  143. "$(BIN_DIR)/$(REDBOOT_PREFIX)-vmlinux.gz" \
  144. "$(BIN_DIR)/$(REDBOOT_PREFIX)-$(notdir $(word 2,$^))" \
  145. > "$@"
  146. endef
  147. # Shared device definition: applies to every defined device
  148. define Device/Default
  149. PROFILES = Default $$(DEVICE_PROFILE)
  150. KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
  151. KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX).elf
  152. DEVICE_PROFILE :=
  153. DEVICE_DTS :=
  154. endef
  155. DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
  156. # BCM33xx HCS devices: only generates ramdisks (unsupported bin images)
  157. define Device/bcm33xxHcsRamdisk
  158. KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma bin | hcs-initramfs
  159. IMAGES :=
  160. HCS_MAGIC_BYTES :=
  161. HCS_REV_MIN :=
  162. HCS_REV_MAJ :=
  163. endef
  164. DEVICE_VARS += HCS_MAGIC_BYTES HCS_REV_MIN HCS_REV_MAJ
  165. # Shared BCM63xx CFE device definitios
  166. define Device/bcm63xxCfeCommon
  167. FILESYSTEMS := squashfs jffs2-64k jffs2-128k
  168. KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | lzma-cfe
  169. KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf
  170. endef
  171. # BCM63xx CFE devices: only generates ramdisks (unsupported bin images)
  172. define Device/bcm63xxCfeRamdisk
  173. $(Device/bcm63xxCfeCommon)
  174. IMAGES :=
  175. endef
  176. # BCM63xx CFE devices: both ramdisks and parallel/spi bin images
  177. # New versions of CFE bootloader compatible with imagetag
  178. define Device/bcm63xxCfe
  179. $(Device/bcm63xxCfeCommon)
  180. IMAGES := cfe.bin
  181. IMAGE/cfe.bin := cfe-bin
  182. CFE_BOARD_ID :=
  183. CFE_CHIP_ID :=
  184. CFE_EXTRAS :=
  185. endef
  186. DEVICE_VARS += CFE_BOARD_ID CFE_CHIP_ID CFE_EXTRAS
  187. # BCM63xx CFE BC221 devices: both ramdisks and parallel/spi bin images
  188. # Generates a generic image and a layout version 5 image
  189. define Device/bcm63xxCfeBc221
  190. $(Device/bcm63xxCfeCommon)
  191. IMAGES := cfe.bin cfe-bc221.bin
  192. IMAGE/cfe.bin := cfe-bin
  193. IMAGE/cfe-bc221.bin := cfe-bin --layoutver 5
  194. CFE_BOARD_ID :=
  195. CFE_CHIP_ID :=
  196. CFE_EXTRAS :=
  197. endef
  198. # BCM63xx CFE MultiFlash devices: both ramdisks and parallel/spi bin images
  199. # Generates generic images padded for 4M/8M/16M flashes
  200. define Device/bcm63xxCfeMultiFlash
  201. $(Device/bcm63xxCfeCommon)
  202. IMAGES := cfe-4M.bin cfe-8M.bin cfe-16M.bin
  203. IMAGE/cfe-4M.bin := cfe-bin --pad 2
  204. IMAGE/cfe-8M.bin := cfe-bin --pad 4
  205. IMAGE/cfe-16M.bin := cfe-bin --pad 8
  206. CFE_BOARD_ID :=
  207. CFE_CHIP_ID :=
  208. CFE_EXTRAS :=
  209. endef
  210. # BCM63xx CFE NETGEAR devices: both ramdisks and parallel/spi bin images
  211. # factory.chk: netgear images for bootloader/original firmware upgrades
  212. # sysupgrade.bin: openwrt images for sysupgrades
  213. define Device/bcm63xxCfeNetgear
  214. $(Device/bcm63xxCfeCommon)
  215. IMAGES := factory.chk sysupgrade.bin
  216. IMAGE/factory.chk := cfe-bin | netgear-chk
  217. IMAGE/sysupgrade.bin := cfe-bin
  218. CFE_BOARD_ID :=
  219. CFE_CHIP_ID :=
  220. CFE_EXTRAS :=
  221. NETGEAR_BOARD_ID :=
  222. NETGEAR_REGION :=
  223. endef
  224. DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION
  225. # BCM63xx Old CFE devices: both ramdisks and parallel/spi bin images
  226. # Old versions of CFE bootloader not compatible with imagetag
  227. define Device/bcm63xxCfeOld
  228. $(Device/bcm63xxCfeCommon)
  229. IMAGES := cfe-old.bin
  230. IMAGE/cfe-old.bin := cfe-old-bin
  231. CFE_BOARD_ID :=
  232. CFE_CHIP_ID :=
  233. CFE_EXTRAS :=
  234. endef
  235. # BCM63xx CFE SPW303V devices: both ramdisks and parallel/spi bin images
  236. # factory.bin: SPW303V images for bootloader/original firmware upgrades
  237. # sysupgrade.bin: openwrt images for sysupgrades
  238. define Device/bcm63xxCfeSpw303v
  239. $(Device/bcm63xxCfeCommon)
  240. IMAGES := factory.bin sysupgrade.bin
  241. IMAGE/factory.bin := cfe-spw303v-bin | spw303v-bin | xor-image
  242. IMAGE/sysupgrade.bin := cfe-spw303v-bin | spw303v-bin
  243. CFE_BOARD_ID :=
  244. CFE_CHIP_ID :=
  245. CFE_EXTRAS :=
  246. endef
  247. # BCM63xx CFE ZyXEL devices: both ramdisks and parallel/spi bin images
  248. # factory.bin: ZyXEL specific CFE images (sysupgrade compatible)
  249. define Device/bcm63xxCfeZyxel
  250. $(Device/bcm63xxCfeCommon)
  251. IMAGES := factory.bin
  252. IMAGE/factory.bin := cfe-bin | zyxel-bin
  253. CFE_BOARD_ID :=
  254. CFE_CHIP_ID :=
  255. CFE_EXTRAS :=
  256. endef
  257. # BCM63xx RedBoot devices: both ramdisks and parallel/spi bin images
  258. # Generates images compatible with RedBoot bootloader
  259. define Device/bcm63xxRedBoot
  260. FILESYSTEMS := squashfs
  261. KERNEL := kernel-bin | append-dtb | gzip
  262. IMAGES := redboot.bin
  263. IMAGE/redboot.bin := redboot-bin
  264. REDBOOT_PREFIX := $$(IMAGE_PREFIX)
  265. endef
  266. DEVICE_VARS += REDBOOT_PREFIX
  267. ### Device macros ###
  268. # $(1) = profile
  269. # $(2) = image name
  270. # $(3) = dts
  271. # $(4) = hcs magic bytes
  272. # $(5) = hcs rev min
  273. # $(6) = hcs rev major
  274. define bcm33xxHcsRamdisk
  275. define Device/$(2)
  276. $$(Device/bcm33xxHcsRamdisk)
  277. DEVICE_PROFILE := $(1)
  278. DEVICE_DTS := $(3)
  279. HCS_MAGIC_BYTES := $(4)
  280. HCS_REV_MIN := $(5)
  281. HCS_REV_MAJ := $(6)
  282. endef
  283. TARGET_DEVICES += $(2)
  284. endef
  285. # $(1) = profile
  286. # $(2) = image name
  287. # $(3) = dts
  288. define bcm63xxCfeRamdisk
  289. define Device/$(2)
  290. $$(Device/bcm63xxCfeRamdisk)
  291. DEVICE_PROFILE := $(1)
  292. DEVICE_DTS := $(3)
  293. endef
  294. TARGET_DEVICES += $(2)
  295. endef
  296. # $(1) = profile
  297. # $(2) = image name
  298. # $(3) = dts
  299. # $(4) = cfe board name
  300. # $(5) = cfe chip id
  301. # $(6) = cfe additional options
  302. define bcm63xxCfe
  303. define Device/$(2)
  304. $$(Device/bcm63xxCfe)
  305. DEVICE_PROFILE := $(1)
  306. DEVICE_DTS := $(3)
  307. CFE_BOARD_ID := $(4)
  308. CFE_CHIP_ID := $(5)
  309. CFE_EXTRAS := $(6)
  310. endef
  311. TARGET_DEVICES += $(2)
  312. endef
  313. # $(1) = profile
  314. # $(2) = image name
  315. # $(3) = dts
  316. # $(4) = cfe board name
  317. # $(5) = cfe chip id
  318. # $(6) = cfe additional options
  319. define bcm63xxCfeMultiFlash
  320. define Device/$(2)
  321. $$(Device/bcm63xxCfeMultiFlash)
  322. DEVICE_PROFILE := $(1)
  323. DEVICE_DTS := $(3)
  324. CFE_BOARD_ID := $(4)
  325. CFE_CHIP_ID := $(5)
  326. CFE_EXTRAS := $(6)
  327. endef
  328. TARGET_DEVICES += $(2)
  329. endef
  330. # $(1) = profile
  331. # $(2) = image name
  332. # $(3) = dts
  333. # $(4) = cfe board name
  334. # $(5) = cfe chip id
  335. # $(6) = cfe additional options
  336. define bcm63xxCfeBc221
  337. define Device/$(2)
  338. $$(Device/bcm63xxCfeBc221)
  339. DEVICE_PROFILE := $(1)
  340. DEVICE_DTS := $(3)
  341. CFE_BOARD_ID := $(4)
  342. CFE_CHIP_ID := $(5)
  343. CFE_EXTRAS := $(6)
  344. endef
  345. TARGET_DEVICES += $(2)
  346. endef
  347. # $(1) = profile
  348. # $(2) = image name
  349. # $(3) = dts
  350. # $(4) = cfe board name
  351. # $(5) = cfe chip id
  352. # $(6) = cfe additional options
  353. # $(7) = netgear id
  354. # $(8) = netgear region
  355. define bcm63xxCfeNetgear
  356. define Device/$(2)
  357. $$(Device/bcm63xxCfeNetgear)
  358. DEVICE_PROFILE := $(1)
  359. DEVICE_DTS := $(3)
  360. CFE_BOARD_ID := $(4)
  361. CFE_CHIP_ID := $(5)
  362. CFE_EXTRAS := $(6)
  363. NETGEAR_BOARD_ID := $(7)
  364. NETGEAR_REGION := $(8)
  365. endef
  366. TARGET_DEVICES += $(2)
  367. endef
  368. # $(1) = profile
  369. # $(2) = image name
  370. # $(3) = dts
  371. # $(4) = cfe board name
  372. # $(5) = cfe chip id
  373. # $(6) = cfe additional options
  374. define bcm63xxCfeOld
  375. define Device/$(2)
  376. $$(Device/bcm63xxCfeOld)
  377. DEVICE_PROFILE := $(1)
  378. DEVICE_DTS := $(3)
  379. CFE_BOARD_ID := $(4)
  380. CFE_CHIP_ID := $(5)
  381. CFE_EXTRAS := $(6)
  382. endef
  383. TARGET_DEVICES += $(2)
  384. endef
  385. # $(1) = profile
  386. # $(2) = image name
  387. # $(3) = dts
  388. # $(4) = cfe board name
  389. # $(5) = cfe chip id
  390. # $(6) = cfe additional options
  391. define bcm63xxCfeSpw303v
  392. define Device/$(2)
  393. $$(Device/bcm63xxCfeSpw303v)
  394. DEVICE_PROFILE := $(1)
  395. DEVICE_DTS := $(3)
  396. CFE_BOARD_ID := $(4)
  397. CFE_CHIP_ID := $(5)
  398. CFE_EXTRAS := $(6)
  399. endef
  400. TARGET_DEVICES += $(2)
  401. endef
  402. # $(1) = profile
  403. # $(2) = image name
  404. # $(3) = dts
  405. # $(4) = cfe board name
  406. # $(5) = cfe chip id
  407. # $(6) = cfe additional options
  408. define bcm63xxCfeZyxel
  409. define Device/$(2)
  410. $$(Device/bcm63xxCfeZyxel)
  411. DEVICE_PROFILE := $(1)
  412. DEVICE_DTS := $(3)
  413. CFE_BOARD_ID := $(4)
  414. CFE_CHIP_ID := $(5)
  415. CFE_EXTRAS := $(6)
  416. endef
  417. TARGET_DEVICES += $(2)
  418. endef
  419. # $(1) = profile
  420. # $(2) = image name
  421. # $(3) = dts
  422. define bcm63xxRedBoot
  423. define Device/$(2)
  424. $$(Device/bcm63xxRedBoot)
  425. DEVICE_PROFILE := $(1)
  426. DEVICE_DTS := $(3)
  427. endef
  428. TARGET_DEVICES += $(2)
  429. endef
  430. ### Devices ###
  431. # Generic 963281TAN
  432. $(eval $(call bcm63xxCfeMultiFlash,963281TAN,963281TAN-generic,bcm963281TAN,963281TAN,6328))
  433. # Generic 96328avng
  434. $(eval $(call bcm63xxCfeMultiFlash,96328avng,96328avng-generic,bcm96328avng,96328avng,6328))
  435. # Generic 96338GW
  436. $(eval $(call bcm63xxCfe,96338GW,96338GW-generic,bcm96338GW,6338GW,6338))
  437. # Generic 96338W
  438. $(eval $(call bcm63xxCfe,96338W,96338W-generic,bcm96338W,6338W,6338))
  439. # Generic 96345GW2
  440. $(eval $(call bcm63xxCfeBc221,96345GW2,96345GW2-generic,bcm96345GW2,96345GW2,6345))
  441. # Generic 96348GW
  442. $(eval $(call bcm63xxCfeBc221,96348GW,96348GW-generic,bcm96348GW,96348GW,6348))
  443. # Generic 96348GW-10
  444. $(eval $(call bcm63xxCfe,96348GW_10,96348GW-10-generic,bcm96348GW-10,96348GW-10,6348))
  445. # Generic 96348GW-11
  446. $(eval $(call bcm63xxCfe,96348GW_11,96348GW-11-generic,bcm96348GW-11,96348GW-11,6348))
  447. # Generic 96348R
  448. $(eval $(call bcm63xxCfe,96348R,96348R-generic,bcm96348R,96348R,6348))
  449. # Generic 96358VW
  450. $(eval $(call bcm63xxCfe,96358VW,96358VW-generic,bcm96358VW,96358VW,6358))
  451. # Generic 96358VW2
  452. $(eval $(call bcm63xxCfe,96358VW2,96358VW2-generic,bcm96358VW2,96358VW2,6358))
  453. # Generic 96368MVNgr
  454. $(eval $(call bcm63xxCfe,96368MVNgr,96368MVNgr-generic,bcm96368MVNgr,96368MVNgr,6368))
  455. # Generic 96368MVWG
  456. $(eval $(call bcm63xxCfe,96368MVWG,96368MVWG-generic,bcm96368MVWG,96368MVWG,6368))
  457. # ADB P.DG A4001N
  458. $(eval $(call bcm63xxCfe,A4001N,A4001N,a4001n,96328dg2x2,6328,--pad 4))
  459. # ADB P.DG A4001N1
  460. $(eval $(call bcm63xxCfe,A4001N1,A4001N1,a4001n1,963281T_TEF,6328,--pad 8))
  461. # Alcatel RG100A
  462. $(eval $(call bcm63xxCfe,RG100A,RG100A,rg100a,96358VW2,6358,--block-size 0x20000 --image-offset 0x20000))
  463. # Asmax AR 1004g
  464. $(eval $(call bcm63xxCfe,AR1004G,AR1004G,ar1004g,96348GW-10,6348))
  465. # Belkin F5D7633
  466. $(eval $(call bcm63xxCfe,F5D7633,F5D7633,f5d7633,96348GW-10,6348,--block-size 0x20000 --image-offset 0x20000))
  467. # Broadcom BCM96318REF
  468. $(eval $(call bcm63xxCfeRamdisk,BCM96318REF,BCM96318REF,bcm96318ref,96318REF,6318))
  469. # Broadcom BCM96318REF_P300
  470. $(eval $(call bcm63xxCfeRamdisk,BCM96318REF_P300,BCM96318ref_P300,bcm96318ref_p300,96318REF_P300,6318))
  471. # Broadcom BCM963268BU_P300
  472. $(eval $(call bcm63xxCfeRamdisk,BCM963268BU_P300,BCM963268BU_P300,bcm963268bu_p300,963268BU_P300,63268))
  473. # Broadcom BCM963269BHR
  474. $(eval $(call bcm63xxCfeRamdisk,BCM963269BHR,BCM963269BHR,bcm963269bhr,963269BHR,63268))
  475. # BT Home Hub 2.0 A
  476. $(eval $(call bcm63xxCfe,BTHOMEHUB2A,HomeHub2A,homehub2a,HOMEHUB2A,6358,--image-offset 0x20000 --block-size 0x20000))
  477. # BT Voyager V2110, V2110_AA, V2110_ROI
  478. $(eval $(call bcm63xxCfe,BTV2110,BTV2110,v2110,V2110,6348,--layoutver 5))
  479. # BT Voyager V2500V, V2500V_SIP_CLUB, V2500V_AA
  480. $(eval $(call bcm63xxCfe,BTV2500V,BTV2500V,v2500v-bb,V2500V_BB,6348,--layoutver 5))
  481. # Comtrend AR-5381u
  482. $(eval $(call bcm63xxCfe,AR5381u,AR-5381u,ar-5381u,96328A-1241N,6328,--pad 8))
  483. # Comtrend AR-5387un
  484. $(eval $(call bcm63xxCfe,AR5387un,AR-5387un,ar-5387un,96328A-1441N1,6328,--pad 8))
  485. # Comtrend 536, 5621
  486. $(eval $(call bcm63xxCfe,CT536_CT5621,CT536_CT5621,ct536plus,96348GW-11,6348))
  487. # Comtrend CT-5365
  488. $(eval $(call bcm63xxCfe,CT5365,CT-5365,ct-5365,96348A-122,6348))
  489. # Comtrend CT-6373
  490. $(eval $(call bcm63xxCfe,CT6373,CT-6373,ct-6373,CT6373-1,6358))
  491. # Comtrend VR-3025u
  492. $(eval $(call bcm63xxCfe,VR3025u,VR-3025u,vr-3025u,96368M-1541N,6368,--pad 16 --image-offset 0x20000 --block-size 0x20000))
  493. # Comtrend VR-3025un
  494. $(eval $(call bcm63xxCfe,VR3025un,VR-3025un,vr-3025un,96368M-1341N,6368,--pad 4))
  495. # Comtrend VR-3026e
  496. $(eval $(call bcm63xxCfe,VR3026e,VR-3026e,vr-3026e,96368MT-1341N1,6368,--pad 4))
  497. # Comtrend WAP-5813n
  498. $(eval $(call bcm63xxCfe,WAP5813n,WAP-5813n,wap-5813n,96369R-1231N,6368,--pad 4))
  499. # D-Link DSL-2640B, rev B2
  500. $(eval $(call bcm63xxCfe,DSL2640B-B2,DSL2640B_B,dsl-2640b-b,D-4P-W,6348))
  501. # D-Link DSL-2640U, rev C1
  502. $(eval $(call bcm63xxCfe,DSL2640U,DSL2640U,dsl-2640u,96338W2_E7T,6338))
  503. # D-Link DSL-2650U
  504. $(eval $(call bcm63xxCfe,DSL2650U,DSL2650U,dsl-2650u,96358VW2,6358))
  505. # D-Link DSL-2740B/DSL-2741B, rev C2
  506. $(eval $(call bcm63xxCfe,DSL274XB_C,DSL274XB-C2,dsl-274xb-c,96358GW,6358))
  507. # D-Link DSL-2740B/DSL-2741B, rev C3
  508. $(eval $(call bcm63xxCfe,DSL274XB_C,DSL274XB-C3,dsl-274xb-c,AW4139,6358))
  509. # D-Link DSL-2740B/DSL-2741B, rev F1
  510. $(eval $(call bcm63xxCfe,DSL274XB_F,DSL274XB-F1-EU,dsl-274xb-f,AW4339U,6328,--signature2 "4.06.01.EUF1" --pad 4))
  511. $(eval $(call bcm63xxCfe,DSL274XB_F,DSL274XB-F1-AU,dsl-274xb-f,AW4339U,6328,--signature2 "4.06.01.AUF1" --pad 4))
  512. # D-Link DSL-2750B/DSL-2751, rev D1
  513. $(eval $(call bcm63xxCfe,DSL275XB_D,DSL275XB-D1,dsl-275xb-d,AW5200B,6318,--pad 4))
  514. # D-Link DVA-G3810BN/TL
  515. $(eval $(call bcm63xxCfe,DVAG3810BN,DVAG3810BN,dva-g3810bn_tl,96358VW,6358))
  516. # Davolink DV-201AMR
  517. $(eval $(call bcm63xxCfeOld,DV201AMR,DV-201AMR,dv-201amr,DV201AMR,6348))
  518. # Dynalink RTA770BW (Siemens SE515)
  519. $(eval $(call bcm63xxCfeRamdisk,RTA770BW,RTA770BW,rta770bw,RTA770BW,6345,--layoutver 5))
  520. # Dynalink RTA770W
  521. $(eval $(call bcm63xxCfeRamdisk,RTA770W,RTA770W,rta770w,RTA770W,6345,--layoutver 5))
  522. # Dynalink RTA1025W (numerous routers)
  523. $(eval $(call bcm63xxCfe,RTA1025W,RTA1025W_16,rta1025w,RTA1025W_16,6348,--layoutver 5))
  524. # Dynalink RTA1320 (numerous routers)
  525. $(eval $(call bcm63xxCfe,RTA1320,RTA1320_16M,rta1320,RTA1320_16M,6338,--layoutver 5))
  526. # Huawei HG520v
  527. $(eval $(call bcm63xxCfe,HG520v,HG520v,hg520v,HW6358GW_B,6358,--rsa-signature "EchoLife_HG520v"))
  528. # Huawei HG553
  529. $(eval $(call bcm63xxCfe,HG553,HG553,hg553,HW553,6358,--rsa-signature "EchoLife_HG553" --image-offset 0x20000 --block-size 0x20000 --tag-version 7))
  530. # Huawei HG556a
  531. $(eval $(call bcm63xxCfe,HG556a_AB,HG556a_A,hg556a-a,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x10000 --tag-version 8))
  532. $(eval $(call bcm63xxCfe,HG556a_AB,HG556a_B,hg556a-b,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
  533. $(eval $(call bcm63xxCfe,HG556a_C,HG556a_C,hg556a-c,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
  534. # Huawei HG622
  535. $(eval $(call bcm63xxCfe,HG622,HG622,hg622,96368MVWG_hg622,6368,--image-offset 0x20000 --block-size 0x20000 --tag-version 7 --pad 8))
  536. # Huawei HG655b
  537. $(eval $(call bcm63xxCfe,HG655b,HG655b,hg655b,HW65x,6368,--image-offset 0x20000 --tag-version 7 --pad 4))
  538. # Inteno VG50
  539. $(eval $(call bcm63xxCfeRamdisk,VG50,vg50,vg50,VW6339GU,63268))
  540. # Inventel Livebox 1
  541. $(eval $(call bcm63xxRedBoot,Livebox,livebox,livebox-blue-5g))
  542. # Netgear CVG834G
  543. $(eval $(call bcm33xxHcsRamdisk,CVG834G,cvg834g,cvg834g,0xa020,0001,0022))
  544. # Netgear DG834GT/PN
  545. $(eval $(call bcm63xxCfe,DG834GTPN,DG834GT_PN,dg834gtpn,96348GW-10,6348))
  546. # Netgear DG834G v4
  547. $(eval $(call bcm63xxCfeRamdisk,DG834GV4,DG834GTv4,dg834g_v4,96348W3,6348))
  548. # Netgear DGND3700 v1
  549. $(eval $(call bcm63xxCfeNetgear,DGND3700v1_3800B,DGND3700v1,dgnd3700v1,96368MVWG,6368,--image-offset 0x20000 --block-size 0x20000,U12L144T01_NETGEAR_NEWLED,1))
  550. # Netgear DGND3800B
  551. $(eval $(call bcm63xxCfeNetgear,DGND3700v1_3800B,DGND3800B,dgnd3700v1,96368MVWG,6368,--image-offset 0x20000 --block-size 0x20000,U12L144T11_NETGEAR_NEWLED,1))
  552. # NuCom R5010UNv2
  553. $(eval $(call bcm63xxCfe,R5010UNV2,R5010UNv2,r5010unv2,96328ang,6328,--pad 8))
  554. # Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
  555. $(eval $(call bcm63xxCfe,AGPF_S0,AGV2+W,agpf-s0,AGPF-S0,6358,--block-size 0x20000 --image-offset 0x20000 --signature2 IMAGE --tag-version 8))
  556. # Pirelli A226G
  557. $(eval $(call bcm63xxCfe,A226G,A226G,a226g,DWV-S0,6358,--signature2 IMAGE --tag-version 8))
  558. # Pirelli A226M/A226M-FWB
  559. $(eval $(call bcm63xxCfe,A226M,A226M,a226m,DWV-S0,6358,--signature2 IMAGE --tag-version 8))
  560. $(eval $(call bcm63xxCfe,A226M,A226M-FWB,a226m-fwb,DWV-S0,6358,--block-size 0x20000 --image-offset 0x20000 --signature2 IMAGE --tag-version 8))
  561. # Sagem F@ST2404
  562. $(eval $(call bcm63xxCfe,FAST2404,F@ST2404,fast2404,F@ST2404,6348))
  563. # Sagem F@ST2504n
  564. $(eval $(call bcm63xxCfe,FAST2504n,F@ST2504n,fast2504n,F@ST2504n,6362))
  565. # Sagem F@ST2604
  566. $(eval $(call bcm63xxCfe,FAST2604,F@ST2604,fast2604,F@ST2604,6348))
  567. # Sagem F@ST2704N V1 / Plusnet F@ST2704N V1
  568. $(eval $(call bcm63xxCfe,FAST2704N,FAST2704N,fast2704n,F@ST2704N,6318,--pad 4))
  569. # Sagem F@ST2704V2
  570. $(eval $(call bcm63xxCfe,FAST2704V2,F@ST2704V2,fast2704v2,F@ST2704V2,6328))
  571. # SFR Neufbox 4
  572. $(eval $(call bcm63xxCfe,Neufbox4,NEUFBOX4-SER,nb4-ser-r0,96358VW,6358,--rsa-signature "OpenWRT-$(REVISION)"))
  573. $(eval $(call bcm63xxCfe,Neufbox4,NEUFBOX4-FXC,nb4-fxc-r1,96358VW,6358,--rsa-signature "OpenWRT-$(REVISION)"))
  574. # SFR Neufbox 6
  575. $(eval $(call bcm63xxCfe,Neufbox6,NEUFBOX6,nb6-ser-r0,NB6-SER-r0,6362,--rsa-signature "OpenWRT-$(REVISION)"))
  576. # T-Com Speedport W 303V Typ B
  577. $(eval $(call bcm63xxCfeSpw303v,SPW303V,SPW303V,spw303v,96358-502V,6358,--pad 4))
  578. # T-Com Speedport W 500V
  579. $(eval $(call bcm63xxCfe,SPW500V,SPW500V,spw500v,96348GW,6348))
  580. # Tecom GW6000
  581. $(eval $(call bcm63xxCfe,GW6000,GW6000,gw6000,96348GW,6348))
  582. # Tecom GW6200
  583. $(eval $(call bcm63xxCfe,GW6200,GW6200,gw6200,96348GW,6348,--rsa-signature "$(shell printf '\x99')"))
  584. # Telsey CPVA502+
  585. $(eval $(call bcm63xxCfeRamdisk,CPVA502PLUS,CVPA502PLUS,cpva502plus,CPVA502+,6348,--signature "Telsey Tlc" --signature2 "99.99.999" --second-image-flag "0"))
  586. # Telsey CPVA642-type (e.g. CPA-ZNTE60T)
  587. $(eval $(call bcm63xxCfe,CPVA642,CPA-ZNTE60T,cpva642,CPVA642,6358,--signature "Telsey Tlc" --signature2 "99.99.999" --second-image-flag "0" --pad 4))
  588. # Telsey MAGIC (Alice W-Gate)
  589. $(eval $(call bcm63xxCfeRamdisk,MAGIC,MAGIC,magic,MAGIC,6348))
  590. # TP-Link TD-W8900GB
  591. $(eval $(call bcm63xxCfe,TDW8900GB,TD-W8900GB,td-w8900gb,96348GW-11,6348,--rsa-signature "$(shell printf 'PRID\x89\x10\x00\x02')" --image-offset 0x20000))
  592. # USRobotics 9108
  593. $(eval $(call bcm63xxCfe,USR9108,USR9108,usr9108,96348GW-A,6348))
  594. # ZyXEL P870HW-51a v2
  595. $(eval $(call bcm63xxCfeZyxel,P870HW_51a_v2,P870HW-51a_v2,p870hw-51a-v2,96368VVW,6368,--rsa-signature "ZyXEL" --signature "ZyXEL_0001"))
  596. $(eval $(call BuildImage))