radxa / radxa-zero-images-released

15 stars 1 forks source link

"reboot now" does not restart #3

Open kwiehler opened 2 years ago

kwiehler commented 2 years ago

Latest build works great - but unfortunately I can't get the zero to reboot on a 'reboot now' command. I made an armbian build based on the zero.wip config - that's rebooting just fine, but doesn't recognise WiFi. I did copy the firmware files into /lib/firmware - but had no success. Any help greatly appreciated.

Also where can I find the build config for these releases?

thieri commented 2 years ago

using: zero_debian_buster_xfce4_arm64_20211010_0810-mbr.img with: Radxa Zero 1GB ram (AP6212 module)

same here (reboot = shutdown)

jack-ma commented 2 years ago

@kwiehler what WiFi chip is your zero? A sdmmc patch is required for the mainline kernel WiFi to work, which is submitted to Armbian already.

kwiehler commented 2 years ago

Okay/ thanks for the update!

So should/can we use armbian/build as well to build or should we stay with this Rad a/armbian-build?

MichaIng commented 2 years ago

~The reboot issue seems to be resolved with the latest kernel: linux-image-5.10.69-4-amlogic-g37ae4051315a~ ~But the update script seems to create an invalid device tree path in uEnv.txt: https://github.com/MichaIng/DietPi/issues/4831#issuecomment-951972001~

EDIT: Okay both seems to be not correct, the reboot worked once somehow, but we are not sure whether this was the old kernel or the new one, now it doesn't work with the new one either.

almirus commented 2 years ago

the solution is new bootloader https://forum.radxa.com/t/instruction-of-how-to-fix-2-seconds-delay-at-boot-and-not-working-reboot/7898

StephenInVamrs commented 2 years ago

Hi. I confirm that this patch helps to fix the 'reboot not working' issue. https://github.com/pyavitz/debian-image-builder/blob/feature/patches/amlogic/radxazero/002-revert-meson-drv-shutdown.patch

This patch is added to Radxa Zero kernel:

When you use prebuilt radxa-zero images, upgrade kernel to version 5.10.69-8-amlogic-g8e2cfaa5faa5 to fix the 'reboot not working' issue. Below is the steps to upgrade kernel.

1.Update your /etc/apt/sources.list.d/apt-radxa-com.list accordingly to enable Radxa APT repository.

For Ubuntu Focal:

 root@zero:~# cat /etc/apt/sources.list.d/apt-radxa-com.list 
 deb http://apt.radxa.com/focal-stable/ focal main
 deb http://apt.radxa.com/focal-testing/ focal main

For Debian Buster:

 root@zero:~# cat /etc/apt/sources.list.d/apt-radxa-com.list 
 deb http://apt.radxa.com/buster-stable/ buster main
 deb http://apt.radxa.com/buster-testing/ buster main

2.Install kernel packages

 sudo apt update
 sudo apt install -y linux-headers-5.10.69-8-amlogic-g8e2cfaa5faa5
 sudo apt install -y linux-image-5.10.69-8-amlogic-g8e2cfaa5faa5

3.Power cycle Radxa Zero. And execute command 'reboot' to restart Radxa zero.

rotdrop commented 2 years ago

When will this make its way to the standard stable packages? I have spent quite some time to figure this out.

rotdrop commented 2 years ago

Ok, the advise was to install ...-8. With ...-9 reboot works, but the LED is flashing ... OK, the annoying LED-flashing is also present in ...-8.

Just to note it down: the LED-flasching can be turned off. It seems you have decided to set it to "heart-beat". Hopefully only for the testing kernel images .... is it possible to relax the heart-beat interval to 5 seconds or so? ...

RadxaYuntian commented 2 years ago

Just to note it down: the LED-flasching can be turned off. It seems you have decided to set it to "heart-beat". Hopefully only for the testing kernel images .... is it possible to relax the heart-beat interval to 5 seconds or so? ...

You can disable led from userland with # echo none > /sys/class/leds/green\:status/trigger. Remember to change the led name to the one on your board since this is copied from another system.

Heartbeat frequency depends CPU load so there is no easy way to change it.

kelvinhenriqu commented 2 years ago

Just to note it down: the LED-flasching can be turned off. It seems you have decided to set it to "heart-beat". Hopefully only for the testing kernel images .... is it possible to relax the heart-beat interval to 5 seconds or so? ...

You can disable led from userland with # echo none > /sys/class/leds/green\:status/trigger. Remember to change the led name to the one on your board since this is copied from another system.

Heartbeat frequency depends CPU load so there is no easy way to change it.

i know that i can turn off the heartbeat led but can i just turn it on and make it always on like the last kernel update ??

MichaIng commented 2 years ago

can i just turn it on and make it always on like the last kernel update ??

echo 'default-on' > /sys/class/leds/green\:status/trigger

should be it. All available triggers can be obtained via:

cat /sys/class/leds/green\:status/trigger
kelvinhenriqu commented 2 years ago

can i just turn it on and make it always on like the last kernel update ??

echo 'default-on' > /sys/class/leds/green\:status/trigger

should be it. All available triggers can be obtained via:

cat /sys/class/leds/green\:status/trigger

image

what about this problem, i tried to execute in sudo mode but not changes

kelvinhenriqu commented 2 years ago

with these commands i accomplished what i wanned:

turn on, heartbeat and turn off:

sudo sh -c " echo none >/sys/class/leds/radxa-zero\:green/trigger"

sudo sh -c " echo hearbeat >/sys/class/leds/radxa-zero\:green/trigger"

sudo sh -c " echo default-on >/sys/class/leds/radxa-zero\:green/trigger"

MichaIng commented 2 years ago

Jep, requires root permissions of course 😉.

Ah, when you run:

sudo echo 'default-on' > /sys/class/leds/radxa-zero:green/trigger

echo is executed with root permissions but the redirect > is done with the originating user. The redirect is not part of the sudo echo call but a shell syntax. So your solution of wrapping everything in a root shell works, the other way is:

echo 'default-on' | sudo tee /sys/class/leds/radxa-zero:green/trigger

So only tee is called as root, which writes to a file internally instead of requiring shell redirects.

mrvanes commented 2 years ago

My radxa0 is on 5.10.69-9-amlogic-g7c418f844e4 but I still can't reboot it using any form of the reboot command?

MichaIng commented 2 years ago

Did you use the new image or did you upgrade the kernel on an old image?

If I'm not mistaken, not only the kernel but the bootloader needs to be the patched one as well. And since there is no bootloader package or other way provided to update and flash it, the new image needs to be flashed for now. But should be confirmed by Radxa developers.

mrvanes commented 2 years ago

No, I only updated the kernel. Flashing is not something I am looking forward to because this a production board in my 3D printer and it is painstakenly well configured at the moment. Thx for commenting.

MichaIng commented 2 years ago

Okay, then I guess you either need to compile and flash U-Boot yourself or wait for Radxa to provide a U-Boot package via their APT repository. I'm also waiting for this, btw 😉.