Page 1 of 3

Update UBOOT from OS

Posted: 27 Aug 2014, 07:54
by past_51
Hi All,

I'm very interested by updating uboot, in order to run another distrib on the B3 (Archlinux for example).
The problem is that I don't have the specific cable, and I'm asking if it is possible to update it by some OS commands ? (I know that if something goes wrong, the cable would be required)

Looking for that on Internet, I found some information for:
- uclinux
- utilite
- solid-run

(as a new user, I cannot post the URLs)

I checked, and all required things are included in this package : mtd-utils

So, what do you think about that ? Would it be possible ?
Someone already tried it ?

Any feedback or comments are welcome :)

Re: Update UBOOT from OS

Posted: 28 Aug 2014, 15:09
by ahoff
1: Download MouettE:s u-boot file.
2: Folow this guide, but repalce the existing u-boot.kwb with MouettE:s
3 Done

Re: Update UBOOT from OS

Posted: 28 Aug 2014, 18:02
by MouettE
Solution from ahoff will work fine (it's the excito official way) ; you can also install directly from the OS with the following commands :

Code: Select all

wget http://files.la-mouette.net/bubba/u-boot.kwb
apt-get -y install mtd-utils
flash_eraseall /dev/mtd0
nandwrite /dev/mtd0 u-boot.kwb

Re: Update UBOOT from OS

Posted: 28 Aug 2014, 18:18
by Damarus
MouettE wrote:Solution from ahoff will work fine (it's the excito official way) ; you can also install directly from the OS with the following commands :

Code: Select all

wget [...]
apt-get -y install mtd-utils
flash_eraseall /dev/mtd0
nandwrite /dev/mtd0 u-boot.kwb
That does not work! I might have just bricked my B3 doing those steps. It all went on fine until the last step. It just tells me "Unknown flash (not normal NAND)". What can I do?

Re: Update UBOOT from OS

Posted: 28 Aug 2014, 18:52
by Damarus
A working command to flash U-Boot is:

Code: Select all

mtd_debug write /dev/mtd0 0 $(stat --printf '%s' "u-boot.kwb") "u-boot.kwb"

Re: Update UBOOT from OS

Posted: 29 Aug 2014, 06:16
by past_51
Hi All,

May thanks for your answers.
I will try that this weekend.

To which Linux distribution are you going?

Re: Update UBOOT from OS

Posted: 03 Sep 2014, 04:02
by sortsnak
Damarus wrote:A working command to flash U-Boot is:

Code: Select all

mtd_debug write /dev/mtd0 0 $(stat --printf '%s' "u-boot.kwb") "u-boot.kwb"
The official

Code: Select all

nandwrite /dev/mtd0 u-boot.kwb
does not work. nandwrite does not recognize the .kwb file as a valid image. The flasherase command works flawless.

Damarus' method works. I did write a new uboot to my B3. But make sure if you don't have serial access on your B3 - then get it right the 1st time, if you don't use the correct image you may end up bricked. (or forcing yourself to get serial to fix it).

Oh, I'm planning running arch linux, infact, that's what I'm doing now. There is a newly created wiki page howto.

Re: Update UBOOT from OS

Posted: 04 Sep 2014, 02:45
by past_51
Hi sortsnak,

Thanks for your reply and comment.
I didn't had time to test it the last weekend. I will try with the method Damarus mentionned.

I think I will go to Archlinux too.

Re: Update UBOOT from OS

Posted: 10 Oct 2014, 11:05
by Cilyan
Hi there !
Thanks for the details, the method works very well.
Do you think it deserves a page on the wiki, or would it be too risky to but such sensitive information there?
Glad to see how easy it is to run Arch on the Bubba now.

Re: Update UBOOT from OS

Posted: 12 Oct 2014, 16:19
by Stryker
ahoff wrote:1: Download MouettE:s u-boot file.
2: Folow this guide, but repalce the existing u-boot.kwb with MouettE:s
3 Done
Do you guys have any ideas as to why this method does not work on my B3?
I have followed the instructions from the How-to-Wiki:
- Empty USB-Stick, FAT32 formatted with Gparted. File is at install/u-boot.kwb
- Plug in the USB-device beforehand, then connect power while holding the power-button.
- Green LED flashes and Status-LED of the USB-Stick light up, signalling mount.

But then the LED stays green forever and there are no indicators the flash-drive is accessed and read from.
A successful flash of the U-Boot should be followed by booting the OS from disk, but nothing happens.
'strings /dev/mtd0/ ...' still shows "U-Boot 2013.01.01-00006-ge588a77-dirty"

I also tried using different USB-Sticks (USB3.0 and 2.0) and reformatting them directly before use.
I have successfully used the USB-UBOOT-Flash-Method before to enable 3TB support.
The only thing different might be the OS running on the drive.
It's the mouette-minimal-wheezy-image and not the Excito-image.

Re: Update UBOOT from OS

Posted: 13 Oct 2014, 02:58
by Gordon
Both the rescue system and u-boot update routine run from flash. You could run Windows on the box and it still wouldn't matter.

I'm pretty sure it's your USB thumb drives. There have been a lot of posts from people not being able to boot the rescue system, specially since Excito started shipping diskless units. I've never had such issues, but I've always used cheap (i.e. free) ones with a maximum size of 1Gb. I suggest you try get hold of one of those yourself, because although it's been a long time since I've occupied myself with this type of electronics, I'm pretty sure that the newer high capacity devices use completely different internals and are most probably not supported by the system that is stored in flash.

Re: Update UBOOT from OS

Posted: 13 Oct 2014, 12:53
by Stryker
I tried several more USB-drives now, neither of them worked.
USB2.0 8GB and 16GB
USB3.0 8GB and 16GB

I do not own any other flashdrives and I am all out of ideas now...
In the past, I have successfully used my USB-drives to update the U-Boot for 3TB-Support, reinstall the excito-image and also boot a rescue-system.
I fear I might have to solder a UART-cable to the motherboard and patch via serial console.

e: I just booted the rescue-system from my 8GB USB3.0-drive. It seems like this stick is recognized by the uboot.
But it won't install the L2Cache-Fix...

Re: Update UBOOT from OS

Posted: 13 Oct 2014, 13:08
by Cilyan
If you can start the rescue system, why don't you use it to flash the uboot? Yes, it may brick your device, but not more or less than using an USB to let uboot flash itself... Just don't forget to erase the partition first, or the write will fail.

Re: Update UBOOT from OS

Posted: 14 Oct 2014, 10:34
by Stryker
With "erasing the partition" you mean the flash_eraseall-command, right?

And just to make sure: These are the correct commands, with mtd_debug instead of nandwrite:

Code: Select all

apt-get -y install mtd-utils
flash_eraseall /dev/mtd0
mtd_debug write /dev/mtd0 0 $(stat --printf '%s' "u-boot.kwb") <path to u-boot-kwb>

Re: Update UBOOT from OS

Posted: 16 Oct 2014, 08:43
by Cilyan
Yes. Just to be extremely precise (and for later reference):

Code: Select all

apt-get -y install mtd-utils
flash_erase /dev/mtd0 0 0
mtd_debug write /dev/mtd0 0 $(stat --printf '%s' "<path to u-boot-kwb>") "<path to u-boot-kwb>"
- flash_eraseall is deprecated in favor to flash_erase <mtddev> 0 0
- The stat command must get the same file as what you are flashing, to output the correct file size.
But I think you got it :)