Skip to content

Commit

Permalink
v9.4
Browse files Browse the repository at this point in the history
- DietPi-Build/Installer | Add support for ROCK 4C Plus, since the recent ROCK 4B bootloader does not select the correct device tree automatically anymore, and cleanup method for installing self-hosted kernel/bootloader builds.
  • Loading branch information
MichaIng committed Apr 21, 2024
1 parent 3da35f5 commit 1004d60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ case $HW_MODEL in
70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';;
'72.1') iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=1008;;
'72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;;
'72.3') iname='ROCK4CPlus' HW_ARCH=3 partition_start=16 root_size=1008;;
73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;;
74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1020;;
75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;;
Expand Down
25 changes: 14 additions & 11 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ _EOF_
'79.3' ': NanoPC T6'
'72.1' ': ROCK 4 (all other variants)'
'72.2' ': ROCK 4 SE'
'72.3' ': ROCK 4C Plus'
'73' ': ROCK Pi S'
'74' ': Radxa Zero'
'77' ': ROCK 3A'
Expand Down Expand Up @@ -1041,7 +1042,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=()
local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_uboot=0 dietpi_kernel=0
case $G_HW_MODEL in
10) model='odroidc1' kernel='meson' arch='arm';;
11) model='odroidxu4' kernel='odroidxu4' arch='arm';;
Expand Down Expand Up @@ -1086,6 +1087,7 @@ _EOF_
72) kernel='rockchip64'
case $HW_VARIANT in
2) model='rock-4se';;
3) model='rockpi-4cplus';;
*) model='rockpi-4b';;
esac;;
73) model='rockpi-s' kernel='rockchip64';;
Expand Down Expand Up @@ -1136,22 +1138,23 @@ _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
[[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd')
# - Download and pre-install a more recent armbian-firmware package from our server
#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
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
if (( $G_HW_MODEL == 83 ))
# 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 ))
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 package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb'
local uboot=()
#(( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 1 )) && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb"; uboot=('package4.deb'); }
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package1.deb package2.deb package3.deb "${uboot[@]}"
G_EXEC rm package1.deb package2.deb package3.deb "${uboot[@]}"
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[1-3].deb
G_EXEC rm package[1-3].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 ))
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 dpkg -i package.deb
G_EXEC rm package.deb
fi
# Orange Pi Zero 3 1.5G RAM variant: Install original Orange Pi bootloader
if (( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 2 ))
Expand Down

0 comments on commit 1004d60

Please sign in to comment.