Skip to content

Commit

Permalink
v9.7
Browse files Browse the repository at this point in the history
- DietPi-Patches | Install packages after postinst scripts have been installed, avoid needless kernel and initramfs image symlinks in filesystem root, build boot script and flash bootloader
  • Loading branch information
MichaIng committed Aug 15, 2024
1 parent 026db6f commit 17b35a9
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1795,9 +1795,6 @@ Patch_9_7()
\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later.
\nDo you want to migrate to the new Linux 6.1 kernel now?'
then
# Packages
G_AGI armbian-firmware initramfs-tools u-boot-tools zstd
G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current"
# Install boot scripts and configs
local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes
G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd
Expand All @@ -1815,6 +1812,14 @@ Patch_9_7()
G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt
# Console args
G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt
# Packages
G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf'
G_AGI armbian-firmware initramfs-tools u-boot-tools zstd
G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current"
# Build boot script
G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr
# Flash bootloader
/boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc
fi

elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null
Expand All @@ -1833,9 +1838,6 @@ Patch_9_7()
\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later.
\nDo you want to migrate to the new Linux 6.6 kernel now?'
then
# Packages
G_AGI armbian-firmware initramfs-tools u-boot-tools zstd
G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor"
# Install boot scripts and configs
local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes
G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd
Expand All @@ -1859,6 +1861,14 @@ Patch_9_7()
G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt
# Console args
G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt
# Packages
G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf'
G_AGI armbian-firmware initramfs-tools u-boot-tools zstd
G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor"
# Build boot script
G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr
# Flash bootloader
/boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc
fi
fi

Expand Down

0 comments on commit 17b35a9

Please sign in to comment.