From 3b01a130f03c6f0e09fbc2253ec426928ea70f34 Mon Sep 17 00:00:00 2001 From: Gold856 <117957790+Gold856@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:16:14 -0500 Subject: [PATCH] Upgrade to bookworm compilers (#97) --- .github/workflows/main.yml | 7 ++----- arm-pi-gnueabihf.toolchain.cmake | 2 +- build.gradle | 10 +++++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9cf5092..6ba17de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,10 +18,10 @@ jobs: - container: wpilib/systemcore-cross-ubuntu:2025-22.04 artifact-name: SystemCore build-options: "-Pplatform=linux-systemcore" - - container: wpilib/raspbian-cross-ubuntu:bullseye-22.04 + - container: wpilib/raspbian-cross-ubuntu:bookworm-22.04 artifact-name: Arm32 build-options: "-Pplatform=linux-arm32" - - container: wpilib/aarch64-cross-ubuntu:bullseye-22.04 + - container: wpilib/aarch64-cross-ubuntu:bookworm-22.04 artifact-name: Arm64 build-options: "-Pplatform=linux-arm64" - container: wpilib/ubuntu-base:22.04 @@ -37,9 +37,6 @@ jobs: submodules: 'true' - run: sudo apt-get update && sudo apt-get install ant -y && sudo rm -rf /var/lib/apt/lists/* && sudo rm -f /bin/ant && sudo ln -s /usr/share/ant/bin/ant /bin/ant name: Install Ant - - run: rm -rf /usr/local/arm-linux-gnueabihf && curl -SL https://github.com/wpilibsuite/opensdk/releases/download/v2023-9/armhf-raspi-bullseye-2023-x86_64-linux-gnu-Toolchain-10.2.0.tgz | sh -c 'mkdir -p /usr/local && cd /usr/local && tar xzf - --strip-components=2' - name: Replace arm32 compiler - if: matrix.artifact-name == 'Arm32' - run: ./gradlew build -PjenkinsBuild ${{ matrix.build-options }} name: Build with Gradle - uses: actions/upload-artifact@v4 diff --git a/arm-pi-gnueabihf.toolchain.cmake b/arm-pi-gnueabihf.toolchain.cmake index 1a09b95..986a10c 100644 --- a/arm-pi-gnueabihf.toolchain.cmake +++ b/arm-pi-gnueabihf.toolchain.cmake @@ -1,5 +1,5 @@ set(GCC_COMPILER_VERSION "" CACHE STRING "GCC Compiler version") -set(GNU_MACHINE "armv6-bullseye-linux-gnueabi" CACHE STRING "GNU compiler triple") +set(GNU_MACHINE "armv6-bookworm-linux-gnueabi" CACHE STRING "GNU compiler triple") set(ARM_LINUX_SYSROOT /usr/local/arm-linux-gnueabihf/sysroot) if(COMMAND toolchain_save_config) diff --git a/build.gradle b/build.gradle index 15752e9..1d04c60 100644 --- a/build.gradle +++ b/build.gradle @@ -186,11 +186,11 @@ if (project.platform == "linux-athena") { stripExe = 'arm-frc2025-linux-gnueabi-strip' objCopyExe = 'arm-frc2025-linux-gnueabi-objcopy' } else if (project.platform == "linux-arm32") { - stripExe = 'armv6-bullseye-linux-gnueabihf-strip' - objCopyExe = 'armv6-bullseye-linux-gnueabihf-objcopy' + stripExe = 'armv6-bookworm-linux-gnueabihf-strip' + objCopyExe = 'armv6-bookworm-linux-gnueabihf-objcopy' } else if (project.platform == "linux-arm64") { - stripExe = 'aarch64-bullseye-linux-gnu-strip' - objCopyExe = 'aarch64-bullseye-linux-gnu-objcopy' + stripExe = 'aarch64-bookworm-linux-gnu-strip' + objCopyExe = 'aarch64-bookworm-linux-gnu-objcopy' } else if (project.platform == "linux-systemcore") { stripExe = 'aarch64-bookworm-linux-gnu-strip' objCopyExe = 'aarch64-bookworm-linux-gnu-objcopy' @@ -254,7 +254,7 @@ if (project.platform == "linux-athena") { "-DCMAKE_MODULE_PATH=$rootDir/arm-frc-modules" + '-DOPENCV_FORCE_LIBATOMIC_COMPILER_CHECK=ON' } else if (project.platform == "linux-arm64") { - toolchain = projectDir.canonicalPath + "/aarch64-bullseye-gnu.toolchain.cmake" + toolchain = projectDir.canonicalPath + "/aarch64-bookworm-gnu.toolchain.cmake" println "Using toolchain '${toolchain}'" return args + "-DCMAKE_TOOLCHAIN_FILE=${toolchain}" + '-DOPENCV_EXTRA_FLAGS_DEBUG=-Og' +