mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Added full description to create cross compile environment and build.
Former-commit-id: 0000306b798ede4dbcc5643b09375c90c36c10b2
This commit is contained in:
parent
cd07bcc467
commit
8d53c765c3
@ -1,3 +1,29 @@
|
||||
http://airwiki.ws.dei.polimi.it/index.php/Cross-compiling_for_the_RaspberryPi
|
||||
ON RASPBERRY
|
||||
--------------
|
||||
sudo apt-get install libprotobuf-dev libQt4-dev rsync
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$HOME/raspberrypi/Toolchain-RaspberryPi.cmake
|
||||
ON HOST
|
||||
---------
|
||||
export RASPI=192.168.1.17
|
||||
export RASCROSS_DIR="$HOME/raspberrypi"
|
||||
export HYPERION_DIR="$HOME/hyperion"
|
||||
|
||||
sudo apt-get install git rsync cmake ia32-libs protobuf-compiler
|
||||
|
||||
mkdir -p "$RASCROSS_DIR/rootfs"
|
||||
git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
|
||||
|
||||
git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
|
||||
ln -s "$RASCROSS_DIR/firmware/opt" "$RASCROSS_DIR/rootfs/opt"
|
||||
|
||||
rsync -rl --delete-after --safe-links pi@$RASPI:/{lib,usr} "$RASCROSS_DIR/rootfs"
|
||||
|
||||
git clone https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
|
||||
mkdir "$HYPERION_DIR/build"
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake" --build "$HYPERION_DIR/build" "$HYPERION_DIR"
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
These instructions are based on the guide given by:
|
||||
http://airwiki.ws.dei.polimi.it/index.php/Cross-compiling_for_the_RaspberryPi
|
||||
|
19
Toolchain-RaspberryPi.cmake
Normal file
19
Toolchain-RaspberryPi.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
SET(RASPCROSS_DIR $ENV{HOME}/raspberrypi)
|
||||
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc)
|
||||
SET(CMAKE_CXX_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++)
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_FIND_ROOT_PATH ${RASPCROSS_DIR}/rootfs)
|
||||
|
||||
# search for programs in the build host directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# for libraries and headers in the target directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
Loading…
Reference in New Issue
Block a user