Makefile 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. #
  2. # Copyright (C) 2010-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # boards missing since devicetree update
  8. #EASY50712 ARV3527P
  9. include $(TOPDIR)/rules.mk
  10. include $(INCLUDE_DIR)/image.mk
  11. JFFS2_BLOCKSIZE = 64k 128k 256k
  12. KDIR_TMP:=$(KDIR)/tmp
  13. LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
  14. define Image/BuildLoader/Template
  15. -rm -rf $(KDIR)/lzma-loader
  16. $(LOADER_MAKE) LOADER=loader$(2)-$(1).bin\
  17. LZMA_TEXT_START=0x80a00000 \
  18. LOADADDR=0x80002000 \
  19. LOADER_DATA="$(KDIR)/vmlinux$(2)-$(1).lzma" BOARD="$(1)" \
  20. compile loader.bin
  21. endef
  22. define CompressLzma
  23. $(STAGING_DIR_HOST)/bin/lzma e $(1) $(2)
  24. endef
  25. define PatchKernelLzma
  26. cp $(KDIR)/vmlinux$(2) $(KDIR)/vmlinux$(2)-$(1)
  27. $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(KDIR)/$(1).dtb ../dts/$(1).dts
  28. $(STAGING_DIR_HOST)/bin/patch-dtb $(KDIR)/vmlinux$(2)-$(1) $(KDIR)/$(1).dtb
  29. $(call CompressLzma,$(KDIR)/vmlinux$(2)-$(1),$(KDIR)/vmlinux$(2)-$(1).lzma)
  30. endef
  31. define MkBrnImage
  32. mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7)
  33. $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma)
  34. mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6)
  35. endef
  36. define MkImageLzma
  37. mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \
  38. -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
  39. -d $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/uImage-$(1)$(2)
  40. endef
  41. define TPLinkImageLzma
  42. mktplinkfw2 -c -B $(2) -s \
  43. -k $(KDIR)/vmlinux$(3)-$(1).lzma -o $(KDIR)/uImage-$(1)$(3)
  44. endef
  45. define MkImageEVA
  46. lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/$(1)$(2).eva.prealign
  47. dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.64k bs=64k conv=sync
  48. dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.128k bs=128k conv=sync
  49. cat ./eva.dummy.squashfs >> $(KDIR)/$(1)$(2).eva.align.64k
  50. endef
  51. define CompressGzip
  52. gzip -c $(1) > $(2)
  53. endef
  54. define PatchKernelGzip
  55. cp $(KDIR)/vmlinux$(3) $(KDIR)/vmlinux$(3)-$(1)
  56. $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux$(3)-$(1) '$(strip $(2))'
  57. $(call CompressGzip,$(KDIR)/vmlinux$(3)-$(1),$(KDIR)/vmlinux$(3)-$(1).gzip)
  58. endef
  59. define MkImageGzip
  60. mkimage -A mips -O linux -T kernel -a 0x80002000 -C gzip \
  61. -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
  62. -d $(KDIR)/vmlinux$(2)-$(1).gzip $(KDIR)/uImage-$(1)$(2)
  63. endef
  64. define Image/Build/squashfs
  65. cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
  66. $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
  67. $(if $(3),$(call MkBrnImage,$(3),$(4),$(5),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(6)))
  68. endef
  69. define Image/BuildNAND/squashfs
  70. ifneq ($($(PROFILE)_UBI_OPTS),)
  71. $(call prepare_generic_squashfs,$(KDIR)/root.$(1))
  72. $(call Image/Build/UbinizeImage,$(PROFILE),,squashfs,$($(PROFILE)_UBI_OPTS))
  73. $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE))
  74. endif
  75. endef
  76. DGN3500_SKERNEL=0x50000
  77. DGN3500_SKERNEL_DECIMAL=327680
  78. define Image/BuildDGN3500/squashfs
  79. dd if=/dev/zero of=$(BIN_DIR)/$(IMG_PREFIX)-pad bs=$(DGN3500_SKERNEL_DECIMAL) count=1
  80. cat $(BIN_DIR)/$(IMG_PREFIX)-pad $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
  81. rm -r $(BIN_DIR)/$(IMG_PREFIX)-pad
  82. dd if=/dev/zero ibs=16M count=1 | tr "\000" "\377" > $(BIN_DIR)/$(IMG_PREFIX)-pwf
  83. cp $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img
  84. dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img $(DGN3500_SKERNEL) NA
  85. $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img)
  86. cp $(BIN_DIR)/$(IMG_PREFIX)-pwf $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-NA.img
  87. dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-NA.img conv=notrunc
  88. dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade-NA.image bs=$(DGN3500_SKERNEL_DECIMAL) skip=1
  89. rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img
  90. mv $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img
  91. dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img $(DGN3500_SKERNEL) WW
  92. $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img)
  93. mv $(BIN_DIR)/$(IMG_PREFIX)-pwf $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-WW.img
  94. dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-WW.img conv=notrunc
  95. dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade-WW.image bs=$(DGN3500_SKERNEL_DECIMAL) skip=1
  96. rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img
  97. endef
  98. define Image/BuildDGN3500B/squashfs
  99. dd if=/dev/zero of=$(BIN_DIR)/$(IMG_PREFIX)-pad bs=327680 count=1
  100. cat $(BIN_DIR)/$(IMG_PREFIX)-pad $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
  101. rm -r $(BIN_DIR)/$(IMG_PREFIX)-pad
  102. dd if=/dev/zero ibs=16M count=1 | tr "\000" "\377" > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory.img
  103. dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(DGN3500_SKERNEL) DE
  104. $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img)
  105. dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory.img conv=notrunc
  106. dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.image bs=$(DGN3500_SKERNEL_DECIMAL) skip=1
  107. rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
  108. dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.image $(DGN3500_SKERNEL) DE
  109. endef
  110. define Image/BuildTPLink/squashfs
  111. mktplinkfw2 -B $(3) -s -a 0x4 -j \
  112. -k $(KDIR)/vmlinux-$(2).lzma -r $(KDIR)/root.$(1) \
  113. -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sysupgrade.image
  114. endef
  115. define Image/BuildEVA/squashfs
  116. cat $(KDIR)/$(2).eva.align.64k $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva
  117. $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva)
  118. endef
  119. define Image/BuildEVA/ubifs
  120. ifneq ($($(PROFILE)_UBIFS_OPTS),)
  121. $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs
  122. endif
  123. endef
  124. define Image/BuildEVA/ubi
  125. ifneq ($($(PROFILE)_UBI_OPTS),)
  126. $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi
  127. $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi
  128. endif
  129. endef
  130. define Image/BuildLoader/squashfs
  131. dd if=$(KDIR)/loader-$(2).bin of=$(KDIR)/loader-$(2).bin.padded bs=3072k conv=sync
  132. cat $(KDIR)/loader-$(2).bin.padded $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
  133. $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
  134. endef
  135. define Image/BuildEVA/jffs2-128k
  136. cat $(KDIR)/$(2).eva.align.128k $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva
  137. endef
  138. define Image/Build/jffs2-64k
  139. dd if=$(KDIR)/uImage-$(2) of=$(KDIR)/uImage-$(2)-$(1) bs=64k conv=sync
  140. cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
  141. endef
  142. define Image/Build/jffs2-128k
  143. dd if=$(KDIR)/uImage-$(2) of=$(KDIR)/uImage-$(2)-$(1) bs=128k conv=sync
  144. cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
  145. endef
  146. define Image/Build/jffs2-256k
  147. dd if=$(KDIR)/uImage-$(2) of=$(KDIR)/uImage-$(2)-$(1) bs=256k conv=sync
  148. cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
  149. endef
  150. define Image/Build/ubifs
  151. ifneq ($($(PROFILE)_UBIFS_OPTS),)
  152. $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs
  153. endif
  154. endef
  155. define Image/Build/ubi
  156. ifneq ($($(PROFILE)_UBI_OPTS),)
  157. $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi
  158. $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi
  159. endif
  160. endef
  161. define Image/BuildNAND/ubifs
  162. ifneq ($($(PROFILE)_UBIFS_OPTS),)
  163. ifneq ($($(PROFILE)_UBI_OPTS),)
  164. $(call Image/Build/UbinizeImage,$(PROFILE),,ubifs,$($(PROFILE)_UBI_OPTS))
  165. $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE))
  166. endif
  167. endif
  168. endef
  169. define Image/InstallKernel/Template
  170. ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL),)
  171. $(INSTALL_DIR) $(TARGET_DIR)/boot
  172. ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_UIMAGE),)
  173. $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage $(TARGET_DIR)/boot/
  174. ln -sf $(IMG_PREFIX)-$(1)-uImage $(TARGET_DIR)/boot/uImage
  175. endif
  176. ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_ZIMAGE),)
  177. $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-zImage $(TARGET_DIR)/boot/
  178. ln -sf $(IMG_PREFIX)-$(1)-zImage $(TARGET_DIR)/boot/zImage
  179. endif
  180. endif
  181. ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_DTB),)
  182. $(INSTALL_DIR) $(TARGET_DIR)/boot
  183. ifneq ($(1),)
  184. $(CP) $(KDIR)/$(1).dtb $(TARGET_DIR)/boot/
  185. endif
  186. endif
  187. endef
  188. define Image/BuildKernel/Template
  189. $(call PatchKernelLzma,$(1))
  190. $(call MkImageLzma,$(1))
  191. $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
  192. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  193. $(call PatchKernelLzma,$(1),-initramfs)
  194. $(call MkImageLzma,$(1),-initramfs)
  195. $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
  196. endif
  197. endef
  198. define Image/BuildKernelLoader/Template
  199. $(CP) $(KDIR)/loader-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-loader
  200. $(CP) $(KDIR)/vmlinux-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux
  201. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  202. $(CP) $(KDIR)/loader-initramfs-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs-loader
  203. $(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs
  204. endif
  205. endef
  206. define Image/Prepare/Profile
  207. $(call PatchKernelLzma,$(1))
  208. $(call Image/BuildLoader/Template,$(1))
  209. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  210. $(call PatchKernelLzma,$(1),-initramfs)
  211. $(call Image/BuildLoader/Template,$(1),-initramfs)
  212. endif
  213. endef
  214. define Image/BuildKernelTPLink/Template
  215. $(call PatchKernelLzma,$(1))
  216. $(call TPLinkImageLzma,$(1),$(2))
  217. $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
  218. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  219. $(call PatchKernelLzma,$(1),-initramfs)
  220. $(call TPLinkImageLzma,$(1),$(2),-initramfs)
  221. $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
  222. endif
  223. endef
  224. define Image/BuildKernelEVA/Template
  225. $(call PatchKernelLzma,$(1))
  226. $(call MkImageEVA,$(1))
  227. $(CP) $(KDIR)/$(1).eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.64k
  228. $(CP) $(KDIR)/$(1).eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.128k
  229. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  230. $(call PatchKernelLzma,$(1),-initramfs)
  231. $(call MkImageEVA,$(1),-initramfs)
  232. $(CP) $(KDIR)/$(1)-initramfs.eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.64k
  233. $(CP) $(KDIR)/$(1)-initramfs.eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.128k
  234. endif
  235. endef
  236. define Image/BuildKernelGzip/Template
  237. $(call PatchKernelGzip,$(1),$(if $(2),$(2) machtype=$(1),))
  238. $(call MkImageGzip,$(1))
  239. $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
  240. ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
  241. $(call PatchKernelGzip,$(1),$(if $(2),$(2) machtype=$(1),),-initramfs)
  242. $(call MkImageGzip,$(1),-initramfs)
  243. $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
  244. endif
  245. endef
  246. ifeq ($(CONFIG_TARGET_lantiq_falcon),y)
  247. Image/BuildKernel/Profile/EASY98000NOR=$(call Image/BuildKernel/Template,EASY98000NOR)
  248. Image/Build/Profile/EASY98000NOR=$(call Image/Build/$(1),$(1),EASY98000NOR)
  249. Image/BuildKernel/Profile/EASY98000SFLASH=$(call Image/BuildKernel/Template,EASY98000SFLASH)
  250. Image/Build/Profile/EASY98000SFLASH=$(call Image/Build/$(1),$(1),EASY98000SFLASH)
  251. endif
  252. ifeq ($(CONFIG_TARGET_lantiq_ase),y)
  253. Image/BuildKernel/Profile/DGN1000B=$(call Image/BuildKernel/Template,DGN1000B)
  254. Image/Build/Profile/DGN1000B=$(call Image/Build/$(1),$(1),DGN1000B)
  255. endif
  256. ifeq ($(CONFIG_TARGET_lantiq_xway),y)
  257. # Danube
  258. Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call Image/BuildKernel/Template,BTHOMEHUBV2B)
  259. Image/Build/Profile/BTHOMEHUBV2B=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV2B)
  260. Image/BuildKernel/Profile/EASY50712=$(call Image/BuildKernel/Template,EASY50712)
  261. Image/Build/Profile/EASY50712=$(call Image/Build/$(1),$(1),EASY50712)
  262. Image/BuildKernel/Profile/ACMP252=$(call Image/BuildKernel/Template,ACMP252)
  263. Image/Build/Profile/ACMP252=$(call Image/Build/$(1),$(1),ACMP252)
  264. Image/BuildKernel/Profile/ARV4510PW=$(call Image/BuildKernel/Template,ARV4510PW)
  265. Image/Build/Profile/ARV4510PW=$(call Image/Build/$(1),$(1),ARV4510PW)
  266. Image/BuildKernel/Profile/ARV4525PW=$(call Image/BuildKernel/Template,ARV4525PW)
  267. Image/Build/Profile/ARV4525PW=$(call Image/Build/$(1),$(1),ARV4525PW)
  268. Image/BuildKernel/Profile/ARV7525PW=$(call Image/BuildKernel/Template,ARV7525PW)
  269. Image/Build/Profile/ARV7525PW=$(call Image/Build/$(1),$(1),ARV7525PW)
  270. Image/BuildKernel/Profile/ARV4518PWR01=$(call Image/BuildKernel/Template,ARV4518PWR01)
  271. Image/Build/Profile/ARV4518PWR01=$(call Image/Build/$(1),$(1),ARV4518PWR01)
  272. Image/BuildKernel/Profile/ARV4518PWR01A=$(call Image/BuildKernel/Template,ARV4518PWR01A)
  273. Image/Build/Profile/ARV4518PWR01A=$(call Image/Build/$(1),$(1),ARV4518PWR01A)
  274. Image/BuildKernel/Profile/ARV4519PW=$(call Image/BuildKernel/Template,ARV4519PW)
  275. Image/Build/Profile/ARV4519PW=$(call Image/Build/$(1),$(1),ARV4519PW)
  276. Image/BuildKernel/Profile/ARV4520PW=$(call Image/BuildKernel/Template,ARV4520PW)
  277. Image/Build/Profile/ARV4520PW=$(call Image/Build/$(1),$(1),ARV4520PW)
  278. Image/BuildKernel/Profile/ARV452CQW=$(call Image/BuildKernel/Template,ARV452CQW)
  279. Image/Build/Profile/ARV452CQW=$(call Image/Build/$(1),$(1),ARV452CQW)
  280. Image/BuildKernel/Profile/ARV7510PW22=$(call Image/BuildKernel/Template,ARV7510PW22)
  281. Image/Build/Profile/ARV7510PW22=$(call Image/Build/$(1),$(1),ARV7510PW22)
  282. Image/BuildKernel/Profile/ARV7518PW=$(call Image/BuildKernel/Template,ARV7518PW)
  283. Image/Build/Profile/ARV7518PW=$(call Image/Build/$(1),$(1),ARV7518PW)
  284. Image/BuildKernel/Profile/ARV7519PW=$(call Image/BuildKernel/Template,ARV7519PW)
  285. Image/Build/Profile/ARV7519PW=$(call Image/Build/$(1),$(1),ARV7519PW)
  286. Image/BuildKernel/Profile/ARV752DPW=$(call Image/BuildKernel/Template,ARV752DPW)
  287. Image/Build/Profile/ARV752DPW=$(call Image/Build/$(1),$(1),ARV752DPW)
  288. Image/BuildKernel/Profile/ARV752DPW22=$(call Image/BuildKernel/Template,ARV752DPW22)
  289. Image/Build/Profile/ARV752DPW22=$(call Image/Build/$(1),$(1),ARV752DPW22)
  290. Image/BuildKernel/Profile/GIGASX76X=$(call Image/BuildKernel/Template,GIGASX76X)
  291. Image/Build/Profile/GIGASX76X=$(call Image/Build/$(1),$(1),GIGASX76X)
  292. # AR9
  293. Image/BuildKernel/Profile/BTHOMEHUBV3A=$(call Image/BuildKernel/Template,BTHOMEHUBV3A)
  294. Image/Build/Profile/BTHOMEHUBV3A=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV3A)
  295. Image/BuildKernel/Profile/DGN3500=$(call Image/BuildKernel/Template,DGN3500)
  296. Image/Build/Profile/DGN3500=$(call Image/BuildDGN3500/$(1),$(1),DGN3500)
  297. Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B)
  298. Image/Build/Profile/DGN3500B=$(call Image/BuildDGN3500B/$(1),$(1),DGN3500B)
  299. Image/BuildKernel/Profile/WBMRA=$(call Image/BuildKernel/Template,WBMR)
  300. Image/Build/Profile/WBMRA=$(call Image/Build/$(1),$(1),WBMR)
  301. Image/BuildKernel/Profile/WBMRB=$(call Image/BuildKernel/Template,WBMR)
  302. Image/Build/Profile/WBMRB=$(call Image/Build/$(1),$(1),WBMR)
  303. Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320)
  304. Image/Build/Profile/FRITZ7320=$(call Image/BuildEVA/$(1),$(1),FRITZ7320)
  305. Image/BuildKernel/Profile/GR7000=$(call Image/BuildKernel/Template,GR7000)
  306. Image/Build/Profile/GR7000=$(call Image/Build/$(1),$(1),GR7000)
  307. Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L)
  308. Image/Build/Profile/H201L=$(call Image/Build/$(1),$(1),H201L)
  309. Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX)
  310. Image/Build/Profile/P2601HNFX=$(call Image/Build/$(1),$(1),P2601HNFX)
  311. endif
  312. ifeq ($(CONFIG_TARGET_lantiq_xrx200),y)
  313. # VR9
  314. Image/BuildKernel/Profile/P2812HNUF1=$(call Image/BuildKernel/Template,P2812HNUF1)
  315. Image/Build/Profile/P2812HNUF1=$(call Image/BuildNAND/$(1),$(1),P2812HNUF1)
  316. Image/BuildKernel/Profile/P2812HNUF3=$(call Image/BuildKernel/Template,P2812HNUF3)
  317. Image/Build/Profile/P2812HNUF3=$(call Image/BuildNAND/$(1),$(1),P2812HNUF3)
  318. Image/BuildKernel/Profile/ARV7519RW22=$(call Image/BuildKernel/Template,ARV7519RW22,$(1))
  319. Image/Build/Profile/ARV7519RW22=$(call Image/Build/$(1),$(1),ARV7519RW22)
  320. Image/BuildKernel/Profile/EASY80920NAND=$(call Image/BuildKernel/Template,EASY80920NAND)
  321. Image/Build/Profile/EASY80920NAND=$(call Image/Build/$(1),$(1),EASY80920NAND)
  322. Image/BuildKernel/Profile/EASY80920NOR=$(call Image/BuildKernel/Template,EASY80920NOR)
  323. Image/Build/Profile/EASY80920NOR=$(call Image/Build/$(1),$(1),EASY80920NOR)
  324. Image/BuildKernel/Profile/FRITZ3370=$(call Image/BuildKernelEVA/Template,FRITZ3370)
  325. Image/Build/Profile/FRITZ3370=$(call Image/BuildEVA/$(1),$(1),FRITZ3370)
  326. Image/BuildKernel/Profile/VG3503J=$(call Image/BuildKernelLoader/Template,VG3503J)
  327. Image/Build/Profile/VG3503J=$(call Image/BuildLoader/$(1),$(1),VG3503J)
  328. Image/BuildKernel/Profile/VG3503J_V2=$(call Image/BuildKernelLoader/Template,VG3503J_V2)
  329. Image/Build/Profile/VG3503J_V2=$(call Image/BuildLoader/$(1),$(1),VG3503J_V2)
  330. Image/BuildKernel/Profile/TDW8970=$(call Image/BuildKernelTPLink/Template,TDW8970,TD-W8970v1,$(1))
  331. Image/Build/Profile/TDW8970=$(call Image/BuildTPLink/$(1),$(1),TDW8970,TD-W8970v1)
  332. Image/BuildKernel/Profile/VGV7510KW22NOR=$(call Image/BuildKernel/Template,VGV7510KW22NOR,$(1))
  333. Image/Build/Profile/VGV7510KW22NOR=$(call Image/Build/$(1),$(1),VGV7510KW22NOR)
  334. Image/BuildKernel/Profile/VGV7510KW22BRN=$(call Image/BuildKernel/Template,VGV7510KW22BRN,$(1))
  335. Image/Build/Profile/VGV7510KW22BRN=$(call Image/Build/$(1),$(1),VGV7510KW22BRN,5BRNDA6431,0x12345678,0x04c11db7,$(1))
  336. Image/BuildKernel/Profile/VGV7519NOR=$(call Image/BuildKernel/Template,VGV7519NOR,$(1))
  337. Image/Build/Profile/VGV7519NOR=$(call Image/Build/$(1),$(1),VGV7519NOR)
  338. Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BRN,$(1))
  339. Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D00008000,0x12345678,0x2083b8ed,$(1))
  340. define Image/Prepare
  341. $(call Image/Prepare/Profile,VG3503J)
  342. $(call Image/Prepare/Profile,VG3503J_V2)
  343. endef
  344. endif
  345. ifeq ($(CONFIG_TARGET_lantiq_svip_be),y)
  346. Image/BuildKernel/Profile/EASY33016=$(call Image/BuildKernelGzip/Template,EASY33016)
  347. Image/Build/Profile/EASY33016=$(call Image/Build/$(1),$(1),EASY33016)
  348. endif
  349. define Image/BuildKernel
  350. $(call Image/BuildKernel/Profile/$(PROFILE))
  351. endef
  352. define Image/InstallKernel
  353. $(call Image/InstallKernel/Template/$(PROFILE))
  354. endef
  355. define Image/Build
  356. $(call Image/Build/Profile/$(PROFILE),$(1))
  357. endef
  358. $(eval $(call BuildImage))