Makefile 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957
  1. #
  2. # (C) Copyright 2000-2005
  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 '[:upper:]' '[:lower:]' | \
  31. sed -e 's/\(cygwin\).*/cygwin/')
  32. export HOSTARCH HOSTOS
  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 SOC
  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 = powerpc-linux-
  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),nios2)
  68. CROSS_COMPILE = nios2-elf-
  69. endif
  70. ifeq ($(ARCH),m68k)
  71. CROSS_COMPILE = m68k-elf-
  72. endif
  73. ifeq ($(ARCH),microblaze)
  74. CROSS_COMPILE = mb-
  75. endif
  76. endif
  77. endif
  78. export CROSS_COMPILE
  79. #########################################################################
  80. # U-Boot objects....order is important (i.e. start must be first)
  81. OBJS = cpu/$(CPU)/start.o
  82. ifeq ($(CPU),i386)
  83. OBJS += cpu/$(CPU)/start16.o
  84. OBJS += cpu/$(CPU)/reset.o
  85. endif
  86. ifeq ($(CPU),ppc4xx)
  87. OBJS += cpu/$(CPU)/resetvec.o
  88. endif
  89. ifeq ($(CPU),mpc83xx)
  90. OBJS += cpu/$(CPU)/resetvec.o
  91. endif
  92. ifeq ($(CPU),mpc85xx)
  93. OBJS += cpu/$(CPU)/resetvec.o
  94. endif
  95. LIBS = lib_generic/libgeneric.a
  96. LIBS += board/$(BOARDDIR)/lib$(BOARD).a
  97. LIBS += cpu/$(CPU)/lib$(CPU).a
  98. ifdef SOC
  99. LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
  100. endif
  101. LIBS += lib_$(ARCH)/lib$(ARCH).a
  102. LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
  103. fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
  104. LIBS += net/libnet.a
  105. LIBS += disk/libdisk.a
  106. LIBS += rtc/librtc.a
  107. LIBS += dtt/libdtt.a
  108. LIBS += drivers/libdrivers.a
  109. LIBS += drivers/sk98lin/libsk98lin.a
  110. LIBS += post/libpost.a post/cpu/libcpu.a
  111. LIBS += common/libcommon.a
  112. .PHONY : $(LIBS)
  113. # Add GCC lib
  114. PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
  115. # The "tools" are needed early, so put this first
  116. # Don't include stuff already done in $(LIBS)
  117. SUBDIRS = tools \
  118. examples \
  119. post \
  120. post/cpu
  121. .PHONY : $(SUBDIRS)
  122. #########################################################################
  123. #########################################################################
  124. ALL = u-boot.srec u-boot.bin System.map
  125. all: $(ALL)
  126. u-boot.hex: u-boot
  127. $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
  128. u-boot.srec: u-boot
  129. $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
  130. u-boot.bin: u-boot
  131. $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
  132. u-boot.img: u-boot.bin
  133. ./tools/mkimage -A $(ARCH) -T firmware -C none \
  134. -a $(TEXT_BASE) -e 0 \
  135. -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \
  136. sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
  137. -d $< $@
  138. u-boot.dis: u-boot
  139. $(OBJDUMP) -d $< > $@
  140. u-boot: depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
  141. UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
  142. $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
  143. --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \
  144. -Map u-boot.map -o u-boot
  145. $(LIBS):
  146. $(MAKE) -C `dirname $@`
  147. $(SUBDIRS):
  148. $(MAKE) -C $@ all
  149. gdbtools:
  150. $(MAKE) -C tools/gdb || exit 1
  151. depend dep:
  152. @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
  153. tags:
  154. ctags -w `find $(SUBDIRS) include \
  155. lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
  156. fs/cramfs fs/fat fs/fdos fs/jffs2 \
  157. net disk rtc dtt drivers drivers/sk98lin common \
  158. \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  159. etags:
  160. etags -a `find $(SUBDIRS) include \
  161. lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
  162. fs/cramfs fs/fat fs/fdos fs/jffs2 \
  163. net disk rtc dtt drivers drivers/sk98lin common \
  164. \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  165. System.map: u-boot
  166. @$(NM) $< | \
  167. grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
  168. sort > System.map
  169. #########################################################################
  170. else
  171. all install u-boot u-boot.srec depend dep:
  172. @echo "System not configured - see README" >&2
  173. @ exit 1
  174. endif
  175. #########################################################################
  176. unconfig:
  177. @rm -f include/config.h include/config.mk board/*/config.tmp
  178. #========================================================================
  179. # PowerPC
  180. #========================================================================
  181. #########################################################################
  182. ## MPC5xx Systems
  183. #########################################################################
  184. canmb_config: unconfig
  185. @./mkconfig -a canmb ppc mpc5xxx canmb
  186. cmi_mpc5xx_config: unconfig
  187. @./mkconfig $(@:_config=) ppc mpc5xx cmi
  188. PATI_config: unconfig
  189. @./mkconfig $(@:_config=) ppc mpc5xx pati mpl
  190. #########################################################################
  191. ## MPC5xxx Systems
  192. #########################################################################
  193. aev_config: unconfig
  194. @./mkconfig -a aev ppc mpc5xxx tqm5200
  195. cpci5200_config: unconfig
  196. @./mkconfig -a cpci5200 ppc mpc5xxx cpci5200 esd
  197. hmi1001_config: unconfig
  198. @./mkconfig hmi1001 ppc mpc5xxx hmi1001
  199. Lite5200_config \
  200. Lite5200_LOWBOOT_config \
  201. Lite5200_LOWBOOT08_config \
  202. icecube_5200_config \
  203. icecube_5200_LOWBOOT_config \
  204. icecube_5200_LOWBOOT08_config \
  205. icecube_5200_DDR_config \
  206. icecube_5200_DDR_LOWBOOT_config \
  207. icecube_5200_DDR_LOWBOOT08_config \
  208. icecube_5100_config: unconfig
  209. @ >include/config.h
  210. @[ -z "$(findstring LOWBOOT_,$@)" ] || \
  211. { if [ "$(findstring DDR,$@)" ] ; \
  212. then echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
  213. else echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \
  214. fi ; \
  215. echo "... with LOWBOOT configuration" ; \
  216. }
  217. @[ -z "$(findstring LOWBOOT08,$@)" ] || \
  218. { echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
  219. echo "... with 8 MB flash only" ; \
  220. echo "... with LOWBOOT configuration" ; \
  221. }
  222. @[ -z "$(findstring DDR,$@)" ] || \
  223. { echo "#define CONFIG_MPC5200_DDR" >>include/config.h ; \
  224. echo "... DDR memory revision" ; \
  225. }
  226. @[ -z "$(findstring 5200,$@)" ] || \
  227. { echo "#define CONFIG_MPC5200" >>include/config.h ; \
  228. echo "... with MPC5200 processor" ; \
  229. }
  230. @[ -z "$(findstring 5100,$@)" ] || \
  231. { echo "#define CONFIG_MGT5100" >>include/config.h ; \
  232. echo "... with MGT5100 processor" ; \
  233. }
  234. @./mkconfig -a IceCube ppc mpc5xxx icecube
  235. inka4x0_config: unconfig
  236. @./mkconfig inka4x0 ppc mpc5xxx inka4x0
  237. o2dnt_config:
  238. @./mkconfig -a o2dnt ppc mpc5xxx o2dnt
  239. pf5200_config: unconfig
  240. @./mkconfig -a pf5200 ppc mpc5xxx pf5200 esd
  241. PM520_config \
  242. PM520_DDR_config \
  243. PM520_ROMBOOT_config \
  244. PM520_ROMBOOT_DDR_config: unconfig
  245. @ >include/config.h
  246. @[ -z "$(findstring DDR,$@)" ] || \
  247. { echo "#define CONFIG_MPC5200_DDR" >>include/config.h ; \
  248. echo "... DDR memory revision" ; \
  249. }
  250. @[ -z "$(findstring ROMBOOT,$@)" ] || \
  251. { echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
  252. echo "... booting from 8-bit flash" ; \
  253. }
  254. @./mkconfig -a PM520 ppc mpc5xxx pm520
  255. MINI5200_config \
  256. EVAL5200_config \
  257. TOP5200_config: unconfig
  258. @ echo "#define CONFIG_$(@:_config=) 1" >include/config.h
  259. @./mkconfig -a TOP5200 ppc mpc5xxx top5200 emk
  260. Total5100_config \
  261. Total5200_config \
  262. Total5200_lowboot_config \
  263. Total5200_Rev2_config \
  264. Total5200_Rev2_lowboot_config: unconfig
  265. @ >include/config.h
  266. @[ -z "$(findstring 5100,$@)" ] || \
  267. { echo "#define CONFIG_MGT5100" >>include/config.h ; \
  268. echo "... with MGT5100 processor" ; \
  269. }
  270. @[ -z "$(findstring 5200,$@)" ] || \
  271. { echo "#define CONFIG_MPC5200" >>include/config.h ; \
  272. echo "... with MPC5200 processor" ; \
  273. }
  274. @[ -n "$(findstring Rev,$@)" ] || \
  275. { echo "#define CONFIG_TOTAL5200_REV 1" >>include/config.h ; \
  276. echo "... revision 1 board" ; \
  277. }
  278. @[ -z "$(findstring Rev2_,$@)" ] || \
  279. { echo "#define CONFIG_TOTAL5200_REV 2" >>include/config.h ; \
  280. echo "... revision 2 board" ; \
  281. }
  282. @[ -z "$(findstring lowboot_,$@)" ] || \
  283. { echo "TEXT_BASE = 0xFE000000" >board/total5200/config.tmp ; \
  284. echo "... with lowboot configuration" ; \
  285. }
  286. @./mkconfig -a Total5200 ppc mpc5xxx total5200
  287. TQM5200_auto_config \
  288. TQM5200_AA_config \
  289. TQM5200_AB_config \
  290. TQM5200_AC_config \
  291. MiniFAP_config: unconfig
  292. @ >include/config.h
  293. @[ -z "$(findstring MiniFAP,$@)" ] || \
  294. { echo "#define CONFIG_MINIFAP" >>include/config.h ; \
  295. echo "#define CONFIG_TQM5200_AC" >>include/config.h ; \
  296. echo "... TQM5200_AC on MiniFAP" ; \
  297. }
  298. @[ -z "$(findstring AA,$@)" ] || \
  299. { echo "#define CONFIG_TQM5200_AA" >>include/config.h ; \
  300. echo "... with 4 MB Flash, 16 MB SDRAM, 32 kB EEPROM" ; \
  301. }
  302. @[ -z "$(findstring AB,$@)" ] || \
  303. { echo "#define CONFIG_TQM5200_AB" >>include/config.h ; \
  304. echo "... with 64 MB Flash, 64 MB SDRAM, 32 kB EEPROM, 512 kB SRAM" ; \
  305. echo "... with Graphics Controller"; \
  306. }
  307. @[ -z "$(findstring AC,$@)" ] || \
  308. { echo "#define CONFIG_TQM5200_AC" >>include/config.h ; \
  309. echo "... with 4 MB Flash, 128 MB SDRAM" ; \
  310. echo "... with Graphics Controller"; \
  311. }
  312. @[ -z "$(findstring auto,$@)" ] || \
  313. { echo "#define CONFIG_CS_AUTOCONF" >>include/config.h ; \
  314. echo "... with automatic CS configuration" ; \
  315. }
  316. @./mkconfig -a TQM5200 ppc mpc5xxx tqm5200
  317. spieval_config: unconfig
  318. echo "#define CONFIG_CS_AUTOCONF">>include/config.h
  319. echo "... with automatic CS configuration"
  320. @./mkconfig -a spieval ppc mpc5xxx tqm5200
  321. #########################################################################
  322. ## MPC8xx Systems
  323. #########################################################################
  324. Adder_config \
  325. Adder87x_config \
  326. AdderII_config \
  327. : unconfig
  328. $(if $(findstring AdderII,$@), \
  329. @echo "#define CONFIG_MPC852T" > include/config.h)
  330. @./mkconfig -a Adder ppc mpc8xx adder
  331. ADS860_config \
  332. FADS823_config \
  333. FADS850SAR_config \
  334. MPC86xADS_config \
  335. MPC885ADS_config \
  336. FADS860T_config: unconfig
  337. @./mkconfig $(@:_config=) ppc mpc8xx fads
  338. AMX860_config : unconfig
  339. @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
  340. c2mon_config: unconfig
  341. @./mkconfig $(@:_config=) ppc mpc8xx c2mon
  342. CCM_config: unconfig
  343. @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
  344. cogent_mpc8xx_config: unconfig
  345. @./mkconfig $(@:_config=) ppc mpc8xx cogent
  346. ELPT860_config: unconfig
  347. @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
  348. ESTEEM192E_config: unconfig
  349. @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
  350. ETX094_config : unconfig
  351. @./mkconfig $(@:_config=) ppc mpc8xx etx094
  352. FLAGADM_config: unconfig
  353. @./mkconfig $(@:_config=) ppc mpc8xx flagadm
  354. xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
  355. GEN860T_SC_config \
  356. GEN860T_config: unconfig
  357. @ >include/config.h
  358. @[ -z "$(findstring _SC,$@)" ] || \
  359. { echo "#define CONFIG_SC" >>include/config.h ; \
  360. echo "With reduced H/W feature set (SC)..." ; \
  361. }
  362. @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
  363. GENIETV_config: unconfig
  364. @./mkconfig $(@:_config=) ppc mpc8xx genietv
  365. GTH_config: unconfig
  366. @./mkconfig $(@:_config=) ppc mpc8xx gth
  367. hermes_config : unconfig
  368. @./mkconfig $(@:_config=) ppc mpc8xx hermes
  369. HMI10_config : unconfig
  370. @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
  371. IAD210_config: unconfig
  372. @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
  373. xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
  374. ICU862_100MHz_config \
  375. ICU862_config: unconfig
  376. @ >include/config.h
  377. @[ -z "$(findstring _100MHz,$@)" ] || \
  378. { echo "#define CONFIG_100MHz" >>include/config.h ; \
  379. echo "... with 100MHz system clock" ; \
  380. }
  381. @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
  382. IP860_config : unconfig
  383. @./mkconfig $(@:_config=) ppc mpc8xx ip860
  384. IVML24_256_config \
  385. IVML24_128_config \
  386. IVML24_config: unconfig
  387. @ >include/config.h
  388. @[ -z "$(findstring IVML24_config,$@)" ] || \
  389. { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
  390. }
  391. @[ -z "$(findstring IVML24_128_config,$@)" ] || \
  392. { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
  393. }
  394. @[ -z "$(findstring IVML24_256_config,$@)" ] || \
  395. { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
  396. }
  397. @./mkconfig -a IVML24 ppc mpc8xx ivm
  398. IVMS8_256_config \
  399. IVMS8_128_config \
  400. IVMS8_config: unconfig
  401. @ >include/config.h
  402. @[ -z "$(findstring IVMS8_config,$@)" ] || \
  403. { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
  404. }
  405. @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
  406. { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
  407. }
  408. @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
  409. { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
  410. }
  411. @./mkconfig -a IVMS8 ppc mpc8xx ivm
  412. KUP4K_config : unconfig
  413. @./mkconfig $(@:_config=) ppc mpc8xx kup4k kup
  414. KUP4X_config : unconfig
  415. @./mkconfig $(@:_config=) ppc mpc8xx kup4x kup
  416. LANTEC_config : unconfig
  417. @./mkconfig $(@:_config=) ppc mpc8xx lantec
  418. lwmon_config: unconfig
  419. @./mkconfig $(@:_config=) ppc mpc8xx lwmon
  420. MBX_config \
  421. MBX860T_config: unconfig
  422. @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
  423. MHPC_config: unconfig
  424. @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
  425. MVS1_config : unconfig
  426. @./mkconfig $(@:_config=) ppc mpc8xx mvs1
  427. xtract_NETVIA = $(subst _V2,,$(subst _config,,$1))
  428. NETVIA_V2_config \
  429. NETVIA_config: unconfig
  430. @ >include/config.h
  431. @[ -z "$(findstring NETVIA_config,$@)" ] || \
  432. { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \
  433. echo "... Version 1" ; \
  434. }
  435. @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \
  436. { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \
  437. echo "... Version 2" ; \
  438. }
  439. @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia
  440. xtract_NETPHONE = $(subst _V2,,$(subst _config,,$1))
  441. NETPHONE_V2_config \
  442. NETPHONE_config: unconfig
  443. @ >include/config.h
  444. @[ -z "$(findstring NETPHONE_config,$@)" ] || \
  445. { echo "#define CONFIG_NETPHONE_VERSION 1" >>include/config.h ; \
  446. }
  447. @[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \
  448. { echo "#define CONFIG_NETPHONE_VERSION 2" >>include/config.h ; \
  449. }
  450. @./mkconfig -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone
  451. xtract_NETTA = $(subst _SWAPHOOK,,$(subst _6412,,$(subst _ISDN,,$(subst _config,,$1))))
  452. NETTA_ISDN_6412_SWAPHOOK_config \
  453. NETTA_ISDN_SWAPHOOK_config \
  454. NETTA_6412_SWAPHOOK_config \
  455. NETTA_SWAPHOOK_config \
  456. NETTA_ISDN_6412_config \
  457. NETTA_ISDN_config \
  458. NETTA_6412_config \
  459. NETTA_config: unconfig
  460. @ >include/config.h
  461. @[ -z "$(findstring ISDN_,$@)" ] || \
  462. { echo "#define CONFIG_NETTA_ISDN 1" >>include/config.h ; \
  463. }
  464. @[ -n "$(findstring ISDN_,$@)" ] || \
  465. { echo "#undef CONFIG_NETTA_ISDN" >>include/config.h ; \
  466. }
  467. @[ -z "$(findstring 6412_,$@)" ] || \
  468. { echo "#define CONFIG_NETTA_6412 1" >>include/config.h ; \
  469. }
  470. @[ -n "$(findstring 6412_,$@)" ] || \
  471. { echo "#undef CONFIG_NETTA_6412" >>include/config.h ; \
  472. }
  473. @[ -z "$(findstring SWAPHOOK_,$@)" ] || \
  474. { echo "#define CONFIG_NETTA_SWAPHOOK 1" >>include/config.h ; \
  475. }
  476. @[ -n "$(findstring SWAPHOOK_,$@)" ] || \
  477. { echo "#undef CONFIG_NETTA_SWAPHOOK" >>include/config.h ; \
  478. }
  479. @./mkconfig -a $(call xtract_NETTA,$@) ppc mpc8xx netta
  480. xtract_NETTA2 = $(subst _V2,,$(subst _config,,$1))
  481. NETTA2_V2_config \
  482. NETTA2_config: unconfig
  483. @ >include/config.h
  484. @[ -z "$(findstring NETTA2_config,$@)" ] || \
  485. { echo "#define CONFIG_NETTA2_VERSION 1" >>include/config.h ; \
  486. }
  487. @[ -z "$(findstring NETTA2_V2_config,$@)" ] || \
  488. { echo "#define CONFIG_NETTA2_VERSION 2" >>include/config.h ; \
  489. }
  490. @./mkconfig -a $(call xtract_NETTA2,$@) ppc mpc8xx netta2
  491. NC650_config: unconfig
  492. @./mkconfig $(@:_config=) ppc mpc8xx nc650
  493. NX823_config: unconfig
  494. @./mkconfig $(@:_config=) ppc mpc8xx nx823
  495. pcu_e_config: unconfig
  496. @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
  497. QS850_config: unconfig
  498. @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
  499. QS823_config: unconfig
  500. @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc
  501. QS860T_config: unconfig
  502. @./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc
  503. quantum_config: unconfig
  504. @./mkconfig $(@:_config=) ppc mpc8xx quantum
  505. R360MPI_config: unconfig
  506. @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
  507. RBC823_config: unconfig
  508. @./mkconfig $(@:_config=) ppc mpc8xx rbc823
  509. RPXClassic_config: unconfig
  510. @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
  511. RPXlite_config: unconfig
  512. @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
  513. RPXlite_DW_64_config \
  514. RPXlite_DW_LCD_config \
  515. RPXlite_DW_64_LCD_config \
  516. RPXlite_DW_NVRAM_config \
  517. RPXlite_DW_NVRAM_64_config \
  518. RPXlite_DW_NVRAM_LCD_config \
  519. RPXlite_DW_NVRAM_64_LCD_config \
  520. RPXlite_DW_config: unconfig
  521. @ >include/config.h
  522. @[ -z "$(findstring _64,$@)" ] || \
  523. { echo "#define RPXlite_64MHz" >>include/config.h ; \
  524. echo "... with 64MHz system clock ..."; \
  525. }
  526. @[ -z "$(findstring _LCD,$@)" ] || \
  527. { echo "#define CONFIG_LCD" >>include/config.h ; \
  528. echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \
  529. echo "... with LCD display ..."; \
  530. }
  531. @[ -z "$(findstring _NVRAM,$@)" ] || \
  532. { echo "#define CFG_ENV_IS_IN_NVRAM" >>include/config.h ; \
  533. echo "... with ENV in NVRAM ..."; \
  534. }
  535. @./mkconfig -a RPXlite_DW ppc mpc8xx RPXlite_dw
  536. rmu_config: unconfig
  537. @./mkconfig $(@:_config=) ppc mpc8xx rmu
  538. RRvision_config: unconfig
  539. @./mkconfig $(@:_config=) ppc mpc8xx RRvision
  540. RRvision_LCD_config: unconfig
  541. @echo "#define CONFIG_LCD" >include/config.h
  542. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  543. @./mkconfig -a RRvision ppc mpc8xx RRvision
  544. SM850_config : unconfig
  545. @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
  546. SPD823TS_config: unconfig
  547. @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
  548. stxxtc_config: unconfig
  549. @./mkconfig $(@:_config=) ppc mpc8xx stxxtc
  550. svm_sc8xx_config: unconfig
  551. @ >include/config.h
  552. @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
  553. SXNI855T_config: unconfig
  554. @./mkconfig $(@:_config=) ppc mpc8xx sixnet
  555. # EMK MPC8xx based modules
  556. TOP860_config: unconfig
  557. @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
  558. # Play some tricks for configuration selection
  559. # Only 855 and 860 boards may come with FEC
  560. # and only 823 boards may have LCD support
  561. xtract_8xx = $(subst _LCD,,$(subst _config,,$1))
  562. FPS850L_config \
  563. FPS860L_config \
  564. NSCU_config \
  565. TQM823L_config \
  566. TQM823L_LCD_config \
  567. TQM850L_config \
  568. TQM855L_config \
  569. TQM860L_config \
  570. TQM862L_config \
  571. TQM823M_config \
  572. TQM850M_config \
  573. TQM855M_config \
  574. TQM860M_config \
  575. TQM862M_config \
  576. TQM866M_config: unconfig
  577. @ >include/config.h
  578. @[ -z "$(findstring _LCD,$@)" ] || \
  579. { echo "#define CONFIG_LCD" >>include/config.h ; \
  580. echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \
  581. echo "... with LCD display" ; \
  582. }
  583. @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
  584. TTTech_config: unconfig
  585. @echo "#define CONFIG_LCD" >include/config.h
  586. @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
  587. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  588. uc100_config : unconfig
  589. @./mkconfig $(@:_config=) ppc mpc8xx uc100
  590. v37_config: unconfig
  591. @echo "#define CONFIG_LCD" >include/config.h
  592. @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
  593. @./mkconfig $(@:_config=) ppc mpc8xx v37
  594. wtk_config: unconfig
  595. @echo "#define CONFIG_LCD" >include/config.h
  596. @echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h
  597. @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
  598. #########################################################################
  599. ## PPC4xx Systems
  600. #########################################################################
  601. xtract_4xx = $(subst _25,,$(subst _33,,$(subst _BA,,$(subst _ME,,$(subst _HI,,$(subst _config,,$1))))))
  602. ADCIOP_config: unconfig
  603. @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
  604. APC405_config: unconfig
  605. @./mkconfig $(@:_config=) ppc ppc4xx apc405 esd
  606. AR405_config: unconfig
  607. @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
  608. ASH405_config: unconfig
  609. @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd
  610. bamboo_config: unconfig
  611. @./mkconfig $(@:_config=) ppc ppc4xx bamboo amcc
  612. bubinga_config: unconfig
  613. @./mkconfig $(@:_config=) ppc ppc4xx bubinga amcc
  614. CANBT_config: unconfig
  615. @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
  616. CATcenter_config \
  617. CATcenter_25_config \
  618. CATcenter_33_config: unconfig
  619. @ echo "/* CATcenter uses PPChameleon Model ME */" > include/config.h
  620. @ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> include/config.h
  621. @[ -z "$(findstring _25,$@)" ] || \
  622. { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \
  623. echo "SysClk = 25MHz" ; \
  624. }
  625. @[ -z "$(findstring _33,$@)" ] || \
  626. { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \
  627. echo "SysClk = 33MHz" ; \
  628. }
  629. @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
  630. CPCI2DP_config: unconfig
  631. @./mkconfig $(@:_config=) ppc ppc4xx cpci2dp esd
  632. CPCI405_config \
  633. CPCI4052_config \
  634. CPCI405DT_config \
  635. CPCI405AB_config: unconfig
  636. @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
  637. @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
  638. CPCI440_config: unconfig
  639. @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
  640. CPCIISER4_config: unconfig
  641. @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
  642. CRAYL1_config: unconfig
  643. @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
  644. csb272_config: unconfig
  645. @./mkconfig $(@:_config=) ppc ppc4xx csb272
  646. csb472_config: unconfig
  647. @./mkconfig $(@:_config=) ppc ppc4xx csb472
  648. DASA_SIM_config: unconfig
  649. @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
  650. DP405_config: unconfig
  651. @./mkconfig $(@:_config=) ppc ppc4xx dp405 esd
  652. DU405_config: unconfig
  653. @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
  654. ebony_config: unconfig
  655. @./mkconfig $(@:_config=) ppc ppc4xx ebony amcc
  656. ERIC_config: unconfig
  657. @./mkconfig $(@:_config=) ppc ppc4xx eric
  658. EXBITGEN_config: unconfig
  659. @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
  660. G2000_config: unconfig
  661. @./mkconfig $(@:_config=) ppc ppc4xx g2000
  662. HH405_config: unconfig
  663. @./mkconfig $(@:_config=) ppc ppc4xx hh405 esd
  664. HUB405_config: unconfig
  665. @./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
  666. JSE_config: unconfig
  667. @./mkconfig $(@:_config=) ppc ppc4xx jse
  668. KAREF_config: unconfig
  669. @./mkconfig $(@:_config=) ppc ppc4xx karef sandburst
  670. METROBOX_config: unconfig
  671. @./mkconfig $(@:_config=) ppc ppc4xx metrobox sandburst
  672. MIP405_config: unconfig
  673. @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
  674. MIP405T_config: unconfig
  675. @echo "#define CONFIG_MIP405T" >include/config.h
  676. @echo "Enable subset config for MIP405T"
  677. @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl
  678. ML2_config: unconfig
  679. @./mkconfig $(@:_config=) ppc ppc4xx ml2
  680. ml300_config: unconfig
  681. @./mkconfig $(@:_config=) ppc ppc4xx ml300 xilinx
  682. ocotea_config: unconfig
  683. @./mkconfig $(@:_config=) ppc ppc4xx ocotea amcc
  684. OCRTC_config \
  685. ORSG_config: unconfig
  686. @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
  687. PCI405_config: unconfig
  688. @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
  689. PIP405_config: unconfig
  690. @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
  691. PLU405_config: unconfig
  692. @./mkconfig $(@:_config=) ppc ppc4xx plu405 esd
  693. PMC405_config: unconfig
  694. @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
  695. PPChameleonEVB_config \
  696. PPChameleonEVB_BA_25_config \
  697. PPChameleonEVB_ME_25_config \
  698. PPChameleonEVB_HI_25_config \
  699. PPChameleonEVB_BA_33_config \
  700. PPChameleonEVB_ME_33_config \
  701. PPChameleonEVB_HI_33_config: unconfig
  702. @ >include/config.h
  703. @[ -z "$(findstring EVB_BA,$@)" ] || \
  704. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
  705. echo "... BASIC model" ; \
  706. }
  707. @[ -z "$(findstring EVB_ME,$@)" ] || \
  708. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
  709. echo "... MEDIUM model" ; \
  710. }
  711. @[ -z "$(findstring EVB_HI,$@)" ] || \
  712. { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
  713. echo "... HIGH-END model" ; \
  714. }
  715. @[ -z "$(findstring _25,$@)" ] || \
  716. { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \
  717. echo "SysClk = 25MHz" ; \
  718. }
  719. @[ -z "$(findstring _33,$@)" ] || \
  720. { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \
  721. echo "SysClk = 33MHz" ; \
  722. }
  723. @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
  724. sbc405_config: unconfig
  725. @./mkconfig $(@:_config=) ppc ppc4xx sbc405
  726. sycamore_config: unconfig
  727. @echo "Configuring for sycamore board as subset of walnut..."
  728. @./mkconfig -a walnut ppc ppc4xx walnut amcc
  729. VOH405_config: unconfig
  730. @./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
  731. VOM405_config: unconfig
  732. @./mkconfig $(@:_config=) ppc ppc4xx vom405 esd
  733. W7OLMC_config \
  734. W7OLMG_config: unconfig
  735. @./mkconfig $(@:_config=) ppc ppc4xx w7o
  736. walnut_config: unconfig
  737. @./mkconfig $(@:_config=) ppc ppc4xx walnut amcc
  738. WUH405_config: unconfig
  739. @./mkconfig $(@:_config=) ppc ppc4xx wuh405 esd
  740. XPEDITE1K_config: unconfig
  741. @./mkconfig $(@:_config=) ppc ppc4xx xpedite1k
  742. yosemite_config: unconfig
  743. @./mkconfig $(@:_config=) ppc ppc4xx yosemite amcc
  744. yellowstone_config: unconfig
  745. @./mkconfig $(@:_config=) ppc ppc4xx yellowstone amcc
  746. #########################################################################
  747. ## MPC8220 Systems
  748. #########################################################################
  749. Alaska8220_config \
  750. Yukon8220_config: unconfig
  751. @./mkconfig $(@:_config=) ppc mpc8220 alaska
  752. sorcery_config: unconfig
  753. @./mkconfig $(@:_config=) ppc mpc8220 sorcery
  754. #########################################################################
  755. ## MPC824x Systems
  756. #########################################################################
  757. xtract_82xx = $(subst _BIGFLASH,,$(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))))
  758. A3000_config: unconfig
  759. @./mkconfig $(@:_config=) ppc mpc824x a3000
  760. barco_config: unconfig
  761. @./mkconfig $(@:_config=) ppc mpc824x barco
  762. BMW_config: unconfig
  763. @./mkconfig $(@:_config=) ppc mpc824x bmw
  764. CPC45_config \
  765. CPC45_ROMBOOT_config: unconfig
  766. @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
  767. @cd ./include ; \
  768. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  769. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  770. echo "... booting from 8-bit flash" ; \
  771. else \
  772. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  773. echo "... booting from 64-bit flash" ; \
  774. fi; \
  775. echo "export CONFIG_BOOT_ROM" >> config.mk;
  776. CU824_config: unconfig
  777. @./mkconfig $(@:_config=) ppc mpc824x cu824
  778. debris_config: unconfig
  779. @./mkconfig $(@:_config=) ppc mpc824x debris etin
  780. eXalion_config: unconfig
  781. @./mkconfig $(@:_config=) ppc mpc824x eXalion
  782. HIDDEN_DRAGON_config: unconfig
  783. @./mkconfig $(@:_config=) ppc mpc824x hidden_dragon
  784. MOUSSE_config: unconfig
  785. @./mkconfig $(@:_config=) ppc mpc824x mousse
  786. MUSENKI_config: unconfig
  787. @./mkconfig $(@:_config=) ppc mpc824x musenki
  788. MVBLUE_config: unconfig
  789. @./mkconfig $(@:_config=) ppc mpc824x mvblue
  790. OXC_config: unconfig
  791. @./mkconfig $(@:_config=) ppc mpc824x oxc
  792. PN62_config: unconfig
  793. @./mkconfig $(@:_config=) ppc mpc824x pn62
  794. Sandpoint8240_config: unconfig
  795. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  796. Sandpoint8245_config: unconfig
  797. @./mkconfig $(@:_config=) ppc mpc824x sandpoint
  798. sbc8240_config: unconfig
  799. @./mkconfig $(@:_config=) ppc mpc824x sbc8240
  800. SL8245_config: unconfig
  801. @./mkconfig $(@:_config=) ppc mpc824x sl8245
  802. utx8245_config: unconfig
  803. @./mkconfig $(@:_config=) ppc mpc824x utx8245
  804. cobra5272_config : unconfig
  805. @./mkconfig $(@:_config=) m68k mcf52x2 cobra5272
  806. #########################################################################
  807. ## MPC8260 Systems
  808. #########################################################################
  809. atc_config: unconfig
  810. @./mkconfig $(@:_config=) ppc mpc8260 atc
  811. cogent_mpc8260_config: unconfig
  812. @./mkconfig $(@:_config=) ppc mpc8260 cogent
  813. CPU86_config \
  814. CPU86_ROMBOOT_config: unconfig
  815. @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
  816. @cd ./include ; \
  817. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  818. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  819. echo "... booting from 8-bit flash" ; \
  820. else \
  821. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  822. echo "... booting from 64-bit flash" ; \
  823. fi; \
  824. echo "export CONFIG_BOOT_ROM" >> config.mk;
  825. CPU87_config \
  826. CPU87_ROMBOOT_config: unconfig
  827. @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu87
  828. @cd ./include ; \
  829. if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  830. echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
  831. echo "... booting from 8-bit flash" ; \
  832. else \
  833. echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
  834. echo "... booting from 64-bit flash" ; \
  835. fi; \
  836. echo "export CONFIG_BOOT_ROM" >> config.mk;
  837. ep8248_config \
  838. ep8248E_config : unconfig
  839. @./mkconfig ep8248 ppc mpc8260 ep8248
  840. ep8260_config: unconfig
  841. @./mkconfig $(@:_config=) ppc mpc8260 ep8260
  842. gw8260_config: unconfig
  843. @./mkconfig $(@:_config=) ppc mpc8260 gw8260
  844. hymod_config: unconfig
  845. @./mkconfig $(@:_config=) ppc mpc8260 hymod
  846. IDS8247_config: unconfig
  847. @./mkconfig $(@:_config=) ppc mpc8260 ids8247
  848. IPHASE4539_config: unconfig
  849. @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
  850. ISPAN_config \
  851. ISPAN_REVB_config: unconfig
  852. @if [ "$(findstring _REVB_,$@)" ] ; then \
  853. echo "#define CFG_REV_B" > include/config.h ; \
  854. fi
  855. @./mkconfig -a ISPAN ppc mpc8260 ispan
  856. MPC8260ADS_config \
  857. MPC8260ADS_lowboot_config \
  858. MPC8260ADS_33MHz_config \
  859. MPC8260ADS_33MHz_lowboot_config \
  860. MPC8260ADS_40MHz_config \
  861. MPC8260ADS_40MHz_lowboot_config \
  862. MPC8272ADS_config \
  863. MPC8272ADS_lowboot_config \
  864. PQ2FADS_config \
  865. PQ2FADS_lowboot_config \
  866. PQ2FADS-VR_config \
  867. PQ2FADS-VR_lowboot_config \
  868. PQ2FADS-ZU_config \
  869. PQ2FADS-ZU_lowboot_config \
  870. PQ2FADS-ZU_66MHz_config \
  871. PQ2FADS-ZU_66MHz_lowboot_config \
  872. : unconfig
  873. $(if $(findstring PQ2FADS,$@), \
  874. @echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > include/config.h, \
  875. @echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > include/config.h)
  876. $(if $(findstring MHz,$@), \
  877. @echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> include/config.h, \
  878. $(if $(findstring VR,$@), \
  879. @echo "#define CONFIG_8260_CLKIN 66000000" >> include/config.h))
  880. @[ -z "$(findstring lowboot_,$@)" ] || \
  881. { echo "TEXT_BASE = 0xFF800000" >board/mpc8260ads/config.tmp ; \
  882. echo "... with lowboot configuration" ; \
  883. }
  884. @./mkconfig -a MPC8260ADS ppc mpc8260 mpc8260ads
  885. MPC8266ADS_config: unconfig
  886. @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
  887. # PM825/PM826 default configuration: small (= 8 MB) Flash / boot from 64-bit flash
  888. PM825_config \
  889. PM825_ROMBOOT_config \
  890. PM825_BIGFLASH_config \
  891. PM825_ROMBOOT_BIGFLASH_config \
  892. PM826_config \
  893. PM826_ROMBOOT_config \
  894. PM826_BIGFLASH_config \
  895. PM826_ROMBOOT_BIGFLASH_config: unconfig
  896. @if [ "$(findstring PM825_,$@)" ] ; then \
  897. echo "#define CONFIG_PCI" >include/config.h ; \
  898. else \
  899. >include/config.h ; \
  900. fi
  901. @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  902. echo "... booting from 8-bit flash" ; \
  903. echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
  904. echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
  905. if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
  906. echo "... with 32 MB Flash" ; \
  907. echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
  908. fi; \
  909. else \
  910. echo "... booting from 64-bit flash" ; \
  911. if [ "$(findstring _BIGFLASH_,$@)" ] ; then \
  912. echo "... with 32 MB Flash" ; \
  913. echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \
  914. echo "TEXT_BASE = 0x40000000" >board/pm826/config.tmp ; \
  915. else \
  916. echo "TEXT_BASE = 0xFF000000" >board/pm826/config.tmp ; \
  917. fi; \
  918. fi
  919. @./mkconfig -a PM826 ppc mpc8260 pm826
  920. PM828_config \
  921. PM828_PCI_config \
  922. PM828_ROMBOOT_config \
  923. PM828_ROMBOOT_PCI_config: unconfig
  924. @if [ -z "$(findstring _PCI_,$@)" ] ; then \
  925. echo "#define CONFIG_PCI" >>include/config.h ; \
  926. echo "... with PCI enabled" ; \
  927. else \
  928. >include/config.h ; \
  929. fi
  930. @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
  931. echo "... booting from 8-bit flash" ; \
  932. echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \
  933. echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \
  934. fi
  935. @./mkconfig -a PM828 ppc mpc8260 pm828
  936. ppmc8260_config: unconfig
  937. @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
  938. Rattler8248_config \
  939. Rattler_config: unconfig
  940. $(if $(findstring 8248,$@), \
  941. @echo "#define CONFIG_MPC8248" > include/config.h)
  942. @./mkconfig -a Rattler ppc mpc8260 rattler
  943. RPXsuper_config: unconfig
  944. @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
  945. rsdproto_config: unconfig
  946. @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
  947. sacsng_config: unconfig
  948. @./mkconfig $(@:_config=) ppc mpc8260 sacsng
  949. sbc8260_config: unconfig
  950. @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
  951. SCM_config: unconfig
  952. @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
  953. TQM8255_AA_config \
  954. TQM8260_AA_config \
  955. TQM8260_AB_config \
  956. TQM8260_AC_config \
  957. TQM8260_AD_config \
  958. TQM8260_AE_config \
  959. TQM8260_AF_config \
  960. TQM8260_AG_config \
  961. TQM8260_AH_config \
  962. TQM8265_AA_config: unconfig
  963. @case "$@" in \
  964. TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no; BMODE=8260;; \
  965. TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no; BMODE=8260;; \
  966. TQM8260_AB_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
  967. TQM8260_AC_config) CTYPE=MPC8260; CFREQ=200; CACHE=yes; BMODE=60x;; \
  968. TQM8260_AD_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
  969. TQM8260_AE_config) CTYPE=MPC8260; CFREQ=266; CACHE=no; BMODE=8260;; \
  970. TQM8260_AF_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \
  971. TQM8260_AG_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=8260;; \
  972. TQM8260_AH_config) CTYPE=MPC8260; CFREQ=300; CACHE=yes; BMODE=60x;; \
  973. TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no; BMODE=60x;; \
  974. esac; \
  975. >include/config.h ; \
  976. if [ "$${CTYPE}" != "MPC8260" ] ; then \
  977. echo "#define CONFIG_$${CTYPE}" >>include/config.h ; \
  978. fi; \
  979. echo "#define CONFIG_$${CFREQ}MHz" >>include/config.h ; \
  980. echo "... with $${CFREQ}MHz system clock" ; \
  981. if [ "$${CACHE}" == "yes" ] ; then \
  982. echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
  983. echo "... with L2 Cache support" ; \
  984. else \
  985. echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
  986. echo "... without L2 Cache support" ; \
  987. fi; \
  988. if [ "$${BMODE}" == "60x" ] ; then \
  989. echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \
  990. echo "... with 60x Bus Mode" ; \
  991. else \
  992. echo "#undef CONFIG_BUSMODE_60x" >>include/config.h ; \
  993. echo "... without 60x Bus Mode" ; \
  994. fi
  995. @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
  996. VoVPN-GW_66MHz_config \
  997. VoVPN-GW_100MHz_config: unconfig
  998. @echo "#define CONFIG_CLKIN_$(word 2,$(subst _, ,$@))" > include/config.h
  999. @./mkconfig -a VoVPN-GW ppc mpc8260 vovpn-gw funkwerk
  1000. ZPC1900_config: unconfig
  1001. @./mkconfig $(@:_config=) ppc mpc8260 zpc1900
  1002. #========================================================================
  1003. # M68K
  1004. #========================================================================
  1005. #########################################################################
  1006. ## Coldfire
  1007. #########################################################################
  1008. M5272C3_config : unconfig
  1009. @./mkconfig $(@:_config=) m68k mcf52x2 m5272c3
  1010. M5282EVB_config : unconfig
  1011. @./mkconfig $(@:_config=) m68k mcf52x2 m5282evb
  1012. TASREG_config : unconfig
  1013. @./mkconfig $(@:_config=) m68k mcf52x2 tasreg esd
  1014. #########################################################################
  1015. ## MPC83xx Systems
  1016. #########################################################################
  1017. MPC8349ADS_config: unconfig
  1018. @./mkconfig $(@:_config=) ppc mpc83xx mpc8349ads
  1019. #########################################################################
  1020. ## MPC85xx Systems
  1021. #########################################################################
  1022. MPC8540ADS_config: unconfig
  1023. @./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
  1024. MPC8540EVAL_config \
  1025. MPC8540EVAL_33_config \
  1026. MPC8540EVAL_66_config \
  1027. MPC8540EVAL_33_slave_config \
  1028. MPC8540EVAL_66_slave_config: unconfig
  1029. @echo "" >include/config.h ; \
  1030. if [ "$(findstring _33_,$@)" ] ; then \
  1031. echo -n "... 33 MHz PCI" ; \
  1032. else \
  1033. echo "#define CONFIG_SYSCLK_66M" >>include/config.h ; \
  1034. echo -n "... 66 MHz PCI" ; \
  1035. fi ; \
  1036. if [ "$(findstring _slave_,$@)" ] ; then \
  1037. echo "#define CONFIG_PCI_SLAVE" >>include/config.h ; \
  1038. echo " slave" ; \
  1039. else \
  1040. echo " host" ; \
  1041. fi
  1042. @./mkconfig -a MPC8540EVAL ppc mpc85xx mpc8540eval
  1043. MPC8560ADS_config: unconfig
  1044. @./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
  1045. MPC8541CDS_config: unconfig
  1046. @./mkconfig $(@:_config=) ppc mpc85xx mpc8541cds cds
  1047. MPC8548CDS_config: unconfig
  1048. @./mkconfig $(@:_config=) ppc mpc85xx mpc8548cds cds
  1049. MPC8555CDS_config: unconfig
  1050. @./mkconfig $(@:_config=) ppc mpc85xx mpc8555cds cds
  1051. PM854_config: unconfig
  1052. @./mkconfig $(@:_config=) ppc mpc85xx pm854
  1053. PM856_config: unconfig
  1054. @./mkconfig $(@:_config=) ppc mpc85xx pm856
  1055. sbc8540_config \
  1056. sbc8540_33_config \
  1057. sbc8540_66_config: unconfig
  1058. @if [ "$(findstring _66_,$@)" ] ; then \
  1059. echo "#define CONFIG_PCI_66" >>include/config.h ; \
  1060. echo "... 66 MHz PCI" ; \
  1061. else \
  1062. >include/config.h ; \
  1063. echo "... 33 MHz PCI" ; \
  1064. fi
  1065. @./mkconfig -a SBC8540 ppc mpc85xx sbc8560
  1066. sbc8560_config \
  1067. sbc8560_33_config \
  1068. sbc8560_66_config: unconfig
  1069. @if [ "$(findstring _66_,$@)" ] ; then \
  1070. echo "#define CONFIG_PCI_66" >>include/config.h ; \
  1071. echo "... 66 MHz PCI" ; \
  1072. else \
  1073. >include/config.h ; \
  1074. echo "... 33 MHz PCI" ; \
  1075. fi
  1076. @./mkconfig -a sbc8560 ppc mpc85xx sbc8560
  1077. stxgp3_config: unconfig
  1078. @./mkconfig $(@:_config=) ppc mpc85xx stxgp3
  1079. TQM8540_config: unconfig
  1080. @./mkconfig $(@:_config=) ppc mpc85xx tqm8540
  1081. TQM8560_config: unconfig
  1082. @./mkconfig $(@:_config=) ppc mpc85xx tqm8560
  1083. #########################################################################
  1084. ## 74xx/7xx Systems
  1085. #########################################################################
  1086. AmigaOneG3SE_config: unconfig
  1087. @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
  1088. BAB7xx_config: unconfig
  1089. @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
  1090. CPCI750_config: unconfig
  1091. @./mkconfig CPCI750 ppc 74xx_7xx cpci750 esd
  1092. DB64360_config: unconfig
  1093. @./mkconfig DB64360 ppc 74xx_7xx db64360 Marvell
  1094. DB64460_config: unconfig
  1095. @./mkconfig DB64460 ppc 74xx_7xx db64460 Marvell
  1096. ELPPC_config: unconfig
  1097. @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
  1098. EVB64260_config \
  1099. EVB64260_750CX_config: unconfig
  1100. @./mkconfig EVB64260 ppc 74xx_7xx evb64260
  1101. P3G4_config: unconfig
  1102. @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
  1103. PCIPPC2_config \
  1104. PCIPPC6_config: unconfig
  1105. @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
  1106. ZUMA_config: unconfig
  1107. @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
  1108. #========================================================================
  1109. # ARM
  1110. #========================================================================
  1111. #########################################################################
  1112. ## StrongARM Systems
  1113. #########################################################################
  1114. assabet_config : unconfig
  1115. @./mkconfig $(@:_config=) arm sa1100 assabet
  1116. dnp1110_config : unconfig
  1117. @./mkconfig $(@:_config=) arm sa1100 dnp1110
  1118. gcplus_config : unconfig
  1119. @./mkconfig $(@:_config=) arm sa1100 gcplus
  1120. lart_config : unconfig
  1121. @./mkconfig $(@:_config=) arm sa1100 lart
  1122. shannon_config : unconfig
  1123. @./mkconfig $(@:_config=) arm sa1100 shannon
  1124. #########################################################################
  1125. ## ARM92xT Systems
  1126. #########################################################################
  1127. xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
  1128. xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1))))
  1129. xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
  1130. at91rm9200dk_config : unconfig
  1131. @./mkconfig $(@:_config=) arm arm920t at91rm9200dk NULL at91rm9200
  1132. cmc_pu2_config : unconfig
  1133. @./mkconfig $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
  1134. ########################################################################
  1135. ## ARM Integrator boards
  1136. ## There are two variants /AP && /CP
  1137. ## - many different core modules (CMs) can be used
  1138. ## - some share characteristics
  1139. ## Those without specific cpu support can still use U-Boot
  1140. ## provided the ARM boot monitor (or similar) runs before U-Boot
  1141. ## to set up the platform e.g. map writeable memory to 0x00000000
  1142. ## setup MMU, setup caches etc.
  1143. ## Ported cores are:-
  1144. ## ARM926EJ-S
  1145. ## ARM946E-S
  1146. ##
  1147. ########################################################################
  1148. xtract_int_board = $(subst _$(subst integrator$1_,,$(subst _config,,$2)),,$(subst _config,,$2))
  1149. xtract_int_cm = $(subst integrator$1_,,$(subst _config,,$2))
  1150. #########################################################################
  1151. ## Integrator/AP
  1152. #########################################################################
  1153. integratorap_config : unconfig
  1154. @echo -n "/* Integrator configuration implied " > tmp.fil; \
  1155. echo " by Makefile target */" >> tmp.fil; \
  1156. echo >> tmp.fil
  1157. @echo -n "#define CONFIG_INTEGRATOR 1" >> tmp.fil; \
  1158. echo " /* Integrator board */" >> tmp.fil; \
  1159. echo -n "#define CONFIG_ARCH_INTEGRATOR" >> tmp.fil; \
  1160. echo " 1 /* Integrator/AP */" >> tmp.fil; \
  1161. echo "/* Core module not defined */" >> tmp.fil; \
  1162. echo -n "#define CONFIG_ARM_INTCM 1" >> tmp.fil; \
  1163. echo -n " /* Integrator core module " >> tmp.fil; \
  1164. echo "with unknown core */" >> tmp.fil; \
  1165. cpu=arm_intcm; \
  1166. mv tmp.fil ./include/config.h; \
  1167. ubootlds=board/integratorap/u-boot.lds; \
  1168. sed -e 's/cpu\/.*\/st/cpu\/'$$cpu'\/st/' \
  1169. $$ubootlds > $$ubootlds.tmp; \
  1170. mv -f $$ubootlds.tmp $$ubootlds; \
  1171. ./mkconfig -a integratorap arm arm_intcm integratorap;
  1172. integratorap_CM720T_config integratorap_CM7TDMI_config \
  1173. integratorap_CM920T_config integratorap_CM920T_ETM_config \
  1174. integratorap_CM922T_XA10_config integratorap_CM926EJ_S_config \
  1175. integratorap_CM940T_config integratorap_CM946E_S_config \
  1176. integratorap_CM966E_S_config integratorap_CM10200E_config \
  1177. integratorap_CM10220E_config integratorap_CM1026EJ_S_config \
  1178. integratorap_CM1136JF_S_config : unconfig
  1179. @echo -n "/* Integrator configuration implied " > tmp.fil; \
  1180. echo " by Makefile target */" >> tmp.fil; \
  1181. echo >> tmp.fil
  1182. @echo -n "#define CONFIG_INTEGRATOR 1" >> tmp.fil; \
  1183. echo " /* Integrator board */" >> tmp.fil; \
  1184. echo -n "#define CONFIG_ARCH_INTEGRATOR" >> tmp.fil; \
  1185. echo " 1 /* Integrator/AP */" >> tmp.fil; \
  1186. cm=$(call xtract_int_cm,ap,$@); \
  1187. echo -n "#define CONFIG_$$cm " >> tmp.fil; \
  1188. echo " /* core module */" >> tmp.fil; \
  1189. case $$cm in \
  1190. CM920T) \
  1191. echo -n "#define CONFIG_ARM920" >> tmp.fil; \
  1192. echo -n "T 1 /* CPU" >> tmp.fil; \
  1193. echo -n " core is ARM920T" >> tmp.fil; \
  1194. echo " */" >> tmp.fil; \
  1195. cpu=arm920t;; \
  1196. CM926EJ_S) echo -n "#define CONFIG_ARM926" >> tmp.fil; \
  1197. echo -n "EJ_S 1 /* CPU" >> tmp.fil; \
  1198. echo -n " core is ARM926EJ-S" >> tmp.fil; \
  1199. echo " */" >> tmp.fil; \
  1200. cpu=arm926ejs;; \
  1201. CM946E_S) echo -n "#define CONFIG_ARM946" >> tmp.fil; \
  1202. echo -n "E_S 1 /* CPU" >> tmp.fil; \
  1203. echo -n " core is ARM946E-S" >> tmp.fil; \
  1204. echo " */" >> tmp.fil; \
  1205. cpu=arm946es;; \
  1206. *) echo -n "#define CONFIG_ARM_IN" >> tmp.fil; \
  1207. echo -n "TCM 1 /* Int" >> tmp.fil; \
  1208. echo -n "egrator core module w" >> tmp.fil; \
  1209. echo -n "ith unported core" >> tmp.fil; \
  1210. echo " */" >> tmp.fil; \
  1211. cpu=arm_intcm;; \
  1212. esac; \
  1213. mv tmp.fil ./include/config.h; \
  1214. ubootlds=board/$(call xtract_int_board,ap,$@)/u-boot.lds; \
  1215. sed -e 's/cpu\/.*\/st/cpu\/'$$cpu'\/st/' \
  1216. $$ubootlds > $$ubootlds.tmp; \
  1217. mv -f $$ubootlds.tmp $$ubootlds; \
  1218. ./mkconfig -a $(call xtract_int_board,ap,$@) arm $$cpu \
  1219. $(call xtract_int_board,ap,$@);
  1220. #########################################################################
  1221. ## Integrator/CP
  1222. #########################################################################
  1223. integratorcp_config : unconfig
  1224. @echo -n "/* Integrator configuration implied " > tmp.fil; \
  1225. echo " by Makefile target */" >> tmp.fil; \
  1226. echo >> tmp.fil
  1227. @echo -n "#define CONFIG_INTEGRATOR 1" >> tmp.fil; \
  1228. echo " /* Integrator board */" >> tmp.fil; \
  1229. echo -n "#define CONFIG_ARCH_CINTEGRATOR" >> tmp.fil; \
  1230. echo " 1 /* Integrator/CP */" >> tmp.fil; \
  1231. echo "/* Core module not defined */" >> tmp.fil; \
  1232. echo -n "#define CONFIG_ARM_INTCM 1" >> tmp.fil; \
  1233. echo -n " /* Integrator core module " >> tmp.fil; \
  1234. echo "with unknown core */" >> tmp.fil; \
  1235. cpu=arm_intcm; \
  1236. echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> tmp.fil; \
  1237. echo -n " /* CM may not have " >> tmp.fil; \
  1238. echo "multiple SSRAM mapping */" >> tmp.fil; \
  1239. echo -n "#undef CONFIG_CM_SPD_DETECT " >> tmp.fil; \
  1240. echo -n " /* CM may not support SPD " >> tmp.fil; \
  1241. echo "query */" >> tmp.fil; \
  1242. echo -n "#undef CONFIG_CM_REMAP " >> tmp.fil; \
  1243. echo -n " /* CM may not support " >> tmp.fil; \
  1244. echo "remapping */" >> tmp.fil; \
  1245. echo -n "#undef CONFIG_CM_INIT " >> tmp.fil; \
  1246. echo -n " /* CM may not have " >> tmp.fil; \
  1247. echo "initialization reg */" >> tmp.fil; \
  1248. echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil; \
  1249. echo -n " /* CM may not have TCRAM */" >> tmp.fil; \
  1250. mv tmp.fil ./include/config.h; \
  1251. ubootlds=board/integratorcp/u-boot.lds; \
  1252. sed -e 's/cpu\/.*\/st/cpu\/'$$cpu'\/st/' \
  1253. $$ubootlds > $$ubootlds.tmp; \
  1254. mv -f $$ubootlds.tmp $$ubootlds; \
  1255. ./mkconfig -a integratorcp arm arm_intcm integratorcp;
  1256. integratorcp_CM920T_config integratorcp_CM920T_ETM_config \
  1257. integratorcp_CM922T_XA10_config integratorcp_CM926EJ_S_config \
  1258. integratorcp_CM940T_config integratorcp_CM946E_S_config \
  1259. integratorcp_CM966E_S_config integratorcp_CM10200E_config \
  1260. integratorcp_CM10220E_config integratorcp_CM1026EJ_S_config \
  1261. integratorcp_CM1136JF_S_config : unconfig
  1262. @echo -n "/* Integrator configuration implied " > tmp.fil; \
  1263. echo " by Makefile target */" >> tmp.fil; \
  1264. echo >> tmp.fil
  1265. @echo -n "#define CONFIG_INTEGRATOR 1" >> tmp.fil; \
  1266. echo " /* Integrator board */" >> tmp.fil; \
  1267. echo -n "#define CONFIG_ARCH_CINTEGRATOR" >> tmp.fil; \
  1268. echo " 1 /* Integrator/CP */" >> tmp.fil; \
  1269. cm=$(call xtract_int_cm,cp,$@); \
  1270. echo -n "#define CONFIG_$$cm " >> tmp.fil; \
  1271. echo " /* core module */" >> tmp.fil; \
  1272. echo "/* $$cm core module */" >> tmp.fil; \
  1273. case $$cm in \
  1274. CM920T) echo -n "#define CONFIG_ARM920" >> tmp.fil; \
  1275. echo -n "T 1 /* CPU" >> tmp.fil; \
  1276. echo -n " core is ARM920T" >> tmp.fil; \
  1277. echo " */" >> tmp.fil; \
  1278. cpu=arm920t;; \
  1279. CM946E_S) echo -n "#define CONFIG_ARM946" >> tmp.fil; \
  1280. echo -n "E_S 1 /* CPU" >> tmp.fil; \
  1281. echo -n " core is ARM946E-S" >> tmp.fil; \
  1282. echo " */" >> tmp.fil; \
  1283. cpu=arm946es;; \
  1284. CM926EJ_S) echo -n "#define CONFIG_ARM926" >> tmp.fil; \
  1285. echo -n "EJ_S 1 /* CPU" >> tmp.fil; \
  1286. echo -n " core is ARM926EJ-S" >> tmp.fil; \
  1287. echo " */" >> tmp.fil; \
  1288. cpu=arm926ejs;; \
  1289. *) echo -n "#define CONFIG_ARM_IN" >> tmp.fil; \
  1290. echo -n "TCM 1 /* Int" >> tmp.fil; \
  1291. echo -n "egrator core module w" >> tmp.fil; \
  1292. echo -n "ith unported core" >> tmp.fil; \
  1293. echo " */" >> tmp.fil; \
  1294. cpu=arm_intcm;; \
  1295. esac; \
  1296. mv tmp.fil ./include/config.h; \
  1297. ubootlds=board/$(call xtract_int_board,cp,$@)/u-boot.lds; \
  1298. sed -e 's/cpu\/.*\/st/cpu\/'$$cpu'\/st/' \
  1299. $$ubootlds > $$ubootlds.tmp; \
  1300. mv -f $$ubootlds.tmp $$ubootlds; \
  1301. ./mkconfig -a $(call xtract_int_board,cp,$@) arm $$cpu \
  1302. $(call xtract_int_board,cp,$@);
  1303. lpd7a400_config \
  1304. lpd7a404_config: unconfig
  1305. @./mkconfig $(@:_config=) arm lh7a40x lpd7a40x
  1306. mx1ads_config : unconfig
  1307. @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx
  1308. mx1fs2_config : unconfig
  1309. @./mkconfig $(@:_config=) arm arm920t mx1fs2 NULL imx
  1310. omap1510inn_config : unconfig
  1311. @./mkconfig $(@:_config=) arm arm925t omap1510inn
  1312. omap5912osk_config : unconfig
  1313. @./mkconfig $(@:_config=) arm arm926ejs omap5912osk
  1314. omap1610inn_config \
  1315. omap1610inn_cs0boot_config \
  1316. omap1610inn_cs3boot_config \
  1317. omap1610inn_cs_autoboot_config \
  1318. omap1610h2_config \
  1319. omap1610h2_cs0boot_config \
  1320. omap1610h2_cs3boot_config \
  1321. omap1610h2_cs_autoboot_config: unconfig
  1322. @if [ "$(findstring _cs0boot_, $@)" ] ; then \
  1323. echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
  1324. echo "... configured for CS0 boot"; \
  1325. elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \
  1326. echo "#define CONFIG_CS_AUTOBOOT" >> ./include/config.h ; \
  1327. echo "... configured for CS_AUTO boot"; \
  1328. else \
  1329. echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
  1330. echo "... configured for CS3 boot"; \
  1331. fi;
  1332. @./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
  1333. omap730p2_config \
  1334. omap730p2_cs0boot_config \
  1335. omap730p2_cs3boot_config : unconfig
  1336. @if [ "$(findstring _cs0boot_, $@)" ] ; then \
  1337. echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
  1338. echo "... configured for CS0 boot"; \
  1339. else \
  1340. echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
  1341. echo "... configured for CS3 boot"; \
  1342. fi;
  1343. @./mkconfig -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2
  1344. scb9328_config : unconfig
  1345. @./mkconfig $(@:_config=) arm arm920t scb9328 NULL imx
  1346. smdk2400_config : unconfig
  1347. @./mkconfig $(@:_config=) arm arm920t smdk2400 NULL s3c24x0
  1348. smdk2410_config : unconfig
  1349. @./mkconfig $(@:_config=) arm arm920t smdk2410 NULL s3c24x0
  1350. SX1_config : unconfig
  1351. @./mkconfig $(@:_config=) arm arm925t sx1
  1352. # TRAB default configuration: 8 MB Flash, 32 MB RAM
  1353. trab_config \
  1354. trab_bigram_config \
  1355. trab_bigflash_config \
  1356. trab_old_config: unconfig
  1357. @ >include/config.h
  1358. @[ -z "$(findstring _bigram,$@)" ] || \
  1359. { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
  1360. echo "#define CONFIG_RAM_32MB" >>include/config.h ; \
  1361. echo "... with 8 MB Flash, 32 MB RAM" ; \
  1362. }
  1363. @[ -z "$(findstring _bigflash,$@)" ] || \
  1364. { echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \
  1365. echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
  1366. echo "... with 16 MB Flash, 16 MB RAM" ; \
  1367. echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
  1368. }
  1369. @[ -z "$(findstring _old,$@)" ] || \
  1370. { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \
  1371. echo "#define CONFIG_RAM_16MB" >>include/config.h ; \
  1372. echo "... with 8 MB Flash, 16 MB RAM" ; \
  1373. echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
  1374. }
  1375. @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab NULL s3c24x0
  1376. VCMA9_config : unconfig
  1377. @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0
  1378. versatile_config : unconfig
  1379. @./mkconfig $(@:_config=) arm arm926ejs versatile
  1380. voiceblue_smallflash_config \
  1381. voiceblue_config: unconfig
  1382. @if [ "$(findstring _smallflash_,$@)" ] ; then \
  1383. echo "... boot from lower flash bank" ; \
  1384. echo "#define VOICEBLUE_SMALL_FLASH" >>include/config.h ; \
  1385. echo "VOICEBLUE_SMALL_FLASH=y" >board/voiceblue/config.tmp ; \
  1386. else \
  1387. echo "... boot from upper flash bank" ; \
  1388. >include/config.h ; \
  1389. echo "VOICEBLUE_SMALL_FLASH=n" >board/voiceblue/config.tmp ; \
  1390. fi
  1391. @./mkconfig -a voiceblue arm arm925t voiceblue
  1392. cm4008_config : unconfig
  1393. @./mkconfig $(@:_config=) arm arm920t cm4008 NULL ks8695
  1394. cm41xx_config : unconfig
  1395. @./mkconfig $(@:_config=) arm arm920t cm41xx NULL ks8695
  1396. #########################################################################
  1397. ## S3C44B0 Systems
  1398. #########################################################################
  1399. B2_config : unconfig
  1400. @./mkconfig $(@:_config=) arm s3c44b0 B2 dave
  1401. #########################################################################
  1402. ## ARM720T Systems
  1403. #########################################################################
  1404. ep7312_config : unconfig
  1405. @./mkconfig $(@:_config=) arm arm720t ep7312
  1406. impa7_config : unconfig
  1407. @./mkconfig $(@:_config=) arm arm720t impa7
  1408. modnet50_config : unconfig
  1409. @./mkconfig $(@:_config=) arm arm720t modnet50
  1410. evb4510_config : unconfig
  1411. @./mkconfig $(@:_config=) arm arm720t evb4510
  1412. #########################################################################
  1413. ## XScale Systems
  1414. #########################################################################
  1415. adsvix_config : unconfig
  1416. @./mkconfig $(@:_config=) arm pxa adsvix
  1417. cerf250_config : unconfig
  1418. @./mkconfig $(@:_config=) arm pxa cerf250
  1419. cradle_config : unconfig
  1420. @./mkconfig $(@:_config=) arm pxa cradle
  1421. csb226_config : unconfig
  1422. @./mkconfig $(@:_config=) arm pxa csb226
  1423. innokom_config : unconfig
  1424. @./mkconfig $(@:_config=) arm pxa innokom
  1425. ixdp425_config : unconfig
  1426. @./mkconfig $(@:_config=) arm ixp ixdp425
  1427. lubbock_config : unconfig
  1428. @./mkconfig $(@:_config=) arm pxa lubbock
  1429. logodl_config : unconfig
  1430. @./mkconfig $(@:_config=) arm pxa logodl
  1431. wepep250_config : unconfig
  1432. @./mkconfig $(@:_config=) arm pxa wepep250
  1433. xaeniax_config : unconfig
  1434. @./mkconfig $(@:_config=) arm pxa xaeniax
  1435. xm250_config : unconfig
  1436. @./mkconfig $(@:_config=) arm pxa xm250
  1437. xsengine_config : unconfig
  1438. @./mkconfig $(@:_config=) arm pxa xsengine
  1439. #########################################################################
  1440. ## ARM1136 Systems
  1441. #########################################################################
  1442. omap2420h4_config : unconfig
  1443. @./mkconfig $(@:_config=) arm arm1136 omap2420h4
  1444. #========================================================================
  1445. # i386
  1446. #========================================================================
  1447. #########################################################################
  1448. ## AMD SC520 CDP
  1449. #########################################################################
  1450. sc520_cdp_config : unconfig
  1451. @./mkconfig $(@:_config=) i386 i386 sc520_cdp
  1452. sc520_spunk_config : unconfig
  1453. @./mkconfig $(@:_config=) i386 i386 sc520_spunk
  1454. sc520_spunk_rel_config : unconfig
  1455. @./mkconfig $(@:_config=) i386 i386 sc520_spunk
  1456. #========================================================================
  1457. # MIPS
  1458. #========================================================================
  1459. #########################################################################
  1460. ## MIPS32 4Kc
  1461. #########################################################################
  1462. xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
  1463. incaip_100MHz_config \
  1464. incaip_133MHz_config \
  1465. incaip_150MHz_config \
  1466. incaip_config: unconfig
  1467. @ >include/config.h
  1468. @[ -z "$(findstring _100MHz,$@)" ] || \
  1469. { echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
  1470. echo "... with 100MHz system clock" ; \
  1471. }
  1472. @[ -z "$(findstring _133MHz,$@)" ] || \
  1473. { echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
  1474. echo "... with 133MHz system clock" ; \
  1475. }
  1476. @[ -z "$(findstring _150MHz,$@)" ] || \
  1477. { echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
  1478. echo "... with 150MHz system clock" ; \
  1479. }
  1480. @./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
  1481. tb0229_config: unconfig
  1482. @./mkconfig $(@:_config=) mips mips tb0229
  1483. #########################################################################
  1484. ## MIPS32 AU1X00
  1485. #########################################################################
  1486. dbau1000_config : unconfig
  1487. @ >include/config.h
  1488. @echo "#define CONFIG_DBAU1000 1" >>include/config.h
  1489. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1490. dbau1100_config : unconfig
  1491. @ >include/config.h
  1492. @echo "#define CONFIG_DBAU1100 1" >>include/config.h
  1493. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1494. dbau1500_config : unconfig
  1495. @ >include/config.h
  1496. @echo "#define CONFIG_DBAU1500 1" >>include/config.h
  1497. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1498. dbau1550_config : unconfig
  1499. @ >include/config.h
  1500. @echo "#define CONFIG_DBAU1550 1" >>include/config.h
  1501. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1502. dbau1550_el_config : unconfig
  1503. @ >include/config.h
  1504. @echo "#define CONFIG_DBAU1550 1" >>include/config.h
  1505. @./mkconfig -a dbau1x00 mips mips dbau1x00
  1506. pb1000_config : unconfig
  1507. @ >include/config.h
  1508. @echo "#define CONFIG_PB1000 1" >>include/config.h
  1509. @./mkconfig -a pb1x00 mips mips pb1x00
  1510. #########################################################################
  1511. ## MIPS64 5Kc
  1512. #########################################################################
  1513. purple_config : unconfig
  1514. @./mkconfig $(@:_config=) mips mips purple
  1515. #========================================================================
  1516. # Nios
  1517. #========================================================================
  1518. #########################################################################
  1519. ## Nios32
  1520. #########################################################################
  1521. DK1C20_safe_32_config \
  1522. DK1C20_standard_32_config \
  1523. DK1C20_config: unconfig
  1524. @ >include/config.h
  1525. @[ -z "$(findstring _safe_32,$@)" ] || \
  1526. { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
  1527. echo "... NIOS 'safe_32' configuration" ; \
  1528. }
  1529. @[ -z "$(findstring _standard_32,$@)" ] || \
  1530. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  1531. echo "... NIOS 'standard_32' configuration" ; \
  1532. }
  1533. @[ -z "$(findstring DK1C20_config,$@)" ] || \
  1534. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  1535. echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
  1536. }
  1537. @./mkconfig -a DK1C20 nios nios dk1c20 altera
  1538. DK1S10_safe_32_config \
  1539. DK1S10_standard_32_config \
  1540. DK1S10_mtx_ldk_20_config \
  1541. DK1S10_config: unconfig
  1542. @ >include/config.h
  1543. @[ -z "$(findstring _safe_32,$@)" ] || \
  1544. { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
  1545. echo "... NIOS 'safe_32' configuration" ; \
  1546. }
  1547. @[ -z "$(findstring _standard_32,$@)" ] || \
  1548. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  1549. echo "... NIOS 'standard_32' configuration" ; \
  1550. }
  1551. @[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
  1552. { echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \
  1553. echo "... NIOS 'mtx_ldk_20' configuration" ; \
  1554. }
  1555. @[ -z "$(findstring DK1S10_config,$@)" ] || \
  1556. { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
  1557. echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
  1558. }
  1559. @./mkconfig -a DK1S10 nios nios dk1s10 altera
  1560. ADNPESC1_DNPEVA2_base_32_config \
  1561. ADNPESC1_base_32_config \
  1562. ADNPESC1_config: unconfig
  1563. @ >include/config.h
  1564. @[ -z "$(findstring _DNPEVA2,$@)" ] || \
  1565. { echo "#define CONFIG_DNPEVA2 1" >>include/config.h ; \
  1566. echo "... DNP/EVA2 configuration" ; \
  1567. }
  1568. @[ -z "$(findstring _base_32,$@)" ] || \
  1569. { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
  1570. echo "... NIOS 'base_32' configuration" ; \
  1571. }
  1572. @[ -z "$(findstring ADNPESC1_config,$@)" ] || \
  1573. { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
  1574. echo "... NIOS 'base_32' configuration (DEFAULT)" ; \
  1575. }
  1576. @./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv
  1577. #########################################################################
  1578. ## Nios-II
  1579. #########################################################################
  1580. PK1C20_config : unconfig
  1581. @./mkconfig PK1C20 nios2 nios2 pk1c20 psyent
  1582. PCI5441_config : unconfig
  1583. @./mkconfig PCI5441 nios2 nios2 pci5441 psyent
  1584. #========================================================================
  1585. # MicroBlaze
  1586. #========================================================================
  1587. #########################################################################
  1588. ## Microblaze
  1589. #########################################################################
  1590. suzaku_config: unconfig
  1591. @ >include/config.h
  1592. @echo "#define CONFIG_SUZAKU 1" >> include/config.h
  1593. @./mkconfig -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
  1594. #########################################################################
  1595. #########################################################################
  1596. clean:
  1597. find . -type f \
  1598. \( -name 'core' -o -name '*.bak' -o -name '*~' \
  1599. -o -name '*.o' -o -name '*.a' \) -print \
  1600. | xargs rm -f
  1601. rm -f examples/hello_world examples/timer \
  1602. examples/eepro100_eeprom examples/sched \
  1603. examples/mem_to_mem_idma2intr examples/82559_eeprom \
  1604. examples/test_burst
  1605. rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
  1606. rm -f tools/mpc86x_clk tools/ncb
  1607. rm -f tools/easylogo/easylogo tools/bmp_logo
  1608. rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
  1609. rm -f tools/env/fw_printenv tools/env/fw_setenv
  1610. rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
  1611. rm -f board/trab/trab_fkt board/voiceblue/eeprom
  1612. clobber: clean
  1613. find . -type f \( -name .depend \
  1614. -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
  1615. -print0 \
  1616. | xargs -0 rm -f
  1617. rm -f $(OBJS) *.bak tags TAGS
  1618. rm -fr *.*~
  1619. rm -f u-boot u-boot.map u-boot.hex $(ALL)
  1620. rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
  1621. rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
  1622. rm -f include/asm/proc include/asm/arch include/asm
  1623. mrproper \
  1624. distclean: clobber unconfig
  1625. backup:
  1626. F=`basename $(TOPDIR)` ; cd .. ; \
  1627. gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
  1628. #########################################################################