Makefile 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309
  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. xtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))
  332. NETPHONE_V2_config \
  333. NETPHONE_config: unconfig
  334. @ >include/config.h
  335. @[ -z "$(findstring NETPHONE_config,$@)" ] || \
  336. { echo "#define CONFIG_NETPHONE_VERSION 1" >>include/config.h ; \
  337. }
  338. @[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
  339. { echo "#define CONFIG_NETPHONE_VERSION 2" >>include/config.h ; \
  340. }
  341. @./mkconfig -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
  342. xtract_NETTA = $(subst _ISDN,,$(subst _config,,$1))
  343. NETTA_ISDN_config \
  344. NETTA_config: unconfig
  345. @ >include/config.h
  346. @[ -z "$(findstring NETTA_config,$@)" ] || \
  347. { echo "#undef CONFIG_NETTA_ISDN" >>include/config.h ; \
  348. }
  349. @[ -z "$(findstring NETTA_ISDN_config,$@)" ] || \
  350. { echo "#define CONFIG_NETTA_ISDN 1" >>include/config.h ; \
  351. }
  352. @./mkconfig -a $(call xtract_NETTA,$@) ppc mpc8xx netta
  353. NX823_config: unconfig
  354. @./mkconfig $(@:_config=) ppc mpc8xx nx823
  355. pcu_e_config: unconfig
  356. @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
  357. QS850_config: unconfig
  358. @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
  359. QS823_config: unconfig
  360. @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
  361. QS860T_config: unconfig
  362. @./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc
  363. R360MPI_config: unconfig
  364. @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
  365. RBC823_config: unconfig
  366. @./mkconfig $(@:_config=) ppc mpc8xx rbc823
  367. RPXClassic_config: unconfig
  368. @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
  369. RPXlite_config: unconfig
  370. @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
  371. rmu_config: unconfig
  372. @./mkconfig $(@:_config=) ppc mpc8xx rmu
  373. RRvision_config: unconfig
  374. @./mkconfig $(@:_config=) ppc mpc8xx RRvision
  375. RRvision_LCD_config: unconfig
  376. @echo "#define CONFIG_LCD" >include/config.h
  377. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  378. @./mkconfig -a RRvision ppc mpc8xx RRvision
  379. SM850_config : unconfig
  380. @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
  381. SPD823TS_config: unconfig
  382. @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
  383. svm_sc8xx_config: unconfig
  384. @ >include/config.h
  385. @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
  386. SXNI855T_config: unconfig
  387. @./mkconfig $(@:_config=) ppc mpc8xx sixnet
  388. # EMK MPC8xx based modules
  389. TOP860_config: unconfig
  390. @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
  391. # Play some tricks for configuration selection
  392. # All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
  393. # but only 855 and 860 boards may come with FEC
  394. # and 823 boards may have LCD support
  395. xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _133MHz,,$(subst _LCD,,$(subst _config,,$1))))))
  396. FPS850L_config \
  397. FPS860L_config \
  398. NSCU_config \
  399. TQM823L_config \
  400. TQM823L_66MHz_config \
  401. TQM823L_80MHz_config \
  402. TQM823L_LCD_config \
  403. TQM823L_LCD_66MHz_config \
  404. TQM823L_LCD_80MHz_config \
  405. TQM850L_config \
  406. TQM850L_66MHz_config \
  407. TQM850L_80MHz_config \
  408. TQM855L_config \
  409. TQM855L_66MHz_config \
  410. TQM855L_80MHz_config \
  411. TQM860L_config \
  412. TQM860L_66MHz_config \
  413. TQM860L_80MHz_config \
  414. TQM862L_config \
  415. TQM862L_66MHz_config \
  416. TQM862L_80MHz_config \
  417. TQM823M_config \
  418. TQM823M_66MHz_config \
  419. TQM823M_80MHz_config \
  420. TQM850M_config \
  421. TQM850M_66MHz_config \
  422. TQM850M_80MHz_config \
  423. TQM855M_config \
  424. TQM855M_66MHz_config \
  425. TQM855M_80MHz_config \
  426. TQM860M_config \
  427. TQM860M_66MHz_config \
  428. TQM860M_80MHz_config \
  429. TQM862M_config \
  430. TQM862M_66MHz_config \
  431. TQM862M_80MHz_config \
  432. TQM862M_100MHz_config \
  433. TQM866M_config: unconfig
  434. @ >include/config.h
  435. @[ -z "$(findstring _66MHz,$@)" ] || \
  436. { echo "#define CONFIG_66MHz" >>include/config.h ; \
  437. echo "... with 66MHz system clock" ; \
  438. }
  439. @[ -z "$(findstring _80MHz,$@)" ] || \
  440. { echo "#define CONFIG_80MHz" >>include/config.h ; \
  441. echo "... with 80MHz system clock" ; \
  442. }
  443. @[ -z "$(findstring _100MHz,$@)" ] || \
  444. { echo "#define CONFIG_100MHz" >>include/config.h ; \
  445. echo "... with 100MHz system clock" ; \
  446. }
  447. @[ -z "$(findstring _133MHz,$@)" ] || \
  448. { echo "#define CONFIG_133MHz" >>include/config.h ; \
  449. echo "... with 133MHz system clock" ; \
  450. }
  451. @[ -z "$(findstring _LCD,$@)" ] || \
  452. { echo "#define CONFIG_LCD" >>include/config.h ; \
  453. echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \
  454. echo "... with LCD display" ; \
  455. }
  456. @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
  457. TTTech_config: unconfig
  458. @echo "#define CONFIG_LCD" >include/config.h
  459. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  460. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  461. v37_config: unconfig
  462. @echo "#define CONFIG_LCD" >include/config.h
  463. @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
  464. @./mkconfig $(@:_config=) ppc mpc8xx v37
  465. wtk_config: unconfig
  466. @echo "#define CONFIG_LCD" >include/config.h
  467. @echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h
  468. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  469. #########################################################################
  470. ## PPC4xx Systems
  471. #########################################################################
  472. xtract_4xx = $(subst _MODEL_BA,,$(subst _MODEL_ME,,$(subst _MODEL_HI,,$(subst _config,,$1))))
  473. ADCIOP_config: unconfig
  474. @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
  475. AR405_config: unconfig
  476. @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
  477. ASH405_config: unconfig
  478. @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
  479. BUBINGA405EP_config: unconfig
  480. @./mkconfig $(@:_config=) ppc ppc4xx bubinga405ep
  481. CANBT_config: unconfig
  482. @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
  483. CPCI405_config \
  484. CPCI4052_config \
  485. CPCI405AB_config: unconfig
  486. @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
  487. @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
  488. CPCI440_config: unconfig
  489. @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
  490. CPCIISER4_config: unconfig
  491. @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
  492. CRAYL1_config: unconfig
  493. @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
  494. csb272_config: unconfig
  495. @./mkconfig $(@:_config=) ppc ppc4xx csb272
  496. DASA_SIM_config: unconfig
  497. @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
  498. DP405_config: unconfig
  499. @./mkconfig $(@:_config=) ppc ppc4xx dp405 esd
  500. DU405_config: unconfig
  501. @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
  502. EBONY_config: unconfig
  503. @./mkconfig $(@:_config=) ppc ppc4xx ebony
  504. ERIC_config: unconfig
  505. @./mkconfig $(@:_config=) ppc ppc4xx eric
  506. EXBITGEN_config: unconfig
  507. @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
  508. HUB405_config: unconfig
  509. @./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
  510. JSE_config: unconfig
  511. @./mkconfig $(@:_config=) ppc ppc4xx jse
  512. MIP405_config: unconfig
  513. @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
  514. MIP405T_config: unconfig
  515. @echo "#define CONFIG_MIP405T" >include/config.h
  516. @echo "Enable subset config for MIP405T"
  517. @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
  518. ML2_config: unconfig
  519. @./mkconfig $(@:_config=) ppc ppc4xx ml2
  520. ml300_config: unconfig
  521. @./mkconfig $(@:_config=) ppc ppc4xx ml300 xilinx
  522. OCOTEA_config: unconfig
  523. @./mkconfig $(@:_config=) ppc ppc4xx ocotea
  524. OCRTC_config \
  525. ORSG_config: unconfig
  526. @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
  527. PCI405_config: unconfig
  528. @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
  529. PIP405_config: unconfig
  530. @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
  531. PLU405_config: unconfig
  532. @./mkconfig $(@:_config=) ppc ppc4xx plu405 esd
  533. PMC405_config: unconfig
  534. @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
  535. PPChameleonEVB_MODEL_BA_config \
  536. PPChameleonEVB_MODEL_ME_config \
  537. PPChameleonEVB_MODEL_HI_config \
  538. PPChameleonEVB_config: unconfig
  539. @ >include/config.h
  540. @[ -z "$(findstring _MODEL_BA,$@)" ] || \
  541. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
  542. echo "... BASIC model" ; \
  543. }
  544. @[ -z "$(findstring _MODEL_ME,$@)" ] || \
  545. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
  546. echo "... MEDIUM model" ; \
  547. }
  548. @[ -z "$(findstring _MODEL_HI,$@)" ] || \
  549. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
  550. echo "... HIGH-END model" ; \
  551. }
  552. @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
  553. VOH405_config: unconfig
  554. @./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
  555. W7OLMC_config \
  556. W7OLMG_config: unconfig
  557. @./mkconfig $(@:_config=) ppc ppc4xx w7o
  558. WALNUT405_config: unconfig
  559. @./mkconfig $(@:_config=) ppc ppc4xx walnut405
  560. XPEDITE1K_config: unconfig
  561. @./mkconfig $(@:_config=) ppc ppc4xx xpedite1k
  562. #########################################################################
  563. ## MPC824x Systems
  564. #########################################################################
  565. xtract_82xx = $(subst _BIGFLASH,,$(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))))
  566. A3000_config: unconfig
  567. @./mkconfig $(@:_config=) ppc mpc824x a3000
  568. BMW_config: unconfig
  569. @./mkconfig $(@:_config=) ppc mpc824x bmw
  570. CPC45_config \
  571. CPC45_ROMBOOT_config: unconfig
  572. @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
  573. @cd ./include ; \
  574. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  575. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  576. echo "... booting from 8-bit flash" ; \
  577. else \
  578. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  579. echo "... booting from 64-bit flash" ; \
  580. fi; \
  581. echo "export CONFIG_BOOT_ROM" >> config.mk;
  582. CU824_config: unconfig
  583. @./mkconfig $(@:_config=) ppc mpc824x cu824
  584. eXalion_config: unconfig
  585. @./mkconfig $(@:_config=) ppc mpc824x eXalion
  586. MOUSSE_config: unconfig
  587. @./mkconfig $(@:_config=) ppc mpc824x mousse
  588. MUSENKI_config: unconfig
  589. @./mkconfig $(@:_config=) ppc mpc824x musenki
  590. MVBLUE_config: unconfig
  591. @./mkconfig $(@:_config=) ppc mpc824x mvblue
  592. OXC_config: unconfig
  593. @./mkconfig $(@:_config=) ppc mpc824x oxc
  594. PN62_config: unconfig
  595. @./mkconfig $(@:_config=) ppc mpc824x pn62
  596. Sandpoint8240_config: unconfig
  597. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  598. Sandpoint8245_config: unconfig
  599. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  600. SL8245_config: unconfig
  601. @./mkconfig $(@:_config=) ppc mpc824x sl8245
  602. utx8245_config: unconfig
  603. @./mkconfig $(@:_config=) ppc mpc824x utx8245
  604. #########################################################################
  605. ## MPC8260 Systems
  606. #########################################################################
  607. atc_config: unconfig
  608. @./mkconfig $(@:_config=) ppc mpc8260 atc
  609. cogent_mpc8260_config: unconfig
  610. @./mkconfig $(@:_config=) ppc mpc8260 cogent
  611. CPU86_config \
  612. CPU86_ROMBOOT_config: unconfig
  613. @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
  614. @cd ./include ; \
  615. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  616. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  617. echo "... booting from 8-bit flash" ; \
  618. else \
  619. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  620. echo "... booting from 64-bit flash" ; \
  621. fi; \
  622. echo "export CONFIG_BOOT_ROM" >> config.mk;
  623. ep8260_config: unconfig
  624. @./mkconfig $(@:_config=) ppc mpc8260 ep8260
  625. gw8260_config: unconfig
  626. @./mkconfig $(@:_config=) ppc mpc8260 gw8260
  627. hymod_config: unconfig
  628. @./mkconfig $(@:_config=) ppc mpc8260 hymod
  629. IPHASE4539_config: unconfig
  630. @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
  631. MPC8260ADS_config \
  632. MPC8260ADS_33MHz_config \
  633. MPC8260ADS_40MHz_config \
  634. MPC8272ADS_config \
  635. PQ2FADS_config \
  636. PQ2FADS-VR_config \
  637. PQ2FADS-ZU_config \
  638. PQ2FADS-ZU_66MHz_config \
  639. : unconfig
  640. $(if $(findstring PQ2FADS,$@), \
  641. @echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > include/config.h, \
  642. @echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > include/config.h)
  643. $(if $(findstring MHz,$@), \
  644. @echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> include/config.h, \
  645. $(if $(findstring VR,$@), \
  646. @echo "#define CONFIG_8260_CLKIN 66000000" >> include/config.h))
  647. @./mkconfig -a MPC8260ADS ppc mpc8260 mpc8260ads
  648. MPC8266ADS_config: unconfig
  649. @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
  650. # PM825/PM826 default configuration: small (= 8 MB) Flash / boot from 64-bit flash
  651. PM825_config \
  652. PM825_ROMBOOT_config \
  653. PM825_BIGFLASH_config \
  654. PM825_ROMBOOT_BIGFLASH_config \
  655. PM826_config \
  656. PM826_ROMBOOT_config \
  657. PM826_BIGFLASH_config \
  658. PM826_ROMBOOT_BIGFLASH_config: unconfig
  659. @if [ "$(findstring PM825_,$@)" ] ; then \
  660. echo "#define CONFIG_PCI" >include/config.h ; \
  661. else \
  662. >include/config.h ; \
  663. fi
  664. @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  665. echo "... booting from 8-bit flash" ; \
  666. echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
  667. echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
  668. if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
  669. echo "... with 32 MB Flash" ; \
  670. echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
  671. fi; \
  672. else \
  673. echo "... booting from 64-bit flash" ; \
  674. if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
  675. echo "... with 32 MB Flash" ; \
  676. echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
  677. echo "TEXT_BASE = 0x40000000" >board/pm826/config.tmp ; \
  678. else \
  679. echo "TEXT_BASE = 0xFF000000" >board/pm826/config.tmp ; \
  680. fi; \
  681. fi
  682. @./mkconfig -a PM826 ppc mpc8260 pm826
  683. PM828_config \
  684. PM828_PCI_config \
  685. PM828_ROMBOOT_config \
  686. PM828_ROMBOOT_PCI_config: unconfig
  687. @if [ -z "$(findstring _PCI_,$@)" ] ; then \
  688. echo "#define CONFIG_PCI" >>include/config.h ; \
  689. echo "... with PCI enabled" ; \
  690. else \
  691. >include/config.h ; \
  692. fi
  693. @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  694. echo "... booting from 8-bit flash" ; \
  695. echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
  696. echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
  697. fi
  698. @./mkconfig -a PM828 ppc mpc8260 pm828
  699. ppmc8260_config: unconfig
  700. @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
  701. RPXsuper_config: unconfig
  702. @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
  703. rsdproto_config: unconfig
  704. @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
  705. sacsng_config: unconfig
  706. @./mkconfig $(@:_config=) ppc mpc8260 sacsng
  707. sbc8260_config: unconfig
  708. @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
  709. SCM_config: unconfig
  710. @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
  711. TQM8255_AA_config \
  712. TQM8260_AA_config \
  713. TQM8260_AB_config \
  714. TQM8260_AC_config \
  715. TQM8260_AD_config \
  716. TQM8260_AE_config \
  717. TQM8260_AF_config \
  718. TQM8260_AG_config \
  719. TQM8260_AH_config \
  720. TQM8265_AA_config: unconfig
  721. @case "$@" in \
  722. TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no; BMODE=8260;; \
  723. TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no; BMODE=8260;; \
  724. TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
  725. TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
  726. TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
  727. TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no; BMODE=8260;; \
  728. TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
  729. TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=8260;; \
  730. TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;; \
  731. TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no; BMODE=60x;; \
  732. esac; \
  733. >include/config.h ; \
  734. if [ "$${CTYPE}" != "MPC8260" ] ; then \
  735. echo "#define CONFIG_$${CTYPE}" >>include/config.h ; \
  736. fi; \
  737. echo "#define CONFIG_$${CFREQ}MHz" >>include/config.h ; \
  738. echo "... with $${CFREQ}MHz system clock" ; \
  739. if [ "$${CACHE}" == "yes" ] ; then \
  740. echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
  741. echo "... with L2 Cache support" ; \
  742. else \
  743. echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
  744. echo "... without L2 Cache support" ; \
  745. fi; \
  746. if [ "$${BMODE}" == "60x" ] ; then \
  747. echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
  748. echo "... with 60x Bus Mode" ; \
  749. else \
  750. echo "#undef CONFIG_BUSMODE_60x" >>include/config.h ; \
  751. echo "... without 60x Bus Mode" ; \
  752. fi
  753. @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
  754. ZPC1900_config: unconfig
  755. @./mkconfig $(@:_config=) ppc mpc8260 zpc1900
  756. #========================================================================
  757. # M68K
  758. #========================================================================
  759. #########################################################################
  760. ## Coldfire
  761. #########################################################################
  762. M5272C3_config : unconfig
  763. @./mkconfig $(@:_config=) m68k mcf52x2 m5272c3
  764. M5282EVB_config : unconfig
  765. @./mkconfig $(@:_config=) m68k mcf52x2 m5282evb
  766. #########################################################################
  767. ## MPC85xx Systems
  768. #########################################################################
  769. MPC8540ADS_config: unconfig
  770. @./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
  771. MPC8560ADS_config: unconfig
  772. @./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
  773. #########################################################################
  774. ## 74xx/7xx Systems
  775. #########################################################################
  776. AmigaOneG3SE_config: unconfig
  777. @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
  778. BAB7xx_config: unconfig
  779. @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
  780. DB64360_config: unconfig
  781. @./mkconfig DB64360 ppc 74xx_7xx db64360 Marvell
  782. DB64460_config: unconfig
  783. @./mkconfig DB64460 ppc 74xx_7xx db64460 Marvell
  784. debris_config: unconfig
  785. @./mkconfig $(@:_config=) ppc mpc824x debris etin
  786. ELPPC_config: unconfig
  787. @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
  788. EVB64260_config \
  789. EVB64260_750CX_config: unconfig
  790. @./mkconfig EVB64260 ppc 74xx_7xx evb64260
  791. P3G4_config: unconfig
  792. @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
  793. PCIPPC2_config \
  794. PCIPPC6_config: unconfig
  795. @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
  796. ZUMA_config: unconfig
  797. @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
  798. #========================================================================
  799. # ARM
  800. #========================================================================
  801. #########################################################################
  802. ## StrongARM Systems
  803. #########################################################################
  804. assabet_config : unconfig
  805. @./mkconfig $(@:_config=) arm sa1100 assabet
  806. dnp1110_config : unconfig
  807. @./mkconfig $(@:_config=) arm sa1100 dnp1110
  808. gcplus_config : unconfig
  809. @./mkconfig $(@:_config=) arm sa1100 gcplus
  810. lart_config : unconfig
  811. @./mkconfig $(@:_config=) arm sa1100 lart
  812. shannon_config : unconfig
  813. @./mkconfig $(@:_config=) arm sa1100 shannon
  814. #########################################################################
  815. ## ARM92xT Systems
  816. #########################################################################
  817. xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
  818. xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
  819. SX1_config : unconfig
  820. @./mkconfig $(@:_config=) arm arm925t sx1
  821. integratorcp_config : unconfig
  822. @./mkconfig $(@:_config=) arm arm926ejs integratorcp
  823. integratorap_config : unconfig
  824. @./mkconfig $(@:_config=) arm arm926ejs integratorap
  825. versatile_config : unconfig
  826. @./mkconfig $(@:_config=) arm arm926ejs versatile
  827. omap1510inn_config : unconfig
  828. @./mkconfig $(@:_config=) arm arm925t omap1510inn
  829. omap1610inn_config \
  830. omap1610inn_cs0boot_config \
  831. omap1610inn_cs3boot_config \
  832. omap1610h2_config \
  833. omap1610h2_cs0boot_config \
  834. omap1610h2_cs3boot_config : unconfig
  835. @if [ "$(findstring _cs0boot_, $@)" ] ; then \
  836. echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
  837. echo "... configured for CS0 boot"; \
  838. else \
  839. echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
  840. echo "... configured for CS3 boot"; \
  841. fi;
  842. @./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
  843. smdk2400_config : unconfig
  844. @./mkconfig $(@:_config=) arm arm920t smdk2400
  845. smdk2410_config : unconfig
  846. @./mkconfig $(@:_config=) arm arm920t smdk2410
  847. # TRAB default configuration: 8 MB Flash, 32 MB RAM
  848. trab_config \
  849. trab_bigram_config \
  850. trab_bigflash_config \
  851. trab_old_config: unconfig
  852. @ >include/config.h
  853. @[ -z "$(findstring _bigram,$@)" ] || \
  854. { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
  855. echo "#define CONFIG_RAM_32MB" >>include/config.h ; \
  856. echo "... with 8 MB Flash, 32 MB RAM" ; \
  857. }
  858. @[ -z "$(findstring _bigflash,$@)" ] || \
  859. { echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \
  860. echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
  861. echo "... with 16 MB Flash, 16 MB RAM" ; \
  862. echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
  863. }
  864. @[ -z "$(findstring _old,$@)" ] || \
  865. { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
  866. echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
  867. echo "... with 8 MB Flash, 16 MB RAM" ; \
  868. echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
  869. }
  870. @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
  871. VCMA9_config : unconfig
  872. @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
  873. #########################################################################
  874. ## S3C44B0 Systems
  875. #########################################################################
  876. B2_config : unconfig
  877. @./mkconfig $(@:_config=) arm s3c44b0 B2 dave
  878. #########################################################################
  879. ## ARM720T Systems
  880. #########################################################################
  881. impa7_config : unconfig
  882. @./mkconfig $(@:_config=) arm arm720t impa7
  883. ep7312_config : unconfig
  884. @./mkconfig $(@:_config=) arm arm720t ep7312
  885. modnet50_config : unconfig
  886. @./mkconfig $(@:_config=) arm arm720t modnet50
  887. #########################################################################
  888. ## AT91RM9200 Systems
  889. #########################################################################
  890. at91rm9200dk_config : unconfig
  891. @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
  892. #########################################################################
  893. ## XScale Systems
  894. #########################################################################
  895. cradle_config : unconfig
  896. @./mkconfig $(@:_config=) arm pxa cradle
  897. csb226_config : unconfig
  898. @./mkconfig $(@:_config=) arm pxa csb226
  899. innokom_config : unconfig
  900. @./mkconfig $(@:_config=) arm pxa innokom
  901. ixdp425_config : unconfig
  902. @./mkconfig $(@:_config=) arm ixp ixdp425
  903. lubbock_config : unconfig
  904. @./mkconfig $(@:_config=) arm pxa lubbock
  905. logodl_config : unconfig
  906. @./mkconfig $(@:_config=) arm pxa logodl
  907. wepep250_config : unconfig
  908. @./mkconfig $(@:_config=) arm pxa wepep250
  909. xm250_config : unconfig
  910. @./mkconfig $(@:_config=) arm pxa xm250
  911. #========================================================================
  912. # i386
  913. #========================================================================
  914. #########################################################################
  915. ## AMD SC520 CDP
  916. #########################################################################
  917. sc520_cdp_config : unconfig
  918. @./mkconfig $(@:_config=) i386 i386 sc520_cdp
  919. sc520_spunk_config : unconfig
  920. @./mkconfig $(@:_config=) i386 i386 sc520_spunk
  921. sc520_spunk_rel_config : unconfig
  922. @./mkconfig $(@:_config=) i386 i386 sc520_spunk
  923. #========================================================================
  924. # MIPS
  925. #========================================================================
  926. #########################################################################
  927. ## MIPS32 4Kc
  928. #########################################################################
  929. xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
  930. incaip_100MHz_config \
  931. incaip_133MHz_config \
  932. incaip_150MHz_config \
  933. incaip_config: unconfig
  934. @ >include/config.h
  935. @[ -z "$(findstring _100MHz,$@)" ] || \
  936. { echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
  937. echo "... with 100MHz system clock" ; \
  938. }
  939. @[ -z "$(findstring _133MHz,$@)" ] || \
  940. { echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
  941. echo "... with 133MHz system clock" ; \
  942. }
  943. @[ -z "$(findstring _150MHz,$@)" ] || \
  944. { echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
  945. echo "... with 150MHz system clock" ; \
  946. }
  947. @./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
  948. tb0229_config: unconfig
  949. @./mkconfig $(@:_config=) mips mips tb0229
  950. #########################################################################
  951. ## MIPS64 5Kc
  952. #########################################################################
  953. purple_config : unconfig
  954. @./mkconfig $(@:_config=) mips mips purple
  955. #========================================================================
  956. # Nios
  957. #========================================================================
  958. #########################################################################
  959. ## Nios32
  960. #########################################################################
  961. DK1C20_safe_32_config \
  962. DK1C20_standard_32_config \
  963. DK1C20_config: unconfig
  964. @ >include/config.h
  965. @[ -z "$(findstring _safe_32,$@)" ] || \
  966. { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
  967. echo "... NIOS 'safe_32' configuration" ; \
  968. }
  969. @[ -z "$(findstring _standard_32,$@)" ] || \
  970. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  971. echo "... NIOS 'standard_32' configuration" ; \
  972. }
  973. @[ -z "$(findstring DK1C20_config,$@)" ] || \
  974. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  975. echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
  976. }
  977. @./mkconfig -a DK1C20 nios nios dk1c20 altera
  978. DK1S10_safe_32_config \
  979. DK1S10_standard_32_config \
  980. DK1S10_mtx_ldk_20_config \
  981. DK1S10_config: unconfig
  982. @ >include/config.h
  983. @[ -z "$(findstring _safe_32,$@)" ] || \
  984. { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
  985. echo "... NIOS 'safe_32' configuration" ; \
  986. }
  987. @[ -z "$(findstring _standard_32,$@)" ] || \
  988. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  989. echo "... NIOS 'standard_32' configuration" ; \
  990. }
  991. @[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
  992. { echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \
  993. echo "... NIOS 'mtx_ldk_20' configuration" ; \
  994. }
  995. @[ -z "$(findstring DK1S10_config,$@)" ] || \
  996. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  997. echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
  998. }
  999. @./mkconfig -a DK1S10 nios nios dk1s10 altera
  1000. ADNPESC1_DNPEVA2_base_32_config \
  1001. ADNPESC1_base_32_config \
  1002. ADNPESC1_config: unconfig
  1003. @ >include/config.h
  1004. @[ -z "$(findstring _DNPEVA2,$@)" ] || \
  1005. { echo "#define CONFIG_DNPEVA2 1" >>include/config.h ; \
  1006. echo "... DNP/EVA2 configuration" ; \
  1007. }
  1008. @[ -z "$(findstring _base_32,$@)" ] || \
  1009. { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
  1010. echo "... NIOS 'base_32' configuration" ; \
  1011. }
  1012. @[ -z "$(findstring ADNPESC1_config,$@)" ] || \
  1013. { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
  1014. echo "... NIOS 'base_32' configuration (DEFAULT)" ; \
  1015. }
  1016. @./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv
  1017. #########################################################################
  1018. ## MIPS32 AU1X00
  1019. #########################################################################
  1020. dbau1000_config : unconfig
  1021. @ >include/config.h
  1022. @echo "#define CONFIG_DBAU1000 1" >>include/config.h
  1023. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1024. dbau1100_config : unconfig
  1025. @ >include/config.h
  1026. @echo "#define CONFIG_DBAU1100 1" >>include/config.h
  1027. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1028. dbau1500_config : unconfig
  1029. @ >include/config.h
  1030. @echo "#define CONFIG_DBAU1500 1" >>include/config.h
  1031. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1032. #########################################################################
  1033. #########################################################################
  1034. clean:
  1035. find . -type f \
  1036. \( -name 'core' -o -name '*.bak' -o -name '*~' \
  1037. -o -name '*.o' -o -name '*.a' \) -print \
  1038. | xargs rm -f
  1039. rm -f examples/hello_world examples/timer \
  1040. examples/eepro100_eeprom examples/sched \
  1041. examples/mem_to_mem_idma2intr examples/82559_eeprom
  1042. rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
  1043. rm -f tools/mpc86x_clk
  1044. rm -f tools/easylogo/easylogo tools/bmp_logo
  1045. rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
  1046. rm -f tools/env/fw_printenv tools/env/fw_setenv
  1047. rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
  1048. rm -f board/trab/trab_fkt
  1049. clobber: clean
  1050. find . -type f \
  1051. \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
  1052. -print \
  1053. | xargs rm -f
  1054. rm -f $(OBJS) *.bak tags TAGS
  1055. rm -fr *.*~
  1056. rm -f u-boot u-boot.map $(ALL)
  1057. rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
  1058. rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
  1059. rm -f include/asm/proc include/asm/arch include/asm
  1060. mrproper \
  1061. distclean: clobber unconfig
  1062. backup:
  1063. F=`basename $(TOPDIR)` ; cd .. ; \
  1064. gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
  1065. #########################################################################