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

Commit 2025f1e

Browse files
committed
Update install/update script
Added build scripts for building different releases (in cross-compile) Added new releases for rpi/imx6/wetek/x32/x64
1 parent 46c0cf1 commit 2025f1e

16 files changed

+260
-0
lines changed

CrossCompileHowto.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ cmake -DENABLE_DISPMANX=OFF --build "$NATIVE_BUILD_DIR" "$HYPERION_DIR"
5555
mkdir -p "$TARGET_BUILD_DIR"
5656
cmake -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" -DIMPORT_PROTOC=$NATIVE_BUILD_DIR/protoc_export.cmake --build "$TARGET_BUILD_DIR" "$HYPERION_DIR"
5757

58+
# For hummingboard (imx6) the following package is required
59+
sudo apt-get install lib32z1
60+
5861
------------------------------------------------------------------------------
5962
These instructions are based on the guide given by:
6063
http://airwiki.ws.dei.polimi.it/index.php/Cross-compiling_for_the_RaspberryPi

Toolchain-imx6.cmake

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
SET(CUBIXCROSS_DIR $ENV{HOME}/hummingboard)
2+
3+
SET(CMAKE_SYSTEM_NAME Linux)
4+
SET(CMAKE_SYSTEM_VERSION 1)
5+
6+
# specify the cross compiler
7+
SET(CMAKE_C_COMPILER ${CUBIXCROSS_DIR}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-gcc)
8+
SET(CMAKE_CXX_COMPILER ${CUBIXCROSS_DIR}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++)
9+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=softfp")
10+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=softfp")
11+
12+
# where is the target environment
13+
SET(CMAKE_FIND_ROOT_PATH ${CUBIXCROSS_DIR}/rootfs)
14+
15+
# search for programs in the build host directories
16+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
17+
18+
# for libraries and headers in the target directories
19+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
20+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
21+
22+
include_directories(${CMAKE_FIND_ROOT_PATH}/usr/include)
File renamed without changes.

Toolchain-x32.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# toolchain file for building a 32bit version on a 64bit host
2+
3+
# use it like this:
4+
# cmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-x32.cmake <sourcedir>
5+
6+
set(CMAKE_SYSTEM_NAME Linux)
7+
set(CMAKE_SYSTEM_VERSION 1)
8+
set(CMAKE_SYSTEM_PROCESSOR "i686")
9+
10+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
11+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
12+

bin/create_all_releases.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/sh
2+
3+
# Create the x64 build
4+
mkdir build-x64
5+
cd build-x64
6+
cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON ..
7+
make -j 4
8+
cd ..
9+
10+
# Create the x32 build
11+
mkdir build-x32
12+
cd build-x32
13+
cmake -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON ..
14+
make -j 4
15+
cd ..
16+
17+
# Create the RPI build
18+
mkdir build-rpi
19+
cd build-rpi
20+
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake ..
21+
make -j 4
22+
cd ..
23+
24+
# Create the WETEK build
25+
mkdir build-wetek
26+
cd build-wetek
27+
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DENABLE_AMLOGIC=ON ..
28+
make -j 4
29+
cd ..
30+
31+
# Create the IMX6 build
32+
mkdir build-imx6
33+
cd build-imx6
34+
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-imx6.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON ..
35+
make -j 4
36+
cd ..
37+
38+
bin/create_release.sh . x64
39+
bin/create_release.sh . x32
40+
bin/create_release.sh . rpi
41+
bin/create_release.sh . wetek
42+
bin/create_release.sh . imx6
43+

bin/create_oe_depedencies.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
RPI_ROOTFS=/home/tvdzwan/hummingboard/rootfs
4+
IMX6_ROOTFS=/home/tvdzwan/hummingboard/rootfs
5+
outfile=hyperion.deps.openelec-imx6.tar.gz
6+
7+
tar --create --verbose --gzip --absolute-names --show-transformed-names --dereference \
8+
--file "$outfile" \
9+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libaudio.so.2" \
10+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libffi.so.6" \
11+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libICE.so.6" \
12+
"$IMX6_ROOTFS/lib/arm-linux-gnueabihf/libpcre.so.3" \
13+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libpng12.so.0" \
14+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libQtCore.so.4" \
15+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libQtGui.so.4" \
16+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libQtNetwork.so.4" \
17+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libSM.so.6" \
18+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libX11.so.6" \
19+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libXau.so.6" \
20+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libxcb.so.1" \
21+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libXdmcp.so.6" \
22+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libXext.so.6" \
23+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libXrender.so.1" \
24+
"$IMX6_ROOTFS/usr/lib/arm-linux-gnueabihf/libXt.so.6" \
25+
"./hyperiond.sh" \
26+
"./hyperion-remote.sh"
27+

bin/create_release.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
3+
if [ "$#" -ne 2 ] || ! [ -d "$1" ]; then
4+
echo "Usage: $0 <REPO-DIR> <BUILD-ID>" >&2
5+
exit 1
6+
fi
7+
8+
repodir="$1"
9+
buildid="$2"
10+
builddir=$repodir/build-$buildid
11+
echo build directory = $builddir
12+
echo repository root dirrectory = $repodir
13+
if ! [ -d "$builddir" ]; then
14+
echo "Could not find build director"
15+
exit 1
16+
fi
17+
18+
outfile="$repodir/deploy/hyperion_$buildid.tar.gz"
19+
echo create $outfile
20+
21+
tar --create --verbose --gzip --absolute-names --show-transformed-names --ignore-failed-read\
22+
--file "$outfile" \
23+
--transform "s:$builddir/bin/:hyperion/bin/:" \
24+
--transform "s:$repodir/effects/:hyperion/effects/:" \
25+
--transform "s:$repodir/config/:hyperion/config/:" \
26+
--transform "s:$repodir/bin/hyperion.init.sh:hyperion/init.d/hyperion.init.sh:" \
27+
--transform "s://:/:g" \
28+
"$builddir/bin/hyperiond" \
29+
"$builddir/bin/hyperion-remote" \
30+
"$builddir/bin/hyperion-v4l2" \
31+
"$builddir/bin/dispmanx2png" \
32+
"$repodir/effects/"* \
33+
"$repodir/bin/hyperion.init.sh" \
34+
"$repodir/config/hyperion.config.json"
35+

deploy/hyperion-remote.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperion-remote "$@"
6.62 MB
Binary file not shown.

deploy/hyperion_imx6.tar.gz

1.13 KB
Binary file not shown.

0 commit comments

Comments
 (0)