Makefile 32 KB

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