Makefile 29 KB

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