@@ -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 |
|
|
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,11 +141,10 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 |
|
148 | ||
|
147 | ||
|
149 | 148 | # enable ZSWAP see https://askubuntu.com/a/472227 or https://wiki.archlinux.org/index.php/zswap |
|
150 | 149 | if [ "$KERNEL_ZSWAP" = true ] ; then |
|
151 | 150 | set_kernel_config CONFIG_ZPOOL y |
@@ -156,7 +155,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
156 | 155 | set_kernel_config CONFIG_PGTABLE_MAPPING y |
|
157 | 156 | set_kernel_config CONFIG_LZO_COMPRESS y |
|
158 | 157 | fi |
|
159 | ||
|
158 | ||
|
160 | 159 | if [ "$RPI_MODEL" = 4 ] ; then |
|
161 | 160 | # Following are set in current 32-bit LPAE kernel |
|
162 | 161 | set_kernel_config CONFIG_CGROUP_PIDS y |
@@ -362,7 +361,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
362 | 361 | set_kernel_config CONFIG_PCIE_BRCMSTB y |
|
363 | 362 | set_kernel_config CONFIG_BCM2835_MMC y |
|
364 | 363 | |
|
365 |
# Snap needs squashfs. The ubuntu eoan-preinstalled-server image at |
|
|
364 | # Snap needs squashfs. The ubuntu eoan-preinstalled-server image at | |
|
366 | 365 | # http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/ uses snap |
|
367 | 366 | # during cloud-init setup at first boot. Without this the login accounts are not |
|
368 | 367 | # created and the user can not login. |
@@ -404,10 +403,10 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
404 | 403 | set_kernel_config CONFIG_SLAB_FREELIST_RANDOM=y |
|
405 | 404 | set_kernel_config CONFIG_SLAB_FREELIST_HARDENED=y |
|
406 | 405 | set_kernel_config CONFIG_MMU_NOTIFIER y |
|
407 | ||
|
406 | ||
|
408 | 407 | # erratum |
|
409 | 408 | set_kernel_config ARM64_ERRATUM_834220 y |
|
410 | ||
|
409 | ||
|
411 | 410 | # https://sourceforge.net/p/kvm/mailman/message/18440797/ |
|
412 | 411 | set_kernel_config CONFIG_PREEMPT_NOTIFIERS y |
|
413 | 412 | fi |
@@ -471,7 +470,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
471 | 470 | set_kernel_config CONFIG_SYSTEM_TRUSTED_KEYS m |
|
472 | 471 | set_kernel_config CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE 4096 |
|
473 | 472 | fi |
|
474 | ||
|
473 | ||
|
475 | 474 | if [ "$ENABLE_CRYPTFS" = true ] ; then |
|
476 | 475 | set_kernel_config CONFIG_EMBEDDED y |
|
477 | 476 | set_kernel_config CONFIG_EXPERT y |
@@ -625,7 +624,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
625 | 624 | set_kernel_config CONFIG_NF_TABLES_BRIDGE y |
|
626 | 625 | set_kernel_config CONFIG_NF_CT_NETLINK_TIMEOUT m |
|
627 | 626 | set_kernel_config CONFIG_NFT_OSF m |
|
628 | ||
|
627 | ||
|
629 | 628 | fi |
|
630 | 629 | |
|
631 | 630 | # Enables BPF syscall for systemd-journald see https://github.com/torvalds/linux/blob/master/init/Kconfig#L848 or https://groups.google.com/forum/#!topic/linux.gentoo.user/_2aSc_ztGpA |
@@ -637,7 +636,7 if [ "$BUILD_KERNEL" = true ] ; then | |||
|
637 | 636 | set_kernel_config CONFIG_XDP_SOCKETS y |
|
638 | 637 | fi |
|
639 | 638 | |
|
640 |
# KERNEL_DEFAULT_GOV was set by user |
|
|
639 | # KERNEL_DEFAULT_GOV was set by user | |
|
641 | 640 | if [ "$KERNEL_DEFAULT_GOV" != ondemand ] && [ -n "$KERNEL_DEFAULT_GOV" ] ; then |
|
642 | 641 | case "$KERNEL_DEFAULT_GOV" in |
|
643 | 642 | performance) |
@@ -811,16 +810,16 else # BUILD_KERNEL=false | |||
|
811 | 810 | temp_dir=$(as_nobody mktemp -d) |
|
812 | 811 | |
|
813 | 812 | # Fetch kernel dl |
|
814 |
as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" |
|
|
813 | as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" | |
|
815 | 814 | fi |
|
816 | 815 | if [ "$SET_ARCH" = 64 ] && [ "$RPI_MODEL" = 4 ] ; then |
|
817 | 816 | # Create temporary directory for dl |
|
818 | 817 | temp_dir=$(as_nobody mktemp -d) |
|
819 | 818 | |
|
820 | 819 | # Fetch kernel dl |
|
821 |
as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI4_64_KERNEL_URL" |
|
|
820 | as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI4_64_KERNEL_URL" | |
|
822 | 821 | fi |
|
823 | ||
|
822 | ||
|
824 | 823 | #extract download |
|
825 | 824 | tar -xJf "${temp_dir}"/kernel.tar.xz -C "${temp_dir}" |
|
826 | 825 |
@@ -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 |
|
|
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,25 +327,32 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 |
|
|
|
323 | fi | |
|
324 |
|
|
|
325 |
|
|
|
343 | $RELEASE = "stretch" | |
|
344 | fi | |
|
345 | fi | |
|
346 | fi | |
|
326 | 347 | fi |
|
327 | 348 | ### Raspberry Pi (2-4) model specific settings |
|
328 | 349 | if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then |
|
329 | 350 | if [ "$RPI_MODEL" != 4 ] ; then |
|
330 | 351 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} |
|
331 |
|
|
|
352 | KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7.img} | |
|
332 | 353 | else |
|
333 | 354 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig} |
|
334 |
|
|
|
355 | KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7l.img} | |
|
335 | 356 | fi |
|
336 | 357 | |
|
337 | 358 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" |
@@ -340,7 +361,8 if [ -n "$SET_ARCH" ] ; then | |||
|
340 | 361 | CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-} |
|
341 | 362 | fi |
|
342 | 363 | fi |
|
343 | # SET_ARCH not set | |
|
364 | ||
|
365 | # SET_ARCH not set | |
|
344 | 366 | else |
|
345 | 367 | echo "error: Please set '32' or '64' as value for SET_ARCH" |
|
346 | 368 | exit 1 |
@@ -348,37 +370,37 fi | |||
|
348 | 370 | # Device specific configuration and U-Boot configuration |
|
349 | 371 | case "$RPI_MODEL" in |
|
350 | 372 | 0) |
|
351 |
|
|
|
352 |
|
|
|
353 |
|
|
|
373 | DTB_FILE=${DTB_FILE:=bcm2708-rpi-0-w.dtb} | |
|
374 | UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} | |
|
375 | ;; | |
|
354 | 376 | 1) |
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
|
377 | DTB_FILE=${DTB_FILE:=bcm2708-rpi-b.dtb} | |
|
378 | UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} | |
|
379 | ;; | |
|
358 | 380 | 1P) |
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
|
381 | DTB_FILE=${DTB_FILE:=bcm2708-rpi-b-plus.dtb} | |
|
382 | UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} | |
|
383 | ;; | |
|
362 | 384 | 2) |
|
363 |
|
|
|
364 |
|
|
|
365 |
|
|
|
385 | DTB_FILE=${DTB_FILE:=bcm2709-rpi-2-b.dtb} | |
|
386 | UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_2_defconfig} | |
|
387 | ;; | |
|
366 | 388 | 3) |
|
367 |
|
|
|
368 |
|
|
|
369 |
|
|
|
389 | DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} | |
|
390 | UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} | |
|
391 | ;; | |
|
370 | 392 | 3P) |
|
371 |
|
|
|
372 |
|
|
|
373 |
|
|
|
393 | DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} | |
|
394 | UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} | |
|
395 | ;; | |
|
374 | 396 | 4) |
|
375 |
|
|
|
376 |
|
|
|
377 |
|
|
|
397 | DTB_FILE=${DTB_FILE:=bcm2711-rpi-4-b.dtb} | |
|
398 | UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_4_defconfig} | |
|
399 | ;; | |
|
378 | 400 | *) |
|
379 |
|
|
|
380 |
|
|
|
381 |
|
|
|
401 | echo "error: Raspberry Pi model $RPI_MODEL is not supported!" | |
|
402 | exit 1 | |
|
403 | ;; | |
|
382 | 404 | esac |
|
383 | 405 | |
|
384 | 406 | # Raspberry PI 0,3,3P,4 with Bluetooth and Wifi onboard |
@@ -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 | |
|
393 | 416 | # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard |
|
394 | 417 | else |
|
418 | ======= | |
|
419 | # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard | |
|
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 << |
|
|
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 | |
@@ -845,7 +889,7 else | |||
|
845 | 889 | dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count=0 seek="${IMAGE_SECTORS}" |
|
846 | 890 | |
|
847 | 891 | # Write partition table |
|
848 | sfdisk -q -L -uS -f "$IMAGE_NAME.img" 2> /dev/null <<EOM | |
|
892 | sfdisk -q -L -uS -f "$IMAGE_NAME.img" 2> /dev/null << EOM | |
|
849 | 893 | ${TABLE_SECTORS},${FRMW_SECTORS},c,* |
|
850 | 894 | ${ROOT_OFFSET},${ROOT_SECTORS},83 |
|
851 | 895 | EOM |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant