Makefile 30 KB

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