wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 1 | # |
| 2 | # (C) Copyright 2000, 2001, 2002 |
| 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 | |
| 24 | HOSTARCH := $(shell uname -m | \ |
| 25 | sed -e s/i.86/i386/ \ |
| 26 | -e s/sun4u/sparc64/ \ |
| 27 | -e s/arm.*/arm/ \ |
| 28 | -e s/sa110/arm/ \ |
| 29 | -e s/powerpc/ppc/ \ |
| 30 | -e s/macppc/ppc/) |
| 31 | |
| 32 | HOSTOS := $(shell uname -s | tr A-Z a-z | \ |
| 33 | sed -e 's/\(cygwin\).*/cygwin/') |
| 34 | |
| 35 | export HOSTARCH |
| 36 | |
| 37 | # Deal with colliding definitions from tcsh etc. |
| 38 | VENDOR= |
| 39 | |
| 40 | ######################################################################### |
| 41 | |
| 42 | TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) |
| 43 | export TOPDIR |
| 44 | |
| 45 | ifeq (include/config.mk,$(wildcard include/config.mk)) |
| 46 | # load ARCH, BOARD, and CPU configuration |
| 47 | include include/config.mk |
| 48 | export ARCH CPU BOARD VENDOR |
| 49 | # load other configuration |
| 50 | include $(TOPDIR)/config.mk |
| 51 | |
| 52 | ifndef CROSS_COMPILE |
| 53 | ifeq ($(HOSTARCH),ppc) |
| 54 | CROSS_COMPILE = |
| 55 | else |
| 56 | ## #ifeq ($(CPU),mpc8xx) |
| 57 | ## CROSS_COMPILE = ppc_8xx- |
| 58 | ## #endif |
| 59 | ## #ifeq ($(CPU),ppc4xx) |
| 60 | ## #CROSS_COMPILE = ppc_4xx- |
| 61 | ## #endif |
| 62 | ## #ifeq ($(CPU),mpc824x) |
| 63 | ## #CROSS_COMPILE = ppc_82xx- |
| 64 | ## #endif |
| 65 | ## #ifeq ($(CPU),mpc8260) |
| 66 | ## #CROSS_COMPILE = ppc_82xx- |
| 67 | ## #endif |
| 68 | ## #ifeq ($(CPU),74xx_7xx) |
| 69 | ## #CROSS_COMPILE = ppc_74xx-) |
| 70 | ## #endif |
| 71 | ifeq ($(ARCH),ppc) |
| 72 | CROSS_COMPILE = ppc_8xx- |
| 73 | endif |
| 74 | ifeq ($(ARCH),arm) |
| 75 | CROSS_COMPILE = arm_920TDI- |
| 76 | endif |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 77 | ifeq ($(ARCH),i386) |
| 78 | #CROSS_COMPILE = i386-elf- |
| 79 | endif |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 80 | endif |
| 81 | endif |
| 82 | |
| 83 | export CROSS_COMPILE |
| 84 | |
| 85 | # The "tools" are needed early, so put this first |
| 86 | SUBDIRS = tools \ |
| 87 | lib_generic \ |
| 88 | lib_$(ARCH) \ |
| 89 | cpu/$(CPU) \ |
| 90 | board/$(BOARDDIR) \ |
| 91 | common \ |
| 92 | disk \ |
| 93 | fs \ |
| 94 | net \ |
| 95 | rtc \ |
| 96 | dtt \ |
| 97 | drivers \ |
| 98 | post \ |
| 99 | post/cpu \ |
| 100 | examples |
| 101 | |
| 102 | ######################################################################### |
| 103 | # U-Boot objects....order is important (i.e. start must be first) |
| 104 | |
| 105 | OBJS = cpu/$(CPU)/start.o |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 106 | ifeq ($(CPU),i386) |
| 107 | OBJS += cpu/$(CPU)/start16.o |
| 108 | OBJS += cpu/$(CPU)/reset.o |
| 109 | endif |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 110 | ifeq ($(CPU),ppc4xx) |
| 111 | OBJS += cpu/$(CPU)/resetvec.o |
| 112 | endif |
| 113 | |
| 114 | LIBS = board/$(BOARDDIR)/lib$(BOARD).a |
| 115 | LIBS += cpu/$(CPU)/lib$(CPU).a |
| 116 | LIBS += lib_$(ARCH)/lib$(ARCH).a |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 117 | LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 118 | LIBS += net/libnet.a |
| 119 | LIBS += disk/libdisk.a |
| 120 | LIBS += rtc/librtc.a |
| 121 | LIBS += dtt/libdtt.a |
| 122 | LIBS += drivers/libdrivers.a |
| 123 | LIBS += post/libpost.a post/cpu/libcpu.a |
| 124 | LIBS += common/libcommon.a |
| 125 | LIBS += lib_generic/libgeneric.a |
| 126 | |
| 127 | ######################################################################### |
| 128 | |
| 129 | all: u-boot.srec u-boot.bin System.map |
| 130 | |
| 131 | install: all |
| 132 | cp u-boot.bin /tftpboot/u-boot.bin |
| 133 | cp u-boot.bin /net/sam/tftpboot/u-boot.bin |
| 134 | |
| 135 | u-boot.srec: u-boot |
| 136 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ |
| 137 | |
| 138 | u-boot.bin: u-boot |
| 139 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
| 140 | |
| 141 | u-boot.dis: u-boot |
| 142 | $(OBJDUMP) -d $< > $@ |
| 143 | |
| 144 | u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT) |
wdenk | b2184c3 | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 145 | $(LD) $(LDFLAGS) $(OBJS) \ |
| 146 | --start-group $(LIBS) --end-group \ |
| 147 | -Map u-boot.map -o u-boot |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 148 | |
| 149 | subdirs: |
| 150 | @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done |
| 151 | |
| 152 | depend dep: |
| 153 | @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done |
| 154 | |
| 155 | tags: |
| 156 | ctags -w `find $(SUBDIRS) include \ |
| 157 | \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` |
| 158 | |
| 159 | etags: |
| 160 | etags -a `find $(SUBDIRS) include \ |
| 161 | \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` |
| 162 | |
| 163 | System.map: u-boot |
| 164 | @$(NM) $< | \ |
| 165 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ |
| 166 | sort > System.map |
| 167 | |
| 168 | ######################################################################### |
| 169 | else |
| 170 | all install u-boot u-boot.srec depend dep: |
| 171 | @echo "System not configured - see README" >&2 |
| 172 | @ exit 1 |
| 173 | endif |
| 174 | |
| 175 | ######################################################################### |
| 176 | |
| 177 | unconfig: |
| 178 | rm -f include/config.h include/config.mk |
| 179 | |
| 180 | #======================================================================== |
| 181 | # PowerPC |
| 182 | #======================================================================== |
| 183 | ######################################################################### |
| 184 | ## MPC8xx Systems |
| 185 | ######################################################################### |
| 186 | |
| 187 | ADS860_config: unconfig |
| 188 | @./mkconfig $(@:_config=) ppc mpc8xx fads |
| 189 | |
| 190 | AMX860_config : unconfig |
| 191 | @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel |
| 192 | |
| 193 | c2mon_config: unconfig |
| 194 | @./mkconfig $(@:_config=) ppc mpc8xx c2mon |
| 195 | |
| 196 | CCM_config: unconfig |
| 197 | @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens |
| 198 | |
| 199 | cogent_mpc8xx_config: unconfig |
| 200 | @./mkconfig $(@:_config=) ppc mpc8xx cogent |
| 201 | |
| 202 | ESTEEM192E_config: unconfig |
| 203 | @./mkconfig $(@:_config=) ppc mpc8xx esteem192e |
| 204 | |
| 205 | ETX094_config : unconfig |
| 206 | @./mkconfig $(@:_config=) ppc mpc8xx etx094 |
| 207 | |
| 208 | FADS823_config \ |
| 209 | FADS850SAR_config \ |
| 210 | FADS860T_config: unconfig |
| 211 | @./mkconfig $(@:_config=) ppc mpc8xx fads |
| 212 | |
| 213 | FLAGADM_config: unconfig |
| 214 | @./mkconfig $(@:_config=) ppc mpc8xx flagadm |
| 215 | |
| 216 | GEN860T_config: unconfig |
| 217 | @./mkconfig $(@:_config=) ppc mpc8xx gen860t |
| 218 | |
| 219 | GENIETV_config: unconfig |
| 220 | @./mkconfig $(@:_config=) ppc mpc8xx genietv |
| 221 | |
| 222 | GTH_config: unconfig |
| 223 | @./mkconfig $(@:_config=) ppc mpc8xx gth |
| 224 | |
| 225 | hermes_config : unconfig |
| 226 | @./mkconfig $(@:_config=) ppc mpc8xx hermes |
| 227 | |
| 228 | IAD210_config: unconfig |
| 229 | @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens |
| 230 | |
| 231 | xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1)) |
| 232 | |
| 233 | ICU862_100MHz_config \ |
| 234 | ICU862_config: unconfig |
| 235 | @ >include/config.h |
| 236 | @[ -z "$(findstring _100MHz,$@)" ] || \ |
| 237 | { echo "#define CONFIG_100MHz" >>include/config.h ; \ |
| 238 | echo "... with 100MHz system clock" ; \ |
| 239 | } |
| 240 | @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862 |
| 241 | |
| 242 | IP860_config : unconfig |
| 243 | @./mkconfig $(@:_config=) ppc mpc8xx ip860 |
| 244 | |
| 245 | IVML24_256_config \ |
| 246 | IVML24_128_config \ |
| 247 | IVML24_config: unconfig |
| 248 | @ >include/config.h |
| 249 | @[ -z "$(findstring IVML24_config,$@)" ] || \ |
| 250 | { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \ |
| 251 | } |
| 252 | @[ -z "$(findstring IVML24_128_config,$@)" ] || \ |
| 253 | { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \ |
| 254 | } |
| 255 | @[ -z "$(findstring IVML24_256_config,$@)" ] || \ |
| 256 | { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \ |
| 257 | } |
| 258 | @./mkconfig -a IVML24 ppc mpc8xx ivm |
| 259 | |
| 260 | IVMS8_256_config \ |
| 261 | IVMS8_128_config \ |
| 262 | IVMS8_config: unconfig |
| 263 | @ >include/config.h |
| 264 | @[ -z "$(findstring IVMS8_config,$@)" ] || \ |
| 265 | { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \ |
| 266 | } |
| 267 | @[ -z "$(findstring IVMS8_128_config,$@)" ] || \ |
| 268 | { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \ |
| 269 | } |
| 270 | @[ -z "$(findstring IVMS8_256_config,$@)" ] || \ |
| 271 | { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \ |
| 272 | } |
| 273 | @./mkconfig -a IVMS8 ppc mpc8xx ivm |
| 274 | |
wdenk | 56f94be | 2002-11-05 16:35:14 +0000 | [diff] [blame] | 275 | KUP4K_config : unconfig |
| 276 | @./mkconfig $(@:_config=) ppc mpc8xx kup4k |
| 277 | |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 278 | LANTEC_config : unconfig |
| 279 | @./mkconfig $(@:_config=) ppc mpc8xx lantec |
| 280 | |
| 281 | lwmon_config: unconfig |
| 282 | @./mkconfig $(@:_config=) ppc mpc8xx lwmon |
| 283 | |
| 284 | MBX_config \ |
| 285 | MBX860T_config: unconfig |
| 286 | @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx |
| 287 | |
| 288 | MHPC_config: unconfig |
| 289 | @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec |
| 290 | |
| 291 | MVS1_config : unconfig |
| 292 | @./mkconfig $(@:_config=) ppc mpc8xx mvs1 |
| 293 | |
| 294 | NETVIA_config: unconfig |
| 295 | @./mkconfig $(@:_config=) ppc mpc8xx netvia |
| 296 | |
| 297 | NX823_config: unconfig |
| 298 | @./mkconfig $(@:_config=) ppc mpc8xx nx823 |
| 299 | |
| 300 | pcu_e_config: unconfig |
| 301 | @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens |
| 302 | |
| 303 | R360MPI_config: unconfig |
| 304 | @./mkconfig $(@:_config=) ppc mpc8xx r360mpi |
| 305 | |
| 306 | RPXClassic_config: unconfig |
| 307 | @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic |
| 308 | |
| 309 | RPXlite_config: unconfig |
| 310 | @./mkconfig $(@:_config=) ppc mpc8xx RPXlite |
| 311 | |
| 312 | RRvision_config: unconfig |
| 313 | @./mkconfig $(@:_config=) ppc mpc8xx RRvision |
| 314 | |
| 315 | RRvision_LCD_config: unconfig |
| 316 | @echo "#define CONFIG_LCD" >include/config.h |
| 317 | @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h |
| 318 | @./mkconfig -a RRvision ppc mpc8xx RRvision |
| 319 | |
| 320 | SM850_config : unconfig |
| 321 | @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx |
| 322 | |
| 323 | SPD823TS_config: unconfig |
| 324 | @./mkconfig $(@:_config=) ppc mpc8xx spd8xx |
| 325 | |
| 326 | SXNI855T_config: unconfig |
| 327 | @./mkconfig $(@:_config=) ppc mpc8xx sixnet |
| 328 | |
| 329 | # Play some tricks for configuration selection |
| 330 | # All boards can come with 50 MHz (default), 66MHz or 80MHz clock, |
| 331 | # but only 855 and 860 boards may come with FEC |
| 332 | # and 823 boards may have LCD support |
| 333 | xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _FEC,,$(subst _config,,$1))))) |
| 334 | |
| 335 | FPS850L_config \ |
wdenk | 384ae02 | 2002-11-05 00:17:55 +0000 | [diff] [blame] | 336 | FPS860L_config \ |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 337 | TQM823L_config \ |
| 338 | TQM823L_66MHz_config \ |
| 339 | TQM823L_80MHz_config \ |
| 340 | TQM823L_LCD_config \ |
| 341 | TQM823L_LCD_66MHz_config \ |
| 342 | TQM823L_LCD_80MHz_config \ |
| 343 | TQM850L_config \ |
| 344 | TQM850L_66MHz_config \ |
| 345 | TQM850L_80MHz_config \ |
| 346 | TQM855L_config \ |
| 347 | TQM855L_66MHz_config \ |
| 348 | TQM855L_80MHz_config \ |
| 349 | TQM855L_FEC_config \ |
| 350 | TQM855L_FEC_66MHz_config \ |
| 351 | TQM855L_FEC_80MHz_config \ |
| 352 | TQM860L_config \ |
| 353 | TQM860L_66MHz_config \ |
| 354 | TQM860L_80MHz_config \ |
| 355 | TQM860L_FEC_config \ |
| 356 | TQM860L_FEC_66MHz_config \ |
| 357 | TQM860L_FEC_80MHz_config: unconfig |
| 358 | @ >include/config.h |
| 359 | @[ -z "$(findstring _FEC,$@)" ] || \ |
| 360 | { echo "#define CONFIG_FEC_ENET" >>include/config.h ; \ |
| 361 | echo "... with FEC support" ; \ |
| 362 | } |
| 363 | @[ -z "$(findstring _66MHz,$@)" ] || \ |
| 364 | { echo "#define CONFIG_66MHz" >>include/config.h ; \ |
| 365 | echo "... with 66MHz system clock" ; \ |
| 366 | } |
| 367 | @[ -z "$(findstring _80MHz,$@)" ] || \ |
| 368 | { echo "#define CONFIG_80MHz" >>include/config.h ; \ |
| 369 | echo "... with 80MHz system clock" ; \ |
| 370 | } |
| 371 | @[ -z "$(findstring _LCD,$@)" ] || \ |
| 372 | { echo "#define CONFIG_LCD" >>include/config.h ; \ |
| 373 | echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \ |
| 374 | echo "... with LCD display" ; \ |
| 375 | } |
| 376 | @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx |
| 377 | |
| 378 | TTTech_config: unconfig |
| 379 | @echo "#define CONFIG_LCD" >include/config.h |
| 380 | @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h |
| 381 | @./mkconfig -a TQM823L ppc mpc8xx tqm8xx |
| 382 | |
| 383 | ######################################################################### |
| 384 | ## PPC4xx Systems |
| 385 | ######################################################################### |
| 386 | |
| 387 | ADCIOP_config: unconfig |
| 388 | @./mkconfig $(@:_config=) ppc ppc4xx adciop esd |
| 389 | |
| 390 | AR405_config: unconfig |
| 391 | @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd |
| 392 | |
| 393 | CANBT_config: unconfig |
| 394 | @./mkconfig $(@:_config=) ppc ppc4xx canbt esd |
| 395 | |
| 396 | CPCI405_config \ |
| 397 | CPCI4052_config: unconfig |
| 398 | @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd |
| 399 | @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk |
| 400 | |
| 401 | CPCI440_config: unconfig |
| 402 | @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd |
| 403 | |
| 404 | CPCIISER4_config: unconfig |
| 405 | @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd |
| 406 | |
| 407 | CRAYL1_config:unconfig |
| 408 | @./mkconfig $(@:_config=) ppc ppc4xx L1 cray |
| 409 | |
| 410 | DASA_SIM_config: unconfig |
| 411 | @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd |
| 412 | |
| 413 | DU405_config: unconfig |
| 414 | @./mkconfig $(@:_config=) ppc ppc4xx du405 esd |
| 415 | |
| 416 | EBONY_config:unconfig |
| 417 | @./mkconfig $(@:_config=) ppc ppc4xx ebony |
| 418 | |
| 419 | ERIC_config:unconfig |
| 420 | @./mkconfig $(@:_config=) ppc ppc4xx eric |
| 421 | |
| 422 | MIP405_config:unconfig |
| 423 | @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl |
| 424 | |
| 425 | ML2_config:unconfig |
| 426 | @./mkconfig $(@:_config=) ppc ppc4xx ml2 |
| 427 | |
| 428 | OCRTC_config \ |
| 429 | ORSG_config: unconfig |
| 430 | @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd |
| 431 | |
| 432 | PCI405_config: unconfig |
| 433 | @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd |
| 434 | |
| 435 | PIP405_config:unconfig |
| 436 | @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl |
| 437 | |
| 438 | W7OLMC_config \ |
| 439 | W7OLMG_config: unconfig |
| 440 | @./mkconfig $(@:_config=) ppc ppc4xx w7o |
| 441 | |
| 442 | WALNUT405_config:unconfig |
| 443 | @./mkconfig $(@:_config=) ppc ppc4xx walnut405 |
| 444 | |
| 445 | ######################################################################### |
| 446 | ## MPC824x Systems |
| 447 | ######################################################################### |
| 448 | BMW_config: unconfig |
| 449 | @./mkconfig $(@:_config=) ppc mpc824x bmw |
| 450 | |
| 451 | CU824_config: unconfig |
| 452 | @./mkconfig $(@:_config=) ppc mpc824x cu824 |
| 453 | |
| 454 | MOUSSE_config: unconfig |
| 455 | @./mkconfig $(@:_config=) ppc mpc824x mousse |
| 456 | |
| 457 | MUSENKI_config: unconfig |
| 458 | @./mkconfig $(@:_config=) ppc mpc824x musenki |
| 459 | |
| 460 | OXC_config: unconfig |
| 461 | @./mkconfig $(@:_config=) ppc mpc824x oxc |
| 462 | |
| 463 | PN62_config: unconfig |
| 464 | @./mkconfig $(@:_config=) ppc mpc824x pn62 |
| 465 | |
| 466 | Sandpoint8240_config: unconfig |
| 467 | @./mkconfig $(@:_config=) ppc mpc824x sandpoint |
| 468 | |
| 469 | Sandpoint8245_config: unconfig |
| 470 | @./mkconfig $(@:_config=) ppc mpc824x sandpoint |
| 471 | |
| 472 | utx8245_config: unconfig |
| 473 | @./mkconfig $(@:_config=) ppc mpc824x utx8245 |
| 474 | |
| 475 | ######################################################################### |
| 476 | ## MPC8260 Systems |
| 477 | ######################################################################### |
| 478 | xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1))))) |
| 479 | |
| 480 | cogent_mpc8260_config: unconfig |
| 481 | @./mkconfig $(@:_config=) ppc mpc8260 cogent |
| 482 | |
| 483 | CPU86_config \ |
| 484 | CPU86_ROMBOOT_config: unconfig |
| 485 | @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86 |
| 486 | @cd ./include ; \ |
| 487 | if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ |
| 488 | echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ |
| 489 | echo "... booting from 8-bit flash" ; \ |
| 490 | else \ |
| 491 | echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ |
| 492 | echo "... booting from 64-bit flash" ; \ |
| 493 | fi; \ |
| 494 | echo "export CONFIG_BOOT_ROM" >> config.mk; |
| 495 | |
| 496 | ep8260_config: unconfig |
| 497 | @./mkconfig $(@:_config=) ppc mpc8260 ep8260 |
| 498 | |
| 499 | gw8260_config: unconfig |
| 500 | @./mkconfig $(@:_config=) ppc mpc8260 gw8260 |
| 501 | |
| 502 | hymod_config: unconfig |
| 503 | @./mkconfig $(@:_config=) ppc mpc8260 hymod |
| 504 | |
| 505 | IPHASE4539_config: unconfig |
| 506 | @./mkconfig $(@:_config=) ppc mpc8260 iphase4539 |
| 507 | |
| 508 | MPC8260ADS_config: unconfig |
| 509 | @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads |
| 510 | |
| 511 | PM826_config \ |
| 512 | PM826_ROMBOOT_config: unconfig |
| 513 | @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826 |
| 514 | @cd ./include ; \ |
| 515 | if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ |
| 516 | echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ |
| 517 | echo "... booting from 8-bit flash" ; \ |
| 518 | else \ |
| 519 | echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ |
| 520 | echo "... booting from 64-bit flash" ; \ |
| 521 | fi; \ |
| 522 | echo "export CONFIG_BOOT_ROM" >> config.mk; \ |
| 523 | |
| 524 | ppmc8260_config: unconfig |
| 525 | @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260 |
| 526 | |
| 527 | RPXsuper_config: unconfig |
| 528 | @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper |
| 529 | |
| 530 | rsdproto_config: unconfig |
| 531 | @./mkconfig $(@:_config=) ppc mpc8260 rsdproto |
| 532 | |
| 533 | sacsng_config: unconfig |
| 534 | @./mkconfig $(@:_config=) ppc mpc8260 sacsng |
| 535 | |
| 536 | sbc8260_config: unconfig |
| 537 | @./mkconfig $(@:_config=) ppc mpc8260 sbc8260 |
| 538 | |
| 539 | SCM_config: unconfig |
| 540 | @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens |
| 541 | |
| 542 | TQM8260_config \ |
| 543 | TQM8260_L2_config \ |
| 544 | TQM8260_266MHz_config \ |
| 545 | TQM8260_L2_266MHz_config \ |
| 546 | TQM8260_300MHz_config: unconfig |
| 547 | @ >include/config.h |
| 548 | @if [ "$(findstring _L2_,$@)" ] ; then \ |
| 549 | echo "#define CONFIG_L2_CACHE" >>include/config.h ; \ |
| 550 | echo "... with L2 Cache support (60x Bus Mode)" ; \ |
| 551 | else \ |
| 552 | echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \ |
| 553 | echo "... without L2 Cache support" ; \ |
| 554 | fi |
| 555 | @[ -z "$(findstring _266MHz,$@)" ] || \ |
| 556 | { echo "#define CONFIG_266MHz" >>include/config.h ; \ |
| 557 | echo "... with 266MHz system clock" ; \ |
| 558 | } |
| 559 | @[ -z "$(findstring _300MHz,$@)" ] || \ |
| 560 | { echo "#define CONFIG_300MHz" >>include/config.h ; \ |
| 561 | echo "... with 300MHz system clock" ; \ |
| 562 | } |
| 563 | @./mkconfig -a $(call xtract_82xx,$@) ppc mpc8260 tqm8260 |
| 564 | |
| 565 | ######################################################################### |
| 566 | ## 74xx/7xx Systems |
| 567 | ######################################################################### |
| 568 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 569 | AmigaOneG3SE_config: unconfig |
| 570 | @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI |
| 571 | |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 572 | EVB64260_config \ |
| 573 | EVB64260_750CX_config: unconfig |
| 574 | @./mkconfig EVB64260 ppc 74xx_7xx evb64260 |
| 575 | |
| 576 | ZUMA_config: unconfig |
| 577 | @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260 |
| 578 | |
| 579 | PCIPPC2_config \ |
| 580 | PCIPPC6_config: unconfig |
| 581 | @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2 |
| 582 | |
| 583 | BAB7xx_config: unconfig |
| 584 | @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec |
| 585 | |
| 586 | ELPPC_config: unconfig |
| 587 | @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec |
| 588 | |
| 589 | #======================================================================== |
| 590 | # ARM |
| 591 | #======================================================================== |
| 592 | ######################################################################### |
| 593 | ## StrongARM Systems |
| 594 | ######################################################################### |
| 595 | |
| 596 | lart_config : unconfig |
| 597 | @./mkconfig $(@:_config=) arm sa1100 lart |
| 598 | |
| 599 | dnp1110_config : unconfig |
| 600 | @./mkconfig $(@:_config=) arm sa1100 dnp1110 |
| 601 | |
| 602 | shannon_config : unconfig |
| 603 | @./mkconfig $(@:_config=) arm sa1100 shannon |
| 604 | |
| 605 | ######################################################################### |
| 606 | ## ARM920T Systems |
| 607 | ######################################################################### |
| 608 | |
| 609 | smdk2400_config : unconfig |
| 610 | @./mkconfig $(@:_config=) arm arm920t smdk2400 |
| 611 | |
| 612 | smdk2410_config : unconfig |
| 613 | @./mkconfig $(@:_config=) arm arm920t smdk2410 |
| 614 | |
| 615 | trab_config : unconfig |
| 616 | @./mkconfig $(@:_config=) arm arm920t trab |
| 617 | |
| 618 | ######################################################################### |
| 619 | ## ARM720T Systems |
| 620 | ######################################################################### |
| 621 | |
| 622 | impa7_config : unconfig |
| 623 | @./mkconfig $(@:_config=) arm arm720t impa7 |
| 624 | |
| 625 | ep7312_config : unconfig |
| 626 | @./mkconfig $(@:_config=) arm arm720t ep7312 |
| 627 | |
| 628 | ######################################################################### |
| 629 | ## Xscale Systems |
| 630 | ######################################################################### |
| 631 | |
| 632 | lubbock_config : unconfig |
| 633 | @./mkconfig $(@:_config=) arm xscale lubbock |
| 634 | |
| 635 | cradle_config : unconfig |
| 636 | @./mkconfig $(@:_config=) arm xscale cradle |
| 637 | |
| 638 | csb226_config : unconfig |
| 639 | @./mkconfig $(@:_config=) arm xscale csb226 |
| 640 | |
wdenk | 2262cfe | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 641 | #======================================================================== |
| 642 | # i386 |
| 643 | #======================================================================== |
| 644 | ######################################################################### |
| 645 | ## AMD SC520 CDP |
| 646 | ######################################################################### |
| 647 | sc520_cdp_config : unconfig |
| 648 | @./mkconfig $(@:_config=) i386 i386 sc520_cdp |
| 649 | |
wdenk | 7ebf744 | 2002-11-02 23:17:16 +0000 | [diff] [blame] | 650 | ######################################################################### |
| 651 | |
| 652 | clean: |
| 653 | find . -type f \ |
| 654 | \( -name 'core' -o -name '*.bak' -o -name '*~' \ |
| 655 | -o -name '*.o' -o -name '*.a' \) -print \ |
| 656 | | xargs rm -f |
| 657 | rm -f examples/hello_world examples/timer examples/eepro100_eeprom |
| 658 | rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr |
| 659 | rm -f tools/easylogo/easylogo tools/bmp_logo |
| 660 | rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend |
| 661 | |
| 662 | clobber: clean |
| 663 | find . -type f \ |
| 664 | \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \ |
| 665 | -print \ |
| 666 | | xargs rm -f |
| 667 | rm -f $(OBJS) *.bak tags TAGS |
| 668 | rm -fr *.*~ |
| 669 | rm -f u-boot u-boot.bin u-boot.elf u-boot.srec u-boot.map System.map |
| 670 | rm -f tools/crc32.c tools/environment.c |
| 671 | rm -f include/asm/arch include/asm |
| 672 | |
| 673 | mrproper \ |
| 674 | distclean: clobber unconfig |
| 675 | |
| 676 | backup: |
| 677 | F=`basename $(TOPDIR)` ; cd .. ; \ |
| 678 | gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F |
| 679 | |
| 680 | ######################################################################### |