Makefile 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  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_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX).elf
  151. DEVICE_PROFILE :=
  152. DEVICE_DTS :=
  153. endef
  154. DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
  155. # BCM33xx HCS devices: only generates ramdisks (unsupported bin images)
  156. define Device/bcm33xxHcsRamdisk
  157. KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma bin | hcs-initramfs
  158. IMAGES :=
  159. HCS_MAGIC_BYTES :=
  160. HCS_REV_MIN :=
  161. HCS_REV_MAJ :=
  162. endef
  163. DEVICE_VARS += HCS_MAGIC_BYTES HCS_REV_MIN HCS_REV_MAJ
  164. # Shared BCM63xx CFE device definitios
  165. define Device/bcm63xxCfeCommon
  166. FILESYSTEMS := squashfs jffs2-64k jffs2-128k
  167. KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | lzma-cfe
  168. KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf
  169. endef
  170. # BCM63xx CFE devices: only generates ramdisks (unsupported bin images)
  171. define Device/bcm63xxCfeRamdisk
  172. $(Device/bcm63xxCfeCommon)
  173. IMAGES :=
  174. endef
  175. # BCM63xx CFE devices: both ramdisks and parallel/spi bin images
  176. # New versions of CFE bootloader compatible with imagetag
  177. define Device/bcm63xxCfe
  178. $(Device/bcm63xxCfeCommon)
  179. IMAGES := cfe.bin
  180. IMAGE/cfe.bin := cfe-bin
  181. CFE_BOARD_ID :=
  182. CFE_CHIP_ID :=
  183. CFE_EXTRAS :=
  184. endef
  185. DEVICE_VARS += CFE_BOARD_ID CFE_CHIP_ID CFE_EXTRAS
  186. # BCM63xx CFE BC221 devices: both ramdisks and parallel/spi bin images
  187. # Generates a generic image and a layout version 5 image
  188. define Device/bcm63xxCfeBc221
  189. $(Device/bcm63xxCfeCommon)
  190. IMAGES := cfe.bin cfe-bc221.bin
  191. IMAGE/cfe.bin := cfe-bin
  192. IMAGE/cfe-bc221.bin := cfe-bin --layoutver 5
  193. CFE_BOARD_ID :=
  194. CFE_CHIP_ID :=
  195. CFE_EXTRAS :=
  196. endef
  197. # BCM63xx CFE MultiFlash devices: both ramdisks and parallel/spi bin images
  198. # Generates generic images padded for 4M/8M/16M flashes
  199. define Device/bcm63xxCfeMultiFlash
  200. $(Device/bcm63xxCfeCommon)
  201. IMAGES := cfe-4M.bin cfe-8M.bin cfe-16M.bin
  202. IMAGE/cfe-4M.bin := cfe-bin --pad 2
  203. IMAGE/cfe-8M.bin := cfe-bin --pad 4
  204. IMAGE/cfe-16M.bin := cfe-bin --pad 8
  205. CFE_BOARD_ID :=
  206. CFE_CHIP_ID :=
  207. CFE_EXTRAS :=
  208. endef
  209. # BCM63xx CFE NETGEAR devices: both ramdisks and parallel/spi bin images
  210. # factory.chk: netgear images for bootloader/original firmware upgrades
  211. # sysupgrade.bin: openwrt images for sysupgrades
  212. define Device/bcm63xxCfeNetgear
  213. $(Device/bcm63xxCfeCommon)
  214. IMAGES := factory.chk sysupgrade.bin
  215. IMAGE/factory.chk := cfe-bin | netgear-chk
  216. IMAGE/sysupgrade.bin := cfe-bin
  217. CFE_BOARD_ID :=
  218. CFE_CHIP_ID :=
  219. CFE_EXTRAS :=
  220. NETGEAR_BOARD_ID :=
  221. NETGEAR_REGION :=
  222. endef
  223. DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION
  224. # BCM63xx Old CFE devices: both ramdisks and parallel/spi bin images
  225. # Old versions of CFE bootloader not compatible with imagetag
  226. define Device/bcm63xxCfeOld
  227. $(Device/bcm63xxCfeCommon)
  228. IMAGES := cfe-old.bin
  229. IMAGE/cfe-old.bin := cfe-old-bin
  230. CFE_BOARD_ID :=
  231. CFE_CHIP_ID :=
  232. CFE_EXTRAS :=
  233. endef
  234. # BCM63xx CFE SPW303V devices: both ramdisks and parallel/spi bin images
  235. # factory.bin: SPW303V images for bootloader/original firmware upgrades
  236. # sysupgrade.bin: openwrt images for sysupgrades
  237. define Device/bcm63xxCfeSpw303v
  238. $(Device/bcm63xxCfeCommon)
  239. IMAGES := factory.bin sysupgrade.bin
  240. IMAGE/factory.bin := cfe-spw303v-bin | spw303v-bin | xor-image
  241. IMAGE/sysupgrade.bin := cfe-spw303v-bin | spw303v-bin
  242. CFE_BOARD_ID :=
  243. CFE_CHIP_ID :=
  244. CFE_EXTRAS :=
  245. endef
  246. # BCM63xx CFE ZyXEL devices: both ramdisks and parallel/spi bin images
  247. # factory.bin: ZyXEL specific CFE images (sysupgrade compatible)
  248. define Device/bcm63xxCfeZyxel
  249. $(Device/bcm63xxCfeCommon)
  250. IMAGES := factory.bin
  251. IMAGE/factory.bin := cfe-bin | zyxel-bin
  252. CFE_BOARD_ID :=
  253. CFE_CHIP_ID :=
  254. CFE_EXTRAS :=
  255. endef
  256. # BCM63xx RedBoot devices: both ramdisks and parallel/spi bin images
  257. # Generates images compatible with RedBoot bootloader
  258. define Device/bcm63xxRedBoot
  259. FILESYSTEMS := squashfs
  260. KERNEL := kernel-bin | append-dtb | gzip
  261. IMAGES := redboot.bin
  262. IMAGE/redboot.bin := redboot-bin
  263. REDBOOT_PREFIX := $$(IMAGE_PREFIX)
  264. endef
  265. DEVICE_VARS += REDBOOT_PREFIX
  266. ### Device macros ###
  267. # $(1) = profile
  268. # $(2) = image name
  269. # $(3) = dts
  270. # $(4) = hcs magic bytes
  271. # $(5) = hcs rev min
  272. # $(6) = hcs rev major
  273. define bcm33xxHcsRamdisk
  274. define Device/$(2)
  275. $$(Device/bcm33xxHcsRamdisk)
  276. DEVICE_PROFILE := $(1)
  277. DEVICE_DTS := $(3)
  278. HCS_MAGIC_BYTES := $(4)
  279. HCS_REV_MIN := $(5)
  280. HCS_REV_MAJ := $(6)
  281. endef
  282. TARGET_DEVICES += $(2)
  283. endef
  284. # $(1) = profile
  285. # $(2) = image name
  286. # $(3) = dts
  287. define bcm63xxCfeRamdisk
  288. define Device/$(2)
  289. $$(Device/bcm63xxCfeRamdisk)
  290. DEVICE_PROFILE := $(1)
  291. DEVICE_DTS := $(3)
  292. endef
  293. TARGET_DEVICES += $(2)
  294. endef
  295. # $(1) = profile
  296. # $(2) = image name
  297. # $(3) = dts
  298. # $(4) = cfe board name
  299. # $(5) = cfe chip id
  300. # $(6) = cfe additional options
  301. define bcm63xxCfe
  302. define Device/$(2)
  303. $$(Device/bcm63xxCfe)
  304. DEVICE_PROFILE := $(1)
  305. DEVICE_DTS := $(3)
  306. CFE_BOARD_ID := $(4)
  307. CFE_CHIP_ID := $(5)
  308. CFE_EXTRAS := $(6)
  309. endef
  310. TARGET_DEVICES += $(2)
  311. endef
  312. # $(1) = profile
  313. # $(2) = image name
  314. # $(3) = dts
  315. # $(4) = cfe board name
  316. # $(5) = cfe chip id
  317. # $(6) = cfe additional options
  318. define bcm63xxCfeMultiFlash
  319. define Device/$(2)
  320. $$(Device/bcm63xxCfeMultiFlash)
  321. DEVICE_PROFILE := $(1)
  322. DEVICE_DTS := $(3)
  323. CFE_BOARD_ID := $(4)
  324. CFE_CHIP_ID := $(5)
  325. CFE_EXTRAS := $(6)
  326. endef
  327. TARGET_DEVICES += $(2)
  328. endef
  329. # $(1) = profile
  330. # $(2) = image name
  331. # $(3) = dts
  332. # $(4) = cfe board name
  333. # $(5) = cfe chip id
  334. # $(6) = cfe additional options
  335. define bcm63xxCfeBc221
  336. define Device/$(2)
  337. $$(Device/bcm63xxCfeBc221)
  338. DEVICE_PROFILE := $(1)
  339. DEVICE_DTS := $(3)
  340. CFE_BOARD_ID := $(4)
  341. CFE_CHIP_ID := $(5)
  342. CFE_EXTRAS := $(6)
  343. endef
  344. TARGET_DEVICES += $(2)
  345. endef
  346. # $(1) = profile
  347. # $(2) = image name
  348. # $(3) = dts
  349. # $(4) = cfe board name
  350. # $(5) = cfe chip id
  351. # $(6) = cfe additional options
  352. # $(7) = netgear id
  353. # $(8) = netgear region
  354. define bcm63xxCfeNetgear
  355. define Device/$(2)
  356. $$(Device/bcm63xxCfeNetgear)
  357. DEVICE_PROFILE := $(1)
  358. DEVICE_DTS := $(3)
  359. CFE_BOARD_ID := $(4)
  360. CFE_CHIP_ID := $(5)
  361. CFE_EXTRAS := $(6)
  362. NETGEAR_BOARD_ID := $(7)
  363. NETGEAR_REGION := $(8)
  364. endef
  365. TARGET_DEVICES += $(2)
  366. endef
  367. # $(1) = profile
  368. # $(2) = image name
  369. # $(3) = dts
  370. # $(4) = cfe board name
  371. # $(5) = cfe chip id
  372. # $(6) = cfe additional options
  373. define bcm63xxCfeOld
  374. define Device/$(2)
  375. $$(Device/bcm63xxCfeOld)
  376. DEVICE_PROFILE := $(1)
  377. DEVICE_DTS := $(3)
  378. CFE_BOARD_ID := $(4)
  379. CFE_CHIP_ID := $(5)
  380. CFE_EXTRAS := $(6)
  381. endef
  382. TARGET_DEVICES += $(2)
  383. endef
  384. # $(1) = profile
  385. # $(2) = image name
  386. # $(3) = dts
  387. # $(4) = cfe board name
  388. # $(5) = cfe chip id
  389. # $(6) = cfe additional options
  390. define bcm63xxCfeSpw303v
  391. define Device/$(2)
  392. $$(Device/bcm63xxCfeSpw303v)
  393. DEVICE_PROFILE := $(1)
  394. DEVICE_DTS := $(3)
  395. CFE_BOARD_ID := $(4)
  396. CFE_CHIP_ID := $(5)
  397. CFE_EXTRAS := $(6)
  398. endef
  399. TARGET_DEVICES += $(2)
  400. endef
  401. # $(1) = profile
  402. # $(2) = image name
  403. # $(3) = dts
  404. # $(4) = cfe board name
  405. # $(5) = cfe chip id
  406. # $(6) = cfe additional options
  407. define bcm63xxCfeZyxel
  408. define Device/$(2)
  409. $$(Device/bcm63xxCfeZyxel)
  410. DEVICE_PROFILE := $(1)
  411. DEVICE_DTS := $(3)
  412. CFE_BOARD_ID := $(4)
  413. CFE_CHIP_ID := $(5)
  414. CFE_EXTRAS := $(6)
  415. endef
  416. TARGET_DEVICES += $(2)
  417. endef
  418. # $(1) = profile
  419. # $(2) = image name
  420. # $(3) = dts
  421. define bcm63xxRedBoot
  422. define Device/$(2)
  423. $$(Device/bcm63xxRedBoot)
  424. DEVICE_PROFILE := $(1)
  425. DEVICE_DTS := $(3)
  426. endef
  427. TARGET_DEVICES += $(2)
  428. endef
  429. ### Devices ###
  430. # Generic 963281TAN
  431. $(eval $(call bcm63xxCfeMultiFlash,963281TAN,963281TAN-generic,bcm963281TAN,963281TAN,6328))
  432. # Generic 96328avng
  433. $(eval $(call bcm63xxCfeMultiFlash,96328avng,96328avng-generic,bcm96328avng,96328avng,6328))
  434. # Generic 96338GW
  435. $(eval $(call bcm63xxCfe,96338GW,96338GW-generic,bcm96338GW,6338GW,6338))
  436. # Generic 96338W
  437. $(eval $(call bcm63xxCfe,96338W,96338W-generic,bcm96338W,6338W,6338))
  438. # Generic 96345GW2
  439. $(eval $(call bcm63xxCfeBc221,96345GW2,96345GW2-generic,bcm96345GW2,96345GW2,6345))
  440. # Generic 96348GW
  441. $(eval $(call bcm63xxCfeBc221,96348GW,96348GW-generic,bcm96348GW,96348GW,6348))
  442. # Generic 96348GW-10
  443. $(eval $(call bcm63xxCfe,96348GW_10,96348GW-10-generic,bcm96348GW-10,96348GW-10,6348))
  444. # Generic 96348GW-11
  445. $(eval $(call bcm63xxCfe,96348GW_11,96348GW-11-generic,bcm96348GW-11,96348GW-11,6348))
  446. # Generic 96348R
  447. $(eval $(call bcm63xxCfe,96348R,96348R-generic,bcm96348R,96348R,6348))
  448. # Generic 96358VW
  449. $(eval $(call bcm63xxCfe,96358VW,96358VW-generic,bcm96358VW,96358VW,6358))
  450. # Generic 96358VW2
  451. $(eval $(call bcm63xxCfe,96358VW2,96358VW2-generic,bcm96358VW2,96358VW2,6358))
  452. # Generic 96368MVNgr
  453. $(eval $(call bcm63xxCfe,96368MVNgr,96368MVNgr-generic,bcm96368MVNgr,96368MVNgr,6368))
  454. # Generic 96368MVWG
  455. $(eval $(call bcm63xxCfe,96368MVWG,96368MVWG-generic,bcm96368MVWG,96368MVWG,6368))
  456. # ADB P.DG A4001N
  457. $(eval $(call bcm63xxCfe,A4001N,A4001N,a4001n,96328dg2x2,6328,--pad 4))
  458. # ADB P.DG A4001N1
  459. $(eval $(call bcm63xxCfe,A4001N1,A4001N1,a4001n1,963281T_TEF,6328,--pad 8))
  460. # Alcatel RG100A
  461. $(eval $(call bcm63xxCfe,RG100A,RG100A,rg100a,96358VW2,6358,--block-size 0x20000 --image-offset 0x20000))
  462. # Asmax AR 1004g
  463. $(eval $(call bcm63xxCfe,AR1004G,AR1004G,ar1004g,96348GW-10,6348))
  464. # Belkin F5D7633
  465. $(eval $(call bcm63xxCfe,F5D7633,F5D7633,f5d7633,96348GW-10,6348,--block-size 0x20000 --image-offset 0x20000))
  466. # Broadcom BCM96318REF
  467. $(eval $(call bcm63xxCfeRamdisk,BCM96318REF,BCM96318REF,bcm96318ref,96318REF,6318))
  468. # Broadcom BCM96318REF_P300
  469. $(eval $(call bcm63xxCfeRamdisk,BCM96318REF_P300,BCM96318ref_P300,bcm96318ref_p300,96318REF_P300,6318))
  470. # Broadcom BCM963268BU_P300
  471. $(eval $(call bcm63xxCfeRamdisk,BCM963268BU_P300,BCM963268BU_P300,bcm963268bu_p300,963268BU_P300,63268))
  472. # Broadcom BCM963269BHR
  473. $(eval $(call bcm63xxCfeRamdisk,BCM963269BHR,BCM963269BHR,bcm963269bhr,963269BHR,63268))
  474. # BT Home Hub 2.0 A
  475. $(eval $(call bcm63xxCfe,BTHOMEHUB2A,HomeHub2A,homehub2a,HOMEHUB2A,6358,--image-offset 0x20000 --block-size 0x20000))
  476. # BT Voyager V2110, V2110_AA, V2110_ROI
  477. $(eval $(call bcm63xxCfe,BTV2110,BTV2110,v2110,V2110,6348,--layoutver 5))
  478. # BT Voyager V2500V, V2500V_SIP_CLUB, V2500V_AA
  479. $(eval $(call bcm63xxCfe,BTV2500V,BTV2500V,v2500v-bb,V2500V_BB,6348,--layoutver 5))
  480. # Comtrend AR-5381u
  481. $(eval $(call bcm63xxCfe,AR5381u,AR-5381u,ar-5381u,96328A-1241N,6328,--pad 8))
  482. # Comtrend AR-5387un
  483. $(eval $(call bcm63xxCfe,AR5387un,AR-5387un,ar-5387un,96328A-1441N1,6328,--pad 8))
  484. # Comtrend 536, 5621
  485. $(eval $(call bcm63xxCfe,CT536_CT5621,CT536_CT5621,ct536plus,96348GW-11,6348))
  486. # Comtrend CT-5365
  487. $(eval $(call bcm63xxCfe,CT5365,CT-5365,ct-5365,96348A-122,6348))
  488. # Comtrend CT-6373
  489. $(eval $(call bcm63xxCfe,CT6373,CT-6373,ct-6373,CT6373-1,6358))
  490. # Comtrend VR-3025u
  491. $(eval $(call bcm63xxCfe,VR3025u,VR-3025u,vr-3025u,96368M-1541N,6368,--pad 16 --image-offset 0x20000 --block-size 0x20000))
  492. # Comtrend VR-3025un
  493. $(eval $(call bcm63xxCfe,VR3025un,VR-3025un,vr-3025un,96368M-1341N,6368,--pad 4))
  494. # Comtrend VR-3026e
  495. $(eval $(call bcm63xxCfe,VR3026e,VR-3026e,vr-3026e,96368MT-1341N1,6368,--pad 4))
  496. # Comtrend WAP-5813n
  497. $(eval $(call bcm63xxCfe,WAP5813n,WAP-5813n,wap-5813n,96369R-1231N,6368,--pad 4))
  498. # D-Link DSL-2640B, rev B2
  499. $(eval $(call bcm63xxCfe,DSL2640B-B2,DSL2640B_B,dsl-2640b-b,D-4P-W,6348))
  500. # D-Link DSL-2640U, rev C1
  501. $(eval $(call bcm63xxCfe,DSL2640U,DSL2640U,dsl-2640u,96338W2_E7T,6338))
  502. # D-Link DSL-2650U
  503. $(eval $(call bcm63xxCfe,DSL2650U,DSL2650U,dsl-2650u,96358VW2,6358))
  504. # D-Link DSL-2740B/DSL-2741B, rev C2
  505. $(eval $(call bcm63xxCfe,DSL274XB_C,DSL274XB-C2,dsl-274xb-c,96358GW,6358))
  506. # D-Link DSL-2740B/DSL-2741B, rev C3
  507. $(eval $(call bcm63xxCfe,DSL274XB_C,DSL274XB-C3,dsl-274xb-c,AW4139,6358))
  508. # D-Link DSL-2740B/DSL-2741B, rev F1
  509. $(eval $(call bcm63xxCfe,DSL274XB_F,DSL274XB-F1-EU,dsl-274xb-f,AW4339U,6328,--signature2 "4.06.01.EUF1" --pad 4))
  510. $(eval $(call bcm63xxCfe,DSL274XB_F,DSL274XB-F1-AU,dsl-274xb-f,AW4339U,6328,--signature2 "4.06.01.AUF1" --pad 4))
  511. # D-Link DSL-2750B/DSL-2751, rev D1
  512. $(eval $(call bcm63xxCfe,DSL275XB_D,DSL275XB-D1,dsl-275xb-d,AW5200B,6318,--pad 4))
  513. # D-Link DVA-G3810BN/TL
  514. $(eval $(call bcm63xxCfe,DVAG3810BN,DVAG3810BN,dva-g3810bn_tl,96358VW,6358))
  515. # Davolink DV-201AMR
  516. $(eval $(call bcm63xxCfeOld,DV201AMR,DV-201AMR,dv-201amr,DV201AMR,6348))
  517. # Dynalink RTA770BW (Siemens SE515)
  518. $(eval $(call bcm63xxCfeRamdisk,RTA770BW,RTA770BW,rta770bw,RTA770BW,6345,--layoutver 5))
  519. # Dynalink RTA770W
  520. $(eval $(call bcm63xxCfeRamdisk,RTA770W,RTA770W,rta770w,RTA770W,6345,--layoutver 5))
  521. # Dynalink RTA1025W (numerous routers)
  522. $(eval $(call bcm63xxCfe,RTA1025W,RTA1025W_16,rta1025w,RTA1025W_16,6348,--layoutver 5))
  523. # Dynalink RTA1320 (numerous routers)
  524. $(eval $(call bcm63xxCfe,RTA1320,RTA1320_16M,rta1320,RTA1320_16M,6338,--layoutver 5))
  525. # Huawei HG520v
  526. $(eval $(call bcm63xxCfe,HG520v,HG520v,hg520v,HW6358GW_B,6358,--rsa-signature "EchoLife_HG520v"))
  527. # Huawei HG553
  528. $(eval $(call bcm63xxCfe,HG553,HG553,hg553,HW553,6358,--rsa-signature "EchoLife_HG553" --image-offset 0x20000 --block-size 0x20000 --tag-version 7))
  529. # Huawei HG556a
  530. $(eval $(call bcm63xxCfe,HG556a_AB,HG556a_A,hg556a-a,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x10000 --tag-version 8))
  531. $(eval $(call bcm63xxCfe,HG556a_AB,HG556a_B,hg556a-b,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
  532. $(eval $(call bcm63xxCfe,HG556a_C,HG556a_C,hg556a-c,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
  533. # Huawei HG655b
  534. $(eval $(call bcm63xxCfe,HG655b,HG655b,hg655b,HW65x,6368,--image-offset 0x20000 --tag-version 7 --pad 4))
  535. # Inteno VG50
  536. $(eval $(call bcm63xxCfeRamdisk,VG50,vg50,vg50,VW6339GU,63268))
  537. # Inventel Livebox 1
  538. $(eval $(call bcm63xxRedBoot,Livebox,livebox,livebox-blue-5g))
  539. # Netgear CVG834G
  540. $(eval $(call bcm33xxHcsRamdisk,CVG834G,cvg834g,cvg834g,0xa020,0001,0022))
  541. # Netgear DG834GT/PN
  542. $(eval $(call bcm63xxCfe,DG834GTPN,DG834GT_PN,dg834gtpn,96348GW-10,6348))
  543. # Netgear DG834G v4
  544. $(eval $(call bcm63xxCfeRamdisk,DG834GV4,DG834GTv4,dg834g_v4,96348W3,6348))
  545. # Netgear DGND3700 v1
  546. $(eval $(call bcm63xxCfeNetgear,DGND3700v1_3800B,DGND3700v1,dgnd3700v1,96368MVWG,6368,--image-offset 0x20000 --block-size 0x20000,U12L144T01_NETGEAR_NEWLED,1))
  547. # Netgear DGND3800B
  548. $(eval $(call bcm63xxCfeNetgear,DGND3700v1_3800B,DGND3800B,dgnd3700v1,96368MVWG,6368,--image-offset 0x20000 --block-size 0x20000,U12L144T11_NETGEAR_NEWLED,1))
  549. # Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
  550. $(eval $(call bcm63xxCfe,AGPF_S0,AGV2+W,agpf-s0,AGPF-S0,6358,--block-size 0x20000 --image-offset 0x20000 --signature2 IMAGE --tag-version 8))
  551. # Pirelli A226G
  552. $(eval $(call bcm63xxCfe,A226G,A226G,a226g,DWV-S0,6358,--signature2 IMAGE --tag-version 8))
  553. # Pirelli A226M/A226M-FWB
  554. $(eval $(call bcm63xxCfe,A226M,A226M,a226m,DWV-S0,6358,--signature2 IMAGE --tag-version 8))
  555. $(eval $(call bcm63xxCfe,A226M,A226M-FWB,a226m-fwb,DWV-S0,6358,--block-size 0x20000 --image-offset 0x20000 --signature2 IMAGE --tag-version 8))
  556. # Sagem F@ST2404
  557. $(eval $(call bcm63xxCfe,FAST2404,F@ST2404,fast2404,F@ST2404,6348))
  558. # Sagem F@ST2504n
  559. $(eval $(call bcm63xxCfe,FAST2504n,F@ST2504n,fast2504n,F@ST2504n,6362))
  560. # Sagem F@ST2604
  561. $(eval $(call bcm63xxCfe,FAST2604,F@ST2604,fast2604,F@ST2604,6348))
  562. # Sagem F@ST2704N V1 / Plusnet F@ST2704N V1
  563. $(eval $(call bcm63xxCfe,FAST2704N,FAST2704N,fast2704n,F@ST2704N,6318,--pad 4))
  564. # Sagem F@ST2704V2
  565. $(eval $(call bcm63xxCfe,FAST2704V2,F@ST2704V2,fast2704v2,F@ST2704V2,6328))
  566. # SFR Neufbox 4
  567. $(eval $(call bcm63xxCfe,Neufbox4,NEUFBOX4-SER,nb4-ser-r0,96358VW,6358,--rsa-signature "OpenWRT-$(REVISION)"))
  568. $(eval $(call bcm63xxCfe,Neufbox4,NEUFBOX4-FXC,nb4-fxc-r1,96358VW,6358,--rsa-signature "OpenWRT-$(REVISION)"))
  569. # SFR Neufbox 6
  570. $(eval $(call bcm63xxCfe,Neufbox6,NEUFBOX6,nb6-ser-r0,NB6-SER-r0,6362,--rsa-signature "OpenWRT-$(REVISION)"))
  571. # T-Com Speedport W 303V Typ B
  572. $(eval $(call bcm63xxCfeSpw303v,SPW303V,SPW303V,spw303v,96358-502V,6358,--pad 4))
  573. # T-Com Speedport W 500V
  574. $(eval $(call bcm63xxCfe,SPW500V,SPW500V,spw500v,96348GW,6348))
  575. # Tecom GW6000
  576. $(eval $(call bcm63xxCfe,GW6000,GW6000,gw6000,96348GW,6348))
  577. # Tecom GW6200
  578. $(eval $(call bcm63xxCfe,GW6200,GW6200,gw6200,96348GW,6348,--rsa-signature "$(shell printf '\x99')"))
  579. # Telsey CPVA502+
  580. $(eval $(call bcm63xxCfeRamdisk,CPVA502PLUS,CVPA502PLUS,cpva502plus,CPVA502+,6348,--signature "Telsey Tlc" --signature2 "99.99.999" --second-image-flag "0"))
  581. # Telsey CPVA642-type (e.g. CPA-ZNTE60T)
  582. $(eval $(call bcm63xxCfe,CPVA642,CPA-ZNTE60T,cpva642,CPVA642,6358,--signature "Telsey Tlc" --signature2 "99.99.999" --second-image-flag "0" --pad 4))
  583. # Telsey MAGIC (Alice W-Gate)
  584. $(eval $(call bcm63xxCfeRamdisk,MAGIC,MAGIC,magic,MAGIC,6348))
  585. # TP-Link TD-W8900GB
  586. $(eval $(call bcm63xxCfe,TDW8900GB,TD-W8900GB,td-w8900gb,96348GW-11,6348,--rsa-signature "$(shell printf 'PRID\x89\x10\x00\x02')" --image-offset 0x20000))
  587. # USRobotics 9108
  588. $(eval $(call bcm63xxCfe,USR9108,USR9108,usr9108,96348GW-A,6348))
  589. # ZyXEL P870HW-51a v2
  590. $(eval $(call bcm63xxCfeZyxel,P870HW_51a_v2,P870HW-51a_v2,p870hw-51a-v2,96368VVW,6368,--rsa-signature "ZyXEL" --signature "ZyXEL_0001"))
  591. $(eval $(call BuildImage))