Skip to content

Commit

Permalink
Upgrade to bookworm compilers (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 authored Dec 24, 2024
1 parent 66a5f6a commit 3b01a13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arm-pi-gnueabihf.toolchain.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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' +
Expand Down

0 comments on commit 3b01a13

Please sign in to comment.