mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	Update compile instructions
Former-commit-id: b5e0ad129c174de32fbb814595aaefe1fc0f6c13
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| # Install the required tools and dependencies | # Install the required tools and dependencies | ||||||
| sudo apt-get update | sudo apt-get update | ||||||
| sudo apt-get install git cmake build-essential libprotobuf-dev libQt4-dev libusb-1.0-0-dev protobuf-compiler python-dev | sudo apt-get install git cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev | ||||||
|  |  | ||||||
| # RPI ONLY: when you build on the rapberry pi and inlcude the dispmanx grabber (which is the default)  | # RPI ONLY: when you build on the rapberry pi and inlcude the dispmanx grabber (which is the default)  | ||||||
| # you also need the firmware including headers installed. This downloads the firmware from the raspberrypi github | # 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 | |||||||
|  |  | ||||||
| # create hyperion directory and checkout the code from github | # create hyperion directory and checkout the code from github | ||||||
| export HYPERION_DIR="hyperion" | export HYPERION_DIR="hyperion" | ||||||
| git clone https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR" | git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR" | ||||||
|  |  | ||||||
| # create and enter the build directory | # create and enter the build directory | ||||||
| mkdir "$HYPERION_DIR/build" | mkdir "$HYPERION_DIR/build" | ||||||
| @@ -20,7 +20,7 @@ cd "$HYPERION_DIR/build" | |||||||
| # run cmake to generate make files on the rsapberry pi | # run cmake to generate make files on the rsapberry pi | ||||||
| cmake .. | cmake .. | ||||||
| # or if you are not compiling on the raspberry pi and need to disable the Dispmanx grabber and support for spi devices | # or if you are not compiling on the raspberry pi and need to disable the Dispmanx grabber and support for spi devices | ||||||
| cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF .. | cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON .. | ||||||
|  |  | ||||||
| # run make to build Hyperion | # run make to build Hyperion | ||||||
| make | make | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| ON RASPBERRY | ON RASPBERRY | ||||||
| -------------- | -------------- | ||||||
| sudo apt-get install libprotobuf-dev libQt4-dev libusb-1.0-0-dev python-dev rsync | sudo apt-get install libQt4-dev libusb-1.0-0-dev python-dev rsync | ||||||
|  |  | ||||||
| ON HOST | ON HOST | ||||||
| --------- | --------- | ||||||
| @@ -8,21 +8,31 @@ export RASPI=192.168.1.17 | |||||||
| export RASCROSS_DIR="$HOME/raspberrypi" | export RASCROSS_DIR="$HOME/raspberrypi" | ||||||
| export HYPERION_DIR="$HOME/hyperion" | export HYPERION_DIR="$HOME/hyperion" | ||||||
|  |  | ||||||
| sudo apt-get install git rsync cmake ia32-libs protobuf-compiler | # install required packages | ||||||
|  | sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev | ||||||
|  |  | ||||||
|  | # create the rootfs by copying it from an rpi running for example raspbmc | ||||||
| mkdir -p "$RASCROSS_DIR/rootfs" | mkdir -p "$RASCROSS_DIR/rootfs" | ||||||
| git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools" |  | ||||||
|  |  | ||||||
| git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware" |  | ||||||
| ln -s "$RASCROSS_DIR/firmware/opt" "$RASCROSS_DIR/rootfs/opt" |  | ||||||
|  |  | ||||||
| rsync -rl --delete-after --safe-links pi@$RASPI:/{lib,usr} "$RASCROSS_DIR/rootfs" | rsync -rl --delete-after --safe-links pi@$RASPI:/{lib,usr} "$RASCROSS_DIR/rootfs" | ||||||
|  |  | ||||||
| git clone https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR" | # get the raspberry pi firmware and add it to the rootfs | ||||||
|  | git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware" | ||||||
|  | ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$RASCROSS_DIR/rootfs/opt" | ||||||
|  |  | ||||||
|  | # get the compile tools | ||||||
|  | git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools" | ||||||
|  |  | ||||||
|  | # get the Hyperion sources | ||||||
|  | git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR" | ||||||
|  |  | ||||||
|  | # do a native build (to build the protobuf compiler for the native platform) | ||||||
| mkdir "$HYPERION_DIR/build" | mkdir "$HYPERION_DIR/build" | ||||||
| cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake" --build "$HYPERION_DIR/build" "$HYPERION_DIR" | cmake -DENABLE_DISPMANX=OFF --build "$HYPERION_DIR/build" "$HYPERION_DIR" | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # do the rpi build  | ||||||
|  | # specify the protoc export file to import the protobuf compiler from the native build | ||||||
|  | mkdir "$HYPERION_DIR/build-rpi" | ||||||
|  | cmake -DCMAKE_TOOLCHAIN_FILE="$HYPERION_DIR/Toolchain-RaspberryPi.cmake" -DIMPORT_PROTOC=$HYPERION_DIR/build/protoc_export.cmake --build "$HYPERION_DIR/build-rpi" "$HYPERION_DIR" | ||||||
|  |  | ||||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||||
| These instructions are based on the guide given by: | These instructions are based on the guide given by: | ||||||
|   | |||||||
| @@ -4,8 +4,8 @@ SET(CMAKE_SYSTEM_NAME Linux) | |||||||
| SET(CMAKE_SYSTEM_VERSION 1)  | SET(CMAKE_SYSTEM_VERSION 1)  | ||||||
|  |  | ||||||
| # specify the cross compiler  | # specify the cross compiler  | ||||||
| SET(CMAKE_C_COMPILER   ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc)  | SET(CMAKE_C_COMPILER   ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc) | ||||||
| SET(CMAKE_CXX_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++)  | SET(CMAKE_CXX_COMPILER ${RASPCROSS_DIR}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++) | ||||||
|  |  | ||||||
| # where is the target environment  | # where is the target environment  | ||||||
| SET(CMAKE_FIND_ROOT_PATH ${RASPCROSS_DIR}/rootfs)  | SET(CMAKE_FIND_ROOT_PATH ${RASPCROSS_DIR}/rootfs)  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user