mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
78 lines
2.5 KiB
Bash
78 lines
2.5 KiB
Bash
#!/bin/bash
|
|
#Use a clean Raspbian Stretch Lite and Ubuntu 18/19 and run this script
|
|
##############
|
|
#ON TARGET
|
|
#--------------
|
|
#sudo apt-get install qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libqt5sql5-sqlite aptitude show qt5-default rsync
|
|
#############
|
|
#ON HOST
|
|
#---------
|
|
sudo apt-get update
|
|
sudo apt-get upgrade
|
|
# !!! TO-DO verify aptitude gcc-multilib
|
|
|
|
sudo apt-get -qq -y install git rsync cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libqt5sql5-sqlite
|
|
#---------
|
|
|
|
|
|
export TARGET_IP=x.x.x.x
|
|
export TARGET_USER=pi
|
|
|
|
export CROSSROOT="$HOME/crosscompile"
|
|
export RASCROSS_DIR="$CROSSROOT/raspberrypi"
|
|
export ROOTFS_DIR="$RASCROSS_DIR/rootfs"
|
|
export TOOLCHAIN_DIR="$RASCROSS_DIR/tools"
|
|
export QT5_DIR="$CROSSROOT/Qt5"
|
|
|
|
export HYPERION_DIR="$HOME/hyperion.ng"
|
|
|
|
mkdir -p "$ROOTFS_DIR/lib"
|
|
mkdir -p "$ROOTFS_DIR/usr"
|
|
rsync -rl --delete-after --copy-unsafe-links $TARGET_USER@$TARGET_IP:/lib "$ROOTFS_DIR"
|
|
rsync -rl --delete-after --copy-unsafe-links $TARGET_USER@$TARGET_IP:/usr/include "$ROOTFS_DIR/usr"
|
|
rsync -rl --delete-after --copy-unsafe-links $TARGET_USER@$TARGET_IP:/usr/lib "$ROOTFS_DIR/usr"
|
|
|
|
######## RPi specific #########
|
|
|
|
mkdir -p "$RASCROSS_DIR/firmware"
|
|
git clone --depth 1 https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
|
|
ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$ROOTFS_DIR/opt"
|
|
|
|
mkdir -p "$TOOLCHAIN_DIR"
|
|
cd $TOOLCHAIN_DIR
|
|
wget -c https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz --no-check-certificate
|
|
tar -xvf gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz
|
|
|
|
##### End of RPi specific ######
|
|
|
|
######## Qt5 specific #########
|
|
|
|
mkdir -p "$QT5_DIR"
|
|
cd "$QT5_DIR"
|
|
|
|
wget -c http://download.qt.io/archive/qt/5.7/5.7.1/qt-opensource-linux-x64-5.7.1.run
|
|
chmod +x $QT5_DIR/*.run
|
|
|
|
#Display absolute installation directory to be used in Qt5 installer
|
|
echo $HOME/crosscompile/Qt5
|
|
|
|
./qt-opensource-linux-x64-5.7.1.run
|
|
|
|
#Follow the dialogs and install in absolute directory of $HOME/crosscompile/Qt5 (copy from above)
|
|
|
|
##### End of Qt5 specific ######
|
|
|
|
# get the Hyperion sources
|
|
git clone --recursive https://github.com/SputnikElf/hyperion.ng.git "$HYPERION_DIR"
|
|
|
|
# get requried submodules
|
|
cd "$HYPERION_DIR"
|
|
git fetch --recurse-submodules -j2
|
|
|
|
#compile
|
|
cd "$HYPERION_DIR"
|
|
chmod +x "$HYPERION_DIR/bin/"*.sh
|
|
./bin/create_all_releases.sh
|
|
|
|
######END
|