Makefile 27 KB

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