Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit b5e0ad1

Browse files
committed
Update compile instructions
1 parent 33239ee commit b5e0ad1

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

CompileHowto.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Install the required tools and dependencies
22
sudo apt-get update
3-
sudo apt-get install git cmake build-essential libprotobuf-dev libQt4-dev libusb-1.0-0-dev protobuf-compiler python-dev
3+
sudo apt-get install git cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev
44

55
# RPI ONLY: when you build on the rapberry pi and inlcude the dispmanx grabber (which is the default)
66
# 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
1111

1212
# create hyperion directory and checkout the code from github
1313
export HYPERION_DIR="hyperion"
14-
git clone https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
14+
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
1515

1616
# create and enter the build directory
1717
mkdir "$HYPERION_DIR/build"
@@ -20,7 +20,7 @@ cd "$HYPERION_DIR/build"
2020
# run cmake to generate make files on the rsapberry pi
2121
cmake ..
2222
# or if you are not compiling on the raspberry pi and need to disable the Dispmanx grabber and support for spi devices
23-
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF ..
23+
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON ..
2424

2525
# run make to build Hyperion
2626
make

CrossCompileHowto.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
11
ON RASPBERRY
22
--------------
3-
sudo apt-get install libprotobuf-dev libQt4-dev libusb-1.0-0-dev python-dev rsync
3+
sudo apt-get install libQt4-dev libusb-1.0-0-dev python-dev rsync
44

55
ON HOST
66
---------
77
export RASPI=192.168.1.17
88
export RASCROSS_DIR="$HOME/raspberrypi"
99
export HYPERION_DIR="$HOME/hyperion"
1010

11-
sudo apt-get install git rsync cmake ia32-libs protobuf-compiler
11+
# install required packages
12+
sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev
1213

14+
# create the rootfs by copying it from an rpi running for example raspbmc
1315
mkdir -p "$RASCROSS_DIR/rootfs"
14-
git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
16+
rsync -rl --delete-after --safe-links pi@$RASPI:/{lib,usr} "$RASCROSS_DIR/rootfs"
1517

18+
# get the raspberry pi firmware and add it to the rootfs
1619
git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
17-
ln -s "$RASCROSS_DIR/firmware/opt" "$RASCROSS_DIR/rootfs/opt"
20+
ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$RASCROSS_DIR/rootfs/opt"
1821

19-
rsync -rl --delete-after --safe-links pi@$RASPI:/{lib,usr} "$RASCROSS_DIR/rootfs"
22+
# get the compile tools
23+
git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
2024

21-
git clone https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
22-
mkdir "$HYPERION_DIR/build"
23-
cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake" --build "$HYPERION_DIR/build" "$HYPERION_DIR"
25+
# get the Hyperion sources
26+
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
2427

28+
# do a native build (to build the protobuf compiler for the native platform)
29+
mkdir "$HYPERION_DIR/build"
30+
cmake -DENABLE_DISPMANX=OFF --build "$HYPERION_DIR/build" "$HYPERION_DIR"
2531

32+
# do the rpi build
33+
# specify the protoc export file to import the protobuf compiler from the native build
34+
mkdir "$HYPERION_DIR/build-rpi"
35+
cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake" -DIMPORT_PROTOC=$HYPERION_DIR/build/protoc_export.cmake --build "$HYPERION_DIR/build-rpi" "$HYPERION_DIR"
2636

2737
------------------------------------------------------------------------------
2838
These instructions are based on the guide given by:

Toolchain-RaspberryPi.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ SET(CMAKE_SYSTEM_NAME Linux)
44
SET(CMAKE_SYSTEM_VERSION 1)
55

66
# specify the cross compiler
7-
SET(CMAKE_C_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc)
8-
SET(CMAKE_CXX_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++)
7+
SET(CMAKE_C_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc)
8+
SET(CMAKE_CXX_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++)
99

1010
# where is the target environment
1111
SET(CMAKE_FIND_ROOT_PATH ${RASPCROSS_DIR}/rootfs)

0 commit comments

Comments
 (0)