[U-Boot-Users] [PATCH] FSL: Clean up board/freescale/common/Makefile

Jon Loeliger jdl at freescale.com
Wed Mar 19 21:02:07 CET 2008


Each file that can be built here now follows some
CONFIG_ option so that they are appropriately built
or not, as needed.  And CONFIG_ defines were added
to various board config files to make sure that happens.

The other board/freescale/*/Makefiles no longer need
to reach up and over into ../common to build their
individually needed files any more.

Boards that are CDS specific were renamed with cds_ prefix.

Signed-off-by: Jon Loeliger <jdl at freescale.com>
---

Hey Andy,

Could you please pick this one up and slate a
pull request for it, please?  It's all 85xx crud.

Thanks,
jdl



 board/freescale/common/Makefile                    |   12 ++++++++++--
 board/freescale/common/{eeprom.c => cds_eeprom.c}  |    0 
 .../freescale/common/{ft_board.c => cds_pci_ft.c}  |    0 
 board/freescale/common/{via.c => cds_via.c}        |    0 
 board/freescale/mpc8541cds/Makefile                |   17 ++++++-----------
 board/freescale/mpc8548cds/Makefile                |   17 ++++++-----------
 board/freescale/mpc8555cds/Makefile                |   17 ++++++-----------
 board/freescale/mpc8568mds/Makefile                |    3 ---
 board/freescale/mpc8610hpcd/Makefile               |    4 ----
 include/configs/MPC8541CDS.h                       |    5 +++++
 include/configs/MPC8548CDS.h                       |    5 +++++
 include/configs/MPC8555CDS.h                       |    5 +++++
 12 files changed, 43 insertions(+), 42 deletions(-)
 rename board/freescale/common/{eeprom.c => cds_eeprom.c} (100%)
 rename board/freescale/common/{ft_board.c => cds_pci_ft.c} (100%)
 rename board/freescale/common/{via.c => cds_via.c} (100%)

diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 6665e7f..6340b41 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -29,10 +29,18 @@ endif
 
 LIB	= $(obj)lib$(VENDOR).a
 
-COBJS-${CONFIG_PQ_MDS_PIB}	+= pq-mds-pib.o
-COBJS-${CONFIG_ID_EEPROM}	+= sys_eeprom.o
+COBJS-${CONFIG_FSL_CADMUS}	+= cadmus.o
+COBJS-${CONFIG_FSL_CDS_EEPROM}	+= cds_eeprom.o
+COBJS-${CONFIG_FSL_VIA}		+= cds_via.o
 COBJS-${CONFIG_FSL_DIU_FB}	+= fsl_diu_fb.o fsl_logo_bmp.o
 COBJS-${CONFIG_FSL_PIXIS}	+= pixis.o
+COBJS-${CONFIG_PQ_MDS_PIB}	+= pq-mds-pib.o
+COBJS-${CONFIG_ID_EEPROM}	+= sys_eeprom.o
+
+COBJS-${CONFIG_MPC8541CDS}	+= cds_pci_ft.o
+COBJS-${CONFIG_MPC8548CDS}	+= cds_pci_ft.o
+COBJS-${CONFIG_MPC8555CDS}	+= cds_pci_ft.o
+
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS-y))
diff --git a/board/freescale/common/eeprom.c b/board/freescale/common/cds_eeprom.c
similarity index 100%
rename from board/freescale/common/eeprom.c
rename to board/freescale/common/cds_eeprom.c
diff --git a/board/freescale/common/ft_board.c b/board/freescale/common/cds_pci_ft.c
similarity index 100%
rename from board/freescale/common/ft_board.c
rename to board/freescale/common/cds_pci_ft.c
diff --git a/board/freescale/common/via.c b/board/freescale/common/cds_via.c
similarity index 100%
rename from board/freescale/common/via.c
rename to board/freescale/common/cds_via.c
diff --git a/board/freescale/mpc8541cds/Makefile b/board/freescale/mpc8541cds/Makefile
index d1a585a..3ae2e97 100644
--- a/board/freescale/mpc8541cds/Makefile
+++ b/board/freescale/mpc8541cds/Makefile
@@ -23,21 +23,16 @@
 #
 
 include $(TOPDIR)/config.mk
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= $(BOARD).o law.o tlb.o \
-	   ../common/cadmus.o \
-	   ../common/eeprom.o \
-	   ../common/ft_board.o \
-	   ../common/via.o
+COBJS-y	+= $(BOARD).o
+COBJS-y	+= law.o
+COBJS-y	+= tlb.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS))
-SOBJS	:= $(addprefix $(obj),$(SOBJS))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y))
+SOBJS	:= $(addprefix $(obj),$(SOBJS-y))
 
 $(LIB):	$(obj).depend $(OBJS) $(SOBJS)
 	$(AR) $(ARFLAGS) $@ $(OBJS)
diff --git a/board/freescale/mpc8548cds/Makefile b/board/freescale/mpc8548cds/Makefile
index d1a585a..3ae2e97 100644
--- a/board/freescale/mpc8548cds/Makefile
+++ b/board/freescale/mpc8548cds/Makefile
@@ -23,21 +23,16 @@
 #
 
 include $(TOPDIR)/config.mk
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= $(BOARD).o law.o tlb.o \
-	   ../common/cadmus.o \
-	   ../common/eeprom.o \
-	   ../common/ft_board.o \
-	   ../common/via.o
+COBJS-y	+= $(BOARD).o
+COBJS-y	+= law.o
+COBJS-y	+= tlb.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS))
-SOBJS	:= $(addprefix $(obj),$(SOBJS))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y))
+SOBJS	:= $(addprefix $(obj),$(SOBJS-y))
 
 $(LIB):	$(obj).depend $(OBJS) $(SOBJS)
 	$(AR) $(ARFLAGS) $@ $(OBJS)
diff --git a/board/freescale/mpc8555cds/Makefile b/board/freescale/mpc8555cds/Makefile
index d1a585a..3ae2e97 100644
--- a/board/freescale/mpc8555cds/Makefile
+++ b/board/freescale/mpc8555cds/Makefile
@@ -23,21 +23,16 @@
 #
 
 include $(TOPDIR)/config.mk
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= $(BOARD).o law.o tlb.o \
-	   ../common/cadmus.o \
-	   ../common/eeprom.o \
-	   ../common/ft_board.o \
-	   ../common/via.o
+COBJS-y	+= $(BOARD).o
+COBJS-y	+= law.o
+COBJS-y	+= tlb.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS))
-SOBJS	:= $(addprefix $(obj),$(SOBJS))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y))
+SOBJS	:= $(addprefix $(obj),$(SOBJS-y))
 
 $(LIB):	$(obj).depend $(OBJS) $(SOBJS)
 	$(AR) $(ARFLAGS) $@ $(OBJS)
diff --git a/board/freescale/mpc8568mds/Makefile b/board/freescale/mpc8568mds/Makefile
index d9f20f9..8294d3b 100644
--- a/board/freescale/mpc8568mds/Makefile
+++ b/board/freescale/mpc8568mds/Makefile
@@ -23,9 +23,6 @@
 #
 
 include $(TOPDIR)/config.mk
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
 
 LIB	= $(obj)lib$(BOARD).a
 
diff --git a/board/freescale/mpc8610hpcd/Makefile b/board/freescale/mpc8610hpcd/Makefile
index 489689e..e17a9cb 100644
--- a/board/freescale/mpc8610hpcd/Makefile
+++ b/board/freescale/mpc8610hpcd/Makefile
@@ -21,10 +21,6 @@
 
 include $(TOPDIR)/config.mk
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= $(BOARD).o law.o
diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h
index f1a86e6..3f3f741 100644
--- a/include/configs/MPC8541CDS.h
+++ b/include/configs/MPC8541CDS.h
@@ -49,6 +49,9 @@
 
 #define CONFIG_FSL_LAW		1	/* Use common FSL init code */
 
+#define CONFIG_FSL_VIA
+#define CONFIG_FSL_CDS_EEPROM
+
 /*
  * When initializing flash, if we cannot find the manufacturer ID,
  * assume this is the AMD flash associated with the CDS board.
@@ -274,6 +277,8 @@ extern unsigned long get_clock_freq(void);
  * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7
  */
 
+#define CONFIG_FSL_CADMUS
+
 #define CADMUS_BASE_ADDR 0xf8000000
 #define CFG_BR3_PRELIM   0xf8000801
 #define CFG_OR3_PRELIM   0xfff00ff7
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 2d44df4..fc8ad88 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -57,6 +57,9 @@
 
 #define CONFIG_FSL_LAW		1	/* Use common FSL init code */
 
+#define CONFIG_FSL_VIA
+#define CONFIG_FSL_CDS_EEPROM
+
 /*
  * When initializing flash, if we cannot find the manufacturer ID,
  * assume this is the AMD flash associated with the CDS board.
@@ -297,6 +300,8 @@ extern unsigned long get_clock_freq(void);
  * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7
  */
 
+#define CONFIG_FSL_CADMUS
+
 #define CADMUS_BASE_ADDR 0xf8000000
 #define CFG_BR3_PRELIM	 0xf8000801
 #define CFG_OR3_PRELIM	 0xfff00ff7
diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h
index fa0f7b3..500b57c 100644
--- a/include/configs/MPC8555CDS.h
+++ b/include/configs/MPC8555CDS.h
@@ -49,6 +49,9 @@
 
 #define CONFIG_FSL_LAW		1	/* Use common FSL init code */
 
+#define CONFIG_FSL_VIA
+#define CONFIG_FSL_CDS_EEPROM
+
 /*
  * When initializing flash, if we cannot find the manufacturer ID,
  * assume this is the AMD flash associated with the CDS board.
@@ -274,6 +277,8 @@ extern unsigned long get_clock_freq(void);
  * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7
  */
 
+#define CONFIG_FSL_CADMUS
+
 #define CADMUS_BASE_ADDR 0xf8000000
 #define CFG_BR3_PRELIM   0xf8000801
 #define CFG_OR3_PRELIM   0xfff00ff7
-- 
1.5.4.3.340.g97b97





More information about the U-Boot mailing list