Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orange Pi Zero 3 | Fix lost Ethernet on reboot on 1.5 GB RAM variant #7064

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ case $HW_MODEL in
80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
81) iname='VisionFive2' HW_ARCH=11 root_size=639;;
82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
'83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;;
'83.2') iname='OrangePiZero3-1.5G' HW_ARCH=3 partition_start=4 root_size=1148;;
83) iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;;
84) iname='Star64' HW_ARCH=11 root_size=639;;
85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;;
Expand Down
15 changes: 3 additions & 12 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,7 @@ _EOF_
'89' ': Orange Pi 3 LTS'
'80' ': Orange Pi 5'
'82' ': Orange Pi 5 Plus'
'83.1' ': Orange Pi Zero 3'
'83.2' ': Orange Pi Zero 3 (1.5 GB RAM)'
'83' ': Orange Pi Zero 3'
'88' ': Orange Pi Zero 2W'
'86' ': ASUS Tinker Board 2'
'23' ': Generic Rockchip RK3328'
Expand Down Expand Up @@ -724,7 +723,6 @@ setenv rootuuid "true"' /boot/boot.cmd
# Device tree
case $G_HW_MODEL in
45) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h6-pine-h64-model-b.dtb' /boot/dietpiEnv.txt;;
83) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt;;
88) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero2w.dtb' /boot/dietpiEnv.txt;;
*) :;;
esac
Expand Down Expand Up @@ -1177,15 +1175,8 @@ _EOF_
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 ))
then
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-u-boot-orangepizero3-next_1.5G.deb'
G_AGI linux-{image,dtb}-"$branch-$kernel" ./package.deb
G_EXEC rm package.deb
else
G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch"
fi
# Install kernel and bootloader
G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch"
# Cleanup
[[ $G_HW_MODEL != 10 && -f '/boot/uImage' ]] && G_EXEC rm /boot/uImage
[[ -f '/boot/.next' ]] && G_EXEC rm /boot/.next
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/dietpi-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ jobs:
'"-m 80 -d 6", "-m 80 -d 7", "-m 80 -d 8", '\
'"-m 81 -d 8", '\
'"-m 82 -d 6", "-m 82 -d 7", "-m 82 -d 8", '\
'"-m 83.1 -d 6", "-m 83.1 -d 7", "-m 83.1 -d 8", '\
'"-m 83.2 -d 6", "-m 83.2 -d 7", "-m 83.2 -d 8", '\
'"-m 83 -d 6", "-m 83 -d 7", "-m 83 -d 8", '\
'"-m 84 -d 8", '\
'"-m 85 -d 6", "-m 85 -d 7", "-m 85 -d 8", '\
'"-m 86 -d 6", "-m 86 -d 7", "-m 86 -d 8", '\
Expand Down
14 changes: 14 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,20 @@ Patch_9_4()
(( $G_AGUP_COUNT )) && G_AGUG
fi

# Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938
if (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null
then
G_DIETPI-NOTIFY 2 'Switching to new U-Boot build which fixes lost Ethernet adapter on reboot ...'
G_AGP linux-u-boot-orangepizero3-next
G_AGI linux-u-boot-orangepizero3-current
# shellcheck disable=SC1091
. /usr/lib/u-boot/platform_install.sh
# Do not mute progress and error messages
eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')"
# shellcheck disable=SC2154
write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")"
fi

if [[ -f '/boot/dietpi/.installed' ]]
then
# GMediaRender
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Enhancements:

Bug fixes:
- NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987
- Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots.
- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043
- DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035
- DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package.
Expand Down