Makefile 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. #
  2. # (C) Copyright 2000, 2001, 2002
  3. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. #
  5. # See file CREDITS for list of people who contributed to this
  6. # project.
  7. #
  8. # This program is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU General Public License as
  10. # published by the Free Software Foundation; either version 2 of
  11. # the License, or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. # MA 02111-1307 USA
  22. #
  23. HOSTARCH := $(shell uname -m | \
  24. sed -e s/i.86/i386/ \
  25. -e s/sun4u/sparc64/ \
  26. -e s/arm.*/arm/ \
  27. -e s/sa110/arm/ \
  28. -e s/powerpc/ppc/ \
  29. -e s/macppc/ppc/)
  30. HOSTOS := $(shell uname -s | tr A-Z a-z | \
  31. sed -e 's/\(cygwin\).*/cygwin/')
  32. export HOSTARCH
  33. # Deal with colliding definitions from tcsh etc.
  34. VENDOR=
  35. #########################################################################
  36. TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
  37. export TOPDIR
  38. ifeq (include/config.mk,$(wildcard include/config.mk))
  39. # load ARCH, BOARD, and CPU configuration
  40. include include/config.mk
  41. export ARCH CPU BOARD VENDOR
  42. # load other configuration
  43. include $(TOPDIR)/config.mk
  44. ifndef CROSS_COMPILE
  45. ifeq ($(HOSTARCH),ppc)
  46. CROSS_COMPILE =
  47. else
  48. ## #ifeq ($(CPU),mpc8xx)
  49. ## CROSS_COMPILE = ppc_8xx-
  50. ## #endif
  51. ## #ifeq ($(CPU),ppc4xx)
  52. ## #CROSS_COMPILE = ppc_4xx-
  53. ## #endif
  54. ## #ifeq ($(CPU),mpc824x)
  55. ## #CROSS_COMPILE = ppc_82xx-
  56. ## #endif
  57. ## #ifeq ($(CPU),mpc8260)
  58. ## #CROSS_COMPILE = ppc_82xx-
  59. ## #endif
  60. ## #ifeq ($(CPU),74xx_7xx)
  61. ## #CROSS_COMPILE = ppc_74xx-)
  62. ## #endif
  63. ifeq ($(ARCH),ppc)
  64. CROSS_COMPILE = ppc_8xx-
  65. endif
  66. ifeq ($(ARCH),arm)
  67. CROSS_COMPILE = arm_920TDI-
  68. endif
  69. ifeq ($(ARCH),i386)
  70. #CROSS_COMPILE = i386-elf-
  71. endif
  72. ifeq ($(ARCH),mips)
  73. CROSS_COMPILE = mips_4KC-
  74. endif
  75. endif
  76. endif
  77. export CROSS_COMPILE
  78. # The "tools" are needed early, so put this first
  79. SUBDIRS = tools \
  80. lib_generic \
  81. lib_$(ARCH) \
  82. cpu/$(CPU) \
  83. board/$(BOARDDIR) \
  84. common \
  85. disk \
  86. fs \
  87. net \
  88. rtc \
  89. dtt \
  90. drivers \
  91. post \
  92. post/cpu \
  93. examples
  94. #########################################################################
  95. # U-Boot objects....order is important (i.e. start must be first)
  96. OBJS = cpu/$(CPU)/start.o
  97. ifeq ($(CPU),i386)
  98. OBJS += cpu/$(CPU)/start16.o
  99. OBJS += cpu/$(CPU)/reset.o
  100. endif
  101. ifeq ($(CPU),ppc4xx)
  102. OBJS += cpu/$(CPU)/resetvec.o
  103. endif
  104. LIBS = board/$(BOARDDIR)/lib$(BOARD).a
  105. LIBS += cpu/$(CPU)/lib$(CPU).a
  106. LIBS += lib_$(ARCH)/lib$(ARCH).a
  107. LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a
  108. LIBS += net/libnet.a
  109. LIBS += disk/libdisk.a
  110. LIBS += rtc/librtc.a
  111. LIBS += dtt/libdtt.a
  112. LIBS += drivers/libdrivers.a
  113. LIBS += post/libpost.a post/cpu/libcpu.a
  114. LIBS += common/libcommon.a
  115. LIBS += lib_generic/libgeneric.a
  116. #########################################################################
  117. all: u-boot.srec u-boot.bin System.map
  118. install: all
  119. -cp u-boot.bin /tftpboot/u-boot.bin
  120. -cp u-boot.bin /net/denx/tftpboot/u-boot.bin
  121. u-boot.srec: u-boot
  122. $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
  123. u-boot.bin: u-boot
  124. $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
  125. u-boot.dis: u-boot
  126. $(OBJDUMP) -d $< > $@
  127. u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
  128. $(LD) $(LDFLAGS) $(OBJS) \
  129. --start-group $(LIBS) --end-group \
  130. -Map u-boot.map -o u-boot
  131. subdirs:
  132. @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
  133. depend dep:
  134. @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
  135. tags:
  136. ctags -w `find $(SUBDIRS) include \
  137. \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  138. etags:
  139. etags -a `find $(SUBDIRS) include \
  140. \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  141. System.map: u-boot
  142. @$(NM) $< | \
  143. grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
  144. sort > System.map
  145. #########################################################################
  146. else
  147. all install u-boot u-boot.srec depend dep:
  148. @echo "System not configured - see README" >&2
  149. @ exit 1
  150. endif
  151. #########################################################################
  152. unconfig:
  153. rm -f include/config.h include/config.mk
  154. #========================================================================
  155. # PowerPC
  156. #========================================================================
  157. #########################################################################
  158. ## MPC8xx Systems
  159. #########################################################################
  160. ADS860_config: unconfig
  161. @./mkconfig $(@:_config=) ppc mpc8xx fads
  162. AMX860_config : unconfig
  163. @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
  164. c2mon_config: unconfig
  165. @./mkconfig $(@:_config=) ppc mpc8xx c2mon
  166. CCM_config: unconfig
  167. @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
  168. cogent_mpc8xx_config: unconfig
  169. @./mkconfig $(@:_config=) ppc mpc8xx cogent
  170. ESTEEM192E_config: unconfig
  171. @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
  172. ETX094_config : unconfig
  173. @./mkconfig $(@:_config=) ppc mpc8xx etx094
  174. FADS823_config \
  175. FADS850SAR_config \
  176. FADS860T_config: unconfig
  177. @./mkconfig $(@:_config=) ppc mpc8xx fads
  178. FLAGADM_config: unconfig
  179. @./mkconfig $(@:_config=) ppc mpc8xx flagadm
  180. GEN860T_config: unconfig
  181. @./mkconfig $(@:_config=) ppc mpc8xx gen860t
  182. GENIETV_config: unconfig
  183. @./mkconfig $(@:_config=) ppc mpc8xx genietv
  184. GTH_config: unconfig
  185. @./mkconfig $(@:_config=) ppc mpc8xx gth
  186. hermes_config : unconfig
  187. @./mkconfig $(@:_config=) ppc mpc8xx hermes
  188. IAD210_config: unconfig
  189. @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
  190. xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
  191. ICU862_100MHz_config \
  192. ICU862_config: unconfig
  193. @ >include/config.h
  194. @[ -z "$(findstring _100MHz,$@)" ] || \
  195. { echo "#define CONFIG_100MHz" >>include/config.h ; \
  196. echo "... with 100MHz system clock" ; \
  197. }
  198. @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
  199. IP860_config : unconfig
  200. @./mkconfig $(@:_config=) ppc mpc8xx ip860
  201. IVML24_256_config \
  202. IVML24_128_config \
  203. IVML24_config: unconfig
  204. @ >include/config.h
  205. @[ -z "$(findstring IVML24_config,$@)" ] || \
  206. { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
  207. }
  208. @[ -z "$(findstring IVML24_128_config,$@)" ] || \
  209. { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
  210. }
  211. @[ -z "$(findstring IVML24_256_config,$@)" ] || \
  212. { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
  213. }
  214. @./mkconfig -a IVML24 ppc mpc8xx ivm
  215. IVMS8_256_config \
  216. IVMS8_128_config \
  217. IVMS8_config: unconfig
  218. @ >include/config.h
  219. @[ -z "$(findstring IVMS8_config,$@)" ] || \
  220. { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
  221. }
  222. @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
  223. { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
  224. }
  225. @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
  226. { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
  227. }
  228. @./mkconfig -a IVMS8 ppc mpc8xx ivm
  229. KUP4K_config : unconfig
  230. @./mkconfig $(@:_config=) ppc mpc8xx kup4k
  231. LANTEC_config : unconfig
  232. @./mkconfig $(@:_config=) ppc mpc8xx lantec
  233. lwmon_config: unconfig
  234. @./mkconfig $(@:_config=) ppc mpc8xx lwmon
  235. MBX_config \
  236. MBX860T_config: unconfig
  237. @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
  238. MHPC_config: unconfig
  239. @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
  240. MVS1_config : unconfig
  241. @./mkconfig $(@:_config=) ppc mpc8xx mvs1
  242. NETVIA_config: unconfig
  243. @./mkconfig $(@:_config=) ppc mpc8xx netvia
  244. NX823_config: unconfig
  245. @./mkconfig $(@:_config=) ppc mpc8xx nx823
  246. pcu_e_config: unconfig
  247. @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
  248. R360MPI_config: unconfig
  249. @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
  250. RPXClassic_config: unconfig
  251. @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
  252. RPXlite_config: unconfig
  253. @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
  254. RRvision_config: unconfig
  255. @./mkconfig $(@:_config=) ppc mpc8xx RRvision
  256. RRvision_LCD_config: unconfig
  257. @echo "#define CONFIG_LCD" >include/config.h
  258. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  259. @./mkconfig -a RRvision ppc mpc8xx RRvision
  260. SM850_config : unconfig
  261. @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
  262. SPD823TS_config: unconfig
  263. @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
  264. SXNI855T_config: unconfig
  265. @./mkconfig $(@:_config=) ppc mpc8xx sixnet
  266. # EMK MPC8xx based modules
  267. TOP860_config: unconfig
  268. @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
  269. # Play some tricks for configuration selection
  270. # All boards can come with 50 MHz (default), 66MHz or 80MHz clock,
  271. # but only 855 and 860 boards may come with FEC
  272. # and 823 boards may have LCD support
  273. xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _FEC,,$(subst _config,,$1)))))
  274. FPS850L_config \
  275. FPS860L_config \
  276. TQM823L_config \
  277. TQM823L_66MHz_config \
  278. TQM823L_80MHz_config \
  279. TQM823L_LCD_config \
  280. TQM823L_LCD_66MHz_config \
  281. TQM823L_LCD_80MHz_config \
  282. TQM850L_config \
  283. TQM850L_66MHz_config \
  284. TQM850L_80MHz_config \
  285. TQM855L_config \
  286. TQM855L_66MHz_config \
  287. TQM855L_80MHz_config \
  288. TQM855L_FEC_config \
  289. TQM855L_FEC_66MHz_config \
  290. TQM855L_FEC_80MHz_config \
  291. TQM860L_config \
  292. TQM860L_66MHz_config \
  293. TQM860L_80MHz_config \
  294. TQM860L_FEC_config \
  295. TQM860L_FEC_66MHz_config \
  296. TQM860L_FEC_80MHz_config: unconfig
  297. @ >include/config.h
  298. @[ -z "$(findstring _FEC,$@)" ] || \
  299. { echo "#define CONFIG_FEC_ENET" >>include/config.h ; \
  300. echo "... with FEC support" ; \
  301. }
  302. @[ -z "$(findstring _66MHz,$@)" ] || \
  303. { echo "#define CONFIG_66MHz" >>include/config.h ; \
  304. echo "... with 66MHz system clock" ; \
  305. }
  306. @[ -z "$(findstring _80MHz,$@)" ] || \
  307. { echo "#define CONFIG_80MHz" >>include/config.h ; \
  308. echo "... with 80MHz system clock" ; \
  309. }
  310. @[ -z "$(findstring _LCD,$@)" ] || \
  311. { echo "#define CONFIG_LCD" >>include/config.h ; \
  312. echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
  313. echo "... with LCD display" ; \
  314. }
  315. @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
  316. TTTech_config: unconfig
  317. @echo "#define CONFIG_LCD" >include/config.h
  318. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  319. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  320. v37_config: unconfig
  321. @echo "#define CONFIG_LCD" >include/config.h
  322. @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
  323. @./mkconfig $(@:_config=) ppc mpc8xx v37
  324. #########################################################################
  325. ## PPC4xx Systems
  326. #########################################################################
  327. ADCIOP_config: unconfig
  328. @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
  329. AR405_config: unconfig
  330. @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
  331. CANBT_config: unconfig
  332. @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
  333. CPCI405_config \
  334. CPCI4052_config: unconfig
  335. @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
  336. @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
  337. CPCI440_config: unconfig
  338. @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
  339. CPCIISER4_config: unconfig
  340. @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
  341. CRAYL1_config:unconfig
  342. @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
  343. DASA_SIM_config: unconfig
  344. @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
  345. DU405_config: unconfig
  346. @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
  347. EBONY_config:unconfig
  348. @./mkconfig $(@:_config=) ppc ppc4xx ebony
  349. ERIC_config:unconfig
  350. @./mkconfig $(@:_config=) ppc ppc4xx eric
  351. MIP405_config:unconfig
  352. @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
  353. ML2_config:unconfig
  354. @./mkconfig $(@:_config=) ppc ppc4xx ml2
  355. OCRTC_config \
  356. ORSG_config: unconfig
  357. @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
  358. PCI405_config: unconfig
  359. @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
  360. PIP405_config:unconfig
  361. @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
  362. W7OLMC_config \
  363. W7OLMG_config: unconfig
  364. @./mkconfig $(@:_config=) ppc ppc4xx w7o
  365. WALNUT405_config:unconfig
  366. @./mkconfig $(@:_config=) ppc ppc4xx walnut405
  367. #########################################################################
  368. ## MPC824x Systems
  369. #########################################################################
  370. BMW_config: unconfig
  371. @./mkconfig $(@:_config=) ppc mpc824x bmw
  372. CU824_config: unconfig
  373. @./mkconfig $(@:_config=) ppc mpc824x cu824
  374. MOUSSE_config: unconfig
  375. @./mkconfig $(@:_config=) ppc mpc824x mousse
  376. MUSENKI_config: unconfig
  377. @./mkconfig $(@:_config=) ppc mpc824x musenki
  378. OXC_config: unconfig
  379. @./mkconfig $(@:_config=) ppc mpc824x oxc
  380. PN62_config: unconfig
  381. @./mkconfig $(@:_config=) ppc mpc824x pn62
  382. Sandpoint8240_config: unconfig
  383. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  384. Sandpoint8245_config: unconfig
  385. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  386. utx8245_config: unconfig
  387. @./mkconfig $(@:_config=) ppc mpc824x utx8245
  388. #########################################################################
  389. ## MPC8260 Systems
  390. #########################################################################
  391. xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
  392. cogent_mpc8260_config: unconfig
  393. @./mkconfig $(@:_config=) ppc mpc8260 cogent
  394. CPU86_config \
  395. CPU86_ROMBOOT_config: unconfig
  396. @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
  397. @cd ./include ; \
  398. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  399. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  400. echo "... booting from 8-bit flash" ; \
  401. else \
  402. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  403. echo "... booting from 64-bit flash" ; \
  404. fi; \
  405. echo "export CONFIG_BOOT_ROM" >> config.mk;
  406. ep8260_config: unconfig
  407. @./mkconfig $(@:_config=) ppc mpc8260 ep8260
  408. gw8260_config: unconfig
  409. @./mkconfig $(@:_config=) ppc mpc8260 gw8260
  410. hymod_config: unconfig
  411. @./mkconfig $(@:_config=) ppc mpc8260 hymod
  412. IPHASE4539_config: unconfig
  413. @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
  414. MPC8260ADS_config: unconfig
  415. @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
  416. MPC8266ADS_config: unconfig
  417. @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
  418. PM826_config \
  419. PM826_ROMBOOT_config: unconfig
  420. @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
  421. @cd ./include ; \
  422. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  423. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  424. echo "... booting from 8-bit flash" ; \
  425. else \
  426. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  427. echo "... booting from 64-bit flash" ; \
  428. fi; \
  429. echo "export CONFIG_BOOT_ROM" >> config.mk; \
  430. ppmc8260_config: unconfig
  431. @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
  432. RPXsuper_config: unconfig
  433. @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
  434. rsdproto_config: unconfig
  435. @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
  436. sacsng_config: unconfig
  437. @./mkconfig $(@:_config=) ppc mpc8260 sacsng
  438. sbc8260_config: unconfig
  439. @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
  440. SCM_config: unconfig
  441. @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
  442. TQM8260_config \
  443. TQM8260_L2_config \
  444. TQM8260_266MHz_config \
  445. TQM8260_L2_266MHz_config \
  446. TQM8260_300MHz_config: unconfig
  447. @ >include/config.h
  448. @if [ "$(findstring _L2_,$@)" ] ; then \
  449. echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
  450. echo "... with L2 Cache support (60x Bus Mode)" ; \
  451. else \
  452. echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
  453. echo "... without L2 Cache support" ; \
  454. fi
  455. @[ -z "$(findstring _266MHz,$@)" ] || \
  456. { echo "#define CONFIG_266MHz" >>include/config.h ; \
  457. echo "... with 266MHz system clock" ; \
  458. }
  459. @[ -z "$(findstring _300MHz,$@)" ] || \
  460. { echo "#define CONFIG_300MHz" >>include/config.h ; \
  461. echo "... with 300MHz system clock" ; \
  462. }
  463. @./mkconfig -a $(call xtract_82xx,$@) ppc mpc8260 tqm8260
  464. #########################################################################
  465. ## 74xx/7xx Systems
  466. #########################################################################
  467. AmigaOneG3SE_config: unconfig
  468. @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
  469. EVB64260_config \
  470. EVB64260_750CX_config: unconfig
  471. @./mkconfig EVB64260 ppc 74xx_7xx evb64260
  472. ZUMA_config: unconfig
  473. @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
  474. PCIPPC2_config \
  475. PCIPPC6_config: unconfig
  476. @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
  477. BAB7xx_config: unconfig
  478. @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
  479. ELPPC_config: unconfig
  480. @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
  481. #========================================================================
  482. # ARM
  483. #========================================================================
  484. #########################################################################
  485. ## StrongARM Systems
  486. #########################################################################
  487. lart_config : unconfig
  488. @./mkconfig $(@:_config=) arm sa1100 lart
  489. dnp1110_config : unconfig
  490. @./mkconfig $(@:_config=) arm sa1100 dnp1110
  491. shannon_config : unconfig
  492. @./mkconfig $(@:_config=) arm sa1100 shannon
  493. #########################################################################
  494. ## ARM920T Systems
  495. #########################################################################
  496. xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
  497. smdk2400_config : unconfig
  498. @./mkconfig $(@:_config=) arm arm920t smdk2400
  499. smdk2410_config : unconfig
  500. @./mkconfig $(@:_config=) arm arm920t smdk2410
  501. trab_config \
  502. trab_big_flash_config: unconfig
  503. @ >include/config.h
  504. @[ -z "$(findstring _big_flash,$@)" ] || \
  505. { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
  506. echo "... with big flash support" ; \
  507. }
  508. @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
  509. VCMA9_config : unconfig
  510. @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
  511. #########################################################################
  512. ## ARM720T Systems
  513. #########################################################################
  514. impa7_config : unconfig
  515. @./mkconfig $(@:_config=) arm arm720t impa7
  516. ep7312_config : unconfig
  517. @./mkconfig $(@:_config=) arm arm720t ep7312
  518. #########################################################################
  519. ## XScale Systems
  520. #########################################################################
  521. cradle_config : unconfig
  522. @./mkconfig $(@:_config=) arm xscale cradle
  523. csb226_config : unconfig
  524. @./mkconfig $(@:_config=) arm xscale csb226
  525. innokom_config : unconfig
  526. @./mkconfig $(@:_config=) arm xscale innokom
  527. lubbock_config : unconfig
  528. @./mkconfig $(@:_config=) arm xscale lubbock
  529. #========================================================================
  530. # i386
  531. #========================================================================
  532. #########################################################################
  533. ## AMD SC520 CDP
  534. #########################################################################
  535. sc520_cdp_config : unconfig
  536. @./mkconfig $(@:_config=) i386 i386 sc520_cdp
  537. #========================================================================
  538. # MIPS
  539. #========================================================================
  540. #########################################################################
  541. ## MIPS32 4Kc
  542. #########################################################################
  543. incaip_config : unconfig
  544. @./mkconfig $(@:_config=) mips mips incaip
  545. clean:
  546. find . -type f \
  547. \( -name 'core' -o -name '*.bak' -o -name '*~' \
  548. -o -name '*.o' -o -name '*.a' \) -print \
  549. | xargs rm -f
  550. rm -f examples/hello_world examples/timer examples/eepro100_eeprom
  551. rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
  552. rm -f tools/easylogo/easylogo tools/bmp_logo
  553. rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
  554. rm -f tools/env/fw_printenv tools/env/fw_setenv
  555. clobber: clean
  556. find . -type f \
  557. \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
  558. -print \
  559. | xargs rm -f
  560. rm -f $(OBJS) *.bak tags TAGS
  561. rm -fr *.*~
  562. rm -f u-boot u-boot.bin u-boot.elf u-boot.srec u-boot.map System.map
  563. rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
  564. rm -f cpu/mpc824x/bedbug_603e.c
  565. rm -f include/asm/arch include/asm
  566. mrproper \
  567. distclean: clobber unconfig
  568. backup:
  569. F=`basename $(TOPDIR)` ; cd .. ; \
  570. gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
  571. #########################################################################