updates
This commit is contained in:
parent
fda1462b70
commit
421b36b64b
@ -1,19 +1,19 @@
|
|||||||
# BBB_ROOTFS should point to the local directory which contains all the
|
# LINUX_ROOTFS should point to the local directory which contains all the
|
||||||
# libraries and includes from the target raspi.
|
# libraries and includes from the target raspi.
|
||||||
# The following command can be used to do this, replace <ip-address> and the
|
# The following command can be used to do this, replace <ip-address> and the
|
||||||
# local <rootfs-path> accordingly:
|
# local <rootfs-path> accordingly:
|
||||||
# rsync -vR --progress -rl --delete-after --safe-links pi@<ip-address>:/{lib,usr,opt/vc/lib} <rootfs-path>
|
# rsync -vR --progress -rl --delete-after --safe-links pi@<ip-address>:/{lib,usr,opt/vc/lib} <rootfs-path>
|
||||||
# RASPBIAN_ROOTFS needs to be passed to the CMake command or defined in the
|
# LINUX_ROOTFS needs to be passed to the CMake command or defined in the
|
||||||
# application CMakeLists.txt before loading the toolchain file.
|
# application CMakeLists.txt before loading the toolchain file.
|
||||||
|
|
||||||
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
|
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
|
||||||
|
|
||||||
if(NOT DEFINED ENV{BBB_ROOTFS})
|
if(NOT DEFINED ENV{LINUX_ROOTFS})
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"Define the BBB_ROOTFS variable to point to the Beagle Bone Black rootfs."
|
"Define the LINUX_ROOTFS variable to point to the Beagle Bone Black rootfs."
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(SYSROOT_PATH "$ENV{BBB_ROOTFS}" CACHE PATH "BBB root filesystem path")
|
set(SYSROOT_PATH "$ENV{LINUX_ROOTFS}" CACHE PATH "Local Linux root filesystem path")
|
||||||
message(STATUS "Beagle Bone Black sysroot: ${SYSROOT_PATH}")
|
message(STATUS "Beagle Bone Black sysroot: ${SYSROOT_PATH}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -6,31 +6,22 @@ if(DEFINED TGT_BSP)
|
|||||||
message(STATUS "FSFW OSAL invalid for specified target BSP ${TGT_BSP}!")
|
message(STATUS "FSFW OSAL invalid for specified target BSP ${TGT_BSP}!")
|
||||||
message(STATUS "Setting valid OS_FSFW: linux")
|
message(STATUS "Setting valid OS_FSFW: linux")
|
||||||
set(OS_FSFW "linux")
|
set(OS_FSFW "linux")
|
||||||
if(${TGT_BSP} MATCHES "arm/stm32h743zi-nucleo")
|
|
||||||
if(NOT ${OS_FSFW} MATCHES freertos)
|
|
||||||
message(STATUS
|
|
||||||
"FSFW OSAL invalid for specified target BSP ${TGT_BSP}!"
|
|
||||||
)
|
|
||||||
message(STATUS "Setting valid OS_FSFW: freertos")
|
|
||||||
set(OS_FSFW "freertos")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${OS_FSFW} STREQUAL linux AND TGT_BSP)
|
if(${OS_FSFW} STREQUAL linux AND TGT_BSP)
|
||||||
if(${TGT_BSP} MATCHES "host/none")
|
if(${TGT_BSP} MATCHES "host/none")
|
||||||
elseif(${TGT_BSP} MATCHES "arm/raspberrypi")
|
elseif(${TGT_BSP} MATCHES "arm/raspberrypi")
|
||||||
if(NOT DEFINED ENV{RASPBIAN_ROOTFS})
|
if(NOT DEFINED ENV{LINUX_ROOTFS})
|
||||||
if(NOT RASPBIAN_ROOTFS)
|
if(NOT RASPBIAN_ROOTFS)
|
||||||
set(ENV{RASPBIAN_ROOTFS} "$ENV{HOME}/raspberrypi/rootfs")
|
message(FATAL_ERROR "LINUX_ROOTFS must be set to Raspberry Pi rootfs location")
|
||||||
else()
|
else()
|
||||||
set(ENV{RASPBIAN_ROOTFS} "${RASPBIAN_ROOTFS}")
|
set(ENV{LINUX_ROOTFS} "${LINUX_ROOTFS}")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"RASPBIAN_ROOTFS from environmental variables used: "
|
"LINUX_ROOTFS from environmental variables used: "
|
||||||
"$ENV{RASPBIAN_ROOTFS}"
|
"$ENV{LINUX_ROOTFS}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -9,22 +9,22 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# RASPBIAN_ROOTFS should point to the local directory which contains all the
|
# LINUX_ROOTFS should point to the local directory which contains all the
|
||||||
# libraries and includes from the target raspi.
|
# libraries and includes from the target raspi.
|
||||||
# The following command can be used to do this, replace <ip-address> and the
|
# The following command can be used to do this, replace <ip-address> and the
|
||||||
# local <rootfs-path> accordingly:
|
# local <rootfs-path> accordingly:
|
||||||
# rsync -vR --progress -rl --delete-after --safe-links pi@<ip-address>:/{lib,usr,opt/vc/lib} <rootfs-path>
|
# rsync -vR --progress -rl --delete-after --safe-links pi@<ip-address>:/{lib,usr,opt/vc/lib} <rootfs-path>
|
||||||
# RASPBIAN_ROOTFS needs to be passed to the CMake command or defined in the
|
# LINUX_ROOTFS needs to be passed to the CMake command or defined in the
|
||||||
# application CMakeLists.txt before loading the toolchain file.
|
# application CMakeLists.txt before loading the toolchain file.
|
||||||
|
|
||||||
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
|
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
|
||||||
|
|
||||||
if(NOT DEFINED ENV{RASPBIAN_ROOTFS})
|
if(NOT DEFINED ENV{LINUX_ROOTFS})
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"Define the RASPBIAN_ROOTFS variable to point to the Raspberry Pi rootfs."
|
"Define the LINUX_ROOTFS variable to point to the Raspberry Pi rootfs."
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(SYSROOT_PATH "$ENV{RASPBIAN_ROOTFS}" CACHE PATH "Raspbian root filesystem path")
|
set(SYSROOT_PATH "$ENV{LINUX_ROOTFS}" CACHE PATH "Local linux root filesystem path")
|
||||||
message(STATUS "Raspberry Pi sysroot: ${SYSROOT_PATH}")
|
message(STATUS "Raspberry Pi sysroot: ${SYSROOT_PATH}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ These prerequisites are valid for Linux as well as Windows hosts.
|
|||||||
|
|
||||||
It is recommended to set the following environmental variables for the CMake build:
|
It is recommended to set the following environmental variables for the CMake build:
|
||||||
- `CROSS_COMPILE`: Explicitely specify the name of the cross compiler
|
- `CROSS_COMPILE`: Explicitely specify the name of the cross compiler
|
||||||
- `BBB_ROOTFS`: Explicitely set the path to the local BBB rootfs
|
- `LINUX_ROOTFS`: Explicitely set the path to the local BBB rootfs
|
||||||
|
|
||||||
For example with the following commands
|
For example with the following commands
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ It is recommended to test whether the environmental variables were set correctly
|
|||||||
for example by running
|
for example by running
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
echo $BBB_ROOTFS
|
echo $LINUX_ROOTFS
|
||||||
```
|
```
|
||||||
|
|
||||||
These variables can either be set every time before a debugging session to
|
These variables can either be set every time before a debugging session to
|
||||||
|
@ -258,14 +258,14 @@ cross-compile a toolchain yourself by following the steps in the
|
|||||||
It is recommended to set the following environmental variables for the CMake build:
|
It is recommended to set the following environmental variables for the CMake build:
|
||||||
- `CROSS_COMPILE`: Explicitely specify the name of the cross compiler
|
- `CROSS_COMPILE`: Explicitely specify the name of the cross compiler
|
||||||
- `RASPBERRY_VERSION`: Explicitely specify the version of the Raspberry Pi
|
- `RASPBERRY_VERSION`: Explicitely specify the version of the Raspberry Pi
|
||||||
- `RASPBIAN_ROOTFS`: Explicitely set the path to the local RPi rootfs
|
- `LINUX_ROOTFS`: Explicitely set the path to the local RPi rootfs
|
||||||
|
|
||||||
For example with the following commands
|
For example with the following commands
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
export CROSS_COMPILE="arm-linux-gnueabihf"
|
||||||
export RASPBERRY_VERSION="4"
|
export RASPBERRY_VERSION="4"
|
||||||
export RASPBIAN_ROOTFS="<pathToRootFS>"
|
export LINUX_ROOTFS="<pathToRootFS>"
|
||||||
```
|
```
|
||||||
|
|
||||||
It is recommended to test whether the environmental variables were set correctly,
|
It is recommended to test whether the environmental variables were set correctly,
|
||||||
|
Loading…
Reference in New Issue
Block a user