Skip to content

Commit

Permalink
Release v9.5 (#7098)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Jun 9, 2024
2 parents b13c673 + 99eb8b2 commit c7429cd
Show file tree
Hide file tree
Showing 30 changed files with 389 additions and 201 deletions.
1 change: 1 addition & 0 deletions .build/images/Quartz64/quartz64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DMADEVICES=y
CONFIG_DMA_CMA=y
CONFIG_DM_CRYPT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_DRM=y
Expand Down
49 changes: 31 additions & 18 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ else
curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1
# shellcheck disable=SC1091
. /tmp/dietpi-globals
G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals
G_EXEC rm /tmp/dietpi-globals
export G_GITOWNER G_GITBRANCH G_HW_ARCH_NAME=$(uname -m)
# shellcheck disable=SC2015
[[ $(</etc/debian_version) =~ ^('12.'|'bookworm/sid')$ ]] && export G_DISTRO=7 || export G_DISTRO=6 # Ubuntu Jammy comes with "bookworm/sid"
read -r debian_version < /etc/debian_version
case $debian_version in
'11.'*|'bullseye/sid') G_DISTRO=6;;
'12.'*|'bookworm/sid') G_DISTRO=7;;
'13.'*|'trixie/sid') G_DISTRO=8;;
*) G_DIETPI-NOTIFY 1 "Unsupported distro version \"$debian_version\". Aborting ..."; exit 1;;
esac
fi
case $G_HW_ARCH_NAME in
'armv6l') export G_HW_ARCH=1;;
Expand Down Expand Up @@ -47,6 +52,8 @@ EDITION=
SUFFIX=
ADD_DOS_PART=1
SIGN_PASS=
TEST_KERNEL=0
TEST_UBOOT=0
while (( $# ))
do
case $1 in
Expand All @@ -63,6 +70,8 @@ do
'-s') shift; SUFFIX=$1;;
'--no-dos-part') ADD_DOS_PART=0;;
'--sign') shift; SIGN_PASS=$1;;
'--test-kernel') TEST_KERNEL=1;;
'--test-uboot') TEST_UBOOT=1;;
*) G_DIETPI-NOTIFY 1 "Invalid input \"$1\", aborting..."; exit 1;;
esac
shift
Expand Down Expand Up @@ -95,26 +104,26 @@ case $HW_MODEL in
45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=1020;;
46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1008;;
47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1008;;
48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=764;;
48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=800;;
'49.1') iname='Quartz64A' HW_ARCH=3 partition_start=16 root_size=752;;
'49.2') iname='Quartz64B' HW_ARCH=3 partition_start=16 root_size=752;;
'49.3') iname='SOQuartz' HW_ARCH=3 partition_start=16 root_size=752;;
52) iname='ASUSTB' HW_ARCH=2 partition_start=4 root_size=764;;
54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1148;;
55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1008;;
56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1008;;
57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=892;;
56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1100;;
57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=1000;;
58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=1008;;
59) iname='ZeroPi' HW_ARCH=2 partition_start=4 root_size=764;;
60) iname='NanoPiNEO' HW_ARCH=2 partition_start=4 root_size=764;;
59) iname='ZeroPi' HW_ARCH=2 partition_start=4 root_size=800;;
60) iname='NanoPiNEO' HW_ARCH=2 partition_start=4 root_size=800;;
61) iname='NanoPiM2' HW_ARCH=2 partition_start=4 boot_size=64 root_size=700 boot_fstype='ext4';;
'62.1') iname='NanoPiM3' HW_ARCH=3 partition_start=4 root_size=700;;
'62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=700;;
63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=764;;
64) iname='NanoPiNEOAir' HW_ARCH=2 partition_start=4 root_size=764;;
'62.1') iname='NanoPiM3' HW_ARCH=3 partition_start=4 root_size=800;;
'62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=800;;
63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=800;;
64) iname='NanoPiNEOAir' HW_ARCH=2 partition_start=4 root_size=800;;
'65.1') iname='NanoPiNEO2' HW_ARCH=3 partition_start=4 root_size=1020;;
'65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=1020;;
66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=764;;
66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=800;;
67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=1020;;
'68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1008;;
'68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1008;;
Expand Down Expand Up @@ -142,7 +151,7 @@ case $HW_MODEL in
86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;;
87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
88) iname='OrangePiZero2W' HW_ARCH=3 partition_start=4 root_size=1148;;
89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=892;;
89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=1000;;
90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
*) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;;
esac
Expand Down Expand Up @@ -214,13 +223,16 @@ fi
(( $efi_size )) || [[ $boot_size -gt 0 && $boot_fstype == 'fat'* ]] && apackages+=('dosfstools')

# Emulation support in case of incompatible architecture
(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && apackages+=('qemu-user-static' 'binfmt-support')
(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && apackages+=('qemu-user-static')

# Virtual machine disk conversion
[[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils')

G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}"

# Register QEMU binfmt configs
dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt

# Bootstrap archive keyring if missing
if [[ ! -f $keyring ]]
then
Expand Down Expand Up @@ -379,9 +391,10 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/run
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/cache/apt
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists
G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log
packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,'
packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,iputils-ping,locales,mawk,nano,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,'
(( $DISTRO > 7 )) && packages+='7zip,' || packages+='p7zip,'
[[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils'
#G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; }
# - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above
G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo"
G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log

Expand All @@ -398,7 +411,7 @@ echo '[ INFO ] Running DietPi-Installer...'
_EOF_

cat << _EOF_ >> rootfs/etc/rc.local
export GITOWNER='$GITOWNER' GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO=0 WIFI_REQUIRED=1 DISTRO_TARGET=$DISTRO
export GITOWNER='$GITOWNER' GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO=0 WIFI_REQUIRED=1 DISTRO_TARGET=$DISTRO TEST_KERNEL=$TEST_KERNEL TEST_UBOOT=$TEST_UBOOT
echo '[ INFO ] Running DietPi-Installer for $G_GITOWNER/$G_GITBRANCH'
bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-installer')" || poweroff
_EOF_
Expand Down
16 changes: 11 additions & 5 deletions .build/images/dietpi-imager
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@
curl -sSf "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1
# shellcheck disable=SC1091
. /tmp/dietpi-globals
G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals
[[ $(</etc/debian_version) =~ ^('12.'|'bookworm/sid'$) ]] && G_DISTRO=7 || G_DISTRO=6 # Ubuntu Jammy comes with "bookworm/sid"
G_EXEC rm /tmp/dietpi-globals
read -r debian_version < /etc/debian_version
case $debian_version in
'11.'*|'bullseye/sid') G_DISTRO=6;;
'12.'*|'bookworm/sid') G_DISTRO=7;;
'13.'*|'trixie/sid') G_DISTRO=8;;
*) G_DIETPI-NOTIFY 1 "Unsupported distro version \"$debian_version\". Aborting ..."; exit 1;;
esac
fi
readonly G_PROGRAM_NAME='DietPi-Imager'
G_CHECK_ROOT_USER
Expand Down Expand Up @@ -621,10 +627,10 @@ _EOF_

# Install required packages
G_AG_CHECK_INSTALL_PREREQ unzip clonezilla partclone xz-utils syslinux-common xorriso isolinux
# - We need Clonezilla 5.x for loop device support
if [[ $(dpkg-query -Wf '${Version}' clonezilla 2> /dev/null) != '5'* ]]
# - Bullseye/Focal: We need Clonezilla 5.x for loop device support
if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' clonezilla 2> /dev/null)" lt 5
then
G_EXEC curl -sSf 'https://deb.debian.org/debian/pool/main/c/clonezilla/clonezilla_5.2.7-1_all.deb' -o clonezilla.deb
G_EXEC curl -sSf 'https://deb.debian.org/debian/pool/main/c/clonezilla/clonezilla_5.3.17-2_all.deb' -o clonezilla.deb
G_EXEC dpkg -i ./clonezilla.deb
G_EXEC rm clonezilla.deb
fi
Expand Down
59 changes: 25 additions & 34 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
# - HW_MODEL=0 (must match one of the supported IDs below)
# - WIFI_REQUIRED=0 [01]
# - DISTRO_TARGET=7 [678] (Bullseye: 6, Bookworm: 7, Trixie: 8)
# - TEST_KERNEL=1 Install test kernel from https://dietpi.com/downloads/binaries/testing/
# - TEST_UBOOT=1 Install test U-Boot from https://dietpi.com/downloads/binaries/testing/
#------------------------------------------------------------------------------------------------

# Core globals
G_PROGRAM_NAME='DietPi-Installer'

# Input variables
[[ $TEST_KERNEL == 1 ]] || TEST_KERNEL=0
[[ $TEST_UBOOT == 1 ]] || TEST_UBOOT=0

#------------------------------------------------------------------------------------------------
# Critical checks and requirements to run this script
#------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -689,7 +695,6 @@ setenv rootuuid "true"' /boot/boot.cmd
79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;;
85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;;
87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;;
90) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-radxa-zero3.dtb' /boot/dietpiEnv.txt;;
*) :;;
esac
case $G_HW_MODEL in
Expand Down Expand Up @@ -876,7 +881,7 @@ setenv rootuuid "true"' /boot/boot.cmd
'cron' # Background job scheduler
'curl' # Web address testing, downloading, uploading etc.
'fdisk' # Partitioning tool used by DietPi-FS_partition_resize and DietPi-Imager
'gnupg' # apt-key add / gpg
'gpg' # apt-key list / gpg
'htop' # System monitor
'iputils-ping' # "ping" command
'locales' # Support locales, used by dietpi-config > Language/Regional Options > Locale
Expand Down Expand Up @@ -1053,7 +1058,7 @@ _EOF_
# Update APT lists
G_AGUP
# Install kernel, device tree, U-Boot, firmware and initramfs packages
local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_uboot=0 dietpi_kernel=0
local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=()
case $G_HW_MODEL in
10) model='odroidc1' kernel='meson' arch='arm';;
11) model='odroidxu4' kernel='odroidxu4' arch='arm';;
Expand Down Expand Up @@ -1151,27 +1156,21 @@ blacklist rockchip_vdec
_EOF_
fi
# Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression
if (( $dietpi_kernel ))
then
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
fi
[[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd')
G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}"
[[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf
# Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available
if (( $dietpi_kernel ))
if (( $TEST_KERNEL ))
then
G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb"
G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb"
G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/testing/linux-image-$branch-$kernel.deb"
G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/testing/linux-dtb-$branch-$kernel.deb"
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[12].deb
G_EXEC rm package[12].deb
fi
# Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available
if (( $dietpi_uboot ))
if (( $TEST_UBOOT ))
then
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb"
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/testing/linux-u-boot-$model-$branch.deb"
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
fi
Expand Down Expand Up @@ -1216,14 +1215,6 @@ _EOF_
G_CONFIG_INJECT 'user_overlays=' 'user_overlays=dietpi-usb-otg' /boot/dietpiEnv.txt
G_EXEC apt-mark auto device-tree-compiler

# Workaround for Odroid N2 failing to boot from eMMC: https://forum.armbian.com/topic/20206-odroid-n2-issues-with-recent-firmware-and-emmc-modules/#comment-142409
elif (( $G_HW_MODEL == 15 ))
then
G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-odroidn2.bin.gz'
G_EXEC gzip -d u-boot.gz
G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=512 seek=1 conv=notrunc,fdatasync
G_EXEC rm u-boot

# Workaround for NanoPi R1 failing boot: https://github.com/MichaIng/DietPi/issues/5927
elif (( $G_HW_MODEL == 48 ))
then
Expand Down Expand Up @@ -1435,10 +1426,10 @@ _EOF_
G_EXEC rm -f /{initrd.img,vmlinuz}{,.old}
fi

# Generic kernel + device tree + U-Boot package auto detect + initramfs-tools
# Generic kernel, device tree, bootloader and firmware package auto detect + initramfs-tools
elif (( $G_HW_MODEL != 75 ))
then
mapfile -t apackages < <(dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb|u-boot)-|^u-boot')
mapfile -t apackages < <({ dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb)|u-boot|bootloader|firmware'; dpkg-query -S /{lib/modules,boot}/* 2> /dev/null | sed 's/:.*//;s/, /\n/g'; } | sort -u)
[[ ${apackages[0]} ]] || G_DIETPI-NOTIFY 2 'Unable to find kernel packages for installation. Assuming non-APT/.deb kernel installation.'
G_AGI initramfs-tools "${apackages[@]}"
unset -v apackages
Expand Down Expand Up @@ -1574,26 +1565,26 @@ _EOF_
[[ -d '/etc/chromium.d' ]] && G_EXEC rm -R /etc/chromium.d
[[ -d '/etc/lightdm' ]] && G_EXEC rm -R /etc/lightdm

# - www
# www
[[ -d '/var/www' ]] && G_EXEC rm -Rf /var/www/{,.??,.[^.]}*

# - Source code and Linux headers
# Source code and Linux headers
[[ -d '/usr/src' ]] && G_EXEC rm -Rf /usr/src/{,.??,.[^.]}*

# - Documentation dirs: https://github.com/MichaIng/DietPi/issues/3259
# Documentation dirs: https://github.com/MichaIng/DietPi/issues/3259
#[[ -d '/usr/share/man' ]] && G_EXEC rm -R /usr/share/man
#[[ -d '/usr/share/doc' ]] && G_EXEC rm -R /usr/share/doc
#[[ -d '/usr/share/doc-base' ]] && G_EXEC rm -R /usr/share/doc-base
[[ -d '/usr/share/calendar' ]] && G_EXEC rm -R /usr/share/calendar

# - Unused DEB package config files
# Unused DEB package config files
find / \( -name '*?.dpkg-dist' -o -name '*?.dpkg-old' -o -name '*?.dpkg-new' -o -name '*?.dpkg-bak' -o -name '*?.dpkg-del' -o -name '*?.ucf-dist' -o -name '*?.ucf-old' -o -name '*?.ucf-new' \) -exec rm -v {} +

# - Fonts
# Fonts
[[ -d '/usr/share/fonts' ]] && G_EXEC rm -R /usr/share/fonts
[[ -d '/usr/share/icons' ]] && G_EXEC rm -R /usr/share/icons

# - Stop, disable and remove not required 3rd party services
# Stop, disable and remove not required 3rd party services
local aservices=(

# RPi
Expand Down Expand Up @@ -1639,7 +1630,7 @@ _EOF_
done
done

# - Remove obsolete SysV service entries
# Remove obsolete SysV service entries
aservices=(

'fake-hwclock'
Expand Down Expand Up @@ -2035,8 +2026,8 @@ _EOF_'
if (( $G_HW_MODEL != 20 && $G_HW_MODEL != 75 ))
then
G_EXEC_DESC='Configuring hdparm'
# Since Debian Bullseye, spindown_time is not applied if APM is not supported by the drive. force_spindown_time is required to override that.
G_EXEC eval 'echo -e '\''apm = 127\nforce_spindown_time = 120'\'' > /etc/hdparm.conf'
# Spin down disks after 10 minutes by default, regardless whether they support APM (spindown_time vs force_spindown_time): https://manpages.debian.org/hdparm#S
G_CONFIG_INJECT 'force_spindown_time[[:blank:]=]' 'force_spindown_time = 120' /etc/hdparm.conf
fi

# RPi
Expand Down Expand Up @@ -2283,7 +2274,7 @@ _EOF_
fi

# Update config
G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX_DEFAULT=' 'GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"' /etc/default/grub
G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX_DEFAULT=' 'GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"' /etc/default/grub # NB: Removing "quiet" adds ~0.5s to boot time on my 6.5s - 7.5s boot time laptop.
G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX=' 'GRUB_CMDLINE_LINUX="net.ifnames=0"' /etc/default/grub
G_CONFIG_INJECT 'GRUB_TIMEOUT=' 'GRUB_TIMEOUT=0' /etc/default/grub
G_EXEC_DESC='Regenerating GRUB config' G_EXEC_OUTPUT=1 G_EXEC grub-mkconfig -o /boot/grub/grub.cfg
Expand Down
8 changes: 4 additions & 4 deletions .build/software/Amiberry/container_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ image="DietPi_Container-$image.img"
# Dependencies
##########################################
apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static')
G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}"

# Register QEMU binfmt configs
dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt

##########################################
# Prepare container
##########################################
Expand Down Expand Up @@ -137,9 +140,6 @@ Pin-Priority: -1
_EOF_
fi

# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo.
(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade

# Automated build
cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh'
echo '[ INFO ] Running Amiberry build script ...'
Expand Down
5 changes: 4 additions & 1 deletion .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ image="DietPi_Container-$image.img"
# Dependencies
##########################################
apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support')
(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static')
G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}"

# Register QEMU binfmt configs
dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt

##########################################
# Prepare container
##########################################
Expand Down
Loading

0 comments on commit c7429cd

Please sign in to comment.