New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Update UBOOT from OS

Got problems with your B2 or B3? Share and get helped!
past_51
Posts: 22
Joined: 25 Aug 2014, 06:27

Update UBOOT from OS

Post 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 :)
ahoff
Posts: 105
Joined: 01 Apr 2008, 20:50
Location: Swe

Re: Update UBOOT from OS

Post 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
Åke Hoff
Örskogen
Sweden
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Update UBOOT from OS

Post 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
Damarus
Posts: 4
Joined: 02 Jun 2014, 07:38

Re: Update UBOOT from OS

Post 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?
Damarus
Posts: 4
Joined: 02 Jun 2014, 07:38

Re: Update UBOOT from OS

Post 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"
past_51
Posts: 22
Joined: 25 Aug 2014, 06:27

Re: Update UBOOT from OS

Post by past_51 »

Hi All,

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

To which Linux distribution are you going?
sortsnak
Posts: 14
Joined: 23 Jun 2011, 10:08
Location: Denmark

Re: Update UBOOT from OS

Post 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.
past_51
Posts: 22
Joined: 25 Aug 2014, 06:27

Re: Update UBOOT from OS

Post 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.
Cilyan
Posts: 7
Joined: 10 Oct 2014, 10:55

Re: Update UBOOT from OS

Post 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.
Stryker
Posts: 56
Joined: 17 Oct 2013, 11:03

Re: Update UBOOT from OS

Post 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.
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Update UBOOT from OS

Post 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.
Stryker
Posts: 56
Joined: 17 Oct 2013, 11:03

Re: Update UBOOT from OS

Post 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...
Cilyan
Posts: 7
Joined: 10 Oct 2014, 10:55

Re: Update UBOOT from OS

Post 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.
Stryker
Posts: 56
Joined: 17 Oct 2013, 11:03

Re: Update UBOOT from OS

Post 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>
Cilyan
Posts: 7
Joined: 10 Oct 2014, 10:55

Re: Update UBOOT from OS

Post 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 :)
Post Reply