[PATCH 1/3] bsp/altera-cyclone-v: Add socal from hwlib.

Christian Mauderer christian.mauderer at embedded-brains.de
Fri Jul 25 09:49:29 UTC 2014


From: Christian Mauderer <Christian.Mauderer at embedded-brains.de>

Some of the headers from the hwlib need the files from the socal subdirectory.
---
 c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am  | 17 +++++++-
 .../lib/libbsp/arm/altera-cyclone-v/preinstall.am  | 45 ++++++++++++++++++++++
 2 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am b/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
index 6d7115b..e92e728 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
@@ -10,6 +10,7 @@ ACLOCAL_AMFLAGS = -I ../../../../aclocal
 include $(top_srcdir)/../../../../automake/compile.am
 
 include_bspdir = $(includedir)/bsp
+include_bsp_socaldir = $(includedir)/bsp/socal
 include_libcpudir = $(includedir)/libcpu
 
 dist_project_lib_DATA = bsp_specs
@@ -27,6 +28,8 @@ nodist_include_HEADERS = ../../shared/include/coverhd.h \
 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
 
 include_bsp_HEADERS =
+include_bsp_socal_HEADERS =
+
 include_bsp_HEADERS += ../../shared/include/utility.h
 include_bsp_HEADERS += ../../shared/include/irq-generic.h
 include_bsp_HEADERS += ../../shared/include/irq-info.h
@@ -71,8 +74,18 @@ include_bsp_HEADERS += hwlib/include/hwlib.h
 #include_bsp_HEADERS += hwlib/include/alt_watchdog.h
 #The following Altera hwlib headers would be problematic with RTEMS:
 #include_bsp_HEADERS += hwlib/include/alt_interrupt.h
-#All header files from hwlib/include/socal are regarded as BSP
-#internal and thus not installed
+
+# Some of the headers from hwlib need the files from socal. Install them.
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_clkmgr.h
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_gpio.h
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_i2c.h
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_l3.h
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_rstmgr.h
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_sdr.h
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_sysmgr.h
+include_bsp_socal_HEADERS += hwlib/include/socal/alt_uart.h
+include_bsp_socal_HEADERS += hwlib/include/socal/hps.h
+include_bsp_socal_HEADERS += hwlib/include/socal/socal.h
 
 include_libcpu_HEADERS = ../../../libcpu/arm/shared/include/arm-cp15.h
 
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am b/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am
index 3f83665..8873d31 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am
@@ -33,6 +33,11 @@ $(PROJECT_INCLUDE)/bsp/$(dirstamp):
 	@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 
+$(PROJECT_INCLUDE)/bsp/socal/$(dirstamp):
+	@$(MKDIR_P) $(PROJECT_INCLUDE)/bsp/socal
+	@: > $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+
 $(PROJECT_INCLUDE)/libcpu/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/libcpu
 	@: > $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
@@ -174,6 +179,46 @@ $(PROJECT_INCLUDE)/bsp/hwlib.h: hwlib/include/hwlib.h $(PROJECT_INCLUDE)/bsp/$(d
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/hwlib.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/hwlib.h
 
+$(PROJECT_INCLUDE)/bsp/socal/alt_clkmgr.h: hwlib/include/socal/alt_clkmgr.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_clkmgr.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_clkmgr.h
+
+$(PROJECT_INCLUDE)/bsp/socal/alt_gpio.h: hwlib/include/socal/alt_gpio.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_gpio.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_gpio.h
+
+$(PROJECT_INCLUDE)/bsp/socal/alt_i2c.h: hwlib/include/socal/alt_i2c.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_i2c.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_i2c.h
+
+$(PROJECT_INCLUDE)/bsp/socal/alt_l3.h: hwlib/include/socal/alt_l3.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_l3.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_l3.h
+
+$(PROJECT_INCLUDE)/bsp/socal/alt_rstmgr.h: hwlib/include/socal/alt_rstmgr.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_rstmgr.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_rstmgr.h
+
+$(PROJECT_INCLUDE)/bsp/socal/alt_sdr.h: hwlib/include/socal/alt_sdr.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_sdr.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_sdr.h
+
+$(PROJECT_INCLUDE)/bsp/socal/alt_sysmgr.h: hwlib/include/socal/alt_sysmgr.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_sysmgr.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_sysmgr.h
+
+$(PROJECT_INCLUDE)/bsp/socal/alt_uart.h: hwlib/include/socal/alt_uart.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/alt_uart.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/alt_uart.h
+
+$(PROJECT_INCLUDE)/bsp/socal/hps.h: hwlib/include/socal/hps.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/hps.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/hps.h
+
+$(PROJECT_INCLUDE)/bsp/socal/socal.h: hwlib/include/socal/socal.h $(PROJECT_INCLUDE)/bsp/socal/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/socal/socal.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/socal/socal.h
+
 $(PROJECT_INCLUDE)/libcpu/arm-cp15.h: ../../../libcpu/arm/shared/include/arm-cp15.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/arm-cp15.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/arm-cp15.h
-- 
1.8.4.5




More information about the devel mailing list