diff options
Diffstat (limited to 'board')
31 files changed, 114 insertions, 81 deletions
diff --git a/board/BuS/EB+MCF-EV123/config.mk b/board/BuS/EB+MCF-EV123/config.mk index 9fe2fc5..f03e396 100644 --- a/board/BuS/EB+MCF-EV123/config.mk +++ b/board/BuS/EB+MCF-EV123/config.mk @@ -22,7 +22,7 @@ # MA 02111-1307 USA # -sinclude $(TOPDIR)/board/$(BOARDDIR)/textbase.mk +sinclude $(OBJTREE)/board/$(BOARDDIR)/textbase.mk ifndef TEXT_BASE TEXT_BASE = 0xFE000000 endif diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c index 9986e9a..0f66061 100644 --- a/board/amcc/canyonlands/canyonlands.c +++ b/board/amcc/canyonlands/canyonlands.c @@ -476,8 +476,37 @@ void ft_board_setup(void *blob, bd_t *bd) val[3] = gd->bd->bi_flashsize; rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges", val, sizeof(val), 1); - if (rc) + if (rc) { printf("Unable to update property NOR mapping, err=%s\n", fdt_strerror(rc)); + } + + if (gd->board_type == BOARD_CANYONLANDS_SATA) { + /* + * When SATA is selected we need to disable the first PCIe + * node in the device tree, so that Linux doesn't initialize + * it. + */ + rc = fdt_find_and_setprop(blob, "/plb/pciex@d00000000", "status", + "disabled", sizeof("disabled"), 1); + if (rc) { + printf("Unable to update property status in PCIe node, err=%s\n", + fdt_strerror(rc)); + } + } + + if (gd->board_type == BOARD_CANYONLANDS_PCIE) { + /* + * When PCIe is selected we need to disable the SATA + * node in the device tree, so that Linux doesn't initialize + * it. + */ + rc = fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status", + "disabled", sizeof("disabled"), 1); + if (rc) { + printf("Unable to update property status in PCIe node, err=%s\n", + fdt_strerror(rc)); + } + } } #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ diff --git a/board/amcc/canyonlands/config.mk b/board/amcc/canyonlands/config.mk index 1e4bbc4..2330cae 100644 --- a/board/amcc/canyonlands/config.mk +++ b/board/amcc/canyonlands/config.mk @@ -24,20 +24,12 @@ # AMCC 460EX/460GT Evaluation Board (Canyonlands) board # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ifndef TEXT_BASE TEXT_BASE = 0xFFFA0000 endif -ifeq ($(CONFIG_NAND_U_BOOT),y) -LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds -endif - -ifeq ($(CONFIG_PCIBOOT_U_BOOT),y) -LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds -endif - PLATFORM_CPPFLAGS += -DCONFIG_440=1 ifeq ($(debug),1) diff --git a/board/amcc/kilauea/kilauea.c b/board/amcc/kilauea/kilauea.c index 37ef06e..d806a41 100644 --- a/board/amcc/kilauea/kilauea.c +++ b/board/amcc/kilauea/kilauea.c @@ -230,14 +230,22 @@ int misc_init_r(void) return 0; } -int board_emac_count(void) +static int is_405exr(void) { u32 pvr = get_pvr(); + if (pvr & 0x00000004) + return 0; /* bit 2 set -> 405EX */ + + return 1; /* bit 2 cleared -> 405EXr */ +} + +int board_emac_count(void) +{ /* * 405EXr only has one EMAC interface, 405EX has two */ - if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA)) + if (is_405exr()) return 1; else return 2; @@ -245,12 +253,10 @@ int board_emac_count(void) static int board_pcie_count(void) { - u32 pvr = get_pvr(); - /* * 405EXr only has one EMAC interface, 405EX has two */ - if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA)) + if (is_405exr()) return 1; else return 2; @@ -259,9 +265,8 @@ static int board_pcie_count(void) int checkboard (void) { char *s = getenv("serial#"); - u32 pvr = get_pvr(); - if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA)) + if (is_405exr()) printf("Board: Haleakala - AMCC PPC405EXr Evaluation Board"); else printf("Board: Kilauea - AMCC PPC405EX Evaluation Board"); diff --git a/board/atmel/at91cap9adk/Makefile b/board/atmel/at91cap9adk/Makefile index 6b4b4b0..e33af76 100644 --- a/board/atmel/at91cap9adk/Makefile +++ b/board/atmel/at91cap9adk/Makefile @@ -1,6 +1,6 @@ # # (C) Copyright 2003-2008 -# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de. +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this # project. diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c index 24861ba..5de52b9 100644 --- a/board/atmel/at91cap9adk/at91cap9adk.c +++ b/board/atmel/at91cap9adk/at91cap9adk.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2007-2008 - * Stelian Pop <stelian.pop <at> leadtechdesign.com> + * Stelian Pop <stelian.pop@leadtechdesign.com> * Lead Tech Design <www.leadtechdesign.com> * * See file CREDITS for list of people who contributed to this @@ -25,7 +25,7 @@ #include <common.h> #include <asm/arch/at91cap9.h> #include <asm/arch/at91cap9_matrix.h> -#include <asm/arch/at91sam926x_mc.h> +#include <asm/arch/at91sam9_smc.h> #include <asm/arch/at91_pmc.h> #include <asm/arch/at91_rstc.h> #include <asm/arch/gpio.h> diff --git a/board/atmel/at91cap9adk/led.c b/board/atmel/at91cap9adk/led.c index 04de139..a137c2a 100644 --- a/board/atmel/at91cap9adk/led.c +++ b/board/atmel/at91cap9adk/led.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2007-2008 - * Stelian Pop <stelian.pop <at> leadtechdesign.com> + * Stelian Pop <stelian.pop@leadtechdesign.com> * Lead Tech Design <www.leadtechdesign.com> * * See file CREDITS for list of people who contributed to this diff --git a/board/atmel/at91cap9adk/nand.c b/board/atmel/at91cap9adk/nand.c index c72b024..28091a4 100644 --- a/board/atmel/at91cap9adk/nand.c +++ b/board/atmel/at91cap9adk/nand.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2007-2008 - * Stelian Pop <stelian.pop <at> leadtechdesign.com> + * Stelian Pop <stelian.pop@leadtechdesign.com> * Lead Tech Design <www.leadtechdesign.com> * * (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas diff --git a/board/atmel/at91cap9adk/partition.c b/board/atmel/at91cap9adk/partition.c index 3bffd71..eb1a724 100644 --- a/board/atmel/at91cap9adk/partition.c +++ b/board/atmel/at91cap9adk/partition.c @@ -1,4 +1,6 @@ /* + * (C) Copyright 2008 + * Ulf Samuelsson <ulf@atmel.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/board/atmel/at91cap9adk/u-boot.lds b/board/atmel/at91cap9adk/u-boot.lds index 05a6d83..996f401 100644 --- a/board/atmel/at91cap9adk/u-boot.lds +++ b/board/atmel/at91cap9adk/u-boot.lds @@ -1,6 +1,6 @@ /* * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de> + * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> * * See file CREDITS for list of people who contributed to this * project. diff --git a/board/atmel/at91rm9200dk/partition.c b/board/atmel/at91rm9200dk/partition.c index a8a5fe6..975be17 100644 --- a/board/atmel/at91rm9200dk/partition.c +++ b/board/atmel/at91rm9200dk/partition.c @@ -1,4 +1,6 @@ /* + * (C) Copyright 2008 + * Ulf Samuelsson <ulf@atmel.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/board/atmel/at91sam9260ek/Makefile b/board/atmel/at91sam9260ek/Makefile index defc085..e6e4082 100644 --- a/board/atmel/at91sam9260ek/Makefile +++ b/board/atmel/at91sam9260ek/Makefile @@ -1,6 +1,6 @@ # # (C) Copyright 2003-2008 -# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de. +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this # project. diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c index a55468e..21479ac 100644 --- a/board/atmel/at91sam9260ek/at91sam9260ek.c +++ b/board/atmel/at91sam9260ek/at91sam9260ek.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2007-2008 - * Stelian Pop <stelian.pop <at> leadtechdesign.com> + * Stelian Pop <stelian.pop@leadtechdesign.com> * Lead Tech Design <www.leadtechdesign.com> * * See file CREDITS for list of people who contributed to this @@ -25,7 +25,7 @@ #include <common.h> #include <asm/arch/at91sam9260.h> #include <asm/arch/at91sam9260_matrix.h> -#include <asm/arch/at91sam926x_mc.h> +#include <asm/arch/at91sam9_smc.h> #include <asm/arch/at91_pmc.h> #include <asm/arch/at91_rstc.h> #include <asm/arch/gpio.h> diff --git a/board/atmel/at91sam9260ek/led.c b/board/atmel/at91sam9260ek/led.c index 4c53742..ddc375f 100644 --- a/board/atmel/at91sam9260ek/led.c +++ b/board/atmel/at91sam9260ek/led.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2007-2008 - * Stelian Pop <stelian.pop <at> leadtechdesign.com> + * Stelian Pop <stelian.pop@leadtechdesign.com> * Lead Tech Design <www.leadtechdesign.com> * * See file CREDITS for list of people who contributed to this diff --git a/board/atmel/at91sam9260ek/nand.c b/board/atmel/at91sam9260ek/nand.c index abb788a..7c1e6ab 100644 --- a/board/atmel/at91sam9260ek/nand.c +++ b/board/atmel/at91sam9260ek/nand.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2007-2008 - * Stelian Pop <stelian.pop <at> leadtechdesign.com> + * Stelian Pop <stelian.pop@leadtechdesign.com> * Lead Tech Design <www.leadtechdesign.com> * * (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas diff --git a/board/atmel/at91sam9260ek/partition.c b/board/atmel/at91sam9260ek/partition.c index 389fb2c..557d695 100644 --- a/board/atmel/at91sam9260ek/partition.c +++ b/board/atmel/at91sam9260ek/partition.c @@ -1,4 +1,6 @@ /* + * (C) Copyright 2008 + * Ulf Samuelsson <ulf@atmel.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/board/atmel/at91sam9260ek/u-boot.lds b/board/atmel/at91sam9260ek/u-boot.lds index 05a6d83..996f401 100644 --- a/board/atmel/at91sam9260ek/u-boot.lds +++ b/board/atmel/at91sam9260ek/u-boot.lds @@ -1,6 +1,6 @@ /* * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de> + * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> * * See file CREDITS for list of people who contributed to this * project. diff --git a/board/esd/mecp5200/config.mk b/board/esd/mecp5200/config.mk index 07b5de1..170779d 100644 --- a/board/esd/mecp5200/config.mk +++ b/board/esd/mecp5200/config.mk @@ -32,7 +32,7 @@ # 0x00100000 boot from RAM (for testing only) # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ifndef TEXT_BASE ## Standard: boot high diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index dc39fbe..efe2a3a 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -59,6 +59,7 @@ int checkboard (void) uint pci_slot = get_pci_slot (); uint cpu_board_rev = get_cpu_board_revision (); + uint svr; printf ("Board: CDS Version 0x%02x, PCI Slot %d\n", get_board_version (), pci_slot); @@ -71,12 +72,16 @@ int checkboard (void) */ local_bus_init (); + svr = get_svr(); + /* * Fix CPU2 errata: A core hang possible while executing a * msync instruction and a snoopable transaction from an I/O * master tagged to make quick forward progress is present. + * Fixed in Silicon Rev.2.1 */ - ecm->eebpcr |= (1 << 16); + if (!(SVR_MAJ(svr) >= 2 && SVR_MIN(svr) >= 1)) + ecm->eebpcr |= (1 << 16); /* * Hack TSEC 3 and 4 IO voltages. diff --git a/board/linkstation/Makefile b/board/linkstation/Makefile index 57c84de..8d92d8a 100644 --- a/board/linkstation/Makefile +++ b/board/linkstation/Makefile @@ -23,18 +23,21 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a OBJS = $(BOARD).o ide.o hwctl.o avr.o -$(LIB): .depend $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(OBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) crv $@ $(OBJS) ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/linkstation/config.mk b/board/linkstation/config.mk index bdf611d..d048290 100644 --- a/board/linkstation/config.mk +++ b/board/linkstation/config.mk @@ -35,7 +35,7 @@ # 0x07F00000 boot from RAM # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ifndef TEXT_BASE # For flash image - all models diff --git a/board/munices/config.mk b/board/munices/config.mk index d226244..1b573bc 100644 --- a/board/munices/config.mk +++ b/board/munices/config.mk @@ -29,7 +29,7 @@ # 0xFFF00000 boot high (standard configuration) # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ifndef TEXT_BASE TEXT_BASE = 0xFFF00000 diff --git a/board/mx31ads/lowlevel_init.S b/board/mx31ads/lowlevel_init.S index 099a7ca..e166058 100644 --- a/board/mx31ads/lowlevel_init.S +++ b/board/mx31ads/lowlevel_init.S @@ -220,7 +220,7 @@ lowlevel_init: mov r1, #CS4_BASE ldrh r1, [r1, #0x2] /* Is 27MHz switch set? */ - ands r1, r1, #0x16 + ands r1, r1, #0x10 /* 532-133-66.5 */ ldr r0, =CCM_BASE diff --git a/board/qemu-mips/README b/board/qemu-mips/README index 39570b1..4c1f8ed 100644 --- a/board/qemu-mips/README +++ b/board/qemu-mips/README @@ -1,4 +1,4 @@ -By Vlad Lungu vlad@comsys.ro 2007-Oct-01 +By Vlad Lungu vlad.lungu@windriver.com 2007-Oct-01 ---------------------------------------- Qemu is a full system emulator. See @@ -9,3 +9,7 @@ Limitations & comments Supports the "-m mips" configuration of qemu: serial,NE2000,IDE. Support is big endian only for now (or at least this is what I tested). Derived from au1x00 with a lot of things cut out. + +Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with +recent qemu versions. When using emulated flash, launch with +-pflash <filename> and erase mips_bios.bin. diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c index a6ad7b9..6869074 100644 --- a/board/qemu-mips/qemu-mips.c +++ b/board/qemu-mips/qemu-mips.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2007 - * Vlad Lungu vlad@comsys.ro + * Vlad Lungu vlad.lungu@windriver.com * * See file CREDITS for list of people who contributed to this * project. diff --git a/board/sc520_cdp/sc520_cdp_asm.S b/board/sc520_cdp/sc520_cdp_asm.S index be7b2bb..7f70d65 100644 --- a/board/sc520_cdp/sc520_cdp_asm.S +++ b/board/sc520_cdp/sc520_cdp_asm.S @@ -76,8 +76,8 @@ done: movb $0x88, %al jmp *%ebp /* return to caller */ -.globl __show_boot_progress -__show_boot_progress: +.globl show_boot_progress +show_boot_progress: out %al, $0x80 xchg %al, %ah movw $0x680, %dx diff --git a/board/sc520_spunk/Makefile b/board/sc520_spunk/Makefile index bfb77e8..226c756 100644 --- a/board/sc520_spunk/Makefile +++ b/board/sc520_spunk/Makefile @@ -36,7 +36,7 @@ OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) $(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(AR) $(ARFLAGS) $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) diff --git a/board/sc520_spunk/flash.c b/board/sc520_spunk/flash.c index 4942e59..0b4bf68 100644 --- a/board/sc520_spunk/flash.c +++ b/board/sc520_spunk/flash.c @@ -33,7 +33,6 @@ #define PROBE_BUFFER_SIZE 1024 static unsigned char buffer[PROBE_BUFFER_SIZE]; - #define SC520_MAX_FLASH_BANKS 1 #define SC520_FLASH_BANK0_BASE 0x38000000 /* BOOTCS */ #define SC520_FLASH_BANKSIZE 0x8000000 @@ -62,7 +61,6 @@ flash_info_t flash_info[SC520_MAX_FLASH_BANKS]; /*----------------------------------------------------------------------- */ - static u32 _probe_flash(u32 addr, u32 bw, int il) { u32 result=0; @@ -180,7 +178,6 @@ static u32 _probe_flash(u32 addr, u32 bw, int il) break; } - return result; } @@ -215,11 +212,9 @@ static int identify_flash(unsigned address, int width) enable_interrupts(); } - vendor = res >> 16; device = res & 0xffff; - return res; } @@ -385,7 +380,6 @@ void flash_print_info(flash_info_t *info) break; } - printf(" Size: %ld MB in %d Sectors\n", info->size >> 20, info->sector_count); @@ -399,13 +393,13 @@ void flash_print_info(flash_info_t *info) } printf ("\n"); - done: +done: + return; } /*----------------------------------------------------------------------- */ - static u32 _amd_erase_flash(u32 addr, u32 sector) { unsigned elapsed; @@ -467,7 +461,6 @@ static u32 _intel_erase_flash(u32 addr, u32 sector) *(volatile u16*)(addr + sector) = 0x0020; /* erase setup */ *(volatile u16*)(addr + sector) = 0x00D0; /* erase confirm */ - /* Wait at least 80us - let's wait 1 ms */ __udelay(1000); @@ -486,7 +479,6 @@ static u32 _intel_erase_flash(u32 addr, u32 sector) return 0; } - extern int _intel_erase_flash_end; asm ("_intel_erase_flash_end:\n" ".long 0\n"); @@ -548,7 +540,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) printf ("\n"); } - /* Start erase on unprotected sectors */ for (sect = s_first; sect<=s_last; sect++) { @@ -566,7 +557,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) enable_interrupts(); } - if (res) { printf("Erase timed out, sector %d\n", sect); return res; @@ -576,7 +566,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) } } - return 0; } @@ -586,11 +575,11 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) * 1 - write timeout * 2 - Flash not erased */ -static int _amd_write_word(unsigned start, unsigned dest, unsigned data) +static int _amd_write_word(unsigned start, unsigned dest, u16 data) { - volatile u16 *addr2 = (u16*)start; - volatile u16 *dest2 = (u16*)dest; - volatile u16 *data2 = (u16*)&data; + volatile u16 *addr2 = (volatile u16*)start; + volatile u16 *dest2 = (volatile u16*)dest; + volatile u16 *data2 = (volatile u16*)&data; int i; unsigned elapsed; @@ -601,7 +590,6 @@ static int _amd_write_word(unsigned start, unsigned dest, unsigned data) for (i = 0; i < 2; i++) { - addr2[0x5555] = 0x00AA; addr2[0x2aaa] = 0x0055; addr2[0x5555] = 0x00A0; @@ -630,7 +618,6 @@ extern int _amd_write_word_end; asm ("_amd_write_word_end:\n" ".long 0\n"); - static int _intel_write_word(unsigned start, unsigned dest, unsigned data) { int i; @@ -663,14 +650,12 @@ static int _intel_write_word(unsigned start, unsigned dest, unsigned data) return 0; - } extern int _intel_write_word_end; asm ("_intel_write_word_end:\n" ".long 0\n"); - /*----------------------------------------------------------------------- * Copy memory to flash, returns: * 0 - OK @@ -715,10 +700,8 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) return 3; } - wp = (addr & ~3); /* get lower word aligned address */ - /* * handle unaligned start bytes */ @@ -805,5 +788,4 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) } return rc; - } diff --git a/board/sc520_spunk/sc520_spunk_asm.S b/board/sc520_spunk/sc520_spunk_asm.S index 8b34103..0127076 100644 --- a/board/sc520_spunk/sc520_spunk_asm.S +++ b/board/sc520_spunk/sc520_spunk_asm.S @@ -73,8 +73,8 @@ done: movl $0xfffefc32,%edx jmp *%ebp /* return to caller */ -.globl __show_boot_progress -__show_boot_progress: +.globl show_boot_progress +show_boot_progress: movl $0xfffefc32,%edx xorw $0xffff, %ax movw %ax,(%edx) diff --git a/board/tqm8272/Makefile b/board/tqm8272/Makefile index 3dbf913..6730263 100644 --- a/board/tqm8272/Makefile +++ b/board/tqm8272/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2001 +# (C) Copyright 2001-2008 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -22,19 +22,26 @@ # include $(TOPDIR)/config.mk +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../tqm8xx/) +endif -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o +COBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o -$(LIB): .depend $(OBJS) - $(AR) crv $@ $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/v38b/config.mk b/board/v38b/config.mk index 75577fc..bc55fc7 100644 --- a/board/v38b/config.mk +++ b/board/v38b/config.mk @@ -25,7 +25,7 @@ # MarelV38B board # -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp TEXT_BASE = 0xFF000000 |