Commit f9fd0368 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>
parent 7624ac14
...@@ -38,7 +38,7 @@ available via ``PATH`` variable. ...@@ -38,7 +38,7 @@ available via ``PATH`` variable.
:: ::
$ cd /path/to/fmc-tdc/software/kernel $ cd /path/to/fmc-tdc/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
...@@ -132,7 +132,7 @@ Build and install kernel module (*fpga-mgr.ko*): ...@@ -132,7 +132,7 @@ Build and install kernel module (*fpga-mgr.ko*):
:: ::
$ cd fpga-manager $ cd fpga-manager
$ export LINUX=/path/to/linux/sources $ export KERNELSRC=/path/to/linux/sources
$ make $ make
$ make install $ make install
...@@ -150,7 +150,7 @@ Build and install kernel modules (*zio-buf-vmalloc.ko* and *zio.ko*): ...@@ -150,7 +150,7 @@ Build and install kernel modules (*zio-buf-vmalloc.ko* and *zio.ko*):
:: ::
$ cd zio $ cd zio
$ export LINUX=/path/to/linux/sources $ export KERNELSRC=/path/to/linux/sources
$ make $ make
$ make install $ make install
...@@ -168,7 +168,7 @@ and *htvic.ko*): ...@@ -168,7 +168,7 @@ and *htvic.ko*):
:: ::
$ cd general-cores/software $ cd general-cores/software
$ export LINUX=/path/to/linux/sources $ export KERNELSRC=/path/to/linux/sources
$ make $ make
$ make install $ make install
...@@ -184,7 +184,7 @@ Clone *fmc* repository: ...@@ -184,7 +184,7 @@ Clone *fmc* repository:
Build and install kernel module (*fmc.ko*): Build and install kernel module (*fmc.ko*):
$ cd fmc-sw/ $ cd fmc-sw/
$ export LINUX=/path/to/linux/sources $ export KERNELSRC=/path/to/linux/sources
$ make $ make
$ make install $ make install
...@@ -207,7 +207,7 @@ Build and install kernel modules (*gn412x-fcl.ko*, *gn412x-gpio.ko*, ...@@ -207,7 +207,7 @@ Build and install kernel modules (*gn412x-fcl.ko*, *gn412x-gpio.ko*,
$ export SPI=/path/to/general-cores/software/spi-ocores $ export SPI=/path/to/general-cores/software/spi-ocores
$ export FPGA_MGR=/path/to/fpga-manager $ export FPGA_MGR=/path/to/fpga-manager
$ export FMC=/path/to/fmc-sw $ export FMC=/path/to/fmc-sw
$ export LINUX=/path/to/linux/sources $ export KERNELSRC=/path/to/linux/sources
$ make $ make
$ make install $ make install
...@@ -619,8 +619,8 @@ directory or fail with an error like:: ...@@ -619,8 +619,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
...@@ -15,7 +15,7 @@ CPPCHECK ?= cppcheck ...@@ -15,7 +15,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
WBGEN2 ?= wbgen2 WBGEN2 ?= wbgen2
ifdef REPO_PARENT ifdef REPO_PARENT
...@@ -70,7 +70,7 @@ timestamp_fifo_regs.h: $(TDC_HDL)/rtl/wbgen/timestamp_fifo_wb.wb ...@@ -70,7 +70,7 @@ 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: hw_headers
$(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) \
...@@ -78,9 +78,9 @@ modules: hw_headers ...@@ -78,9 +78,9 @@ modules: hw_headers
VMEBUS_ABS=$(VMEBUS_ABS) modules VMEBUS_ABS=$(VMEBUS_ABS) modules
install modules_install: modules install modules_install: modules
$(MAKE) -C $(LINUX) M=$(CURDIR) modules_install $(MAKE) -C $(KERNELSRC) M=$(CURDIR) modules_install
# be able to run the "clean" rule even if $(LINUX) is not valid # be able to run the "clean" rule even if $(KERNELSRC) is not valid
clean: clean:
rm -rf *.o *~ .*.cmd *.ko *.mod.c .tmp_versions Module.symvers \ rm -rf *.o *~ .*.cmd *.ko *.mod.c .tmp_versions Module.symvers \
Module.markers modules.order Module.markers modules.order
......
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