Makefile 30 KB

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