Skip to content

Commit

Permalink
Beta v8.15.2 (#6234)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Mar 11, 2023
2 parents dd82d7c + 684db62 commit bac5266
Show file tree
Hide file tree
Showing 17 changed files with 155 additions and 115 deletions.
13 changes: 1 addition & 12 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -746,13 +746,6 @@ setenv rootuuid "true"' /boot/boot.cmd
G_CONFIG_INJECT "G_LIVE_PATCH_STATUS\[$i\]=" "G_LIVE_PATCH_STATUS[$i]='${G_LIVE_PATCH_STATUS[$i]}'" /boot/dietpi/.version
done

# ToDo: Temporary fix for wrong serial console baudrate override below Bookworm, fixed via live patch only if an actual console has been enabled already
(( $DISTRO_TARGET > 6 )) || G_EXEC sed -i 's/9600 -/9600 %I/' /boot/dietpi/func/dietpi-set_hardware

# Pre-v8.15 ToDo: Fix Bookworm detection on Sid
# shellcheck disable=SC2016
G_EXEC sed -i 's/\[\[ \$distro == '\''bookworm\/sid'\''/\[\[ \$distro == '\''12.'\''\* || \$distro == '\''bookworm\/sid'\''/' /boot/dietpi/func/dietpi-obtain_hw_model

G_EXEC cp /boot/dietpi/.version /var/lib/dietpi/.dietpi_image_version

G_EXEC systemctl daemon-reload
Expand All @@ -765,8 +758,6 @@ setenv rootuuid "true"' /boot/boot.cmd

# We need to forward $DISTRO_TARGET* to dietpi-set_software, as well as $G_HW_MODEL + $G_RASPBIAN for Debian vs Raspbian decision.
G_DISTRO=$DISTRO_TARGET G_DISTRO_NAME=$DISTRO_TARGET_NAME G_HW_ARCH=$G_HW_ARCH G_HW_MODEL=$G_HW_MODEL G_RASPBIAN=$G_RASPBIAN G_EXEC /boot/dietpi/func/dietpi-set_software apt-mirror default
# ToDo: Temporary step until v8.15 release: Since Bookworm, non-free firmware has been moved to new component: https://deb.debian.org/debian/pool/
(( $DISTRO_TARGET > 6 )) && G_EXEC sed -i 's/$/ non-free-firmware/' /etc/apt/sources.list

# (Re)create DietPi runtime and logs dir, used by G_AGx
G_EXEC mkdir -p /run/dietpi /var/tmp/dietpi/logs
Expand Down Expand Up @@ -1110,8 +1101,6 @@ _EOF_
G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/firmware-$variant.deb"
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
# ToDo: Temporary workaround for read-only mount after filesystem expansion until v8.15 has been released: https://github.com/MichaIng/DietPi/issues/6149
G_EXEC sed -i '/resize2fs/s/;;/ || reboot;;/' /var/lib/dietpi/services/fs_partition_resize.sh

# NanoPi R5S
elif (( $G_HW_MODEL == 76 )) && { [[ ! $(find /lib/modules -mindepth 1 -maxdepth 1 -type d) ]] || dpkg-query -s 'firmware-nanopi5' &> /dev/null; }
Expand Down Expand Up @@ -1777,7 +1766,7 @@ _EOF_'
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS0
# With our current VisionFive 2 kernel, the Xen hypervisor virtual console device /dev/hvc0 is active and leads to a serial-getty spawn. Mask it explicitly, in case the installer runs within a container.
[[ $G_HW_MODEL == 81 ]] && /boot/dietpi/func/dietpi-set_hardware serialconsole disable hvc0 && G_EXEC systemctl mask serial-getty@hvc0 # ToDo: dietpi-set_hardware can be omitted after DietPi v8.15 release, which brings general support for these serial console device schemes.
[[ $G_HW_MODEL == 81 ]] && G_EXEC systemctl mask serial-getty@hvc0

# NanoPi R1
elif (( $G_HW_MODEL == 48 ))
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/quartz64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,33 @@ jobs:
shell: sh
working-directory: /dev/shm
env:
linux_version: '6.1.14'
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/?h=linux-rolling-stable
linux_version: '6.1.16'
uboot_branch: 'v2022.04-dietpi'
CROSS_COMPILE: 'aarch64-linux-gnu-'
ARCH: 'arm64'
steps:
# https://github.com/actions/setup-python/tags
- uses: actions/setup-python@v4
with:
# https://github.com/actions/python-versions/tags
python-version: '3.x'
check-latest: true
- name: Setup build
run: |
{ sudo apt-get -q update; sudo apt-get -qq install make gcc libc6-dev gcc-aarch64-linux-gnu bc bison flex libssl-dev libncurses5-dev libelf-dev time xz-utils device-tree-compiler kmod swig zip; } &
{ sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-aarch64-linux-gnu bc libssl-dev; } &
{ python3 -m pip install --no-cache-dir -U pip setuptools wheel; python3 -m pip install --no-cache-dir -U pyelftools; } &
{ curl -fO "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-$linux_version.tar.gz"; tar xf "linux-$linux_version.tar.gz"; rm "linux-$linux_version.tar.gz"; } &
{ curl -fO "https://gitlab.com/MichaIng/u-boot/-/archive/$uboot_branch/u-boot-$uboot_branch.tar.bz2"; tar xf "u-boot-$uboot_branch.tar.bz2"; rm "u-boot-$uboot_branch.tar.bz2"; } &
mkdir artefacts
{ curl -fO "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-$linux_version.tar.gz"; tar xf "linux-$linux_version.tar.gz"; rm "linux-$linux_version.tar.gz"; } &
wait
curl -sSfo "u-boot-$uboot_branch/u-boot-spl-ddr.bin" 'https://raw.githubusercontent.com/JeffyCN/rockchip_mirrors/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin' &
curl -sSfo "u-boot-$uboot_branch/bl31.elf" 'https://raw.githubusercontent.com/JeffyCN/rockchip_mirrors/6186deb/bin/rk35/rk3568_bl31_v1.28.elf' &
curl -sSfo "linux-$linux_version/arch/arm64/configs/quartz64_defconfig" "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/images/Quartz64/quartz64_defconfig" &
mkdir -p artefacts/mainline-u-boot modules
wait
curl -sSfo "linux-$linux_version/arch/arm64/configs/quartz64_defconfig" "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/images/Quartz64/quartz64_defconfig"
- name: Build U-Boot
run: |
mkdir artefacts/mainline-u-boot
cd "u-boot-$uboot_branch"
curl -sSfo 'u-boot-spl-ddr.bin' 'https://raw.githubusercontent.com/JeffyCN/rockchip_mirrors/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin' &
curl -sSfo 'bl31.elf' 'https://raw.githubusercontent.com/JeffyCN/rockchip_mirrors/6186deb/bin/rk35/rk3568_bl31_v1.28.elf' &
export BL31='bl31.elf'
wait
cd "u-boot-$uboot_branch"
make quartz64-a-rk3566_defconfig
make -j$(nproc)
mv u-boot-rockchip.bin ../artefacts/mainline-u-boot/quartz64-a-u-boot-rockchip.bin
Expand All @@ -54,7 +53,6 @@ jobs:
rm -R "u-boot-$uboot_branch"
- name: Build Linux
run: |
mkdir modules
export INSTALL_MOD_PATH="$PWD/modules"
cd "linux-$linux_version"
make quartz64_defconfig
Expand All @@ -72,7 +70,7 @@ jobs:
umask 377
echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts
echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519
zip -9r artefacts.zip artefacts
curl -T artefacts.zip --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/'
tar cI 'gzip -9' -f artefacts.tar.gz artefacts
curl -T artefacts.tar.gz --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/'
curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \
--data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/artefacts.zip"]}'
--data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/artefacts.tar.gz"]}'
9 changes: 9 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,12 @@ Patch_8_15()

# Revert with new kernel: https://github.com/MichaIng/DietPi/issues/5890
grep -q ' systemd.unified_cgroup_hierarchy=0' /boot/extlinux/extlinux.conf && G_EXEC sed -i '/^append /s/ systemd.unified_cgroup_hierarchy=0//' /boot/extlinux/extlinux.conf

elif (( $G_HW_MODEL == 81 )) && dpkg-query -s 'linux-image-visionfive2' &> /dev/null
then
G_EXEC_OUTPUT=1 G_EXEC curl -fO 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i linux-image-visionfive2.deb
G_EXEC_HOHALT=1 G_EXEC rm linux-image-visionfive2.deb
fi

(( $G_DISTRO > 6 )) || for i in '/etc/systemd/system/serial-getty@'*'.service.d/dietpi-baudrate.conf'
Expand All @@ -1133,6 +1139,9 @@ _EOF_

# Remove obsolete Build-Essential install state
grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[16\]=' /boot/dietpi/.installed && G_EXEC sed -i '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[16\]=/d' /boot/dietpi/.installed

# Remove obsolete CAVA console font
grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[119\]=' /boot/dietpi/.installed && G_EXEC rm -f /{root,home/*}/cava.psf
fi
}

Expand Down
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=8
G_REMOTE_VERSION_SUB=15
G_REMOTE_VERSION_RC=1
G_REMOTE_VERSION_RC=2
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=6
G_MIN_VERSION_SUB=14
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ v8.15

New images:
- StarFive VisionFive 2 | An experimental image has been added. For details, please read our related blog post: https://dietpi.com/blog/?p=2629
- ROCK 5B | Resolved an issue with kernel upgrades since the boot partition was too small. The image is not shipped without a dedicated boot partition. Many thanks to @isarrider and @skyuplam for reporting this issue and testing the solution: https://github.com/MichaIng/DietPi/issues/6206
- ROCK 5B | Resolved an issue with kernel upgrades since the boot partition was too small. The image is now shipped without a dedicated boot partition. Many thanks to @isarrider and @skyuplam for reporting this issue and testing the solution: https://github.com/MichaIng/DietPi/issues/6206

Removed software:
- Build-Essential | The C/C++ build tools and headers install option has been removed. It was used as generic dependency for other software options, but with the downside that often more packages were installed than required. When compiling is done, specific additional development headers are usually required anyway, so adding the required compiler and in case "make" per software option isn't such a burden. Hence, this has been done gradually and finally finished, making "Build-Essential" obsolete.

Enhancements:
- Quartz64 | Major kernel update to latest v6.1.14, stable U-Boot v2022.04 and enabled a lot of kernel features for various container engines and firewall/filter tasks: https://github.com/MichaIng/DietPi/issues/6151. The kernel upgrade will be applied on DietPi update.
- Quartz64 | Major kernel update to latest v6.1.16, stable U-Boot v2022.04 and enabled a lot of kernel features for various container engines and firewall/filter tasks: https://github.com/MichaIng/DietPi/issues/6151. The kernel upgrade will be applied on DietPi update.
- Odroid C4/HC4 | Added support for HDMI audio to dietpi-config. The manual setup via a(lsa)mixer was very complicated. Many thanks to @MDAR for testing the solution: https://github.com/MichaIng/DietPi/issues/6178
- VisionFive 2 | Updated Linux to v5.15.98.
- DietPi-Installer | Resolved an issue where conflicting network configurations were left in place, e.g. from cloud-init when running the script on a VPS Debian image. Many thanks to @mews-se for reporting this issue: https://github.com/MichaIng/DietPi/issues/6067
- DietPi-CPU_info | The script and "cpu" command do not require root privileges anymore. Many thanks to @hansratzinger for bringing this to our attention: https://github.com/MichaIng/DietPi/issues/6196. The option to write available scaling frequencies to a file via command argument "2" has been removed as well. This was not documented anywhere and has no use for end users. Internally it was used by dietpi-config, where the code has now been moved to and overall shortened.
- DietPi-Config | VisionFive 2: Added an entry to "Advanced Options" to update the SPI flash bootloader.
- DietPi-Software | XRDP: TLS via snakeoil certificate is now enabled OOTB. This leads to a warning shown on Windows RDP clients until either a proper certificate signed by a trusted CA is used (e.g. by Let's Encrypt), or it is muted for the particular server via checkbox at the client. Many thanks to @amibumping for providing the needed step: https://github.com/MichaIng/DietPi/issues/5976
- DietPi-Software | Home Assistant: Our Home Assistant integration used two Python environments: A pyenv is used to install the "homeassistant" core module and its direct dependencies. Home Assistant itself installs its frontend with dependencies on startup, as well as dependencies for integrations on demand, internally into another Python environment. On Home Assistant reinstalls, pyenv is removed but the internal dependencies were left untouched. This caused issues when those dependency builds were incompatible with the new pyenv Python version, or conflicting with other pyenv module upgrades. Both environments are now merged and reset on every reinstall, which solves potential conflicts but means that the first Home Assistant startup after a reinstall takes longer. Many thanks to @maury77 for reporting a related issue: https://github.com/MichaIng/DietPi/issues/6117
- DietPi-Software | WiFi Hotspot: hostapd and the DHCP server are not stopped and restarted on DietPi updates, software installs and backups anymore, since the hotspot might be used by the client which does this task and then cuts its own connection. Many thanks to @symbios24 for making us aware of this: https://github.com/MichaIng/DietPi/issues/6166
- DietPi-Software | Box64: Added RISC-V support, as well as optimised builds for Raspberry Pi 3 and RK3588 boards, available since v0.2.2: https://github.com/ptitSeb/box64/releases/tag/v0.2.2

Bug fixes:
- Quartz64 | Resolved an issue where the system boots read-only on very first boot. Many thanks to @belveder79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6149
- DietPi-Sync | Resolved an issue where the prompt after the dry run was shown even in non-interactive mode (input argument "1"), and when selecting "Cancel" or ESC, the real sync ran regardless. Many thanks to @Ruud for reporting this issue: https://dietpi.com/forum/t/howto-call-dietpi-sync-1-without-user-interaction/15964
- DietPi-Config | Resolved a v8.14 regression where an invalid post-down interface entry was created when using WiFi Hotspot. Many thanks to @as-shura for reporting this issue: https://github.com/MichaIng/DietPi/issues/6224
- DietPi-Software | Docker Compose: Resolved an issue where installing and uninstalling Docker Compose could have failed if pip was installed without the distutils module. Many thanks to @bccarbone for reporting this issue: https://github.com/MichaIng/DietPi/issues/6153
- DietPi-Software | Pi-hole: Resolved an issue where Nginx, if chosen as webserver, failed to start due to an invalid variable. Many thanks to @Trimble-tech for reporting this issue: https://dietpi.com/forum/t/pi-hole-install-crashes-nginx/15960
- DietPi-Software | Python 3: Resolved an issue on Bookworm where installs of and via pip failed because the Debian Python 3.11 packages added a flag to prevent system-wide module installs without an override flag.
Expand Down
3 changes: 1 addition & 2 deletions dietpi/dietpi-autostart
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ _EOF_
elif (( $ID_AUTOSTART == 10 ))
then
local home=$(eval "echo ~$user")
[[ ! -d $home/.config/cava ]] && mkdir -p "$home/.config" && cp /root/.config/cava "$home/.config/cava" && chown -R "$user:" "$home/.config"
[[ ! -f $home/cava.psf ]] && cp /root/cava.psf "$home/cava.psf" && chown "$user:" "$home/cava.psf"
[[ ! -f $home/.config/cava/config ]] && mkdir -p "$home/.config/cava" && { cp /root/.config/cava/config "$home/.config/cava/"; chown -R "$user:" "$home/.config"; }
fi

# Apply to TTY1 getty: Skip for LightDM-based autologin
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-bugreport
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Available commands:
echo -e "\n----------\n$i\n----------"
$i

done > CMD_OUT.txt
done &> CMD_OUT.txt

# Copy the Git error template to working directory
[[ -f '/tmp/G_EXEC_ERROR_REPORT' ]] && G_EXEC cp /tmp/G_EXEC_ERROR_REPORT G_EXEC_ERROR_REPORT
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-cleaner
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ $G_PROGRAM_NAME simulation has finished: Press any key to continue..."
Banner_Cleaning

local apackages
mapfile -t apackages < <(dpkg --get-selections '*-dev' build-essential make automake autoconf g++ gcc pkg-config libtool 2> /dev/null | mawk '{print $1}')
mapfile -t apackages < <(dpkg --get-selections '*-dev' build-essential make cmake automake autoconf g++ gcc pkg-config libtool 2> /dev/null | mawk '{print $1}')

if (( $DRY_RUN )); then

Expand Down
29 changes: 19 additions & 10 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
'1' ': Display Options'
'2' ': Audio Options'
)
# Hide performance options on VM
(( $G_HW_MODEL == 20 )) || G_WHIP_MENU_ARRAY+=('3' ': Performance Options')
# Hide performance options on VM and container
(( $G_HW_MODEL == 20 || $G_HW_MODEL == 75 )) || G_WHIP_MENU_ARRAY+=('3' ': Performance Options')
G_WHIP_MENU_ARRAY+=(

'4' ': Advanced Options'
Expand Down Expand Up @@ -1013,22 +1013,23 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the
fi

# RPi4 EEPROM update: https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md
if (( $G_HW_MODEL == 4 )); then

if dpkg -s 'rpi-eeprom' &> /dev/null; then

if (( $G_HW_MODEL == 4 ))
then
if dpkg -s 'rpi-eeprom' &> /dev/null
then
rpi-eeprom-update -m version_eeprom
# shellcheck disable=SC1091
. ./version_eeprom
rm version_eeprom
G_WHIP_MENU_ARRAY+=('Update RPi4 EEPROM firmware' ": [Bootloader: ${BOOTLOADER_CURRENT:-N/A} | VL805: ${VL805_CURRENT:-N/A}]")

else

G_WHIP_MENU_ARRAY+=('Update RPi4 EEPROM firmware' ': Install rpi-eeprom APT package')

fi

# VisionFive 2: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf
elif (( $G_HW_MODEL == 81 ))
then
G_WHIP_MENU_ARRAY+=('Update bootloader' ': on VisionFive 2 SPI storage')
fi

# Serial/UART devices
Expand Down Expand Up @@ -1146,6 +1147,14 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr
\nDo you want to continue?' || return
/boot/dietpi/func/dietpi-set_hardware rpi-eeprom

elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then

G_WHIP_YESNO '[ INFO ] SPI bootloader update
\nThis will download and flash the latest U-Boot from StarFive to your VisionFive 2 SPI storage.
Latest release notes: https://github.com/starfive-tech/VisionFive2/releases
\nDo you want to continue?' || return
/boot/dietpi/func/dietpi-set_hardware vf2-spi-update

elif [[ $G_WHIP_RETURNED_VALUE == 'I2C state' ]]; then

/boot/dietpi/func/dietpi-set_hardware i2c $(( ! $rpi_i2c_enabled )) && REBOOT_REQUIRED=1
Expand Down Expand Up @@ -1910,7 +1919,7 @@ netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 9.9.9.9 149.112.112.112
pre-up iw dev $WIFI_DEV_IFACE set power_save off
post-down iw dev "WIFI_DEV_IFACE set power_save on
post-down iw dev "$WIFI_DEV_IFACE set power_save on
# iptables NAT rules
up iptables-restore < /etc/iptables.ipv4.nat
Expand Down
Loading

0 comments on commit bac5266

Please sign in to comment.