Skip to content

Commit

Permalink
Merge branch 'MichaIng:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JappeHallunken authored Jan 22, 2024
2 parents 6a4b6e0 + ff81167 commit c95a463
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
16 changes: 13 additions & 3 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,8 @@ setenv rootuuid "true"' /boot/boot.cmd
# (Re)create DietPi runtime and logs dir, used by G_AGx
G_EXEC mkdir -p /run/dietpi /var/tmp/dietpi/logs

aPACKAGES_REQUIRED_INSTALL=()

# RPi/ARMv6 container
if [[ -f '/etc/apt/sources.list.d/raspi.list' ]]
then
Expand All @@ -784,6 +786,7 @@ setenv rootuuid "true"' /boot/boot.cmd
G_EXEC curl -sSf 'https://archive.raspberrypi.com/debian/pool/main/r/raspberrypi-archive-keyring/raspberrypi-archive-keyring_2021.1.1+rpt1_all.deb' -o keyring.deb
G_EXEC dpkg -i keyring.deb
G_EXEC rm keyring.deb
aPACKAGES_REQUIRED_INSTALL+=('raspberrypi-archive-keyring')
fi

if (( $DISTRO_TARGET > 7 ))
Expand All @@ -810,7 +813,7 @@ _EOF_
unset -v apackages

# DietPi list of minimal required packages, which must be installed:
aPACKAGES_REQUIRED_INSTALL=(
aPACKAGES_REQUIRED_INSTALL+=(

'apt' # Debian package manager
'bash-completion' # Auto completes a wide list of bash commands and options via <tab>
Expand Down Expand Up @@ -1063,6 +1066,7 @@ _EOF_
G_EXEC curl -sSfo 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
aPACKAGES_REQUIRED_INSTALL+=("linux-u-boot-$model-$branch")
fi

# Odroid C1: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818
Expand Down Expand Up @@ -1203,27 +1207,31 @@ _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
aPACKAGES_REQUIRED_INSTALL+=("firmware-$variant")

# NanoPi R5S/R5C
elif (( $G_HW_MODEL == 76 )) && { [[ ! $(find /lib/modules -mindepth 1 -maxdepth 1 -type d) ]] || dpkg-query -s 'firmware-nanopi5' &> /dev/null; }
then
G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-nanopi5.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
aPACKAGES_REQUIRED_INSTALL+=('firmware-nanopi5')

# NanoPi 6
elif (( $G_HW_MODEL == 79 )) && { [[ ! $(find /lib/modules -mindepth 1 -maxdepth 1 -type d) ]] || dpkg-query -s 'firmware-nanopi6' &> /dev/null; }
then
G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-nanopi6.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
aPACKAGES_REQUIRED_INSTALL+=('firmware-nanopi6')

# NanoPi M2/T2/Fire2 Linux 4.4: Requires dedicated boot partition, starting at 4 MiB for U-Boot, with ext4 filesystem
elif [[ $G_HW_MODEL == 61 && $(findmnt -Ufnro FSTYPE -M /boot) == 'ext4' ]] && (( $(sfdisk -qlo Start "$BOOT_DEVICE" | mawk 'NR==2') >= 8192 ))
then
G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-nanopi2.deb'
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
aPACKAGES_REQUIRED_INSTALL+=('firmware-nanopi2')

# VisionFive 2
elif (( $G_HW_MODEL == 81 ))
Expand All @@ -1237,7 +1245,7 @@ _EOF_
G_EXEC rm package.deb
G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf
G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf
aPACKAGES_REQUIRED_INSTALL+=('libubootenv-tool')
aPACKAGES_REQUIRED_INSTALL+=('linux-image-visionfive2' 'libubootenv-tool')

# Star64
elif (( $G_HW_MODEL == 84 ))
Expand All @@ -1251,7 +1259,7 @@ _EOF_
G_EXEC rm package.deb
G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf
G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf
aPACKAGES_REQUIRED_INSTALL+=('libubootenv-tool')
aPACKAGES_REQUIRED_INSTALL+=('linux-image-star64' 'libubootenv-tool')

# Orange Pi Zero 3
elif (( $G_HW_MODEL == 83 ))
Expand All @@ -1269,6 +1277,7 @@ _EOF_
G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb "https://dietpi.com/downloads/binaries/linux-u-boot-orangepizero3-next$variant.deb"
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package1.deb package2.deb package3.deb
G_EXEC rm package1.deb package2.deb package3.deb
aPACKAGES_REQUIRED_INSTALL+=('linux-image-next-sun50iw9' 'linux-dtb-next-sun50iw9' 'linux-u-boot-orangepizero3-next')

# Flash U-Boot
# shellcheck disable=SC1091
Expand Down Expand Up @@ -1311,6 +1320,7 @@ fi\
[[ -f '/boot/uenv.txt' ]] && G_EXEC rm /boot/uenv.txt
G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb
G_EXEC rm package.deb
aPACKAGES_REQUIRED_INSTALL+=('firmware-sparkysbc')

G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-sparkysbc.img.gz'
G_EXEC gzip -d u-boot.gz
Expand Down
1 change: 1 addition & 0 deletions .update/pre-patches
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ then
find /etc/apt/preferences.d/* &> /dev/null && G_EXEC sed -i 's/raspberrypi.org/raspberrypi.com/' /etc/apt/preferences.d/*
fi
GITBRANCH_TARGET=$(sed -n '/^[[:blank:]]*DEV_GITBRANCH=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)
GITBRANCH_TARGET=${GITBRANCH_TARGET:-master}
GITBRANCH_TARGET=${GITBRANCH_TARGET//\//-}
G_EXEC mkdir -p "../DietPi-Update/DietPi-$GITBRANCH_TARGET/dietpi"
# shellcheck disable=SC2261
Expand Down
3 changes: 2 additions & 1 deletion dietpi/func/dietpi-set_hardware
Original file line number Diff line number Diff line change
Expand Up @@ -1146,10 +1146,11 @@ _EOF_
'btbcm' # RPi3 Broadcom onboard
'rfcomm' # BPi Pro/M2+ and others
'hidp' # BPi Pro/M2+ and others
'sprdbt_tty' # Orange Pi 3B/Zero 3
'hci_uart'
)

[[ $G_HW_MODEL =~ ^(83|87)$ ]] && aBLUETOOTH_MODULES+=('sprdbt_tty') # Orange Pi 3B/Zero 3

if [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then

# RPi
Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-set_software
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt
'v7'|'v7+') kernel_package='linux-image-rpi-v7';;
'v7l'|'v7l+') kernel_package='linux-image-rpi-v7l';;
'v8'|'v8+') kernel_package='linux-image-rpi-v8';;
'2712'|'16k+') kernel_package='linux-image-rpi-2712';; # rpi-update suffixes differ: https://github.com/raspberrypi/rpi-firmware/tree/master/modules
'2712'|'16k+'|'v8_16k+') kernel_package='linux-image-rpi-2712';; # rpi-update suffixes differ: https://github.com/raspberrypi/rpi-firmware/tree/master/modules, on older version: https://github.com/raspberrypi/rpi-firmware/tree/d1ba55d
*) { G_WHIP_MSG "[FAILED] No supported kernel variant detected
\nYou do not seem to use a kernel which we match without doubt with a certain new kernel package:
- $(uname -a)
Expand Down

0 comments on commit c95a463

Please sign in to comment.