Skip to content
Snippets Groups Projects
Commit 268c934f authored by Dimitris Lampridis's avatar Dimitris Lampridis
Browse files

add options to skip patching, building and/or installing

parent 70d99193
No related branches found
No related tags found
No related merge requests found
Pipeline #1226606 failed
Showing with 88 additions and 78 deletions
......@@ -25,3 +25,10 @@ The following environment variables affect the behaviour of the scripts.
* **$VERSION:** Kernel version to use. If not specified, it defaults to the output of `uname -r`.
* **$LINUX:** Path to Kernel sources/headers. If not specified, it defaults to
`/lib/modules/$KVERSION/build`.
* **$SKIP_INSTALL:** If set to `true`, everything will be downloaded and built under `$BUILD_DIR`,
but nothing will be installed.
* **$SKIP_BUILD:** If set to `true`, everything will be downloaded under `$BUILD_DIR`, but nothing
will be built. This automatically implies `$SKIP_INSTALL=true`.
* **$SKIP_PATCH:** If set to `true`, no patches will be applied to the downloaded sources. This is
useful in particular when using a custom `$BUILD_DIR` and the patches have already been applied
during a previous run.
......@@ -11,11 +11,11 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://ohwr.org/project/adc-lib.git $PROJECT
cd $PROJECT
git checkout -B release v2.5.0
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
export ZIO=$BUILD_DIR/zio
export FMCADC100M=$BUILD_DIR/fmc-adc-100m14b4cha-sw
make
sudo -E make install
sudo -E make -C lib/PyAdcLib install
[ $SKIP_BUILD ] || make
[ $SKIP_INSTALL ] || sudo -E make install
[ $SKIP_INSTALL ] || sudo -E make -C lib/PyAdcLib install
. $SCRIPT_DIR/post_script
......@@ -7,9 +7,12 @@ unset DEP_FAIL
[ -z $BUILD_DIR ] && export BUILD_DIR=$(mktemp -d)
[ -z $KVERSION ] && export KVERSION=$(uname -r)
[ -z $LINUX ] && export LINUX=/lib/modules/$KVERSION/build
[ -z $KERNELSRC ] && export KERNELSRC=$LINUX
[ -z $SCRIPT_DIR ] && export SCRIPT_DIR=$(pwd)
[ -z $PATCH_DIR ] && export PATCH_DIR=$(pwd)/../patches
[ $SKIP_BUILD ] && export SKIP_INSTALL=true
export SCRIPT_DIR=$(pwd)
export PATCH_DIR=$(pwd)/../patches
export KERNELSRC=$LINUX
[ -f $BUILD_DIR/deps.ok ] && return 0
......@@ -80,8 +83,8 @@ set -e
# Always give priority to modules from the "extra" folder, where we install our modules.
# This is needed for i2c-ocores, fpga-mgr and other modules that also exist in the mainline kernel.
sudo mkdir -p /etc/depmod.d
sudo sh -c 'echo "search extra" > /etc/depmod.d/ohwr_extra.conf'
[ $SKIP_INSTALL ] || sudo mkdir -p /etc/depmod.d
[ $SKIP_INSTALL ] || sudo sh -c 'echo "search extra" > /etc/depmod.d/ohwr_extra.conf'
touch $BUILD_DIR/deps.ok
......
......@@ -13,11 +13,11 @@ cd $BUILD_DIR
cd $PROJECT
#TODO: release!
git checkout dlamprid-dev
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
export ZIO=$BUILD_DIR/zio
export FMC=$BUILD_DIR/fmc-sw
make
sudo -E make -C kernel modules_install
sudo -E make -C tools install
[ $SKIP_BUILD ] || make
[ $SKIP_INSTALL ] || sudo -E make -C kernel modules_install
[ $SKIP_INSTALL ] || sudo -E make -C tools install
. $SCRIPT_DIR/post_script
......@@ -14,8 +14,8 @@ cd $BUILD_DIR
cd $PROJECT
#TODO: release
git checkout feature/convention
make -C software
sudo -E make -C software install
[ $SKIP_BUILD ] || make -C software
[ $SKIP_INSTALL ] || sudo -E make -C software install
#TODO: donwload released gateware and install it
......
......@@ -9,8 +9,8 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://ohwr.org/project/fmc-sw.git $PROJECT
cd $PROJECT
git checkout master
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
make
sudo -E make modules_install
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_BUILD ] || make
[ $SKIP_INSTALL ] || sudo -E make modules_install
. $SCRIPT_DIR/post_script
......@@ -9,7 +9,7 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://gitlab.cern.ch/coht/fpga-manager.git $PROJECT
cd $PROJECT
git checkout master
make
sudo -E make modules_install
[ $SKIP_BUILD ] || make
[ $SKIP_INSTALL ] || sudo -E make modules_install
. $SCRIPT_DIR/post_script
......@@ -9,10 +9,10 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://ohwr.org/project/general-cores.git $PROJECT
cd $PROJECT
git checkout proposed_master
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
make -C software/htvic
make -C software/i2c-ocores
make -C software/spi-ocores
sudo -E make -C software install
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_BUILD ] || make -C software/htvic
[ $SKIP_BUILD ] || make -C software/i2c-ocores
[ $SKIP_BUILD ] || make -C software/spi-ocores
[ $SKIP_INSTALL ] || sudo -E make -C software install
. $SCRIPT_DIR/post_script
......@@ -11,10 +11,10 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://ohwr.org/project/mock-turtle.git $PROJECT
cd $PROJECT
git checkout -B release v4.0.4
WBGEN2=$BUILD_DIR/wishbone-gen/wbgen2 make -C software
WBGEN2=$BUILD_DIR/wishbone-gen/wbgen2 sudo -E make -C software install
sudo -E make -C software/lib/PyMockTurtle install
sudo -E sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/mockturtle.conf'
sudo -E ldconfig
[ $SKIP_BUILD ] || WBGEN2=$BUILD_DIR/wishbone-gen/wbgen2 make -C software
[ $SKIP_INSTALL ] || WBGEN2=$BUILD_DIR/wishbone-gen/wbgen2 sudo -E make -C software install
[ $SKIP_INSTALL ] || sudo -E make -C software/lib/PyMockTurtle install
[ $SKIP_INSTALL ] || sudo -E sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/mockturtle.conf'
[ $SKIP_INSTALL ] || sudo -E ldconfig
. $SCRIPT_DIR/post_script
......@@ -3,7 +3,7 @@
set -e
if [ ! -e $LINUX/System.map ]; then
sudo depmod -a $KVERSION
[ $SKIP_INSTALL ] || sudo depmod -a $KVERSION
fi
touch $BUILD_DIR/built.$PROJECT
......
......@@ -14,20 +14,20 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://ohwr.org/project/spec.git $PROJECT
cd $PROJECT
git checkout -B release v1.4.4
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
export CHEBY="python $BUILD_DIR/cheby/proto/cheby.py"
export FMC="$BUILD_DIR/fmc-sw"
export I2C="$BUILD_DIR/general-cores/software/i2c-ocores"
export SPI="$BUILD_DIR/general-cores/software/spi-ocores"
export CONFIG_FPGA_MGR_BACKPORT="y"
export CONFIG_FPGA_MGR_BACKPORT_PATH="$BUILD_DIR/fpga-manager"
make -C software
sudo -E make -C software modules_install
[ $SKIP_BUILD ] || make -C software
[ $SKIP_INSTALL ] || sudo -E make -C software modules_install
SPEC_BIN="https://www.ohwr.org/project/spec/wikis/uploads/98d07df245b14b373b11a02ab7358cb2/spec-binaries-v1.4.4.tar.xz"
curl $SPEC_BIN | tar xJ -C $BUILD_DIR
sudo -E install -d /lib/firmware
sudo -E install -m 0644 $BUILD_DIR/spec-binaries-v1.4.4/spec-golden-45T.bin /lib/firmware/
sudo -E install -m 0644 $BUILD_DIR/spec-binaries-v1.4.4/spec-golden-150T.bin /lib/firmware/
[ $SKIP_INSTALL ] || sudo -E install -d /lib/firmware
[ $SKIP_INSTALL ] || sudo -E install -m 0644 $BUILD_DIR/spec-binaries-v1.4.4/spec-golden-45T.bin /lib/firmware/
[ $SKIP_INSTALL ] || sudo -E install -m 0644 $BUILD_DIR/spec-binaries-v1.4.4/spec-golden-150T.bin /lib/firmware/
. $SCRIPT_DIR/post_script
......@@ -16,7 +16,7 @@ cd $BUILD_DIR
cd $PROJECT
#TODO: release!
git checkout develop
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
export CHEBY="python $BUILD_DIR/cheby/proto/cheby.py"
export FMC="$BUILD_DIR/fmc-sw"
export VMEBRIDGE="$BUILD_DIR/vmebridge"
......@@ -25,7 +25,7 @@ export I2C="$BUILD_DIR/general-cores/software/i2c-ocores"
#export SPI="$BUILD_DIR/general-cores/software/spi-ocores"
export CONFIG_FPGA_MGR_BACKPORT="y"
export CONFIG_FPGA_MGR_BACKPORT_PATH="$BUILD_DIR/fpga-manager"
make -C software/kernel
sudo -E make -C software modules_install
[ $SKIP_BUILD ] || make -C software/kernel
[ $SKIP_INSTALL ] || sudo -E make -C software modules_install
. $SCRIPT_DIR/post_script
......@@ -11,12 +11,12 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://gitlab.cern.ch/cohtdrivers/ual.git $PROJECT
cd $PROJECT
git checkout -B release v1.3.0
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
make VMEBRIDGE=../../vmebridge CONFIG_VME=y
sudo -E make install
sudo -E sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/ual.conf'
sudo -E ldconfig
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_BUILD ] || make VMEBRIDGE=../../vmebridge CONFIG_VME=y
[ $SKIP_INSTALL ] || sudo -E make install
[ $SKIP_INSTALL ] || sudo -E sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/ual.conf'
[ $SKIP_INSTALL ] || sudo -E ldconfig
cd PyUAL
sudo -E python setup.py install
[ $SKIP_INSTALL ] || sudo -E python setup.py install
. $SCRIPT_DIR/post_script
......@@ -11,22 +11,22 @@ rm -rf vmebridge
cd coht
#TODO: release!
git checkout develop
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
cp -r vmebridge ../
cd ../vmebridge/driver
make -C $LINUX M=`pwd` modules
sudo -E make -C $LINUX M=`pwd` modules_install
[ $SKIP_BUILD ] || make -C $LINUX M=`pwd` modules
[ $SKIP_INSTALL ] || sudo -E make -C $LINUX M=`pwd` modules_install
cd ../lib
gcc -c -Wall -I../include -fPIC -DGIT_VERSION=\"none\" libvmebus.c libvmebus.h
ar rv libvmebus.a libvmebus.o
[ $SKIP_BUILD ] || gcc -c -Wall -I../include -fPIC -DGIT_VERSION=\"none\" libvmebus.c libvmebus.h
[ $SKIP_BUILD ] || ar rv libvmebus.a libvmebus.o
cd ../vmeutils
CFLAGS="-Wall -I../include -DGIT_VERSION=\"none\" -L../lib -lvmebus"
gcc $CFLAGS -o lsvme lsvme.c common.c
gcc $CFLAGS -o vme-module vme-module.c module.c common.c
gcc $CFLAGS -o vme-register vme-register.c register.c common.c
sudo -E install -d /usr/local/bin
sudo -E install -m 0755 lsvme /usr/local/bin
sudo -E install -m 0755 vme-module /usr/local/bin
sudo -E install -m 0755 vme-register /usr/local/bin
[ $SKIP_BUILD ] || gcc $CFLAGS -o lsvme lsvme.c common.c
[ $SKIP_BUILD ] || gcc $CFLAGS -o vme-module vme-module.c module.c common.c
[ $SKIP_BUILD ] || gcc $CFLAGS -o vme-register vme-register.c register.c common.c
[ $SKIP_INSTALL ] || sudo -E install -d /usr/local/bin
[ $SKIP_INSTALL ] || sudo -E install -m 0755 lsvme /usr/local/bin
[ $SKIP_INSTALL ] || sudo -E install -m 0755 vme-module /usr/local/bin
[ $SKIP_INSTALL ] || sudo -E install -m 0755 vme-register /usr/local/bin
. $SCRIPT_DIR/post_script
......@@ -9,12 +9,12 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://ohwr.org/project/wrpc-sw.git $PROJECT
cd $PROJECT
git checkout -B release wrpc-v4.2
make -C liblinux
make -C liblinux/extest
make -C tools wrpc-vuart wrpc-diags wr-streamers
sudo -E install -d /usr/local/bin
sudo -E install -m 0755 tools/wrpc-vuart /usr/local/bin
sudo -E install -m 0755 tools/wrpc-diags /usr/local/bin
sudo -E install -m 0755 tools/wr-streamers /usr/local/bin
[ $SKIP_BUILD ] || make -C liblinux
[ $SKIP_BUILD ] || make -C liblinux/extest
[ $SKIP_BUILD ] || make -C tools wrpc-vuart wrpc-diags wr-streamers
[ $SKIP_INSTALL ] || sudo -E install -d /usr/local/bin
[ $SKIP_INSTALL ] || sudo -E install -m 0755 tools/wrpc-vuart /usr/local/bin
[ $SKIP_INSTALL ] || sudo -E install -m 0755 tools/wrpc-diags /usr/local/bin
[ $SKIP_INSTALL ] || sudo -E install -m 0755 tools/wr-streamers /usr/local/bin
. $SCRIPT_DIR/post_script
......@@ -13,18 +13,18 @@ cd $PROJECT
#TODO: release
git checkout proposed_master
export WRTD_DEP_TRTL=$BUILD_DIR/mock-turtle
make -C software
sudo -E make -C software install
sudo -E sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/wrtd.conf'
sudo -E ldconfig
sudo -E install -d /etc/udev/rules.d/
sudo -E install -m 0644 software/udev/rules.d/* /etc/udev/rules.d/
sudo -E sh -c 'getent group wrtd 2>&1 > /dev/null || groupadd wrtd'
[ $SKIP_BUILD ] || make -C software
[ $SKIP_INSTALL ] || sudo -E make -C software install
[ $SKIP_INSTALL ] || sudo -E sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/wrtd.conf'
[ $SKIP_INSTALL ] || sudo -E ldconfig
[ $SKIP_INSTALL ] || sudo -E install -d /etc/udev/rules.d/
[ $SKIP_INSTALL ] || sudo -E install -m 0644 software/udev/rules.d/* /etc/udev/rules.d/
[ $SKIP_INSTALL ] || sudo -E sh -c 'getent group wrtd 2>&1 > /dev/null || groupadd wrtd'
WRTD_BIN="https://www.ohwr.org/project/wrtd/wikis/uploads/8c95166b306cf12b6d75c6e0b27f142d/wrtd-binaries-v1.0.0.tar.gz"
curl $WRTD_BIN | tar xz -C $BUILD_DIR
sudo -E install -d /lib/firmware
sudo -E install -m 0644 $BUILD_DIR/wrtd-binaries-v1.0.0/wrtd_ref_spec150t_adc/gateware/wrtd_ref_spec150t_adc.bin /lib/firmware/
sudo -E install -m 0644 $BUILD_DIR/wrtd-binaries-v1.0.0/wrtd_ref_svec_tdc_fd/gateware/wrtd_ref_svec_tdc_fd.bin /lib/firmware/
[ $SKIP_INSTALL ] || sudo -E install -d /lib/firmware
[ $SKIP_INSTALL ] || sudo -E install -m 0644 $BUILD_DIR/wrtd-binaries-v1.0.0/wrtd_ref_spec150t_adc/gateware/wrtd_ref_spec150t_adc.bin /lib/firmware/
[ $SKIP_INSTALL ] || sudo -E install -m 0644 $BUILD_DIR/wrtd-binaries-v1.0.0/wrtd_ref_svec_tdc_fd/gateware/wrtd_ref_svec_tdc_fd.bin /lib/firmware/
. $SCRIPT_DIR/post_script
......@@ -9,8 +9,8 @@ cd $BUILD_DIR
[ -d $PROJECT ] || git clone https://ohwr.org/project/zio.git $PROJECT
cd $PROJECT
git checkout -B release v1.4.2
[ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
make -C drivers/zio
sudo -E make -C drivers/zio modules_install
[ $SKIP_PATCH ] || [ -e $PATCH_DIR/$PROJECT.diff ] && patch -p1 < $PATCH_DIR/$PROJECT.diff
[ $SKIP_BUILD ] || make -C drivers/zio
[ $SKIP_INSTALL ] || sudo -E make -C drivers/zio modules_install
. $SCRIPT_DIR/post_script
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment