Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master/master' into hyperion_v…
Browse files Browse the repository at this point in the history
…ersion_id

Conflicts:
	src/hyperion-aml/CMakeLists.txt
	src/hyperion-remote/CMakeLists.txt
	src/hyperion-v4l2/CMakeLists.txt
  • Loading branch information
redpanther committed Mar 13, 2016
2 parents aaac3a7 + a02ab75 commit d34fbdd
Show file tree
Hide file tree
Showing 74 changed files with 1,562 additions and 666 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "dependencies/external/protobuf"]
path = dependencies/external/protobuf
url = https://github.com/tvdzwan/protobuf.git
[submodule "dependencies/external/rpi_ws281x"]
path = dependencies/external/rpi_ws281x
url = https://github.com/jgarff/rpi_ws281x
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ message(STATUS "ENABLE_V4L2 = " ${ENABLE_V4L2})
option(ENABLE_WS2812BPWM "Enable the WS2812b-PWM device" OFF)
message(STATUS "ENABLE_WS2812BPWM = " ${ENABLE_WS2812BPWM})

option(ENABLE_WS281XPWM "Enable the WS281x-PWM device" OFF)
message(STATUS "ENABLE_WS281XPWM = " ${ENABLE_WS281XPWM})

option(ENABLE_X11 "Enable the X11 grabber" OFF)
message(STATUS "ENABLE_X11 = " ${ENABLE_X11})

Expand Down
14 changes: 10 additions & 4 deletions CompileHowto.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install the required tools and dependencies
sudo apt-get update
sudo apt-get install git cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev
sudo apt-get install git cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev libxrender-dev

# RPI ONLY: when you build on the rapberry pi and include the dispmanx grabber (which is the default)
# you also need the firmware including headers installed. This downloads the firmware from the raspberrypi github
Expand All @@ -14,7 +14,7 @@ sudo cp -R "$FIRMWARE_DIR/hardfp/opt/" /opt
export HYPERION_DIR="hyperion"
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"

# if you forget the --resursive in above statement or you are updating an existing clone you need
# if you forget the --recursive in above statement or you are updating an existing clone you need
# to clone the protobuf submodule by runnning the follwing two statements:
git submodule init
git submodule update
Expand All @@ -29,10 +29,16 @@ cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
# as an alternative for the dispmanx grabber on non-rpi devices (e.g. cubox-i) you could try the framebuffer grabber
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
# for OSX build you need XCode, qt4 libraries and cmake. You can use macport (homebrew might work too) to install them
# for OSX build you need XCode, qt4 libraries and cmake (maybe libusb too). You can use macport or homebrew(recommended) to install them:
#for port:
sudo port install qt4-mac
sudo port install cmake
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_V4L2=OFF -DENABLE_OSX=ON .
#sudo port install libusb
#for brew:
sudo brew install qt4-mac
sudo brew install cmake
#sudo brew install libusb
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_V4L2=OFF -DENABLE_OSX=ON ..

# run make to build Hyperion
make
Expand Down
81 changes: 50 additions & 31 deletions CrossCompileHowto.txt
Original file line number Diff line number Diff line change
@@ -1,51 +1,62 @@
ON TARGET
--------------
sudo apt-get install libQt4-dev libusb-1.0-0-dev python-dev rsync

ON HOST
---------
export TARGET_IP=192.168.1.17
#!/bin/bash
#Updated: 13 March 2016, by TPmodding
#Just use a clean Ubunut 14.04 and run this script
##############
#ON TARGET
#--------------
#sudo apt-get install libQt4-dev libusb-1.0-0-dev python-dev rsync
#############

#ON HOST
#---------
sudo apt-get update
sudo apt-get upgrade
#TO-DO verify what is really required
sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev libxrender-dev protobuf-compiler lib32z1 lib32ncurses5 lib32bz2-1.0 zlib1g-dev

echo 'PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin' >> .bashrc
#---------


export TARGET_IP=192.168.0.103
export TARGET_USER=pi

export RASCROSS_DIR="$HOME/raspberrypi"
export ROOTFS_DIR="RASCROSS_DIR/rootfs"
export ROOTFS_DIR="$RASCROSS_DIR/rootfs"
export HYPERION_DIR="$HOME/hyperion"
#export IMX6_DIR="$HOME/hummingboard"
export TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake"

export NATIVE_BUILD_DIR="$HYPERION_DIR/build"
export TARGET_BUILD_DIR=HYPERION_DIR="$HYPERION_DIR/build-rpi"

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

# On newer version of Ubuntu (and maybe other distros) the ia32-libs is not available, the following
# install solved this for me (TODO: verify what is really required)
sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386
export TARGET_BUILD_DIR="$HYPERION_DIR/build-rpi"

# create the rootfs by copying it from an target
mkdir -p "$ROOTFS_DIR"
rsync -rl --delete-after --copy-unsafe-links $TARGET_USER@$TARGET_IP:/{lib,usr} "$ROOTFS_DIR"

######## RPi specific #########

# get the raspberry pi firmware and add it to the rootfs
mkdir -p "$RASCROSS_DIR/firmware"
git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$ROOTFS_DIR/opt"

# get the compile tools
git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"

##### End of RPi specific ######

######## NOT TESTED ONLY INFOs #########
######## IMX6 specific #########
#export IMX6_DIR="$HOME/hummingboard"
#mkdir -p "$IMX6_Dir"
#cd "$IMX6_Dir"
#wget https://launchpad.net/linaro-toolchain-binaries/trunk/2013.10/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.bz2
#tar -xvjf gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.bz2
#cd
##### End of IMX6 specific ######
######## NOT TESTED #########

# get the Hyperion sources
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"

# if you forget the --resursive in above statement or you are updating an existing clone you need
# to clone the protobuf submodule by runnning the follwing two statements:
git submodule init
git submodule update

# do a native build (to build the protobuf compiler for the native platform)
mkdir -p "$NATIVE_BUILD_DIR"
cmake -DENABLE_DISPMANX=OFF --build "$NATIVE_BUILD_DIR" "$HYPERION_DIR"
Expand All @@ -55,9 +66,17 @@ cmake -DENABLE_DISPMANX=OFF --build "$NATIVE_BUILD_DIR" "$HYPERION_DIR"
mkdir -p "$TARGET_BUILD_DIR"
cmake -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" -DIMPORT_PROTOC=$NATIVE_BUILD_DIR/protoc_export.cmake --build "$TARGET_BUILD_DIR" "$HYPERION_DIR"

# For hummingboard (imx6) the following package is required
sudo apt-get install lib32z1

------------------------------------------------------------------------------
These instructions are based on the guide given by:
http://airwiki.ws.dei.polimi.it/index.php/Cross-compiling_for_the_RaspberryPi
#compile
cd "$HYPERION_DIR/deploy"
rm -rf hummingboard_prerelease.tar.gz hyperion.deps.openelec-imx6.tar.gz hyperion.deps.openelec-rpi.tar.gz hyperion_imx6.tar.gz hyperion_rpi.tar.gz hyperion_wetek.tar.gz hyperion_x32.tar.gz hyperion_x64.tar.gz
cd
cd "$HYPERION_DIR/bin"
chmod +x *
cp "$HYPERION_DIR/bin/create_all_releases.sh" "$HYPERION_DIR"
cd "$HYPERION_DIR"
./create_all_releases.sh

######END
#------------------------------------------------------------------------------
#These instructions are based on tvdzwan and on the guide given by:
#http://airwiki.ws.dei.polimi.it/index.php/Cross-compiling_for_the_RaspberryPi
5 changes: 4 additions & 1 deletion HyperionConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// Define to enable the ws2812b-pwm-device
#cmakedefine ENABLE_WS2812BPWM

// Define to enable the ws281x-pwm-via-dma-device using jgarff's library
#cmakedefine ENABLE_WS281XPWM

// Define to enable the spi-device
#cmakedefine ENABLE_TINKERFORGE

Expand All @@ -27,4 +30,4 @@
// Define to enable the osx grabber
#cmakedefine ENABLE_OSX

#define HYPERION_VERSION_ID "${HYPERION_VERSION_ID}"
#define HYPERION_VERSION_ID "${HYPERION_VERSION_ID}"
8 changes: 8 additions & 0 deletions ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**Please provide some information that we could help as fast as possible.
Please check the wiki in case your problem is already known/feature requested.**

**1.** Used hardware and sofware (Wetek,RPi1,Rpi2,... Ubuntu 14.04(64bit),OSX,OpenELEC,OSMC,XBian,...)
**2.** Your LED device and additional hardware (if used) (WS2801,APA102,WS2812B,... connected through (direct,arduino uno,...))
**3.** Please upload your Hyperion log to pastebin.com and insert the link. Have a look at the wiki how you get one.
**4.** Please upload your "Hyperion Configuration File" to www.jsoneditoronline.org and insert the link.

4 changes: 4 additions & 0 deletions PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**1.** Tell us something about your changes.
**2.** If this changes affect the .conf file. Please provide the changed section
**3.** Reference a issue (optional)

12 changes: 6 additions & 6 deletions bin/create_all_releases.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
#!/bin/sh

# create all directly for release with -DCMAKE_BUILD_TYPE=Release -Wno-dev
# Create the x64 build
mkdir build-x64
cd build-x64
cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON ..
cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
make -j 4
cd ..

# Create the x32 build
mkdir build-x32
cd build-x32
cmake -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON ..
cmake -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
make -j 4
cd ..

# Create the RPI build
mkdir build-rpi
cd build-rpi
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake ..
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
make -j 4
cd ..

# Create the WETEK build
mkdir build-wetek
cd build-wetek
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DENABLE_AMLOGIC=ON ..
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DENABLE_AMLOGIC=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
make -j 4
cd ..

# Create the IMX6 build
mkdir build-imx6
cd build-imx6
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-imx6.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON ..
cmake -DCMAKE_TOOLCHAIN_FILE="../Toolchain-imx6.cmake" -DIMPORT_PROTOC=../build-x64/protoc_export.cmake -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
make -j 4
cd ..

Expand Down
4 changes: 4 additions & 0 deletions bin/create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ tar --create --verbose --gzip --absolute-names --show-transformed-names --ignore
--transform "s:$repodir/effects/:hyperion/effects/:" \
--transform "s:$repodir/config/:hyperion/config/:" \
--transform "s:$repodir/bin/hyperion.init.sh:hyperion/init.d/hyperion.init.sh:" \
--transform "s:$repodir/bin/hyperion.systemd.sh:hyperion/init.d/hyperion.systemd.sh:" \
--transform "s:$repodir/bin/hyperion.initctl.sh:hyperion/init.d/hyperion.initctl.sh:" \
--transform "s://:/:g" \
"$builddir/bin/hyperiond" \
"$builddir/bin/hyperion-remote" \
Expand All @@ -32,5 +34,7 @@ tar --create --verbose --gzip --absolute-names --show-transformed-names --ignore
"$builddir/bin/dispmanx2png" \
"$repodir/effects/"* \
"$repodir/bin/hyperion.init.sh" \
"$repodir/bin/hyperion.systemd.sh" \
"$repodir/bin/hyperion.initctl.sh" \
"$repodir/config/hyperion.config.json"

File renamed without changes.
11 changes: 10 additions & 1 deletion bin/hyperion.init.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/bin/bash
# Hyperion daemon
# Hyperion daemon service
# description: Hyperion daemon
# processname: hyperiond
### BEGIN INIT INFO
# Provides: Hyperion
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Hyperion Ambilight init.d Service.
# Description: Hyperion Ambilight init.d Service.
### END INIT INFO

DAEMON=hyperiond
DAEMONOPTS="/etc/hyperion.config.json"
Expand Down
11 changes: 11 additions & 0 deletions bin/hyperion.initctl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Hyperion daemon initctl script

description "hyperion"
author "poljvd & tvdzwan"

start on (runlevel [2345])
stop on (runlevel [!2345])

respawn

exec /usr/bin/hyperiond /etc/hyperion.config.json
15 changes: 15 additions & 0 deletions bin/hyperion.systemd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Hyperion Systemd service

[Service]
Type=simple
User=root
Group=root
UMask=007
ExecStart=/opt/hyperion/bin/hyperiond /etc/hyperion.config.json
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
TimeoutStopSec=10

[Install]
WantedBy=multi-user.target
File renamed without changes.
Loading

0 comments on commit d34fbdd

Please sign in to comment.