##// END OF EJS Templates
Merge branch 'contribGV' of http://depot.tremplin.ens-lyon.fr/Raspi2-3_GenImage into contribGV
vidal -
r776:3332c4bc4391 Fusion contribGV
parent child
Show More
@@ -207,7 +207,11 The following static networking parameters are only supported if `ENABLE_WIFI_DH
207 207 |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|
208 208 |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|
209 209 |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|
210 <<<<<<< HEAD
210 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|
212 =======
213 |ENABLE_GR_ACCEL|boolean|true|`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` and installed for Raspberry4 only.
214 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
211 215 |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 216 |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 217 |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|
@@ -399,6 +403,6 qemu-system-arm -m 2048M -M vexpress-a15 -cpu cortex-a15 -kernel kernel7.img -no
399 403 * [Official Raspberry Pi Firmware on github](https://github.com/raspberrypi/firmware)
400 404 * [Official Raspberry Pi Kernel on github](https://github.com/raspberrypi/linux)
401 405 * [U-BOOT git repository](https://git.denx.de/?p=u-boot.git;a=summary)
402 * [Xorg DDX driver fbturbo](https://github.com/ssvb/xf86-video-fbturbo)
406 * [Xorg DDX driver #FFFFFF#FFFFFF#FFFFFF](https://github.com/ssvb/xf86-video-fbturbo)
403 407 * [RPi3 Wireless interface firmware](https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm)
404 408 * [Collabora RPi2 Kernel precompiled](https://repositories.collabora.co.uk/debian/)
@@ -141,7 +141,6 if [ "$BUILD_KERNEL" = true ] ; then
141 141 #set_kernel_config CONFIG_MMC_SDHCI_IPROC n
142 142 #set_kernel_config CONFIG_USB_DWC2 n
143 143 #sed -i "s|depends on MMC_BCM2835_MMC && MMC_BCM2835_DMA|depends on MMC_BCM2835_MMC|" "${KERNEL_DIR}"/drivers/mmc/host/Kconfig
144
145 144 #VLAN got disabled without reason in arm64bit
146 145 set_kernel_config CONFIG_IPVLAN m
147 146 fi
@@ -265,6 +265,7 fi
265 265 echo "${CMDLINE}" > "${BOOT_DIR}/cmdline.txt"
266 266
267 267 # Setup minimal GPU memory allocation size: 16MB (no X)
268 <<<<<<< HEAD
268 269 if [ "$ENABLE_MINGPU" = true ] ; then
269 270 if [ "$ENABLE_GR_ACCEL" = false ] ; then
270 271 echo "gpu_mem=16" >> "${BOOT_DIR}/config.txt"
@@ -272,6 +273,10 if [ "$ENABLE_MINGPU" = true ] ; then
272 273 ### Cannot reduce memory if graphics acceleration is requested
273 274 echo "gpu_mem=128" >> "${BOOT_DIR}/config.txt"
274 275 fi
276 =======
277 if [ "$ENABLE_MINGPU" = true ] && [ "$ENABLE_GR_ACCEL" = false ] ; then
278 echo "gpu_mem=16" >> "${BOOT_DIR}/config.txt"
279 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
275 280 fi
276 281
277 282 # Setup boot with initramfs
@@ -315,6 +320,17 if [ "$ENABLE_SPI" = true ] ; then
315 320 fi
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 echo "gpu_mem=128" >> "${BOOT_DIR}/config.txt"
330 echo "dtoverlay=vc4-fkms-v3d, cma-128" >> "${BOOT_DIR}/config.txt"
331 fi
332
333
318 334 # Disable RPi2/3 under-voltage warnings
319 335 if [ -n "$DISABLE_UNDERVOLT_WARNINGS" ] ; then
320 336 echo "avoid_warnings=${DISABLE_UNDERVOLT_WARNINGS}" >> "${BOOT_DIR}/config.txt"
@@ -42,9 +42,15 set -x
42 42 # Raspberry Pi model configuration defaults to 3P
43 43 RPI_MODEL=${RPI_MODEL:=3P}
44 44
45 <<<<<<< HEAD
45 46 # Debian release defaults to bullseye
46 47 RELEASE=${RELEASE:=bullseye}
47 48 if [ "$RELEASE" = "bookworm" ] ; then
49 =======
50 # Debian release
51 RELEASE=${RELEASE:=buster}
52 if [ $RELEASE = "bullseye" ] ; then
53 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
48 54 RELEASE=testing
49 55 fi
50 56 echo "Debian release value used : " $RELEASE
@@ -280,7 +286,11 if [ -n "$SET_ARCH" ] ; then
280 286 KERNEL_ARCH=${KERNEL_ARCH:=arm64}
281 287 KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"}
282 288
289 <<<<<<< HEAD
283 290 ### Raspberry Pi model specific settings
291 =======
292 ### Raspberry Pi 64-bit model specific settings
293 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
284 294 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then
285 295 if [ "$RPI_MODEL" != 4 ] ; then
286 296 KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig}
@@ -292,7 +302,11 if [ -n "$SET_ARCH" ] ; then
292 302 RELEASE_ARCH=${RELEASE_ARCH:=arm64}
293 303 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img}
294 304 CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-}
305 <<<<<<< HEAD
295 306
307 =======
308
309 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
296 310 else
297 311 echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit"
298 312 exit 1
@@ -313,11 +327,18 if [ -n "$SET_ARCH" ] ; then
313 327 RELEASE_ARCH=${RELEASE_ARCH:=armel}
314 328 KERNEL_IMAGE=${KERNEL_IMAGE:=kernel.img}
315 329 CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-}
330 <<<<<<< HEAD
316 331
317 332 if [ $ENABLE_XORG = true ] ; then
318 333 if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then
319 334 printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] "
320 335 read -r confirm
336 =======
337 if [ $ENABLE_XORG = true ] ; then
338 if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then
339 printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] "
340 read -r confirm
341 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
321 342 if [ "$confirm" = "y" ] ; then
322 343 $RELEASE = "stretch"
323 344 fi
@@ -340,6 +361,7 if [ -n "$SET_ARCH" ] ; then
340 361 CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-}
341 362 fi
342 363 fi
364
343 365 # SET_ARCH not set
344 366 else
345 367 echo "error: Please set '32' or '64' as value for SET_ARCH"
@@ -390,8 +412,13 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$
390 412 if [ "$ENABLE_WIRELESS" = true ] ; then
391 413 APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant"
392 414 fi
415 <<<<<<< HEAD
416 # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard
417 else
418 =======
393 419 # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard
394 420 else
421 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
395 422 ## Check if the internal wireless interface is not supported by the RPi model
396 423 if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then
397 424 echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth"
@@ -445,7 +472,7 if [ "$ENABLE_CRYPTFS" = true ] && [ "$BUILD_KERNEL" = true ] ; then
445 472 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cryptsetup"
446 473 APT_INCLUDES="${APT_INCLUDES},cryptsetup,busybox,console-setup,cryptsetup-initramfs"
447 474
448 # If cryptfs,dropbear and initramfs are enabled include dropbear-initramfs package
475 ## If cryptfs,dropbear and initramfs are enabled include dropbear-initramfs package
449 476 if [ "$CRYPTFS_DROPBEAR" = true ] && [ "$ENABLE_INITRAMFS" = true ]; then
450 477 APT_INCLUDES="${APT_INCLUDES},dropbear-initramfs"
451 478 fi
@@ -468,10 +495,17 if [ "$ENABLE_UBOOT" = true ] ; then
468 495 fi
469 496
470 497 if [ "$ENABLE_USBBOOT" = true ] ; then
498 <<<<<<< HEAD
471 499 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 2 ]; then
472 500 echo "error: Booting from USB alone is only supported by Raspberry Pi 3 and 3P"
473 501 exit 1
474 502 fi
503 =======
504 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 2 ]; then
505 echo "error: Booting from USB alone is only supported by Raspberry Pi 3 and 3P"
506 exit 1
507 fi
508 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
475 509 fi
476 510
477 511 # Check if root SSH (v2) public key file exists
@@ -706,7 +740,7 fi
706 740 # Execute custom scripts inside the chroot
707 741 if [ -n "$CHROOT_SCRIPTS" ] && [ -d "$CHROOT_SCRIPTS" ] ; then
708 742 cp -r "${CHROOT_SCRIPTS}" "${R}/chroot_scripts"
709 chroot_exec /bin/bash -x <<'EOF'
743 chroot_exec /bin/bash -x << EOF
710 744 for SCRIPT in /chroot_scripts/* ; do
711 745 if [ -f $SCRIPT -a -x $SCRIPT ] ; then
712 746 $SCRIPT
@@ -826,6 +860,7 if [ "$ENABLE_SPLITFS" = true ] ; then
826 860 dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count="${TABLE_SECTORS}"
827 861 dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count=0 seek="${ROOT_SECTORS}"
828 862
863 <<<<<<< HEAD
829 864 ## Write firmware/boot partition tables
830 865 sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null <<EOM
831 866 ${TABLE_SECTORS},${FRMW_SECTORS},c,*
@@ -833,6 +868,15 EOM
833 868
834 869 ## Write root partition table
835 870 sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null <<EOM
871 =======
872 # Write firmware/boot partition tables
873 sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null << EOM
874 ${TABLE_SECTORS},${FRMW_SECTORS},c,*
875 EOM
876
877 # Write root partition table
878 sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null << EOM
879 >>>>>>> 7588b4f62cfa955de0822acf49908044e0504249
836 880 ${TABLE_SECTORS},${ROOT_SECTORS},83
837 881 EOM
838 882
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant