Makefile 41 KB

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