Re: avr with u-boot on ls hg
- On Sun, Feb 18, 2007 at 10:23:46PM +0100, Michael Weiser wrote:
> In all cases the power led keeps blinking rapidly, commands sent to theAddendum: When loading a 2.6.20 ppc-based kernel using loader.o, the avr
> AVR are ignored and the machine reboots after a few minutes. Also the
> minimal console using the power button doesn't work. Otherwise
can be initialised manually using echo -n "[[[[" >/dev/ttyS1 and the
like. The problem seems to be uboot-specific, not hardware-related.
- On Mon, Feb 19, 2007 at 01:05:32PM +0100, Michael Weiser wrote:
> > In all cases the power led keeps blinking rapidly, commands sent to thePrivate mail from linuxnotincluded gives the answer:
> > AVR are ignored and the machine reboots after a few minutes. Also the
> > minimal console using the power button doesn't work. Otherwise
> Addendum: When loading a 2.6.20 ppc-based kernel using loader.o, the avr
> can be initialised manually using echo -n "[[[[" >/dev/ttyS1 and the
> like. The problem seems to be uboot-specific, not hardware-related.
What appears to happen to your setup is that the AVR receives the reboot
command from the kernel before passing the control to u-boot. Once the
reboot command is issued to the AVR, there is no going back. The AVR
_will_ reboot the LinkStation. The power LED blinking fast is what shows
that the AVR is in this state.
The problem with uloader is that it attempts to leave as much as
possible from the shutdown to happen in order for the disks to be shut
down properly but before the reboot string is sent to the AVR. Depending
on the original kernel, the assumptions made by uloader may be
I will have to look again at the sources about the UART initialisation
but, as I said before, the AVR will ignore any commands once it receives
the reboot command. This is why the minimal console doesn't work. The
buttons are read by the AVR which passes the information to u-boot (or
to the kernel).
This doesn't happen when u-boot is in flash because u-boot takes over
the LinkStation when the AVR has been re-armed and ready to accept
If the AVR is your only problem and everything else works for you, then
the risk of flashing u-boot is small. Lots of people have done it and I
haven't heard of any problems. Unfortunately, there are no absolute
guarantees. Even if you u-boot build is fine, there is always the risk
of power loss during the flash and there have been reports of defective
flash chips, fortunately not in the u-boot area.
If you take the chance and something goes wrong, you can still find
somebody in your area willing to fix your box for you. You can post the
question in the Linstationwiki forums and see if there is anyone in your
So I patched uloader:
--- uloader_mod.c.orig 2006-08-26 15:07:23.000000000 +0200
+++ uloader_mod.c 2007-02-22 00:18:41.000000000 +0100
@@ -207,7 +207,8 @@
if((err = read_file(uboot, &uboot_buf)))
+ load_uboot(va2pa(load_uboot), va2pa(uboot_buf), laddr);
and tried again. The RAM build worked nicely then, so I was comfortable
flashing the flash build. I've got the box running now with Guennadi's
powerpc-based 2.6.20 kernel and everything seems to be just fine.