@@ -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 |
@@ -224,6 +224,12 Install and enable the [hardware accelerated Xorg video driver](https://github.c | |||
|
224 | 224 | ##### `FBTURBOSRC_DIR`="" |
|
225 | 225 | 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. |
|
226 | 226 | |
|
227 | ##### `ENABLE_VIDEOCORE`=false | |
|
228 | 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. | |
|
229 | ||
|
230 | ##### `VIDEOCORESRC_DIR`="" | |
|
231 | 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. | |
|
232 | ||
|
227 | 233 | ##### `ENABLE_IPTABLES`=false |
|
228 | 234 | Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service. |
|
229 | 235 |
@@ -103,6 +103,7 WLAN_FIRMWARE_URL=${WLAN_FIRMWARE_URL:=https://github.com/RPi-Distro/firmware-no | |||
|
103 | 103 | COLLABORA_URL=${COLLABORA_URL:=https://repositories.collabora.co.uk/debian} |
|
104 | 104 | FBTURBO_URL=${FBTURBO_URL:=https://github.com/ssvb/xf86-video-fbturbo.git} |
|
105 | 105 | UBOOT_URL=${UBOOT_URL:=https://git.denx.de/u-boot.git} |
|
106 | VIDEOCORE_URL=${VIDEOCORE_URL=https://github.com/raspberrypi/userland} | |
|
106 | 107 | |
|
107 | 108 | # Build directories |
|
108 | 109 | BASEDIR=${BASEDIR:=$(pwd)/images/${RELEASE}} |
@@ -191,6 +192,8 ENABLE_REDUCE=${ENABLE_REDUCE:=false} | |||
|
191 | 192 | ENABLE_UBOOT=${ENABLE_UBOOT:=false} |
|
192 | 193 | UBOOTSRC_DIR=${UBOOTSRC_DIR:=""} |
|
193 | 194 | ENABLE_FBTURBO=${ENABLE_FBTURBO:=false} |
|
195 | ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=true} | |
|
196 | VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""} | |
|
194 | 197 | FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""} |
|
195 | 198 | ENABLE_HARDNET=${ENABLE_HARDNET:=false} |
|
196 | 199 | ENABLE_IPTABLES=${ENABLE_IPTABLES:=false} |
@@ -321,6 +324,10 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
321 | 324 | fi |
|
322 | 325 | fi |
|
323 | 326 | |
|
327 | if [ "$ENABLE_VIDEOCORE" = true ] ; then | |
|
328 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cmake" | |
|
329 | fi | |
|
330 | ||
|
324 | 331 | # Add libncurses5 to enable kernel menuconfig |
|
325 | 332 | if [ "$KERNEL_MENUCONFIG" = true ] ; then |
|
326 | 333 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libncurses5-dev" |
@@ -413,6 +420,12 if [ -n "$UBOOTSRC_DIR" ] && [ ! -d "$UBOOTSRC_DIR" ] ; then | |||
|
413 | 420 | exit 1 |
|
414 | 421 | fi |
|
415 | 422 | |
|
423 | # Check if specified VIDEOCORESRC_DIR directory exists | |
|
424 | if [ -n "$VIDEOCORESRC_DIR" ] && [ ! -d "$VIDEOCORESRC_DIR" ] ; then | |
|
425 | echo "error: '${VIDEOCORESRC_DIR}' specified directory not found (VIDEOCORESRC_DIR)!" | |
|
426 | exit 1 | |
|
427 | fi | |
|
428 | ||
|
416 | 429 | # Check if specified FBTURBOSRC_DIR directory exists |
|
417 | 430 | if [ -n "$FBTURBOSRC_DIR" ] && [ ! -d "$FBTURBOSRC_DIR" ] ; then |
|
418 | 431 | echo "error: '${FBTURBOSRC_DIR}' specified directory not found (FBTURBOSRC_DIR)!" |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant