Makefile 30 KB

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