@@ -208,6 +208,7 The following static networking parameters are only supported if `ENABLE_WIFI_DH | |||||
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| |
|
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 | |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 | |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 | |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 | |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 | |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 | |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 | |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 | |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 | |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| |
|
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 | # Create temporary directory for kernel sources |
|
31 | # Create temporary directory for kernel sources | |
32 | temp_dir=$(as_nobody mktemp -d) |
|
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 | if [ -z "${KERNEL_BRANCH}" ] ; then |
|
35 | if [ -z "${KERNEL_BRANCH}" ] ; then | |
36 | as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux |
|
36 | as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux | |
37 | else |
|
37 | else | |
@@ -883,4 +883,4 else # BUILD_KERNEL=false | |||||
883 | cleanup |
|
883 | cleanup | |
884 | exit 1 |
|
884 | exit 1 | |
885 | fi |
|
885 | fi | |
886 | fi No newline at end of file |
|
886 | fi |
@@ -20,7 +20,7 if [ -n "$RPI_FIRMWARE_DIR" ] && [ -d "$RPI_FIRMWARE_DIR" ] ; then | |||||
20 | cp "${RPI_FIRMWARE_DIR}"/boot/fixup4x.dat "${BOOT_DIR}"/fixup4x.dat |
|
20 | cp "${RPI_FIRMWARE_DIR}"/boot/fixup4x.dat "${BOOT_DIR}"/fixup4x.dat | |
21 | cp "${RPI_FIRMWARE_DIR}"/boot/start4cd.elf "${BOOT_DIR}"/start4cd.elf |
|
21 | cp "${RPI_FIRMWARE_DIR}"/boot/start4cd.elf "${BOOT_DIR}"/start4cd.elf | |
22 | cp "${RPI_FIRMWARE_DIR}"/boot/start4db.elf "${BOOT_DIR}"/start4db.elf |
|
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 | cp "${RPI_FIRMWARE_DIR}"/boot/start4x.elf "${BOOT_DIR}"/start4x.elf |
|
24 | cp "${RPI_FIRMWARE_DIR}"/boot/start4x.elf "${BOOT_DIR}"/start4x.elf | |
25 | else |
|
25 | else | |
26 | # Create temporary directory for boot binaries |
|
26 | # Create temporary directory for boot binaries | |
@@ -40,7 +40,7 else | |||||
40 | as_nobody wget -q -O "${temp_dir}/fixup4x.dat" "${FIRMWARE_URL}/fixup4x.dat" |
|
40 | as_nobody wget -q -O "${temp_dir}/fixup4x.dat" "${FIRMWARE_URL}/fixup4x.dat" | |
41 | as_nobody wget -q -O "${temp_dir}/start4cd.elf" "${FIRMWARE_URL}/start4cd.elf" |
|
41 | as_nobody wget -q -O "${temp_dir}/start4cd.elf" "${FIRMWARE_URL}/start4cd.elf" | |
42 | as_nobody wget -q -O "${temp_dir}/start4db.elf" "${FIRMWARE_URL}/start4db.elf" |
|
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 | as_nobody wget -q -O "${temp_dir}/start4x.elf" "${FIRMWARE_URL}/start4x.elf" |
|
44 | as_nobody wget -q -O "${temp_dir}/start4x.elf" "${FIRMWARE_URL}/start4x.elf" | |
45 |
|
45 | |||
46 | # Move downloaded boot binaries |
|
46 | # Move downloaded boot binaries | |
@@ -266,7 +266,12 echo "${CMDLINE}" > "${BOOT_DIR}/cmdline.txt" | |||||
266 |
|
266 | |||
267 | # Setup minimal GPU memory allocation size: 16MB (no X) |
|
267 | # Setup minimal GPU memory allocation size: 16MB (no X) | |
268 | if [ "$ENABLE_MINGPU" = true ] ; then |
|
268 | if [ "$ENABLE_MINGPU" = true ] ; then | |
269 | echo "gpu_mem=16" >> "${BOOT_DIR}/config.txt" |
|
269 | if [ "$ENABLE_GR_ACCEL" = false ] ; then | |
|
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 | fi |
|
275 | fi | |
271 |
|
276 | |||
272 | # Setup boot with initramfs |
|
277 | # Setup boot with initramfs | |
@@ -315,6 +320,19 if [ -n "$DISABLE_UNDERVOLT_WARNINGS" ] ; then | |||||
315 | echo "avoid_warnings=${DISABLE_UNDERVOLT_WARNINGS}" >> "${BOOT_DIR}/config.txt" |
|
320 | echo "avoid_warnings=${DISABLE_UNDERVOLT_WARNINGS}" >> "${BOOT_DIR}/config.txt" | |
316 | fi |
|
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 | # Install kernel modules blacklist |
|
336 | # Install kernel modules blacklist | |
319 | mkdir -p "${ETC_DIR}/modprobe.d/" |
|
337 | mkdir -p "${ETC_DIR}/modprobe.d/" | |
320 | install_readonly files/modules/raspi-blacklist.conf "${ETC_DIR}/modprobe.d/raspi-blacklist.conf" |
|
338 | install_readonly files/modules/raspi-blacklist.conf "${ETC_DIR}/modprobe.d/raspi-blacklist.conf" |
@@ -5,7 +5,7 | |||||
5 | # Load utility functions |
|
5 | # Load utility functions | |
6 | . ./functions.sh |
|
6 | . ./functions.sh | |
7 |
|
7 | |||
8 | if [ "$ENABLE_FBTURBO" = true ] ; then |
|
8 | if [ "$ENABLE_FBTURBO" = true ] && [ "$ENABLE_GR_ACCEL" = false ] ; then | |
9 | # Install c/c++ build environment inside the chroot |
|
9 | # Install c/c++ build environment inside the chroot | |
10 | chroot_install_cc |
|
10 | chroot_install_cc | |
11 |
|
11 |
@@ -45,7 +45,7 RPI_MODEL=${RPI_MODEL:=3P} | |||||
45 | # Debian release |
|
45 | # Debian release | |
46 | RELEASE=${RELEASE:=buster} |
|
46 | RELEASE=${RELEASE:=buster} | |
47 | if [ $RELEASE = "bullseye" ] ; then |
|
47 | if [ $RELEASE = "bullseye" ] ; then | |
48 | RELEASE=testing |
|
48 | RELEASE=testing | |
49 | fi |
|
49 | fi | |
50 |
|
50 | |||
51 | # Kernel Branch |
|
51 | # Kernel Branch | |
@@ -191,6 +191,7 CHROOT_SCRIPTS=${CHROOT_SCRIPTS:=""} | |||||
191 | ENABLE_UBOOT=${ENABLE_UBOOT:=false} |
|
191 | ENABLE_UBOOT=${ENABLE_UBOOT:=false} | |
192 | UBOOTSRC_DIR=${UBOOTSRC_DIR:=""} |
|
192 | UBOOTSRC_DIR=${UBOOTSRC_DIR:=""} | |
193 | ENABLE_FBTURBO=${ENABLE_FBTURBO:=false} |
|
193 | ENABLE_FBTURBO=${ENABLE_FBTURBO:=false} | |
|
194 | ENABLE_GR_ACCEL=${ENABLE_GR_ACCEL:=true} | |||
194 | FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""} |
|
195 | FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""} | |
195 | ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false} |
|
196 | ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false} | |
196 | VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""} |
|
197 | VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""} | |
@@ -270,14 +271,14 fi | |||||
270 |
|
271 | |||
271 | # Setup architecture specific settings |
|
272 | # Setup architecture specific settings | |
272 | if [ -n "$SET_ARCH" ] ; then |
|
273 | if [ -n "$SET_ARCH" ] ; then | |
273 | # 64-bit configuration |
|
274 | ## 64-bit configuration | |
274 | if [ "$SET_ARCH" = 64 ] ; then |
|
275 | if [ "$SET_ARCH" = 64 ] ; then | |
275 | # General 64-bit depended settings |
|
276 | ### General 64-bit depended settings | |
276 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} |
|
277 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} | |
277 | KERNEL_ARCH=${KERNEL_ARCH:=arm64} |
|
278 | KERNEL_ARCH=${KERNEL_ARCH:=arm64} | |
278 | KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"} |
|
279 | KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"} | |
279 |
|
280 | |||
280 | # Raspberry Pi model specific settings |
|
281 | ### Raspberry Pi model specific settings | |
281 | if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then |
|
282 | if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then | |
282 | if [ "$RPI_MODEL" != 4 ] ; then |
|
283 | if [ "$RPI_MODEL" != 4 ] ; then | |
283 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} |
|
284 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} | |
@@ -289,20 +290,21 if [ -n "$SET_ARCH" ] ; then | |||||
289 | RELEASE_ARCH=${RELEASE_ARCH:=arm64} |
|
290 | RELEASE_ARCH=${RELEASE_ARCH:=arm64} | |
290 | KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} |
|
291 | KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} | |
291 | CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-} |
|
292 | CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-} | |
|
293 | ||||
292 | else |
|
294 | else | |
293 | echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit" |
|
295 | echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit" | |
294 | exit 1 |
|
296 | exit 1 | |
295 | fi |
|
297 | fi | |
296 | fi |
|
298 | fi | |
297 |
|
299 | |||
298 | # 32-bit configuration |
|
300 | ## 32-bit configuration | |
299 | if [ "$SET_ARCH" = 32 ] ; then |
|
301 | if [ "$SET_ARCH" = 32 ] ; then | |
300 | # General 32-bit dependend settings |
|
302 | ### General 32-bit dependend settings | |
301 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static} |
|
303 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static} | |
302 | KERNEL_ARCH=${KERNEL_ARCH:=arm} |
|
304 | KERNEL_ARCH=${KERNEL_ARCH:=arm} | |
303 | KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="zImage"} |
|
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 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then |
|
308 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then | |
307 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" |
|
309 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" | |
308 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} |
|
310 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} | |
@@ -320,7 +322,7 if [ -n "$SET_ARCH" ] ; then | |||||
320 | fi |
|
322 | fi | |
321 | fi |
|
323 | fi | |
322 | fi |
|
324 | fi | |
323 | # Raspberry Pi model specific settings |
|
325 | ### Raspberry Pi (2-4) model specific settings | |
324 | if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then |
|
326 | if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then | |
325 | if [ "$RPI_MODEL" != 4 ] ; then |
|
327 | if [ "$RPI_MODEL" != 4 ] ; then | |
326 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} |
|
328 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} | |
@@ -377,17 +379,18 case "$RPI_MODEL" in | |||||
377 | ;; |
|
379 | ;; | |
378 | esac |
|
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 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then |
|
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 | if [ "$ENABLE_BLUETOOTH" = true ] ; then |
|
385 | if [ "$ENABLE_BLUETOOTH" = true ] ; then | |
384 | APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez" |
|
386 | APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez" | |
385 | fi |
|
387 | fi | |
386 | if [ "$ENABLE_WIRELESS" = true ] ; then |
|
388 | if [ "$ENABLE_WIRELESS" = true ] ; then | |
387 | APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant" |
|
389 | APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant" | |
388 | fi |
|
390 | fi | |
389 |
|
|
391 | # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard | |
390 | # Check if the internal wireless interface is not supported by the RPi model |
|
392 | else | |
|
393 | ## Check if the internal wireless interface is not supported by the RPi model | |||
391 | if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then |
|
394 | if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then | |
392 | echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth" |
|
395 | echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth" | |
393 | exit 1 |
|
396 | exit 1 | |
@@ -506,7 +509,7 if [ -n "$MISSING_PACKAGES" ] ; then | |||||
506 | read -r confirm |
|
509 | read -r confirm | |
507 | [ "$confirm" != "y" ] && exit 1 |
|
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 | apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"` |
|
513 | apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"` | |
511 | fi |
|
514 | fi | |
512 |
|
515 | |||
@@ -554,8 +557,8 fi | |||||
554 |
|
557 | |||
555 | # Check if specified CHROOT_SCRIPTS directory exists |
|
558 | # Check if specified CHROOT_SCRIPTS directory exists | |
556 | if [ -n "$CHROOT_SCRIPTS" ] && [ ! -d "$CHROOT_SCRIPTS" ] ; then |
|
559 | if [ -n "$CHROOT_SCRIPTS" ] && [ ! -d "$CHROOT_SCRIPTS" ] ; then | |
557 |
|
|
560 | echo "error: ${CHROOT_SCRIPTS} specified directory not found (CHROOT_SCRIPTS)!" | |
558 |
|
|
561 | exit 1 | |
559 | fi |
|
562 | fi | |
560 |
|
563 | |||
561 | # Check if specified device mapping already exists (will be used by cryptsetup) |
|
564 | # Check if specified device mapping already exists (will be used by cryptsetup) | |
@@ -649,12 +652,12 fi | |||||
649 |
|
652 | |||
650 | # Replace selected packages with smaller clones |
|
653 | # Replace selected packages with smaller clones | |
651 | if [ "$ENABLE_REDUCE" = true ] ; then |
|
654 | if [ "$ENABLE_REDUCE" = true ] ; then | |
652 | # Add levee package instead of vim-tiny |
|
655 | ## Add levee package instead of vim-tiny | |
653 | if [ "$REDUCE_VIM" = true ] ; then |
|
656 | if [ "$REDUCE_VIM" = true ] ; then | |
654 | APT_INCLUDES="$(echo ${APT_INCLUDES} | sed "s/vim-tiny/levee/")" |
|
657 | APT_INCLUDES="$(echo ${APT_INCLUDES} | sed "s/vim-tiny/levee/")" | |
655 | fi |
|
658 | fi | |
656 |
|
659 | |||
657 | # Add dropbear package instead of openssh-server |
|
660 | ## Add dropbear package instead of openssh-server | |
658 | if [ "$REDUCE_SSHD" = true ] ; then |
|
661 | if [ "$REDUCE_SSHD" = true ] ; then | |
659 | APT_INCLUDES="$(echo "${APT_INCLUDES}" | sed "s/openssh-server/dropbear/")" |
|
662 | APT_INCLUDES="$(echo "${APT_INCLUDES}" | sed "s/openssh-server/dropbear/")" | |
660 | fi |
|
663 | fi | |
@@ -821,20 +824,21 if [ "$ENABLE_SPLITFS" = true ] ; then | |||||
821 | dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count="${TABLE_SECTORS}" |
|
824 | dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count="${TABLE_SECTORS}" | |
822 | dd if=/dev/zero of="$IMAGE_NAME-root.img" bs=512 count=0 seek="${ROOT_SECTORS}" |
|
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 | sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null <<EOM |
|
828 | sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null <<EOM | |
826 | ${TABLE_SECTORS},${FRMW_SECTORS},c,* |
|
829 | ${TABLE_SECTORS},${FRMW_SECTORS},c,* | |
827 | EOM |
|
830 | EOM | |
828 |
|
831 | |||
829 | # Write root partition table |
|
832 | ## Write root partition table | |
830 | sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null <<EOM |
|
833 | sfdisk -q -L -uS -f "$IMAGE_NAME-root.img" 2> /dev/null <<EOM | |
831 | ${TABLE_SECTORS},${ROOT_SECTORS},83 |
|
834 | ${TABLE_SECTORS},${ROOT_SECTORS},83 | |
832 | EOM |
|
835 | EOM | |
833 |
|
836 | |||
834 | # Setup temporary loop devices |
|
837 | ## Setup temporary loop devices | |
835 | FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME"-frmw.img)" |
|
838 | FRMW_LOOP="$(losetup -o 1M --sizelimit 64M -f --show "$IMAGE_NAME"-frmw.img)" | |
836 | ROOT_LOOP="$(losetup -o 1M -f --show "$IMAGE_NAME"-root.img)" |
|
839 | ROOT_LOOP="$(losetup -o 1M -f --show "$IMAGE_NAME"-root.img)" | |
837 |
|
|
840 | # ENABLE_SPLITFS=false | |
|
841 | else | |||
838 |
|
|
842 | dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count="${TABLE_SECTORS}" | |
839 | dd if=/dev/zero of="$IMAGE_NAME.img" bs=512 count=0 seek="${IMAGE_SECTORS}" |
|
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