Makefile 42 KB

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