@@ -0,0 +1,33 | |||
|
1 | # | |
|
2 | # Setup videocore - Raspberry Userland | |
|
3 | # | |
|
4 | ||
|
5 | # Load utility functions | |
|
6 | . ./functions.sh | |
|
7 | ||
|
8 | if [ "$ENABLE_VIDEOCORE" = true ] ; then | |
|
9 | # Copy existing videocore sources into chroot directory | |
|
10 | if [ -n "$VIDEOCORESRC_DIR" ] && [ -d "$VIDEOCORESRC_DIR" ] ; then | |
|
11 | # Copy local U-Boot sources | |
|
12 | cp -r "${VIDEOCORESRC_DIR}" "${R}/tmp" | |
|
13 | else | |
|
14 | # Create temporary directory for U-Boot sources | |
|
15 | temp_dir=$(as_nobody mktemp -d) | |
|
16 | ||
|
17 | # Fetch U-Boot sources | |
|
18 | as_nobody git -C "${temp_dir}" clone "${VIDEOCORE_URL}" | |
|
19 | ||
|
20 | # Copy downloaded U-Boot sources | |
|
21 | mv "${temp_dir}/userland" "${R}/tmp/" | |
|
22 | ||
|
23 | # Set permissions of the U-Boot sources | |
|
24 | chown -R root:root "${R}/tmp/userland" | |
|
25 | ||
|
26 | # Remove temporary directory for U-Boot sources | |
|
27 | rm -fr "${temp_dir}" | |
|
28 | fi | |
|
29 | ||
|
30 | cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_BUILD_TYPE=release -DARM64=ON -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_ASM_COMPILER=aarch64-linux-gnu-gcc -DVIDEOCORE_BUILD_DIR="${R}"/opt/vc | |
|
31 | make -j $(nproc) | |
|
32 | chroot_exec PATH=${PATH}:/opt/vc/bin | |
|
33 | fi |
@@ -212,6 +212,12 Install and enable the [hardware accelerated Xorg video driver](https://github.c | |||
|
212 | 212 | ##### `FBTURBOSRC_DIR`="" |
|
213 | 213 | Path to a directory (`xf86-video-fbturbo`) of [hardware accelerated Xorg video driver sources](https://github.com/ssvb/xf86-video-fbturbo) that will be copied, configured, build and installed inside the chroot. |
|
214 | 214 | |
|
215 | ##### `ENABLE_VIDEOCORE`=false | |
|
216 | Install and enable the [Source code for ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) `vcgencmd`. Please note that this driver is currently limited to hardware accelerated window moving and scrolling. | |
|
217 | ||
|
218 | ##### `VIDEOCORESRC_DIR`="" | |
|
219 | Path to a directory (`userland`) of [Source code for ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) that will be copied, configured, build and installed inside the chroot. | |
|
220 | ||
|
215 | 221 | ##### `ENABLE_IPTABLES`=false |
|
216 | 222 | Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service. |
|
217 | 223 |
@@ -54,6 +54,7 export FIRMWARE_URL=${FIRMWARE_URL:=https://github.com/raspberrypi/firmware/raw/ | |||
|
54 | 54 | export WLAN_FIRMWARE_URL=${WLAN_FIRMWARE_URL:=https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm} |
|
55 | 55 | export FBTURBO_URL=${FBTURBO_URL:=https://github.com/ssvb/xf86-video-fbturbo.git} |
|
56 | 56 | export UBOOT_URL=${UBOOT_URL:=https://git.denx.de/u-boot.git} |
|
57 | export VIDEOCORE_URL=${VIDEOCORE_URL=https://github.com/raspberrypi/userland} | |
|
57 | 58 | |
|
58 | 59 | # Firmware directory: Blank if download from github |
|
59 | 60 | export RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:=""} |
@@ -143,6 +144,8 export ENABLE_UBOOT=${ENABLE_UBOOT:=false} | |||
|
143 | 144 | export UBOOTSRC_DIR=${UBOOTSRC_DIR:=""} |
|
144 | 145 | export ENABLE_UBOOTUSB=${ENABLE_UBOOTUSB=false} |
|
145 | 146 | export ENABLE_FBTURBO=${ENABLE_FBTURBO:=false} |
|
147 | export ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=true} | |
|
148 | export VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""} | |
|
146 | 149 | export FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""} |
|
147 | 150 | export ENABLE_HARDNET=${ENABLE_HARDNET:=false} |
|
148 | 151 | export ENABLE_IPTABLES=${ENABLE_IPTABLES:=false} |
@@ -333,6 +336,10 if [ -n "$DISABLE_UNDERVOLT_WARNINGS" ] ; then | |||
|
333 | 336 | fi |
|
334 | 337 | fi |
|
335 | 338 | |
|
339 | if [ "$ENABLE_VIDEOCORE" = true ] ; then | |
|
340 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cmake" | |
|
341 | fi | |
|
342 | ||
|
336 | 343 | # Add libncurses5 to enable kernel menuconfig |
|
337 | 344 | if [ "$KERNEL_MENUCONFIG" = true ] ; then |
|
338 | 345 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libncurses-dev" |
@@ -430,6 +437,12 if [ -n "$UBOOTSRC_DIR" ] && [ ! -d "$UBOOTSRC_DIR" ] ; then | |||
|
430 | 437 | exit 1 |
|
431 | 438 | fi |
|
432 | 439 | |
|
440 | # Check if specified VIDEOCORESRC_DIR directory exists | |
|
441 | if [ -n "$VIDEOCORESRC_DIR" ] && [ ! -d "$VIDEOCORESRC_DIR" ] ; then | |
|
442 | echo "error: '${VIDEOCORESRC_DIR}' specified directory not found (VIDEOCORESRC_DIR)!" | |
|
443 | exit 1 | |
|
444 | fi | |
|
445 | ||
|
433 | 446 | # Check if specified FBTURBOSRC_DIR directory exists |
|
434 | 447 | if [ -n "$FBTURBOSRC_DIR" ] && [ ! -d "$FBTURBOSRC_DIR" ] ; then |
|
435 | 448 | echo "error: '${FBTURBOSRC_DIR}' specified directory not found (FBTURBOSRC_DIR)!" |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant