diff options
| author | Kim Phillips <kim.phillips@freescale.com> | 2007-08-21 17:00:17 -0500 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2007-08-29 02:15:46 +0200 | 
| commit | 7608d75f9c87c9eb5b3a43219d0506d3e979a13f (patch) | |
| tree | 6370fbb2dd1c25a645144617427e10eb28fb98df | |
| parent | ef8f20752712dc1cdbd86f47e3bd6e35f81c83fd (diff) | |
| download | olio-uboot-2014.01-7608d75f9c87c9eb5b3a43219d0506d3e979a13f.tar.xz olio-uboot-2014.01-7608d75f9c87c9eb5b3a43219d0506d3e979a13f.zip | |
support board vendor-common makefiles
if a board/$(VENDOR)/common/Makefile exists, build it.
also add the first such case, board/freescale/common/Makefile, to
handle building board-shared EEPROM, PIXIS, and MDS-PIB code, as
dictated by board configuration.
thusly get rid of alternate build dir errors such as:
FATAL: can't create /work/wd/tmp/u-boot-ppc/board/freescale/mpc8360emds/../common/pq-mds-pib.o: No such file or directory
by putting the common/ mkdir command in its proper place (the common
Makefile). Common bits from existing individual board Makefiles have
been removed.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | board/freescale/common/Makefile | 56 | ||||
| -rw-r--r-- | board/freescale/common/pixis.c | 3 | ||||
| -rw-r--r-- | board/freescale/common/pq-mds-pib.c | 3 | ||||
| -rw-r--r-- | board/freescale/mpc832xemds/Makefile | 2 | ||||
| -rw-r--r-- | board/freescale/mpc8360emds/Makefile | 2 | ||||
| -rw-r--r-- | board/freescale/mpc8544ds/Makefile | 7 | ||||
| -rw-r--r-- | board/freescale/mpc8641hpcn/Makefile | 8 | ||||
| -rw-r--r-- | include/configs/MPC8544DS.h | 1 | ||||
| -rw-r--r-- | include/configs/MPC8641HPCN.h | 1 | 
10 files changed, 70 insertions, 15 deletions
| @@ -190,6 +190,8 @@ endif  OBJS := $(addprefix $(obj),$(OBJS))  LIBS  = lib_generic/libgeneric.a +LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ +	"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)  LIBS += board/$(BOARDDIR)/lib$(BOARD).a  LIBS += cpu/$(CPU)/lib$(CPU).a  ifdef SOC diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile new file mode 100644 index 000000000..44f613e41 --- /dev/null +++ b/board/freescale/common/Makefile @@ -0,0 +1,56 @@ +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)board/$(VENDOR)/common) +endif + +LIB	= $(obj)lib$(VENDOR).a + +COBJS	:= sys_eeprom.o	\ +	   pixis.o	\ +	   pq-mds-pib.o + +SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS	:= $(addprefix $(obj),$(COBJS)) +SOBJS	:= $(addprefix $(obj),$(SOBJS)) + +$(LIB):	$(obj).depend $(OBJS) +	$(AR) $(ARFLAGS) $@ $(OBJS) + +clean: +	rm -f $(SOBJS) $(OBJS) + +distclean:	clean +	rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c index 99cc2ee19..ae4bef187 100644 --- a/board/freescale/common/pixis.c +++ b/board/freescale/common/pixis.c @@ -27,6 +27,8 @@  #include <watchdog.h>  #include <asm/cache.h> +#ifdef CONFIG_FSL_PIXIS +  #include "pixis.h" @@ -470,3 +472,4 @@ U_BOOT_CMD(  	"    pixis_reset altbank cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>\n"  	"    pixis_reset cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>\n"  	); +#endif /* CONFIG_FSL_PIXIS */ diff --git a/board/freescale/common/pq-mds-pib.c b/board/freescale/common/pq-mds-pib.c index 8c013c72f..d79f2eb2e 100644 --- a/board/freescale/common/pq-mds-pib.c +++ b/board/freescale/common/pq-mds-pib.c @@ -12,6 +12,8 @@  #include <i2c.h>  #include <asm/io.h> +#ifdef CONFIG_PQ_MDS_PIB +  #include "pq-mds-pib.h"  int pib_init(void) @@ -100,3 +102,4 @@ int pib_init(void)  	i2c_set_bus_num(orig_i2c_bus);  	return 0;  } +#endif /* CONFIG_PQ_MDS_PIB */ diff --git a/board/freescale/mpc832xemds/Makefile b/board/freescale/mpc832xemds/Makefile index ea52484c0..5ec7a871d 100644 --- a/board/freescale/mpc832xemds/Makefile +++ b/board/freescale/mpc832xemds/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk  LIB	= $(obj)lib$(BOARD).a -COBJS	:= $(BOARD).o pci.o ../common/pq-mds-pib.o +COBJS	:= $(BOARD).o pci.o  SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)  OBJS	:= $(addprefix $(obj),$(COBJS)) diff --git a/board/freescale/mpc8360emds/Makefile b/board/freescale/mpc8360emds/Makefile index ea52484c0..5ec7a871d 100644 --- a/board/freescale/mpc8360emds/Makefile +++ b/board/freescale/mpc8360emds/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk  LIB	= $(obj)lib$(BOARD).a -COBJS	:= $(BOARD).o pci.o ../common/pq-mds-pib.o +COBJS	:= $(BOARD).o pci.o  SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)  OBJS	:= $(addprefix $(obj),$(COBJS)) diff --git a/board/freescale/mpc8544ds/Makefile b/board/freescale/mpc8544ds/Makefile index 308f707de..006fdc95e 100644 --- a/board/freescale/mpc8544ds/Makefile +++ b/board/freescale/mpc8544ds/Makefile @@ -24,14 +24,9 @@  include $(TOPDIR)/config.mk -ifneq ($(OBJTREE),$(SRCTREE)) -$(shell mkdir -p $(obj)../common) -endif -  LIB	= $(obj)lib$(BOARD).a -COBJS	:= $(BOARD).o \ -	   ../common/pixis.o +COBJS	:= $(BOARD).o  SOBJS	:= init.o diff --git a/board/freescale/mpc8641hpcn/Makefile b/board/freescale/mpc8641hpcn/Makefile index 93b015d47..201da3ebe 100644 --- a/board/freescale/mpc8641hpcn/Makefile +++ b/board/freescale/mpc8641hpcn/Makefile @@ -23,15 +23,9 @@  include $(TOPDIR)/config.mk -ifneq ($(OBJTREE),$(SRCTREE)) -$(shell mkdir -p $(obj)../common) -endif -  LIB	= $(obj)lib$(BOARD).a -COBJS	:= $(BOARD).o \ -		../common/sys_eeprom.o \ -		../common/pixis.o +COBJS	:= $(BOARD).o  SOBJS	:= init.o diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index 07631b921..9743f031e 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -181,6 +181,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);  #define CFG_BR3_PRELIM		0xf8100801	/* port size 8bit */  #define CFG_OR3_PRELIM		0xfff06ff7	/* 1MB PIXIS area*/ +#define CONFIG_FSL_PIXIS	1	/* use common PIXIS code */  #define PIXIS_BASE	0xf8100000	/* PIXIS registers */  #define PIXIS_ID		0x0	/* Board ID at offset 0 */  #define PIXIS_VER		0x1	/* Board version at offset 1 */ diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h index bf25f7f4f..7d8a380dc 100644 --- a/include/configs/MPC8641HPCN.h +++ b/include/configs/MPC8641HPCN.h @@ -185,6 +185,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);  #define CFG_OR3_PRELIM		0xfff06ff7	/* 1MB PIXIS area*/ +#define CONFIG_FSL_PIXIS	1	/* use common PIXIS code */  #define PIXIS_BASE	0xf8100000      /* PIXIS registers */  #define PIXIS_ID		0x0	/* Board ID at offset 0 */  #define PIXIS_VER		0x1	/* Board version at offset 1 */ |