Commit 68a62356 authored by Vaibhav Gupta's avatar Vaibhav Gupta

CI/CD: Use fec-os-sw-build image to build entire software

Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent 1d143b4e
...@@ -28,10 +28,10 @@ flawfinder: ...@@ -28,10 +28,10 @@ flawfinder:
script: script:
- make -C software/tools flawfinder - make -C software/tools flawfinder
kernel_build_cc7: software_build:
extends: .kernel_build_cc7 extends: .build_fec_os_sw
variables: variables:
EDL_CI_KBUILD_PATHS: software/kernel EDL_CI_SW_PATHS: software
kernel_build_validation: kernel_build_validation:
extends: .kernel_build_validation extends: .kernel_build_validation
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
# include parent_common.mk for buildsystem's defines # include parent_common.mk for buildsystem's defines
# use absolute path for REPO_PARENT # use absolute path for REPO_PARENT
REPO_PARENT ?= $(shell /bin/pwd)/../../ TOPDIR ?= $(pwd)/..
REPO_PARENT ?= $(TOPDIR)/..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
all: kernel lib tools all: kernel lib tools
...@@ -16,8 +17,6 @@ kernel: ...@@ -16,8 +17,6 @@ kernel:
lib: lib:
tools: lib tools: lib
DESTDIR ?= /usr/local
.PHONY: all clean cppcheck flawfinder modules install modules_install $(DIRS) .PHONY: all clean cppcheck flawfinder modules install modules_install $(DIRS)
install modules_install: install modules_install:
......
...@@ -66,7 +66,7 @@ tdc_buffer_control_regs.h: $(TDC_HDL)/rtl/wbgen/tdc_buffer_control_regs.wb ...@@ -66,7 +66,7 @@ tdc_buffer_control_regs.h: $(TDC_HDL)/rtl/wbgen/tdc_buffer_control_regs.wb
timestamp_fifo_regs.h: $(TDC_HDL)/rtl/wbgen/timestamp_fifo_wb.wb timestamp_fifo_regs.h: $(TDC_HDL)/rtl/wbgen/timestamp_fifo_wb.wb
$(WBGEN2) -s defines -C hw/$@ $< $(WBGEN2) -s defines -C hw/$@ $<
modules: hw_headers modules modules_install: hw_headers
$(MAKE) -C $(KERNELSRC) M=$(CURDIR) ZIO_ABS=$(ZIO_ABS) FMC_ABS=$(FMC_ABS) \ $(MAKE) -C $(KERNELSRC) M=$(CURDIR) ZIO_ABS=$(ZIO_ABS) FMC_ABS=$(FMC_ABS) \
ZIO_EXTRA_SYMBOLS-y=$(ZIO_EXTRA_SYMBOLS-y) \ ZIO_EXTRA_SYMBOLS-y=$(ZIO_EXTRA_SYMBOLS-y) \
FMC_EXTRA_SYMBOLS-y=$(FMC_EXTRA_SYMBOLS-y) \ FMC_EXTRA_SYMBOLS-y=$(FMC_EXTRA_SYMBOLS-y) \
...@@ -74,8 +74,7 @@ modules: hw_headers ...@@ -74,8 +74,7 @@ modules: hw_headers
GIT_VERSION=$(GIT_VERSION) \ GIT_VERSION=$(GIT_VERSION) \
$@ $@
install modules_install: modules install : modules modules_install
$(MAKE) -C $(KERNELSRC) M=$(CURDIR) modules_install
# be able to run the "clean" rule even if $(KERNELSRC) is not valid # be able to run the "clean" rule even if $(KERNELSRC) is not valid
clean: clean:
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
# include parent_common.mk for buildsystem's defines # include parent_common.mk for buildsystem's defines
IGNORE_CPU_SUFFIX := y IGNORE_CPU_SUFFIX := y
REPO_PARENT ?=$(shell pwd)/../../../ TOPDIR ?= $(shell pwd)/../..
REPO_PARENT ?=$(TOPDIR)/..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
ifdef REPO_PARENT ifdef REPO_PARENT
...@@ -41,13 +42,12 @@ CFLAGS += -fPIC ...@@ -41,13 +42,12 @@ CFLAGS += -fPIC
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\"" CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
CFLAGS += -DZIO_GIT_VERSION="\"$(ZIO_GIT_VERSION)\"" CFLAGS += -DZIO_GIT_VERSION="\"$(ZIO_GIT_VERSION)\""
CFLAGS += $(EXTRACFLAGS) CFLAGS += $(EXTRACFLAGS)
DESTDIR ?= /usr/local
CPPCHECK ?= cppcheck CPPCHECK ?= cppcheck
FLAWFINDER ?= flawfinder FLAWFINDER ?= flawfinder
modules all: lib modules all: lib
lib: $(LIB) $(LIBS_XYZ) lib: $(LIB) $(LIBS) $(LIBS_XYZ)
%: %.c $(LIB) %: %.c $(LIB)
$(CC) $(CFLAGS) $*.c $(LDFLAGS) -o $@ $(CC) $(CFLAGS) $*.c $(LDFLAGS) -o $@
...@@ -56,7 +56,10 @@ $(LIB): $(LOBJ) ...@@ -56,7 +56,10 @@ $(LIB): $(LOBJ)
$(AR) r $@ $^ $(AR) r $@ $^
$(LIBS_XYZ): $(LIB) $(LIBS_XYZ): $(LIB)
$(CC) -shared -o $@ -Wl,--whole-archive,-soname,$@ $^ -Wl,--no-whole-archive $(CC) -shared -o $@ -Wl,--whole-archive,-soname,$(LIBS).$(SO_VERSION_X) $^ -Wl,--no-whole-archive
$(LIBS): $(LIBS_XYZ)
ln -sf $< $@
clean: clean:
rm -f $(LIB) $(LIBS_XYZ) .depend *.o *~ rm -f $(LIB) $(LIBS_XYZ) .depend *.o *~
...@@ -64,15 +67,18 @@ clean: ...@@ -64,15 +67,18 @@ clean:
.depend: Makefile $(wildcard *.c *.h ../*.h) .depend: Makefile $(wildcard *.c *.h ../*.h)
$(CC) $(CFLAGS) -M $(LOBJ:.o=.c) -o $@ $(CC) $(CFLAGS) -M $(LOBJ:.o=.c) -o $@
install: DESTDIR ?=
install -d $(DESTDIR)/lib prefix ?= /usr/local
install -d $(DESTDIR)/include/fmc-tdc libdir ?= $(prefix)/lib
includedir ?= $(prefix)/include
install -m 644 -D $(LIB) $(DESTDIR)/lib
install -m 0755 $(LIBS_XYZ) $(DESTDIR)/lib deploy install: $(LIB) $(LIBS) $(LIBS_XYZ)
install -m 644 -D fmctdc-lib.h $(DESTDIR)/include/fmc-tdc mkdir -m 0775 -p $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)/fmc-tdc
ln -sf $(LIBS_XYZ) $(DESTDIR)/lib/$(LIBS).$(SO_VERSION_X) install -D -t $(DESTDIR)$(libdir) -m 0644 $(LIB)
ln -sf $(LIBS).$(SO_VERSION_X) $(DESTDIR)/lib/$(LIBS) install -D -t $(DESTDIR)$(libdir) -m 0755 $(LIBS_XYZ)
install -D -t $(DESTDIR)$(includedir)/fmc-tdc -m 0644 fmctdc-lib.h
install -D -t $(DESTDIR)$(includedir)/fmc-tdc -m 0644 ../kernel/fmc-tdc.h
cp -d $(LIBS) $(DESTDIR)$(libdir)
modules_install: modules_install:
......
...@@ -9,10 +9,11 @@ ...@@ -9,10 +9,11 @@
# include parent_common.mk for buildsystem's defines # include parent_common.mk for buildsystem's defines
IGNORE_CPU_SUFFIX := y IGNORE_CPU_SUFFIX := y
REPO_PARENT ?= $(shell pwd)/../../..
TOPDIR ?= $(shell pwd)/../..
REPO_PARENT ?= $(TOPDIR)/..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
DESTDIR ?= /usr/local/
LIBTDC = ../lib/ LIBTDC = ../lib/
TESTS = fmc-tdc-term \ TESTS = fmc-tdc-term \
...@@ -52,10 +53,15 @@ clean: ...@@ -52,10 +53,15 @@ clean:
# make nothing for modules_install, but avoid errors # make nothing for modules_install, but avoid errors
modules_install: modules_install:
install: DESTDIR ?=
install -d $(DESTDIR)/bin prefix ?= /usr/local
install -D fmc-tdc-list $(DESTDIR)/bin exec_prefix ?= $(prefix)
install -D $(TESTS) $(DESTDIR)/bin bindir ?= $(exec_prefix)/bin
install: all
mkdir -m 0775 -p $(DESTDIR)$(bindir)
install -D -t $(DESTDIR)$(bindir) -m 0755 fmc-tdc-list
install -D -t $(DESTDIR)$(bindir) -m 0755 $(TESTS)
cppcheck: cppcheck:
$(CPPCHECK) -q -I. -I../kernel -I$(LIBTDC) --suppress=missingIncludeSystem --enable=all fmc-tdc*.c *.h $(CPPCHECK) -q -I. -I../kernel -I$(LIBTDC) --suppress=missingIncludeSystem --enable=all fmc-tdc*.c *.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment