Skip to content

Commit af7bb26

Browse files
committed
updated scripts toolchain file
1 parent 19a6b7c commit af7bb26

5 files changed

+21
-50
lines changed

RPiToolchain.cmake

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ endif()
1616

1717
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
1818

19-
if(NOT DEFINED ENV{RASPBIAN_ROOTFS})
19+
if(NOT DEFINED ENV{LINUX_ROOTFS})
2020
message(FATAL_ERROR
21-
"Define the RASPBIAN_ROOTFS variable to point to the Raspberry Pi rootfs."
21+
"Define the LINUX_ROOTFS variable to point to the Raspberry Pi rootfs."
2222
)
2323
else()
24-
set(SYSROOT_PATH "$ENV{RASPBIAN_ROOTFS}")
24+
set(SYSROOT_PATH "$ENV{LINUX_ROOTFS}")
2525
message(STATUS "Raspberry Pi sysroot: ${SYSROOT_PATH}")
2626
endif()
2727

@@ -70,26 +70,6 @@ endif()
7070
set(CMAKE_C_COMPILER ${CROSS_COMPILE_CC})
7171
set(CMAKE_CXX_COMPILER ${CROSS_COMPILE_CXX})
7272

73-
# List of library dirs where LD has to look. Pass them directly through gcc.
74-
# LD_LIBRARY_PATH is not evaluated by arm-*-ld
75-
set(LIB_DIRS
76-
"/opt/cross-pi-gcc/arm-linux-gnueabihf/lib"
77-
"/opt/cross-pi-gcc/lib"
78-
"${SYSROOT_PATH}/opt/vc/lib"
79-
"${SYSROOT_PATH}/lib/${CROSS_COMPILE}"
80-
"${SYSROOT_PATH}/usr/local/lib"
81-
"${SYSROOT_PATH}/usr/lib/${CROSS_COMPILE}"
82-
"${SYSROOT_PATH}/usr/lib"
83-
"${SYSROOT_PATH}/usr/lib/${CROSS_COMPILE}/blas"
84-
"${SYSROOT_PATH}/usr/lib/${CROSS_COMPILE}/lapack"
85-
)
86-
# You can additionally check the linker paths if you add the
87-
# flags ' -Xlinker --verbose'
88-
set(COMMON_FLAGS "-I${SYSROOT_PATH}/usr/include")
89-
foreach(LIB ${LIB_DIRS})
90-
set(COMMON_FLAGS "${COMMON_FLAGS} -L${LIB} -Wl,-rpath-link,${LIB}")
91-
endforeach()
92-
9373
set(CMAKE_PREFIX_PATH
9474
"${CMAKE_PREFIX_PATH}"
9575
"${SYSROOT_PATH}/usr/lib/${CROSS_COMPILE}"

rpi3-env-set.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -i
2+
echo "Entering Raspberry Pi 3 environment"
3+
export PATH=$PATH:"$HOME/x-tools/armv8-rpi3-linux-gnueabihf/bin"
4+
export CROSS_COMPILE="armv8-rpi3-linux-gnueabihf"
5+
export RASPBERRY_VERSION="3"
6+
export LINUX_ROOTFS="${HOME}/rpi3/rootfs"
7+
8+
export CONSOLE_PREFIX="[Raspberry Pi 3]"
9+
exec /bin/bash

rpi4-env-set.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -i
2+
echo "Entering Raspberry Pi 4 environment"
3+
export PATH=$PATH:"$HOME/x-tools/armv8-rpi4-linux-gnueabihf/bin"
4+
export CROSS_COMPILE="armv8-rpi4-linux-gnueabihf"
5+
export RASPBERRY_VERSION="4"
6+
export LINUX_ROOTFS="${HOME}/rpi4/rootfs"
7+
8+
export CONSOLE_PREFIX="[Raspberry Pi 4]"
9+
exec /bin/bash

rpi_path_helper_unix.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

rpi_path_helper_win.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)