Makefile 45 KB

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