1
- ON RASPBERRY
1
+ ON TARGET
2
2
--------------
3
3
sudo apt-get install libQt4-dev libusb-1.0-0-dev python-dev rsync
4
4
5
5
ON HOST
6
6
---------
7
- export RASPI=192.168.1.17
7
+ export TARGET_IP=192.168.1.17
8
+ export TARGET_USER=pi
9
+
8
10
export RASCROSS_DIR="$HOME/raspberrypi"
11
+ export ROOTFS_DIR="RASCROSS_DIR/rootfs"
9
12
export HYPERION_DIR="$HOME/hyperion"
13
+ export TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake"
14
+
15
+ export NATIVE_BUILD_DIR="$HYPERION_DIR/build"
16
+ export TARGET_BUILD_DIR=HYPERION_DIR="$HYPERION_DIR/build-rpi"
10
17
11
18
# install required packages
12
19
sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev
@@ -16,17 +23,21 @@ sudo apt-get install git rsync cmake ia32-libs protobuf-compiler
16
23
# install solved this for me (TODO: verify what is really required)
17
24
sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386
18
25
19
- # create the rootfs by copying it from an rpi running for example raspbmc
20
- mkdir -p "$RASCROSS_DIR/rootfs"
21
- rsync -rl --delete-after --safe-links pi@$RASPI:/{lib,usr} "$RASCROSS_DIR/rootfs"
26
+ # create the rootfs by copying it from an target
27
+ mkdir -p "$ROOTFS_DIR"
28
+ rsync -rl --delete-after --copy-unsafe-links $TARGET_USER@$TARGET_IP:/{lib,usr} "$ROOTFS_DIR"
29
+
30
+ ######## RPi specific #########
22
31
23
32
# get the raspberry pi firmware and add it to the rootfs
24
33
git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
25
- ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$RASCROSS_DIR/rootfs /opt"
34
+ ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$ROOTFS_DIR /opt"
26
35
27
36
# get the compile tools
28
37
git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
29
38
39
+ ##### End of RPi specific ######
40
+
30
41
# get the Hyperion sources
31
42
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
32
43
@@ -36,13 +47,13 @@ git submodule init
36
47
git submodule update
37
48
38
49
# do a native build (to build the protobuf compiler for the native platform)
39
- mkdir "$HYPERION_DIR/build "
40
- cmake -DENABLE_DISPMANX=OFF --build "$HYPERION_DIR/build " "$HYPERION_DIR"
50
+ mkdir -p "$NATIVE_BUILD_DIR "
51
+ cmake -DENABLE_DISPMANX=OFF --build "$NATIVE_BUILD_DIR " "$HYPERION_DIR"
41
52
42
- # do the rpi build
53
+ # do the cross build
43
54
# specify the protoc export file to import the protobuf compiler from the native build
44
- mkdir "$HYPERION_DIR/build-rpi "
45
- cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake " -DIMPORT_PROTOC=$HYPERION_DIR/build/ protoc_export.cmake --build "$HYPERION_DIR/build-rpi " "$HYPERION_DIR"
55
+ mkdir -p "$TARGET_BUILD_DIR "
56
+ cmake -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE " -DIMPORT_PROTOC=$NATIVE_BUILD_DIR/ protoc_export.cmake --build "$TARGET_BUILD_DIR " "$HYPERION_DIR"
46
57
47
58
------------------------------------------------------------------------------
48
59
These instructions are based on the guide given by:
0 commit comments