Makefile 38 KB

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