Update compile instructions

Former-commit-id: b5e0ad129c
This commit is contained in:
poljvd 2014-12-20 20:51:17 +01:00
parent 05df260d2c
commit ae4462f098
3 changed files with 25 additions and 15 deletions

View File

@ -1,6 +1,6 @@
# Install the required tools and dependencies
sudo apt-get update
sudo apt-get install git cmake build-essential libprotobuf-dev libQt4-dev libusb-1.0-0-dev protobuf-compiler python-dev
sudo apt-get install git cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev
# RPI ONLY: when you build on the rapberry pi and inlcude the dispmanx grabber (which is the default)
# you also need the firmware including headers installed. This downloads the firmware from the raspberrypi github
@ -11,7 +11,7 @@ sudo cp -R "$FIRMWARE_DIR/hardfp/opt/*" /opt
# create hyperion directory and checkout the code from github
export HYPERION_DIR="hyperion"
git clone https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
# create and enter the build directory
mkdir "$HYPERION_DIR/build"
@ -20,7 +20,7 @@ cd "$HYPERION_DIR/build"
# run cmake to generate make files on the rsapberry pi
cmake ..
# or if you are not compiling on the raspberry pi and need to disable the Dispmanx grabber and support for spi devices
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF ..
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON ..
# run make to build Hyperion
make

View File

@ -1,6 +1,6 @@
ON RASPBERRY
--------------
sudo apt-get install libprotobuf-dev libQt4-dev libusb-1.0-0-dev python-dev rsync
sudo apt-get install libQt4-dev libusb-1.0-0-dev python-dev rsync
ON HOST
---------
@ -8,21 +8,31 @@ 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
# install required packages
sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev
# create the rootfs by copying it from an rpi running for example raspbmc
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"
# get the raspberry pi firmware and add it to the rootfs
git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$RASCROSS_DIR/rootfs/opt"
# get the compile tools
git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
# get the Hyperion sources
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
# do a native build (to build the protobuf compiler for the native platform)
mkdir "$HYPERION_DIR/build"
cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake" --build "$HYPERION_DIR/build" "$HYPERION_DIR"
cmake -DENABLE_DISPMANX=OFF --build "$HYPERION_DIR/build" "$HYPERION_DIR"
# do the rpi build
# specify the protoc export file to import the protobuf compiler from the native build
mkdir "$HYPERION_DIR/build-rpi"
cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake" -DIMPORT_PROTOC=$HYPERION_DIR/build/protoc_export.cmake --build "$HYPERION_DIR/build-rpi" "$HYPERION_DIR"
------------------------------------------------------------------------------
These instructions are based on the guide given by:

View File

@ -4,8 +4,8 @@ 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++)
SET(CMAKE_C_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH ${RASPCROSS_DIR}/rootfs)