Makefile 31 KB

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