Welcome! Log In Create A New Profile

Advanced

8/30 - New uBoot with LED support

Posted by Jeff 
8/30 - New uBoot with LED support
August 30, 2010 10:19PM
This is just a cosmetic change, it is in all other ways identical to the older uBoot from 8/25.

By default, the led will blink green while uBoot is running and turn off when control is passed to the kernel. The light will switch to blinking orange if there is an error.

You can adjust the lights to fit your personal preference by modifying the "led_init", "led_exit", and "led_error" environment variables. Valid values are in the form "color status" where color is "green" or "orange" and "status" is "on" "off" or "blinking"

To upgrade (from the instructions for installing mtd0 uBoot):

cd /tmp
wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh

-- Jeff
Brian
Re: 8/30 - New uBoot with LED support
August 31, 2010 02:18PM
Amazing stuff Jeff. Newer better faster every post it seems.

Question about all these changes - are you pushing changes back into the U-boot GIT at Denx or are you publishing your sources somewhere else?
Re: 8/30 - New uBoot with LED support
August 31, 2010 03:51PM
All of my changes are available on http://jeff.doozan.com/debian/uboot/build_uboot.htm

The Denx code tree is frozen for their 2010.09 release, and these patches are really just a hack on the sheevaplug board config. I'm not sure it's worth the maintenance headache of adding yet "almost sheevaplug" another board config to the Denx tree.

-- Jeff
Re: 8/30 - New uBoot with LED support
August 31, 2010 06:31PM
Jeff Wrote:
-------------------------------------------------------
.......
>
> You can adjust the lights to fit your personal
> preference by modifying the "led_init",
> "led_exit", and "led_error" environment variables.
> Valid values are in the form "color status" where
> color is "green" or "orange" and "status" is "on"
> "off" or "blinking"
>
...........
>
> -- Jeff

Jeff:
This is very nice.
Can you explain how to do the modifications and give a couple exampels? Thanks.
Re: 8/30 - New uBoot with LED support
August 31, 2010 09:45PM
http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh

Does this uBoot work on Pogoplug V2(Pink)?


Thanks
Re: 8/30 - New uBoot with LED support
August 31, 2010 10:31PM
Yes.
Re: 8/30 - New uBoot with LED support
September 01, 2010 02:59PM
Jeff:
I installed your new uBoot and it works fine. However, when I check the environment parameters, the old modifications for mtd3 dual boot are still there. How I can delete these changes, mainly the statements: if_connected='ping ${active_host}' and 'run if_connected bootcmd_usb; run bootcmd_original'?
ecc
Re: 8/30 - New uBoot with LED support
September 01, 2010 10:03PM
twinclouds Wrote:
-------------------------------------------------------
> How I can delete these changes, mainly the
> statements: if_connected='ping ${active_host}' and
> 'run if_connected bootcmd_usb; run bootcmd_original'?

You can delete u-boot environment variables by using setenv with a variable name but no value. I.e.,
setenv if_connected
saveenv
from the u-boot prompt, or
# fw_setenv if_connected
from Linux.
Re: 8/30 - New uBoot with LED support
September 02, 2010 12:22PM
Thanks. What about the second statement, will it be removed also?
BTW, can I force the reinstall blparam by removing the if statement checking if blparam has been installed already?
Re: 8/30 - New uBoot with LED support
September 02, 2010 10:32PM
1) blparam is just a program that edits the old uBoot environment. The utility does NOT have the environment inside it. As such, there is no "new" blparam.

2) With the new uBoot, blparam is entirely depricated. If your Dockstar boots to Pogoplug when there is no USB drive attached, you can throw away the blparam utility.
Re: 8/30 - New uBoot with LED support
September 03, 2010 02:59PM
Jeff:
Thanks.
The problem I had has nothing to do with uboot or blparam. It was related to one of your postings about the ethernet port assignment when a USB driver plugged into a new Dockstar. The problem has been solved by disabling Squeeze to do that.
I still not sure how I can change the LED color yet. Should I use setenv (I will need to set up netconsole in this case) or use fw_setenv. I am also not sure about the format. For example, if I want the led be solid green when the boot from USB is successful, should I use: led_exit='green on'? Wish to have your help.
Re: 8/30 - New uBoot with LED support
September 03, 2010 11:26PM
O.K. After try and error. Now I can set led to be constant green at exit now.
Re: 8/30 - New uBoot with LED support
September 05, 2010 09:52PM
twinclouds, can you share what you learned?
Re: 8/30 - New uBoot with LED support
September 06, 2010 12:29PM
It is actually very simple. First you need to boot into the native Pogoplug OS by disconnecting the USB Drive. Here I am assuming you are already using Jeff's mtd0 bootloader. Then you can use fw_ comments. To set led to be constant green at exit, the format is (without quotation marks) "fw_setenv led_exit green on". In the same way, you can set other led status and color.
Re: 8/30 - New uBoot with LED support
September 07, 2010 10:52AM
Thanks!!
mute
Re: 8/30 - New uBoot with LED support
September 16, 2010 08:30AM
Is the scanning of all usb devices included? http://forum.doozan.com/read.php?3,12
Re: 8/30 - New uBoot with LED support
September 20, 2010 03:36PM
Hello,

can this uboot version boot from jfs?
Matthias
Re: 8/30 - New uBoot with LED support
September 21, 2010 03:17AM
Hi!

I tried to update uBoot from 8/25 to the version of 8/30.

## Unknown uBoot detected on mtd0: 447561d59678984205324463d003311f
##
## The installer could not detect the version of your current uBoot
## This may happen if you have installed a different uBoot on
## /dev/mtd0 or if you have bad blocks on /dev/mtd0
##
## If you have bad blocks on mtd0, you should not try to install uBoot.
##
## If you have installed a diffirent uBoot on mtd0, and understand the
## risks, you can re-run the installer with the --no-uboot-check parameter
##
## Installation cancelled.

Whats the problem here?

Thanks for your help.

Matthias
Re: 8/30 - New uBoot with LED support
September 21, 2010 10:59AM
I had similar problem. But when I tried to rerun this same scrip everything went fine.
Re: 8/30 - New uBoot with LED support
September 21, 2010 04:40PM
>>Question about all these changes - are you pushing changes back into the
>>U-boot GIT at Denx or are you publishing your sources somewhere else?

>The Denx code tree is frozen for their 2010.09 release, and these patches
>are really just a hack on the sheevaplug board config. I'm not sure it's
>worth the maintenance headache of adding yet "almost sheevaplug" another
>board config to the Denx tree.

please consider sending your changes upstream!
No u-boot developer will have a look on issues with this modified u-boot and i _have_ issues, as i`m suffering from the repeatedly reported problem (on many places on the net) that usb-boot from a real 2.5" harddrive does not work. tried two disks with two different kinds of usb2ide cable and both fail like this:

U-Boot 2010.06-00695-gbd23130-dirty (Aug 30 2010 - 23:04:56)
Marvell-Dockstar/Pogoplug by Jeff Doozan
Hit any key to stop autoboot: 0
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..

usb stick from sandisk works fine. so does a SD card attached to an SD2usb cardreader. installation of debian from within pogoplug linux works fine. i just can`t the damn thing to boot.

> I'm not sure it's
>worth the maintenance headache of adding yet "almost sheevaplug" another
>board config to the Denx tree.
why not leave that up to the u-boot developers?

there is already a lot of duplicate code inside and that thing needs to be adressed, anyway.

let`s give an example:
neoware:/tmp/uboot/u-boot-2010.09-rc2/board/Marvell # diff -y -r guruplug/ sheevaplug/ |wc -l
248
neoware:/tmp/uboot/u-boot-2010.09-rc2/board/Marvell # diff -y --suppress-common-lines -r guruplug/ sheevaplug/ |wc -l
18

so, guruplug and sheevaplug differ very slightly.

even much much worse example:

neoware:/tmp/uboot/u-boot-2010.09-rc2/board/Marvell # diff -y -r db64360/ db64460 |wc -l
9545
neoware:/tmp/uboot/u-boot-2010.09-rc2/board/Marvell # diff -y --suppress-common-lines -r db64360/ db64460 |wc -l
1234

that`s a bummer, isn`t it ?

if you have a look at the diff, you see that even those 1234 lines of diff are mostly the same, they are just mostly string replacements of MV64360 vs. MV64460

so, please consider sending your sources upstream so they get review and may be included !

if that gets acceptet, you and the userbase would profit all from that!
ecc
Re: 8/30 - New uBoot with LED support
September 21, 2010 05:06PM
I did submit a patch upstream (see here and here).

The duplication of code among all the Kirkwood variants seems to be the way the u-boot and linux kernel developers prefer it -- separate files rather than #ifdefs. I don't particularly like it either. But getting the basic support into the main tree is more important than the cleanup/consolidation, which could come later.
Re: 8/30 - New uBoot with LED support
September 22, 2010 02:16AM
thanks for the info and your upstream work!
good to hear it`s on the way !
i did miss that posts on the u-boot list - seems searching the list via google did not give me any hits. i tried to find posts regarding dockstar, but my search apparently was not good enough!
Re: 8/30 - New uBoot with LED support
September 22, 2010 02:03PM
can we get a u-boot version with all USB storage debug/trace enabled, so we can analyse the usb-boot issue ?

i found:

neoware:/tmp/uboot/u-boot-2010.09-rc2/common # cat usb_storage.c |grep undef
#undef USB_STOR_DEBUG
#undef BBB_COMDAT_TRACE
#undef BBB_XPORT_TRACE

seems these need to be defined and we need a recompiled u-boot to see some more?

anyway, the usb-boot issue seems to affect a LOT of people:

http://forum.doozan.com/read.php?2,567
http://forum.doozan.com/read.php?2,286
http://forum.doozan.com/read.php?3,654
http://forum.doozan.com/read.php?3,255
http://plugcomputer.org/plugforum/index.php?topic=1172.0
http://plugcomputer.org/plugforum/index.php?topic=1125.0
http://openplug.org/plugforum/index.php?topic=131.0
https://www.newit.co.uk/forum/index.php?topic=392.10;wap2

u-boot people will be interested in finding/fixing this, i think:
http://lists.denx.de/pipermail/u-boot/2010-September/077595.html

adding freebsd code-repo link for reference here, as the u-boot usb_storage.c seems to be derived from that:
http://p4db.freebsd.org/fileLogView.cgi?FSPC=//depot/projects/usb/src/sys/dev/usb/storage/umass.c

also mind this note from common/usb_storage.c

/*
* New Note:
* Support for USB Mass Storage Devices (BBB) has been added. It has
* only been tested with USB memory sticks.
*/

more interesting detail:
http://lists.denx.de/pipermail/u-boot/2010-August/076316.html



Edited 1 time(s). Last edit at 09/22/2010 02:31PM by devzero.
Re: 8/30 - New uBoot with LED support
September 26, 2010 06:26AM
for those who have problems with booting from usb disk via u-boot, I´d like to encourage to try a different usb bridge cable.
see http://lists.denx.de/pipermail/u-boot/2010-September/077734.html
Re: 8/30 - New uBoot with LED support
September 28, 2010 02:56AM
I have connecte 7 USB Devices.
I extended usb_init with command:

fw_setenv usb_init 'usb start; if ext2load usb 0:1 0x800000 /boot/uImage; then setenv usb_device 0:1; setenv usb_root /dev/sda1; elif ext2load usb 1:1 0x800000 /boot/uImage; then setenv usb_device 1:1; setenv usb_root /dev/sdb1; elif ext2load usb 2:1 0x800000 /boot/uImage; then setenv usb_device 2:1; setenv usb_root /dev/sdc1; elif ext2load usb 3:1 0x800000 /boot/uImage; then setenv usb_device 3:1;setenv usb_root /dev/sdd1; elif ext2load usb 4:1 0x800000 /boot/uImage; then setenv usb_device 4:1;setenv usb_root /dev/sde1; elif ext2load usb 4:1 0x800000 /boot/uImage; then setenv usb_device 4:1;setenv usb_root /dev/sdf1; elif ext2load usb 5:1 0x800000 /boot/uImage; then setenv usb_device 5:1;setenv usb_root /dev/sdg1;fi;'

When booting I get frequent one reboot.

Can i fix this by changing bootdelay or usb_rootdelay?
Sorry, you can't reply to this topic. It has been closed.