From d6ce49d8b18878c830bcf7f27531139570feb14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20P=C3=A9tr=C3=A9?= <laurent.petre@cern.ch> Date: Tue, 21 Jun 2022 21:47:39 +0200 Subject: [PATCH 1/3] Update the CTP7 sysroot to versioned paths --- .gitlab-ci.yml | 2 +- .gitlab-ci/Dockerfile | 4 ++-- DEVELOPERS.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eae13161..8037d088 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,7 @@ build gemhardware: - GEM_BACKEND: cvp13 GEM_STATION: ["me0", "ge21"] script: - - declare -A GEM_BUILD_ARGS=( [ctp7]="-DCMAKE_TOOLCHAIN_FILE=${PWD}/cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7" ) + - declare -A GEM_BUILD_ARGS=( [ctp7]="-DCMAKE_TOOLCHAIN_FILE=${PWD}/cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2021032401" ) # Use Release instead of RelWithDebInfo # The binaries are not stripped, so we disable the debug symbols generation but we still want the optimizations - cmake3 -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGEM_BACKEND=${GEM_BACKEND} -DGEM_STATION=${GEM_STATION} ${GEM_BUILD_ARGS[${GEM_BACKEND}]} -S gemhardware -B _build/${GEM_BACKEND}-${GEM_STATION} diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile index 2778f713..47c29f20 100644 --- a/.gitlab-ci/Dockerfile +++ b/.gitlab-ci/Dockerfile @@ -57,8 +57,8 @@ RUN yum install -y \ && mkdir -p /opt/linaro/4.9-2014.09 \ && (cd /opt/linaro/4.9-2014.09 && wget -O - -q https://cmsgemos.web.cern.ch/repos/extras/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz | tar --no-same-owner --preserve-permissions --strip-components=1 -xJ) -RUN mkdir -p /opt/gem-sysroot/ctp7 \ - && (cd /opt/gem-sysroot/ctp7 && wget -O - -q https://cmsgemos.web.cern.ch/repos/extras/gem-sysroot-ctp7-20210324.tar.xz | tar --no-same-owner --preserve-permissions --strip-components=1 -xJ) +RUN mkdir -p /opt/gem-sysroot/ctp7-2021032401 \ + && (cd /opt/gem-sysroot/ctp7-2021032401 && wget -O - -q https://cmsgemos.web.cern.ch/repos/extras/gem-sysroot-ctp7-2021032401.tar.xz | tar --no-same-owner --preserve-permissions --strip-components=1 -xJ) # We squash all layers, so need to clean up only at the end RUN yum clean all diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 08a45268..83544010 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -47,7 +47,7 @@ To build the backend board libraries and applications, use the following instruc * Go to the `gemhardware` sub-directory `cd gemhardware` * Configure the build with `cmake3 -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEM_BACKEND=<gem-backend> -DGEM_STATION=<gem-station> -S . -B _build` * The GEM backend board is one of `ctp7` or `cvp13`. - **In the case of the CTP7, the following parameters must be added**: `-DCMAKE_TOOLCHAIN_FILE=../cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7/`. + **In the case of the CTP7, the following parameters must be added**: `-DCMAKE_TOOLCHAIN_FILE=../cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2021032401/`. * The GEM station is one of `me0`, `ge11` or `ge21`. * Build and install in a local tree backend software: * For the CTP7: `DESTDIR=_install cmake3 --build _build --target install` -- GitLab From 1ee4d6e56cb17409f1361032035f3d13b1998f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20P=C3=A9tr=C3=A9?= <laurent.petre@cern.ch> Date: Tue, 21 Jun 2022 21:51:06 +0200 Subject: [PATCH 2/3] Bump the CTP7 sysroot to version 2022062001 --- .gitlab-ci.yml | 2 +- .gitlab-ci/Dockerfile | 4 ++-- DEVELOPERS.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8037d088..5516efc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,7 @@ build gemhardware: - GEM_BACKEND: cvp13 GEM_STATION: ["me0", "ge21"] script: - - declare -A GEM_BUILD_ARGS=( [ctp7]="-DCMAKE_TOOLCHAIN_FILE=${PWD}/cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2021032401" ) + - declare -A GEM_BUILD_ARGS=( [ctp7]="-DCMAKE_TOOLCHAIN_FILE=${PWD}/cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2022062001" ) # Use Release instead of RelWithDebInfo # The binaries are not stripped, so we disable the debug symbols generation but we still want the optimizations - cmake3 -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGEM_BACKEND=${GEM_BACKEND} -DGEM_STATION=${GEM_STATION} ${GEM_BUILD_ARGS[${GEM_BACKEND}]} -S gemhardware -B _build/${GEM_BACKEND}-${GEM_STATION} diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile index 47c29f20..6485e9cf 100644 --- a/.gitlab-ci/Dockerfile +++ b/.gitlab-ci/Dockerfile @@ -57,8 +57,8 @@ RUN yum install -y \ && mkdir -p /opt/linaro/4.9-2014.09 \ && (cd /opt/linaro/4.9-2014.09 && wget -O - -q https://cmsgemos.web.cern.ch/repos/extras/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz | tar --no-same-owner --preserve-permissions --strip-components=1 -xJ) -RUN mkdir -p /opt/gem-sysroot/ctp7-2021032401 \ - && (cd /opt/gem-sysroot/ctp7-2021032401 && wget -O - -q https://cmsgemos.web.cern.ch/repos/extras/gem-sysroot-ctp7-2021032401.tar.xz | tar --no-same-owner --preserve-permissions --strip-components=1 -xJ) +RUN mkdir -p /opt/gem-sysroot/ctp7-2022062001 \ + && (cd /opt/gem-sysroot/ctp7-2022062001 && wget -O - -q https://cmsgemos.web.cern.ch/repos/extras/gem-sysroot-ctp7-2022062001.tar.xz | tar --no-same-owner --preserve-permissions --strip-components=1 -xJ) # We squash all layers, so need to clean up only at the end RUN yum clean all diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 83544010..9250ce33 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -47,7 +47,7 @@ To build the backend board libraries and applications, use the following instruc * Go to the `gemhardware` sub-directory `cd gemhardware` * Configure the build with `cmake3 -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEM_BACKEND=<gem-backend> -DGEM_STATION=<gem-station> -S . -B _build` * The GEM backend board is one of `ctp7` or `cvp13`. - **In the case of the CTP7, the following parameters must be added**: `-DCMAKE_TOOLCHAIN_FILE=../cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2021032401/`. + **In the case of the CTP7, the following parameters must be added**: `-DCMAKE_TOOLCHAIN_FILE=../cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2022062001/`. * The GEM station is one of `me0`, `ge11` or `ge21`. * Build and install in a local tree backend software: * For the CTP7: `DESTDIR=_install cmake3 --build _build --target install` -- GitLab From e1b94ea72c16d584ee4efb265dedb6a3001a14b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20P=C3=A9tr=C3=A9?= <laurent.petre@cern.ch> Date: Tue, 21 Jun 2022 22:09:10 +0200 Subject: [PATCH 3/3] Replace the Peta sysroot by the GEM sysroot --- .gitlab-ci.yml | 2 +- DEVELOPERS.md | 2 +- cmake/ToolchainCTP7.cmake | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5516efc2..32a9c714 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,7 @@ build gemhardware: - GEM_BACKEND: cvp13 GEM_STATION: ["me0", "ge21"] script: - - declare -A GEM_BUILD_ARGS=( [ctp7]="-DCMAKE_TOOLCHAIN_FILE=${PWD}/cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2022062001" ) + - declare -A GEM_BUILD_ARGS=( [ctp7]="-DCMAKE_TOOLCHAIN_FILE=${PWD}/cmake/ToolchainCTP7.cmake -DGEM_SYSROOT=/opt/gem-sysroot/ctp7-2022062001" ) # Use Release instead of RelWithDebInfo # The binaries are not stripped, so we disable the debug symbols generation but we still want the optimizations - cmake3 -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGEM_BACKEND=${GEM_BACKEND} -DGEM_STATION=${GEM_STATION} ${GEM_BUILD_ARGS[${GEM_BACKEND}]} -S gemhardware -B _build/${GEM_BACKEND}-${GEM_STATION} diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 9250ce33..fa2e3094 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -47,7 +47,7 @@ To build the backend board libraries and applications, use the following instruc * Go to the `gemhardware` sub-directory `cd gemhardware` * Configure the build with `cmake3 -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEM_BACKEND=<gem-backend> -DGEM_STATION=<gem-station> -S . -B _build` * The GEM backend board is one of `ctp7` or `cvp13`. - **In the case of the CTP7, the following parameters must be added**: `-DCMAKE_TOOLCHAIN_FILE=../cmake/ToolchainCTP7.cmake -DPETA_SYSROOT=/opt/gem-sysroot/ctp7-2022062001/`. + **In the case of the CTP7, the following parameters must be added**: `-DCMAKE_TOOLCHAIN_FILE=../cmake/ToolchainCTP7.cmake -DGEM_SYSROOT=/opt/gem-sysroot/ctp7-2022062001/`. * The GEM station is one of `me0`, `ge11` or `ge21`. * Build and install in a local tree backend software: * For the CTP7: `DESTDIR=_install cmake3 --build _build --target install` diff --git a/cmake/ToolchainCTP7.cmake b/cmake/ToolchainCTP7.cmake index fe6c4db0..a45a4f5c 100644 --- a/cmake/ToolchainCTP7.cmake +++ b/cmake/ToolchainCTP7.cmake @@ -7,8 +7,8 @@ set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -march=armv7-a -mfpu=neon -mfloat-abi=hard -mthumb-interwork -mtune=cortex-a9 -DEMBED -Dlinux -D__linux__ -Dunix") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -march=armv7-a -mfpu=neon -mfloat-abi=hard -mthumb-interwork -mtune=cortex-a9 -DEMBED -Dlinux -D__linux__ -Dunix") -set(CMAKE_SYSROOT ${PETA_SYSROOT}) -set(CMAKE_STAGING_PREFIX ${PETA_STAGING}) +set(CMAKE_SYSROOT ${GEM_SYSROOT}) +set(CMAKE_STAGING_PREFIX ${GEM_STAGING}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -- GitLab