@@ -208,6 +208,7 The following static networking parameters are only supported if `ENABLE_WIFI_DH | |||
|
208 | 208 | |ENABLE_UBOOT|boolean|false|`true`\|`false`|Replace the default RPi 0/1/2/3 second stage bootloader (bootcode.bin) with [U-Boot bootloader](https://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol. RPI4 needs tbd| |
|
209 | 209 | |UBOOTSRC_DIR|string||`FullPathToUBootFolder`|Full path to a directory named `u-boot` of [U-Boot bootloader sources](https://git.denx.de/?p=u-boot.git;a=summary) that will be copied, configured, build and installed inside the chroot| |
|
210 | 210 | |ENABLE_FBTURBO|boolean|false|`true`\|`false`|Install and enable the [hardware accelerated Xorg video driver](https://github.com/ssvb/xf86-video-fbturbo) `fbturbo`. Please note that this driver is currently limited to hardware accelerated window moving and scrolling| |
|
211 | |ENABLE_GR_ACCEL|boolean|false|`true`\|`false`|Install and enable [one of the 3D graphics accelerators for Raspi4](https://www.raspberrypi.org/documentation/configuration/config-txt/video.md) `vc4-fkms-v3d`. Not compatible with `fbturbo` mutually excluded and installed for Raspberry4 only| | |
|
211 | 212 | |FBTURBOSRC_DIR|string||`FullPathToFbTurboFolder`|Full path to a directory named `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| |
|
212 | 213 | |ENABLE_VIDEOCORE|boolean|false|`true`\|`false`|Install and enable the [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| |
|
213 | 214 | |VIDEOCORESRC_DIR|string||`FullPathToVideoSrcFolder`|Full path to a directory named `userland` of [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| |
@@ -31,7 +31,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
31 | 31 | # Create temporary directory for kernel sources |
|
32 | 32 | temp_dir=$(as_nobody mktemp -d) |
|
33 | 33 | |
|
34 | # Fetch current RPi2/3 kernel sources | |
|
34 | # Fetch current RPi2/3/4 kernel sources | |
|
35 | 35 | if [ -z "${KERNEL_BRANCH}" ] ; then |
|
36 | 36 | as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux |
|
37 | 37 | else |
@@ -20,7 +20,7 if [ -n "$RPI_FIRMWARE_DIR" ] && [ -d "$RPI_FIRMWARE_DIR" ] ; then | |||
|
20 | 20 | cp "${RPI_FIRMWARE_DIR}"/boot/fixup4x.dat "${BOOT_DIR}"/fixup4x.dat |
|
21 | 21 | cp "${RPI_FIRMWARE_DIR}"/boot/start4cd.elf "${BOOT_DIR}"/start4cd.elf |
|
22 | 22 | cp "${RPI_FIRMWARE_DIR}"/boot/start4db.elf "${BOOT_DIR}"/start4db.elf |
|
23 |
cp "${RPI_FIRMWARE_DIR}"/boot/start4.elf "${BOOT_DIR}"/start4 |
|
|
23 | cp "${RPI_FIRMWARE_DIR}"/boot/start4.elf "${BOOT_DIR}"/start4.elf | |
|
24 | 24 | cp "${RPI_FIRMWARE_DIR}"/boot/start4x.elf "${BOOT_DIR}"/start4x.elf |
|
25 | 25 | else |
|
26 | 26 | # Create temporary directory for boot binaries |
@@ -40,7 +40,7 else | |||
|
40 | 40 | as_nobody wget -q -O "${temp_dir}/fixup4x.dat" "${FIRMWARE_URL}/fixup4x.dat" |
|
41 | 41 | as_nobody wget -q -O "${temp_dir}/start4cd.elf" "${FIRMWARE_URL}/start4cd.elf" |
|
42 | 42 | as_nobody wget -q -O "${temp_dir}/start4db.elf" "${FIRMWARE_URL}/start4db.elf" |
|
43 |
as_nobody wget -q -O "${temp_dir}/start4 |
|
|
43 | as_nobody wget -q -O "${temp_dir}/start4.elf" "${FIRMWARE_URL}/start4.elf" | |
|
44 | 44 | as_nobody wget -q -O "${temp_dir}/start4x.elf" "${FIRMWARE_URL}/start4x.elf" |
|
45 | 45 | |
|
46 | 46 | # Move downloaded boot binaries |
@@ -266,7 +266,12 echo "${CMDLINE}" > "${BOOT_DIR}/cmdline.txt" | |||
|
266 | 266 | |
|
267 | 267 | # Setup minimal GPU memory allocation size: 16MB (no X) |
|
268 | 268 | if [ "$ENABLE_MINGPU" = true ] ; then |
|
269 | if [ "$ENABLE_GR_ACCEL" = false ] ; then | |
|
269 | 270 | echo "gpu_mem=16" >> "${BOOT_DIR}/config.txt" |
|
271 | else | |
|
272 | ### Cannot reduce memory if graphics acceleration is requested | |
|
273 | echo "gpu_mem=128" >> "${BOOT_DIR}/config.txt" | |
|
274 | fi | |
|
270 | 275 | fi |
|
271 | 276 | |
|
272 | 277 | # Setup boot with initramfs |
@@ -315,6 +320,19 if [ -n "$DISABLE_UNDERVOLT_WARNINGS" ] ; then | |||
|
315 | 320 | echo "avoid_warnings=${DISABLE_UNDERVOLT_WARNINGS}" >> "${BOOT_DIR}/config.txt" |
|
316 | 321 | fi |
|
317 | 322 | |
|
323 | #Enable graphics acceleration for Model 4 | |
|
324 | if [ "$RPI_MODEL" = 4 ] && [ "$ENABLE_GR_ACCEL" = true ] ; then | |
|
325 | echo "max_framebuffers=2" >> "${BOOT_DIR}/config.txt" | |
|
326 | echo "arm_64bit=1" >> "${BOOT_DIR}/config.txt" | |
|
327 | echo "cmdline=cmdline.txt" >> "${BOOT_DIR}/config.txt" | |
|
328 | echo "dtparam=audio=on" >> "${BOOT_DIR}/config.txt" | |
|
329 | if [ "$ENABLE_MINGPU" = false ] ; then | |
|
330 | echo "gpu_mem=128" >> "${BOOT_DIR}/config.txt" | |
|
331 | fi | |
|
332 | echo "dtoverlay=vc4-fkms-v3d, cma-128" >> "${BOOT_DIR}/config.txt" | |
|
333 | fi | |
|
334 | ||
|
335 | ||
|
318 | 336 | # Install kernel modules blacklist |
|
319 | 337 | mkdir -p "${ETC_DIR}/modprobe.d/" |
|
320 | 338 | install_readonly files/modules/raspi-blacklist.conf "${ETC_DIR}/modprobe.d/raspi-blacklist.conf" |
@@ -5,7 +5,7 | |||
|
5 | 5 | # Load utility functions |
|
6 | 6 | . ./functions.sh |
|
7 | 7 | |
|
8 | if [ "$ENABLE_FBTURBO" = true ] ; then | |
|
8 | if [ "$ENABLE_FBTURBO" = true ] && [ "$ENABLE_GR_ACCEL" = false ] ; then | |
|
9 | 9 | # Install c/c++ build environment inside the chroot |
|
10 | 10 | chroot_install_cc |
|
11 | 11 |
@@ -191,6 +191,7 CHROOT_SCRIPTS=${CHROOT_SCRIPTS:=""} | |||
|
191 | 191 | ENABLE_UBOOT=${ENABLE_UBOOT:=false} |
|
192 | 192 | UBOOTSRC_DIR=${UBOOTSRC_DIR:=""} |
|
193 | 193 | ENABLE_FBTURBO=${ENABLE_FBTURBO:=false} |
|
194 | ENABLE_GR_ACCEL=${ENABLE_GR_ACCEL:=true} | |
|
194 | 195 | FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""} |
|
195 | 196 | ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false} |
|
196 | 197 | VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""} |
@@ -270,14 +271,14 fi | |||
|
270 | 271 | |
|
271 | 272 | # Setup architecture specific settings |
|
272 | 273 | if [ -n "$SET_ARCH" ] ; then |
|
273 | # 64-bit configuration | |
|
274 | ## 64-bit configuration | |
|
274 | 275 | if [ "$SET_ARCH" = 64 ] ; then |
|
275 | # General 64-bit depended settings | |
|
276 | ### General 64-bit depended settings | |
|
276 | 277 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} |
|
277 | 278 | KERNEL_ARCH=${KERNEL_ARCH:=arm64} |
|
278 | 279 | KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"} |
|
279 | 280 | |
|
280 | # Raspberry Pi model specific settings | |
|
281 | ### Raspberry Pi model specific settings | |
|
281 | 282 | if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then |
|
282 | 283 | if [ "$RPI_MODEL" != 4 ] ; then |
|
283 | 284 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} |
@@ -289,20 +290,21 if [ -n "$SET_ARCH" ] ; then | |||
|
289 | 290 | RELEASE_ARCH=${RELEASE_ARCH:=arm64} |
|
290 | 291 | KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} |
|
291 | 292 | CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-} |
|
293 | ||
|
292 | 294 | else |
|
293 | 295 | echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit" |
|
294 | 296 | exit 1 |
|
295 | 297 | fi |
|
296 | 298 | fi |
|
297 | 299 | |
|
298 | # 32-bit configuration | |
|
300 | ## 32-bit configuration | |
|
299 | 301 | if [ "$SET_ARCH" = 32 ] ; then |
|
300 | # General 32-bit dependend settings | |
|
302 | ### General 32-bit dependend settings | |
|
301 | 303 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static} |
|
302 | 304 | KERNEL_ARCH=${KERNEL_ARCH:=arm} |
|
303 | 305 | KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="zImage"} |
|
304 | 306 | |
|
305 | # Raspberry Pi model specific settings | |
|
307 | ### Raspberry Pi (0-1P) model specific settings | |
|
306 | 308 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then |
|
307 | 309 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" |
|
308 | 310 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} |
@@ -320,7 +322,7 if [ -n "$SET_ARCH" ] ; then | |||
|
320 | 322 | fi |
|
321 | 323 | fi |
|
322 | 324 | fi |
|
323 | # Raspberry Pi model specific settings | |
|
325 | ### Raspberry Pi (2-4) model specific settings | |
|
324 | 326 | if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then |
|
325 | 327 | if [ "$RPI_MODEL" != 4 ] ; then |
|
326 | 328 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} |
@@ -377,17 +379,18 case "$RPI_MODEL" in | |||
|
377 | 379 | ;; |
|
378 | 380 | esac |
|
379 | 381 | |
|
380 | # Raspberry PI 0,3,3P with Bluetooth and Wifi onboard | |
|
382 | # Raspberry PI 0,3,3P,4 with Bluetooth and Wifi onboard | |
|
381 | 383 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then |
|
382 | # Include bluetooth packages on supported boards | |
|
384 | ## Include bluetooth packages on supported boards | |
|
383 | 385 | if [ "$ENABLE_BLUETOOTH" = true ] ; then |
|
384 | 386 | APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez" |
|
385 | 387 | fi |
|
386 | 388 | if [ "$ENABLE_WIRELESS" = true ] ; then |
|
387 | 389 | APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant" |
|
388 | 390 | fi |
|
389 |
|
|
|
390 | # Check if the internal wireless interface is not supported by the RPi model | |
|
391 | # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard | |
|
392 | else | |
|
393 | ## Check if the internal wireless interface is not supported by the RPi model | |
|
391 | 394 | if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then |
|
392 | 395 | echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth" |
|
393 | 396 | exit 1 |
@@ -506,7 +509,7 if [ -n "$MISSING_PACKAGES" ] ; then | |||
|
506 | 509 | read -r confirm |
|
507 | 510 | [ "$confirm" != "y" ] && exit 1 |
|
508 | 511 | |
|
509 | # Make sure all missing required packages are installed | |
|
512 | ## Make sure all missing required packages are installed | |
|
510 | 513 | apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"` |
|
511 | 514 | fi |
|
512 | 515 | |
@@ -649,12 +652,12 fi | |||
|
649 | 652 | |
|
650 | 653 | # Replace selected packages with smaller clones |
|
651 | 654 | if [ "$ENABLE_REDUCE" = true ] ; then |
|
652 | # Add levee package instead of vim-tiny | |
|
655 | ## Add levee package instead of vim-tiny | |
|
653 | 656 | if [ "$REDUCE_VIM" = true ] ; then |
|
654 | 657 | APT_INCLUDES="$(echo ${APT_INCLUDES} | sed "s/vim-tiny/levee/")" |
|
655 | 658 | fi |
|
656 | 659 | |
|
657 | # Add dropbear package instead of openssh-server | |
|
660 | ## Add dropbear package instead of openssh-server | |
|
658 | 661 | if [ "$REDUCE_SSHD" = true ] ; then |
|
659 | 662 | APT_INCLUDES="$(echo "${APT_INCLUDES}" | sed "s/openssh-server/dropbear/")" |
|
660 | 663 | fi |
@@ -821,20 +824,21 if [ "$ENABLE_SPLITFS" = true ] ; then | |||
|
821 | 824 | dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count="${TABLE_SECTORS}" |
|
822 | 825 | dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count=0 seek="${ROOT_SECTORS}" |
|
823 | 826 | |
|
824 | # Write firmware/boot partition tables | |
|
827 | ## Write firmware/boot partition tables | |
|
825 | 828 | sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null <<EOM |
|
826 | 829 | ${TABLE_SECTORS},${FRMW_SECTORS},c,* |
|
827 | 830 | EOM |
|
828 | 831 | |
|
829 | # Write root partition table | |
|
832 | ## Write root partition table | |
|
830 | 833 | sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null <<EOM |
|
831 | 834 | ${TABLE_SECTORS},${ROOT_SECTORS},83 |
|
832 | 835 | EOM |
|
833 | 836 | |
|
834 | # Setup temporary loop devices | |
|
837 | ## Setup temporary loop devices | |
|
835 | 838 | FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME"-frmw.img)" |
|
836 | 839 | ROOT_LOOP="$(losetup -o 1M -f --show "$IMAGE_NAME"-root.img)" |
|
837 |
|
|
|
840 | # ENABLE_SPLITFS=false | |
|
841 | else | |
|
838 | 842 |
|
|
839 | 843 | dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count=0 seek="${IMAGE_SECTORS}" |
|
840 | 844 |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant