Makefile 24 KB

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