Makefile 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084
  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 ($(ARCH),ppc)
  49. CROSS_COMPILE = ppc_8xx-
  50. endif
  51. ifeq ($(ARCH),arm)
  52. CROSS_COMPILE = arm-linux-
  53. endif
  54. ifeq ($(ARCH),i386)
  55. ifeq ($(HOSTARCH),i386)
  56. CROSS_COMPILE =
  57. else
  58. CROSS_COMPILE = i386-linux-
  59. endif
  60. endif
  61. ifeq ($(ARCH),mips)
  62. CROSS_COMPILE = mips_4KC-
  63. endif
  64. ifeq ($(ARCH),nios)
  65. CROSS_COMPILE = nios-elf-
  66. endif
  67. ifeq ($(ARCH),m68k)
  68. CROSS_COMPILE = m68k-elf-
  69. endif
  70. endif
  71. endif
  72. export CROSS_COMPILE
  73. #########################################################################
  74. # U-Boot objects....order is important (i.e. start must be first)
  75. OBJS = cpu/$(CPU)/start.o
  76. ifeq ($(CPU),i386)
  77. OBJS += cpu/$(CPU)/start16.o
  78. OBJS += cpu/$(CPU)/reset.o
  79. endif
  80. ifeq ($(CPU),ppc4xx)
  81. OBJS += cpu/$(CPU)/resetvec.o
  82. endif
  83. ifeq ($(CPU),mpc85xx)
  84. OBJS += cpu/$(CPU)/resetvec.o
  85. endif
  86. LIBS = lib_generic/libgeneric.a
  87. LIBS += board/$(BOARDDIR)/lib$(BOARD).a
  88. LIBS += cpu/$(CPU)/lib$(CPU).a
  89. LIBS += lib_$(ARCH)/lib$(ARCH).a
  90. LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a
  91. LIBS += net/libnet.a
  92. LIBS += disk/libdisk.a
  93. LIBS += rtc/librtc.a
  94. LIBS += dtt/libdtt.a
  95. LIBS += drivers/libdrivers.a
  96. LIBS += drivers/sk98lin/libsk98lin.a
  97. LIBS += post/libpost.a post/cpu/libcpu.a
  98. LIBS += common/libcommon.a
  99. .PHONY : $(LIBS)
  100. # Add GCC lib
  101. PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
  102. # The "tools" are needed early, so put this first
  103. # Don't include stuff already done in $(LIBS)
  104. SUBDIRS = tools \
  105. examples \
  106. post \
  107. post/cpu
  108. .PHONY : $(SUBDIRS)
  109. #########################################################################
  110. #########################################################################
  111. ALL = u-boot.srec u-boot.bin System.map
  112. all: $(ALL)
  113. u-boot.srec: u-boot
  114. $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
  115. u-boot.bin: u-boot
  116. $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
  117. u-boot.img: u-boot.bin
  118. ./tools/mkimage -A $(ARCH) -T firmware -C none \
  119. -a $(TEXT_BASE) -e 0 \
  120. -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \
  121. sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
  122. -d $< $@
  123. u-boot.dis: u-boot
  124. $(OBJDUMP) -d $< > $@
  125. u-boot: depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
  126. UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
  127. $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
  128. --start-group $(LIBS) $(PLATFORM_LIBS) --end-group \
  129. -Map u-boot.map -o u-boot
  130. $(LIBS):
  131. $(MAKE) -C `dirname $@`
  132. $(SUBDIRS):
  133. $(MAKE) -C $@ all
  134. gdbtools:
  135. $(MAKE) -C tools/gdb || exit 1
  136. depend dep:
  137. @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
  138. tags:
  139. ctags -w `find $(SUBDIRS) include \
  140. \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  141. etags:
  142. etags -a `find $(SUBDIRS) include \
  143. \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  144. System.map: u-boot
  145. @$(NM) $< | \
  146. grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
  147. sort > System.map
  148. #########################################################################
  149. else
  150. all install u-boot u-boot.srec depend dep:
  151. @echo "System not configured - see README" >&2
  152. @ exit 1
  153. endif
  154. #########################################################################
  155. unconfig:
  156. rm -f include/config.h include/config.mk
  157. #========================================================================
  158. # PowerPC
  159. #========================================================================
  160. #########################################################################
  161. ## MPC5xx Systems
  162. #########################################################################
  163. cmi_mpc5xx_config: unconfig
  164. @./mkconfig $(@:_config=) ppc mpc5xx cmi
  165. #########################################################################
  166. ## MPC5xxx Systems
  167. #########################################################################
  168. MPC5200LITE_config \
  169. MPC5200LITE_LOWBOOT_config \
  170. MPC5200LITE_LOWBOOT08_config \
  171. icecube_5200_DDR_config \
  172. IceCube_5200_DDR_config \
  173. icecube_5200_config \
  174. IceCube_5200_config \
  175. IceCube_5100_config: unconfig
  176. @ >include/config.h
  177. @[ -z "$(findstring LOWBOOT,$@)" ] || \
  178. { echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \
  179. echo "... with LOWBOOT configuration" ; \
  180. }
  181. @[ -z "$(findstring LOWBOOT08,$@)" ] || \
  182. { echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
  183. echo "... with 8 MB flash only" ; \
  184. }
  185. @[ -z "$(findstring 5200,$@)" ] || \
  186. { echo "#define CONFIG_MPC5200" >>include/config.h ; \
  187. echo "... with MPC5200 processor" ; \
  188. }
  189. @[ -z "$(findstring DDR,$@)" ] || \
  190. { echo "#define CONFIG_MPC5200_DDR" >>include/config.h ; \
  191. echo "... DDR memory revision" ; \
  192. }
  193. @[ -z "$(findstring 5100,$@)" ] || \
  194. { echo "#define CONFIG_MGT5100" >>include/config.h ; \
  195. echo "... with MGT5100 processor" ; \
  196. }
  197. @./mkconfig -a IceCube ppc mpc5xxx icecube
  198. #########################################################################
  199. ## MPC8xx Systems
  200. #########################################################################
  201. AdderII_config: unconfig
  202. @./mkconfig $(@:_config=) ppc mpc8xx adderII
  203. ADS860_config: unconfig
  204. @./mkconfig $(@:_config=) ppc mpc8xx fads
  205. AMX860_config : unconfig
  206. @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
  207. bms2003_config : unconfig
  208. @echo "#define CONFIG_BMS2003" >include/config.h
  209. @echo "#define CONFIG_LCD" >>include/config.h
  210. @echo "#define CONFIG_NEC_NL6448BC33_54" >>include/config.h
  211. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  212. c2mon_config: unconfig
  213. @./mkconfig $(@:_config=) ppc mpc8xx c2mon
  214. CCM_config: unconfig
  215. @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
  216. cogent_mpc8xx_config: unconfig
  217. @./mkconfig $(@:_config=) ppc mpc8xx cogent
  218. ELPT860_config: unconfig
  219. @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
  220. ESTEEM192E_config: unconfig
  221. @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
  222. ETX094_config : unconfig
  223. @./mkconfig $(@:_config=) ppc mpc8xx etx094
  224. FADS823_config \
  225. FADS850SAR_config \
  226. MPC86xADS_config \
  227. FADS860T_config: unconfig
  228. @./mkconfig $(@:_config=) ppc mpc8xx fads
  229. FLAGADM_config: unconfig
  230. @./mkconfig $(@:_config=) ppc mpc8xx flagadm
  231. xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
  232. GEN860T_SC_config \
  233. GEN860T_config: unconfig
  234. @ >include/config.h
  235. @[ -z "$(findstring _SC,$@)" ] || \
  236. { echo "#define CONFIG_SC" >>include/config.h ; \
  237. echo "With reduced H/W feature set (SC)..." ; \
  238. }
  239. @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
  240. GENIETV_config: unconfig
  241. @./mkconfig $(@:_config=) ppc mpc8xx genietv
  242. GTH_config: unconfig
  243. @./mkconfig $(@:_config=) ppc mpc8xx gth
  244. hermes_config : unconfig
  245. @./mkconfig $(@:_config=) ppc mpc8xx hermes
  246. IAD210_config: unconfig
  247. @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
  248. xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
  249. ICU862_100MHz_config \
  250. ICU862_config: unconfig
  251. @ >include/config.h
  252. @[ -z "$(findstring _100MHz,$@)" ] || \
  253. { echo "#define CONFIG_100MHz" >>include/config.h ; \
  254. echo "... with 100MHz system clock" ; \
  255. }
  256. @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
  257. IP860_config : unconfig
  258. @./mkconfig $(@:_config=) ppc mpc8xx ip860
  259. IVML24_256_config \
  260. IVML24_128_config \
  261. IVML24_config: unconfig
  262. @ >include/config.h
  263. @[ -z "$(findstring IVML24_config,$@)" ] || \
  264. { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
  265. }
  266. @[ -z "$(findstring IVML24_128_config,$@)" ] || \
  267. { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
  268. }
  269. @[ -z "$(findstring IVML24_256_config,$@)" ] || \
  270. { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
  271. }
  272. @./mkconfig -a IVML24 ppc mpc8xx ivm
  273. IVMS8_256_config \
  274. IVMS8_128_config \
  275. IVMS8_config: unconfig
  276. @ >include/config.h
  277. @[ -z "$(findstring IVMS8_config,$@)" ] || \
  278. { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
  279. }
  280. @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
  281. { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
  282. }
  283. @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
  284. { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
  285. }
  286. @./mkconfig -a IVMS8 ppc mpc8xx ivm
  287. KUP4K_config : unconfig
  288. @./mkconfig $(@:_config=) ppc mpc8xx kup4k
  289. LANTEC_config : unconfig
  290. @./mkconfig $(@:_config=) ppc mpc8xx lantec
  291. lwmon_config: unconfig
  292. @./mkconfig $(@:_config=) ppc mpc8xx lwmon
  293. MBX_config \
  294. MBX860T_config: unconfig
  295. @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
  296. MHPC_config: unconfig
  297. @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
  298. MVS1_config : unconfig
  299. @./mkconfig $(@:_config=) ppc mpc8xx mvs1
  300. xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
  301. NETVIA_V2_config \
  302. NETVIA_config: unconfig
  303. @ >include/config.h
  304. @[ -z "$(findstring NETVIA_config,$@)" ] || \
  305. { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
  306. echo "... Version 1" ; \
  307. }
  308. @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
  309. { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
  310. echo "... Version 2" ; \
  311. }
  312. @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
  313. NX823_config: unconfig
  314. @./mkconfig $(@:_config=) ppc mpc8xx nx823
  315. pcu_e_config: unconfig
  316. @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
  317. QS850_config: unconfig
  318. @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
  319. QS823_config: unconfig
  320. @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
  321. QS860T_config: unconfig
  322. @./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc
  323. R360MPI_config: unconfig
  324. @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
  325. RBC823_config: unconfig
  326. @./mkconfig $(@:_config=) ppc mpc8xx rbc823
  327. RPXClassic_config: unconfig
  328. @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
  329. RPXlite_config: unconfig
  330. @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
  331. rmu_config: unconfig
  332. @./mkconfig $(@:_config=) ppc mpc8xx rmu
  333. RRvision_config: unconfig
  334. @./mkconfig $(@:_config=) ppc mpc8xx RRvision
  335. RRvision_LCD_config: unconfig
  336. @echo "#define CONFIG_LCD" >include/config.h
  337. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  338. @./mkconfig -a RRvision ppc mpc8xx RRvision
  339. SM850_config : unconfig
  340. @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
  341. SPD823TS_config: unconfig
  342. @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
  343. svm_sc8xx_config: unconfig
  344. @ >include/config.h
  345. @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
  346. SXNI855T_config: unconfig
  347. @./mkconfig $(@:_config=) ppc mpc8xx sixnet
  348. # EMK MPC8xx based modules
  349. TOP860_config: unconfig
  350. @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
  351. # Play some tricks for configuration selection
  352. # All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
  353. # but only 855 and 860 boards may come with FEC
  354. # and 823 boards may have LCD support
  355. xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _LCD,,$(subst _config,,$1)))))
  356. FPS850L_config \
  357. FPS860L_config \
  358. NSCU_config \
  359. TQM823L_config \
  360. TQM823L_66MHz_config \
  361. TQM823L_80MHz_config \
  362. TQM823L_LCD_config \
  363. TQM823L_LCD_66MHz_config \
  364. TQM823L_LCD_80MHz_config \
  365. TQM850L_config \
  366. TQM850L_66MHz_config \
  367. TQM850L_80MHz_config \
  368. TQM855L_config \
  369. TQM855L_66MHz_config \
  370. TQM855L_80MHz_config \
  371. TQM860L_config \
  372. TQM860L_66MHz_config \
  373. TQM860L_80MHz_config \
  374. TQM862L_config \
  375. TQM862L_66MHz_config \
  376. TQM862L_80MHz_config \
  377. TQM823M_config \
  378. TQM823M_66MHz_config \
  379. TQM823M_80MHz_config \
  380. TQM850M_config \
  381. TQM850M_66MHz_config \
  382. TQM850M_80MHz_config \
  383. TQM855M_config \
  384. TQM855M_66MHz_config \
  385. TQM855M_80MHz_config \
  386. TQM860M_config \
  387. TQM860M_66MHz_config \
  388. TQM860M_80MHz_config \
  389. TQM862M_config \
  390. TQM862M_66MHz_config \
  391. TQM862M_80MHz_config \
  392. TQM862M_100MHz_config: unconfig
  393. @ >include/config.h
  394. @[ -z "$(findstring _66MHz,$@)" ] || \
  395. { echo "#define CONFIG_66MHz" >>include/config.h ; \
  396. echo "... with 66MHz system clock" ; \
  397. }
  398. @[ -z "$(findstring _80MHz,$@)" ] || \
  399. { echo "#define CONFIG_80MHz" >>include/config.h ; \
  400. echo "... with 80MHz system clock" ; \
  401. }
  402. @[ -z "$(findstring _100MHz,$@)" ] || \
  403. { echo "#define CONFIG_100MHz" >>include/config.h ; \
  404. echo "... with 100MHz system clock" ; \
  405. }
  406. @[ -z "$(findstring _LCD,$@)" ] || \
  407. { echo "#define CONFIG_LCD" >>include/config.h ; \
  408. echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \
  409. echo "... with LCD display" ; \
  410. }
  411. @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
  412. TTTech_config: unconfig
  413. @echo "#define CONFIG_LCD" >include/config.h
  414. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  415. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  416. v37_config: unconfig
  417. @echo "#define CONFIG_LCD" >include/config.h
  418. @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
  419. @./mkconfig $(@:_config=) ppc mpc8xx v37
  420. wtk_config: unconfig
  421. @echo "#define CONFIG_LCD" >include/config.h
  422. @echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h
  423. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  424. #########################################################################
  425. ## PPC4xx Systems
  426. #########################################################################
  427. xtract_4xx = $(subst _MODEL_BA,,$(subst _MODEL_ME,,$(subst _MODEL_HI,,$(subst _config,,$1))))
  428. ADCIOP_config: unconfig
  429. @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
  430. AR405_config: unconfig
  431. @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
  432. ASH405_config: unconfig
  433. @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
  434. BUBINGA405EP_config:unconfig
  435. @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
  436. CANBT_config: unconfig
  437. @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
  438. CPCI405_config \
  439. CPCI4052_config \
  440. CPCI405AB_config: unconfig
  441. @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
  442. @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
  443. CPCI440_config: unconfig
  444. @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
  445. CPCIISER4_config: unconfig
  446. @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
  447. CRAYL1_config:unconfig
  448. @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
  449. DASA_SIM_config: unconfig
  450. @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
  451. DP405_config: unconfig
  452. @./mkconfig $(@:_config=) ppc ppc4xx dp405 esd
  453. DU405_config: unconfig
  454. @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
  455. EBONY_config:unconfig
  456. @./mkconfig $(@:_config=) ppc ppc4xx ebony
  457. ERIC_config:unconfig
  458. @./mkconfig $(@:_config=) ppc ppc4xx eric
  459. EXBITGEN_config:unconfig
  460. @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
  461. HUB405_config: unconfig
  462. @./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
  463. MIP405_config:unconfig
  464. @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
  465. MIP405T_config:unconfig
  466. @echo "#define CONFIG_MIP405T" >include/config.h
  467. @echo "Enable subset config for MIP405T"
  468. @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
  469. ML2_config:unconfig
  470. @./mkconfig $(@:_config=) ppc ppc4xx ml2
  471. OCRTC_config \
  472. ORSG_config: unconfig
  473. @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
  474. PCI405_config: unconfig
  475. @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
  476. PIP405_config:unconfig
  477. @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
  478. PLU405_config: unconfig
  479. @./mkconfig $(@:_config=) ppc ppc4xx plu405 esd
  480. PMC405_config: unconfig
  481. @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
  482. PPChameleonEVB_MODEL_BA_config \
  483. PPChameleonEVB_MODEL_ME_config \
  484. PPChameleonEVB_MODEL_HI_config \
  485. PPChameleonEVB_config: unconfig
  486. @ >include/config.h
  487. @[ -z "$(findstring _MODEL_BA,$@)" ] || \
  488. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
  489. echo "... BASIC model" ; \
  490. }
  491. @[ -z "$(findstring _MODEL_ME,$@)" ] || \
  492. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
  493. echo "... MEDIUM model" ; \
  494. }
  495. @[ -z "$(findstring _MODEL_HI,$@)" ] || \
  496. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
  497. echo "... HIGH-END model" ; \
  498. }
  499. @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
  500. VOH405_config: unconfig
  501. @./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
  502. W7OLMC_config \
  503. W7OLMG_config: unconfig
  504. @./mkconfig $(@:_config=) ppc ppc4xx w7o
  505. WALNUT405_config:unconfig
  506. @./mkconfig $(@:_config=) ppc ppc4xx walnut405
  507. #########################################################################
  508. ## MPC824x Systems
  509. #########################################################################
  510. xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
  511. A3000_config: unconfig
  512. @./mkconfig $(@:_config=) ppc mpc824x a3000
  513. BMW_config: unconfig
  514. @./mkconfig $(@:_config=) ppc mpc824x bmw
  515. CPC45_config \
  516. CPC45_ROMBOOT_config: unconfig
  517. @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
  518. @cd ./include ; \
  519. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  520. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  521. echo "... booting from 8-bit flash" ; \
  522. else \
  523. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  524. echo "... booting from 64-bit flash" ; \
  525. fi; \
  526. echo "export CONFIG_BOOT_ROM" >> config.mk;
  527. CU824_config: unconfig
  528. @./mkconfig $(@:_config=) ppc mpc824x cu824
  529. MOUSSE_config: unconfig
  530. @./mkconfig $(@:_config=) ppc mpc824x mousse
  531. MUSENKI_config: unconfig
  532. @./mkconfig $(@:_config=) ppc mpc824x musenki
  533. MVBLUE_config: unconfig
  534. @./mkconfig $(@:_config=) ppc mpc824x mvblue
  535. OXC_config: unconfig
  536. @./mkconfig $(@:_config=) ppc mpc824x oxc
  537. PN62_config: unconfig
  538. @./mkconfig $(@:_config=) ppc mpc824x pn62
  539. Sandpoint8240_config: unconfig
  540. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  541. Sandpoint8245_config: unconfig
  542. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  543. SL8245_config: unconfig
  544. @./mkconfig $(@:_config=) ppc mpc824x sl8245
  545. utx8245_config: unconfig
  546. @./mkconfig $(@:_config=) ppc mpc824x utx8245
  547. #########################################################################
  548. ## MPC8260 Systems
  549. #########################################################################
  550. atc_config: unconfig
  551. @./mkconfig $(@:_config=) ppc mpc8260 atc
  552. cogent_mpc8260_config: unconfig
  553. @./mkconfig $(@:_config=) ppc mpc8260 cogent
  554. CPU86_config \
  555. CPU86_ROMBOOT_config: unconfig
  556. @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
  557. @cd ./include ; \
  558. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  559. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  560. echo "... booting from 8-bit flash" ; \
  561. else \
  562. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  563. echo "... booting from 64-bit flash" ; \
  564. fi; \
  565. echo "export CONFIG_BOOT_ROM" >> config.mk;
  566. ep8260_config: unconfig
  567. @./mkconfig $(@:_config=) ppc mpc8260 ep8260
  568. gw8260_config: unconfig
  569. @./mkconfig $(@:_config=) ppc mpc8260 gw8260
  570. hymod_config: unconfig
  571. @./mkconfig $(@:_config=) ppc mpc8260 hymod
  572. IPHASE4539_config: unconfig
  573. @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
  574. MPC8260ADS_config: unconfig
  575. @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
  576. MPC8266ADS_config: unconfig
  577. @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
  578. PM825_config \
  579. PM825_ROMBOOT_config: unconfig
  580. @echo "#define CONFIG_PCI" >include/config.h
  581. @./mkconfig -a PM826 ppc mpc8260 pm826
  582. @cd ./include ; \
  583. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  584. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  585. echo "... booting from 8-bit flash" ; \
  586. else \
  587. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  588. echo "... booting from 64-bit flash" ; \
  589. fi; \
  590. echo "export CONFIG_BOOT_ROM" >> config.mk; \
  591. PM826_config \
  592. PM826_ROMBOOT_config: unconfig
  593. @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
  594. @cd ./include ; \
  595. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  596. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  597. echo "... booting from 8-bit flash" ; \
  598. else \
  599. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  600. echo "... booting from 64-bit flash" ; \
  601. fi; \
  602. echo "export CONFIG_BOOT_ROM" >> config.mk; \
  603. ppmc8260_config: unconfig
  604. @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
  605. RPXsuper_config: unconfig
  606. @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
  607. rsdproto_config: unconfig
  608. @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
  609. sacsng_config: unconfig
  610. @./mkconfig $(@:_config=) ppc mpc8260 sacsng
  611. sbc8260_config: unconfig
  612. @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
  613. SCM_config: unconfig
  614. @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
  615. TQM8255_AA_config \
  616. TQM8260_AA_config \
  617. TQM8260_AB_config \
  618. TQM8260_AC_config \
  619. TQM8260_AD_config \
  620. TQM8260_AE_config \
  621. TQM8260_AF_config \
  622. TQM8260_AG_config \
  623. TQM8260_AH_config \
  624. TQM8265_AA_config: unconfig
  625. @case "$@" in \
  626. TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no; BMODE=8260;; \
  627. TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no; BMODE=8260;; \
  628. TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
  629. TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
  630. TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
  631. TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no; BMODE=8260;; \
  632. TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
  633. TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=8260;; \
  634. TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;; \
  635. TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no; BMODE=60x;; \
  636. esac; \
  637. >include/config.h ; \
  638. if [ "$${CTYPE}" != "MPC8260" ] ; then \
  639. echo "#define CONFIG_$${CTYPE}" >>include/config.h ; \
  640. fi; \
  641. echo "#define CONFIG_$${CFREQ}MHz" >>include/config.h ; \
  642. echo "... with $${CFREQ}MHz system clock" ; \
  643. if [ "$${CACHE}" == "yes" ] ; then \
  644. echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
  645. echo "... with L2 Cache support" ; \
  646. else \
  647. echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
  648. echo "... without L2 Cache support" ; \
  649. fi; \
  650. if [ "$${BMODE}" == "60x" ] ; then \
  651. echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
  652. echo "... with 60x Bus Mode" ; \
  653. else \
  654. echo "#undef CONFIG_BUSMODE_60x" >>include/config.h ; \
  655. echo "... without 60x Bus Mode" ; \
  656. fi
  657. @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
  658. ZPC1900_config: unconfig
  659. @./mkconfig $(@:_config=) ppc mpc8260 zpc1900
  660. #========================================================================
  661. # M68K
  662. #========================================================================
  663. #########################################################################
  664. ## Coldfire
  665. #########################################################################
  666. M5272C3_config : unconfig
  667. @./mkconfig $(@:_config=) m68k coldfire m5272c3
  668. M5282EVB_config : unconfig
  669. @./mkconfig $(@:_config=) m68k coldfire m5282evb
  670. #########################################################################
  671. ## MPC85xx Systems
  672. #########################################################################
  673. MPC8540ADS_config: unconfig
  674. @./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
  675. MPC8560ADS_config: unconfig
  676. @./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
  677. #########################################################################
  678. ## 74xx/7xx Systems
  679. #########################################################################
  680. AmigaOneG3SE_config: unconfig
  681. @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
  682. BAB7xx_config: unconfig
  683. @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
  684. debris_config: unconfig
  685. @./mkconfig $(@:_config=) ppc mpc824x debris etin
  686. ELPPC_config: unconfig
  687. @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
  688. EVB64260_config \
  689. EVB64260_750CX_config: unconfig
  690. @./mkconfig EVB64260 ppc 74xx_7xx evb64260
  691. P3G4_config: unconfig
  692. @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
  693. PCIPPC2_config \
  694. PCIPPC6_config: unconfig
  695. @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
  696. ZUMA_config: unconfig
  697. @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
  698. #========================================================================
  699. # ARM
  700. #========================================================================
  701. #########################################################################
  702. ## StrongARM Systems
  703. #########################################################################
  704. at91rm9200dk_config : unconfig
  705. @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
  706. lart_config : unconfig
  707. @./mkconfig $(@:_config=) arm sa1100 lart
  708. dnp1110_config : unconfig
  709. @./mkconfig $(@:_config=) arm sa1100 dnp1110
  710. shannon_config : unconfig
  711. @./mkconfig $(@:_config=) arm sa1100 shannon
  712. #########################################################################
  713. ## ARM92xT Systems
  714. #########################################################################
  715. xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
  716. omap1510inn_config : unconfig
  717. @./mkconfig $(@:_config=) arm arm925t omap1510inn
  718. omap1610inn_config : unconfig
  719. @./mkconfig $(@:_config=) arm arm926ejs omap1610inn
  720. smdk2400_config : unconfig
  721. @./mkconfig $(@:_config=) arm arm920t smdk2400
  722. smdk2410_config : unconfig
  723. @./mkconfig $(@:_config=) arm arm920t smdk2410
  724. # TRAB default configuration: 8 MB Flash, 32 MB RAM
  725. trab_config \
  726. trab_bigram_config \
  727. trab_bigflash_config \
  728. trab_old_config: unconfig
  729. @ >include/config.h
  730. @[ -z "$(findstring _bigram,$@)" ] || \
  731. { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
  732. echo "#define CONFIG_RAM_32MB" >>include/config.h ; \
  733. echo "... with 8 MB Flash, 32 MB RAM" ; \
  734. }
  735. @[ -z "$(findstring _bigflash,$@)" ] || \
  736. { echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \
  737. echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
  738. echo "... with 16 MB Flash, 16 MB RAM" ; \
  739. echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
  740. }
  741. @[ -z "$(findstring _old,$@)" ] || \
  742. { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
  743. echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
  744. echo "... with 8 MB Flash, 16 MB RAM" ; \
  745. echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
  746. }
  747. @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
  748. VCMA9_config : unconfig
  749. @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
  750. #########################################################################
  751. ## ARM720T Systems
  752. #########################################################################
  753. impa7_config : unconfig
  754. @./mkconfig $(@:_config=) arm arm720t impa7
  755. ep7312_config : unconfig
  756. @./mkconfig $(@:_config=) arm arm720t ep7312
  757. #########################################################################
  758. ## XScale Systems
  759. #########################################################################
  760. cradle_config : unconfig
  761. @./mkconfig $(@:_config=) arm pxa cradle
  762. csb226_config : unconfig
  763. @./mkconfig $(@:_config=) arm pxa csb226
  764. innokom_config : unconfig
  765. @./mkconfig $(@:_config=) arm pxa innokom
  766. ixdp425_config : unconfig
  767. @./mkconfig $(@:_config=) arm ixp ixdp425
  768. lubbock_config : unconfig
  769. @./mkconfig $(@:_config=) arm pxa lubbock
  770. logodl_config : unconfig
  771. @./mkconfig $(@:_config=) arm pxa logodl
  772. wepep250_config : unconfig
  773. @./mkconfig $(@:_config=) arm pxa wepep250
  774. #========================================================================
  775. # i386
  776. #========================================================================
  777. #########################################################################
  778. ## AMD SC520 CDP
  779. #########################################################################
  780. sc520_cdp_config : unconfig
  781. @./mkconfig $(@:_config=) i386 i386 sc520_cdp
  782. sc520_spunk_config : unconfig
  783. @./mkconfig $(@:_config=) i386 i386 sc520_spunk
  784. sc520_spunk_rel_config : unconfig
  785. @./mkconfig $(@:_config=) i386 i386 sc520_spunk
  786. #========================================================================
  787. # MIPS
  788. #========================================================================
  789. #########################################################################
  790. ## MIPS32 4Kc
  791. #########################################################################
  792. xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
  793. incaip_100MHz_config \
  794. incaip_133MHz_config \
  795. incaip_150MHz_config \
  796. incaip_config: unconfig
  797. @ >include/config.h
  798. @[ -z "$(findstring _100MHz,$@)" ] || \
  799. { echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
  800. echo "... with 100MHz system clock" ; \
  801. }
  802. @[ -z "$(findstring _133MHz,$@)" ] || \
  803. { echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
  804. echo "... with 133MHz system clock" ; \
  805. }
  806. @[ -z "$(findstring _150MHz,$@)" ] || \
  807. { echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
  808. echo "... with 150MHz system clock" ; \
  809. }
  810. @./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
  811. #########################################################################
  812. ## MIPS64 5Kc
  813. #########################################################################
  814. purple_config : unconfig
  815. @./mkconfig $(@:_config=) mips mips purple
  816. #========================================================================
  817. # Nios
  818. #========================================================================
  819. #########################################################################
  820. ## Nios32
  821. #########################################################################
  822. DK1C20_config: unconfig
  823. @./mkconfig $(@:_config=) nios nios dk1c20
  824. #########################################################################
  825. ## MIPS32 AU1X00
  826. #########################################################################
  827. dbau1000_config : unconfig
  828. @ >include/config.h
  829. @echo "#define CONFIG_DBAU1000 1" >>include/config.h
  830. @./mkconfig -a dbau1x00 mips mips dbau1x00
  831. dbau1100_config : unconfig
  832. @ >include/config.h
  833. @echo "#define CONFIG_DBAU1100 1" >>include/config.h
  834. @./mkconfig -a dbau1x00 mips mips dbau1x00
  835. dbau1500_config : unconfig
  836. @ >include/config.h
  837. @echo "#define CONFIG_DBAU1500 1" >>include/config.h
  838. @./mkconfig -a dbau1x00 mips mips dbau1x00
  839. #########################################################################
  840. #########################################################################
  841. clean:
  842. find . -type f \
  843. \( -name 'core' -o -name '*.bak' -o -name '*~' \
  844. -o -name '*.o' -o -name '*.a' \) -print \
  845. | xargs rm -f
  846. rm -f examples/hello_world examples/timer \
  847. examples/eepro100_eeprom examples/sched \
  848. examples/mem_to_mem_idma2intr examples/82559_eeprom
  849. rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
  850. rm -f tools/easylogo/easylogo tools/bmp_logo
  851. rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
  852. rm -f tools/env/fw_printenv tools/env/fw_setenv
  853. rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
  854. rm -f board/trab/trab_fkt board/*/config.tmp
  855. clobber: clean
  856. find . -type f \
  857. \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
  858. -print \
  859. | xargs rm -f
  860. rm -f $(OBJS) *.bak tags TAGS
  861. rm -fr *.*~
  862. rm -f u-boot u-boot.map $(ALL)
  863. rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
  864. rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
  865. rm -f include/asm/proc include/asm/arch include/asm
  866. mrproper \
  867. distclean: clobber unconfig
  868. backup:
  869. F=`basename $(TOPDIR)` ; cd .. ; \
  870. gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
  871. #########################################################################