Commit 34000735 authored by Vaibhav Gupta's avatar Vaibhav Gupta Committed by Federico Vaga

Rename variable 'LINUX' to 'KERNELSRC'

Variable name 'LINUX' is very ambiguous for its purpose in the makefile.
Also, this project builds as a part of COHT project which uses another
variable name 'KERNELSRC' for the same purpose. Hence, this change makes
this project uniform with others.
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
Reviewed-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 3e6bda7a
...@@ -54,6 +54,7 @@ documentation: ...@@ -54,6 +54,7 @@ documentation:
build-centos-7: build-centos-7:
stage: build stage: build
variables: variables:
KERNELSRC: /usr/src/kernels/*/
LINUX: /usr/src/kernels/*/ LINUX: /usr/src/kernels/*/
image: image:
name: gitlab-registry.cern.ch/coht/common-containers/build-centos-7:latest name: gitlab-registry.cern.ch/coht/common-containers/build-centos-7:latest
...@@ -65,7 +66,7 @@ build-centos-7: ...@@ -65,7 +66,7 @@ build-centos-7:
.script_build_kernel_ver: &script_build_kernel_ver .script_build_kernel_ver: &script_build_kernel_ver
- source /linux-versions.sh - source /linux-versions.sh
- fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION) - fetch $VERSION && prepare $VERSION && export KERNELSRC=$(linux $VERSION) && export LINUX=$(linux $VERSION)
- *script_build_kernel_dep - *script_build_kernel_dep
- make -C software/kernel all - make -C software/kernel all
...@@ -83,7 +84,7 @@ build-kernel-5.4.207: ...@@ -83,7 +84,7 @@ build-kernel-5.4.207:
.script_build_kernel_ver: &script_build_kernel_ver .script_build_kernel_ver: &script_build_kernel_ver
- source /linux-versions.sh - source /linux-versions.sh
- fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION) - fetch $VERSION && prepare $VERSION && export KERNELSRC=$(linux $VERSION) && export LINUX=$(linux $VERSION)
- *script_build_kernel_dep - *script_build_kernel_dep
- make -C software/kernel all - make -C software/kernel all
......
...@@ -37,7 +37,7 @@ driver from CERN BE-CEM. ...@@ -37,7 +37,7 @@ driver from CERN BE-CEM.
:: ::
$ cd /path/to/fmc-adc-100m14b4cha/software/kernel $ cd /path/to/fmc-adc-100m14b4cha/software/kernel
$ export LINUX=/path/to/linux/sources $ export KERNELSRC=/path/to/linux/sources
$ export ZIO=/path/to/zio $ export ZIO=/path/to/zio
$ export FMC=/path/to/fmc-sw $ export FMC=/path/to/fmc-sw
$ export VMEBUS=/path/to/vmebridge $ export VMEBUS=/path/to/vmebridge
...@@ -581,8 +581,8 @@ directory or fail with an error like:: ...@@ -581,8 +581,8 @@ directory or fail with an error like::
make: *** /lib/modules/<kernel-version>/build: No such file or directory. make: *** /lib/modules/<kernel-version>/build: No such file or directory.
This happens when you compiled by setting ``LINUX=`` and your sudo is not This happens when you compiled by setting ``KERNELSRC=`` and your sudo is not
propagating the environment to its child processes. In this case, you propagating the environment to its child processes. In this case, you
should run this command instead:: should run this command instead::
sudo make modules_install LINUX=$LINUX sudo make modules_install KERNELSRC=$KERNELSRC
...@@ -13,7 +13,7 @@ CPPCHECK ?= cppcheck ...@@ -13,7 +13,7 @@ CPPCHECK ?= cppcheck
DKMS ?= 0 DKMS ?= 0
CURDIR := $(shell /bin/pwd) CURDIR := $(shell /bin/pwd)
KVERSION ?= $(shell uname -r) KVERSION ?= $(shell uname -r)
LINUX ?= /lib/modules/$(KVERSION)/build KERNELSRC ?= /lib/modules/$(KVERSION)/build
ifdef REPO_PARENT ifdef REPO_PARENT
ZIO ?= $(REPO_PARENT)/fmc/zio ZIO ?= $(REPO_PARENT)/fmc/zio
...@@ -57,7 +57,7 @@ GIT_VERSION = $(shell git describe --always --dirty --long --tags) ...@@ -57,7 +57,7 @@ GIT_VERSION = $(shell git describe --always --dirty --long --tags)
all: modules all: modules
clean modules help modules_install coccicheck: clean modules help modules_install coccicheck:
$(MAKE) -C $(LINUX) 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) \
ZIO_VERSION=$(ZIO_VERSION) \ ZIO_VERSION=$(ZIO_VERSION) \
......
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