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!
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Re: Update UBOOT from OS

Post by ReedWood »

Back again with the serial output when thumb drive and network cable is attached. I pressed the rear button before power on the B3.

--------------
U-Boot 2010.06 (Jun 10 2011 - 09:06:51)
BUBBA|3

SoC: Kirkwood 88F6281_A0
DRAM: 512 MiB
In: serial
Out: serial
Err: serial
Net: egiga0, egiga1
88E1116 Initializing on egiga0 @08 done
88E1116 Initializing on egiga1 @18 done
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
reading /install/install.itb

** Unable to read "/install/install.itb" from usb 0:1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
reading /install/u-boot.kwb

** Unable to read "/install/u-boot.kwb" from usb 0:1 **
No SPI flash selected. Please run `sf probe'
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
resetting ...
----------------

Maybe I have to reformat the flash? If I run st proble on the u-boot command line line I find the following

sf probe 0
2048 KiB M25P16 at 0:0 is now current device
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Update UBOOT from OS

Post by johannes »

again I might be wrong since this is from memory, but I think it doesn't read your flash memory correctly. Try anotherone and double check the contents. It should have the "install" folder in root.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Update UBOOT from OS

Post by MouettE »

ReedWood wrote:I want to use the community u-boot from github [1] which you might know, since the last commit if from you. :) Btw. what is the difference between this repo and your own [2] despite the fact that [2] look more official.

Thanks!

[1] https://github.com/nielsek/community-b3-uboot
[2] https://github.com/Excito/U-Boot-B3
Long story short, the [1] was created a few month ago to host the community work on u-boot. After the bankruptcy we decided to rename this repo to U-Boot-B3 which is the source of the official U-Boot shipped with the B3. The binary version is on files.la-mouette.net but will be moved to more official location once all migrations are complete.
ReedWood wrote:Maybe I have to reformat the flash? If I run st proble on the u-boot command line line I find the following
From the log, U-Boot doesn't find the file to flash on the usb key. Make sure u-boot.kwb resides in the install directory of the key.
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Re: Update UBOOT from OS

Post by ReedWood »

Hi,

thank you for hanging on this thread so patiently!

I missed, that the zip of the 3TB update unpacks into a folder "install". When I put the u-boot.kwb into this folder it is found and read correctly (correct size read), but I am only dropped onto the u-boot command line.

--------------------
U-Boot 2010.06 (Jun 10 2011 - 09:06:51)
BUBBA|3

SoC: Kirkwood 88F6281_A0
DRAM: 512 MiB
In: serial
Out: serial
Err: serial
Net: egiga0, egiga1
88E1116 Initializing on egiga0 @08 done
88E1116 Initializing on egiga1 @18 done
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
reading /install/install.itb

** Unable to read "/install/install.itb" from usb 0:1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
reading /install/u-boot.kwb
........................

255984 bytes read
2048 KiB M25P16 at 0:0 is now current device
B3>
--------------------------

At this point I waited for 5 min, but the server just sits there. Since the flash is already selected as current device, would it help if I would try to burn the u-boot image manually using sf erase and sf write? Where in RAM would I find the loaded u-boot.kwb?
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Update UBOOT from OS

Post by MouettE »

Just did the test on my b3 and indeed it just sits here because the configuration does not reset the board after the flash procedure. Just type reset and see wether the flash was successful or not.
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Re: Update UBOOT from OS

Post by ReedWood »

I booted with usb key in place, pressing the rear button. The output was the same as already quoted in my last post. On the u-boot command line, I typed "reset". The board was reset and the system booted into my os.

There, I read out the u-boot on flash using
mtd_debug read /dev/mtd0 0 786432 currUboot
and then used strings to grep for the U-Boot version, which is
U-Boot 2010.06 (Jun 10 2011 - 09:06:51)

Just to be sure, that the U-Boot on the key is a different one, I also checked the version there.
U-Boot 2013.01.01-b3-excito-gde5c089 (Jan 24 2015 - 20:15:14)

In resume, the flash was not successful. When you test this on your B3, is there more output than
-----------
[...]
reading /install/u-boot.kwb
........................

255984 bytes read
2048 KiB M25P16 at 0:0 is now current device
B3>
------------
Is there something, that shows that a write to flash has happend. Or is the output the same as for me, just that my flash is never written to?

Thank you again!
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Update UBOOT from OS

Post by MouettE »

ReedWood wrote:Is there something, that shows that a write to flash has happend. Or is the output the same as for me, just that my flash is never written to?
The write operations are silent. Can you try a manual flash from u-boot ? This is the content of such a session :

Code: Select all

U-Boot 2010.06 (Jun 10 2011 - 09:06:51)
BUBBA|3

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1116 Initializing on egiga0 @08 done
88E1116 Initializing on egiga1 @18 done
Hit any key to stop autoboot:  0
B3> usb start
(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
B3> fatload usb 0:1 0x800000 /install/u-boot.kwb
reading /install/u-boot.kwb
.
.
........................
.

257148 bytes read
B3> echo $filesize
3EC7C
B3> sf probe 0:0
2048 KiB M25P16 at 0:0 is now current device
B3> sf erase 0 80000
B3> sf write 0x800000 0 $filesize
B3> reset
resetting ...


U-Boot 2013.01.01-b3-excito-gde5c089 (Jan 18 2015 - 21:52:12)
BUBBA|3

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
SF: Detected M25P16 with page size 64 KiB, total 2 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1116 Initializing on egiga0 @08 done
88E1116 Initializing on egiga1 @09PHY reset timed out
 done
Hit any key to stop autoboot:  0
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Re: Update UBOOT from OS

Post by ReedWood »

I tried manual flashing. Apart from a different file size of the u-boot.kwb, our sessions look alike, only that for me the flash was unsuccessfull. I do not know, why we have different sizes, but for flashing, this souldn't be an issue, shoud it? I compiled the u-boot code on the B3. I can check from which revision if this would be important.
The write operations are silent. Can you try a manual flash from u-boot ?

Code: Select all

U-Boot 2010.06 (Jun 10 2011 - 09:06:51)
BUBBA|3

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1116 Initializing on egiga0 @08 done
88E1116 Initializing on egiga1 @18 done
Hit any key to stop autoboot:  0
B3> usb start
(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
B3> fatload usb 0:1 0x800000 /install/u-boot.kwb
reading /install/u-boot.kwb
........................

255988 bytes read
B3> echo $filesize
3E7F4
B3> sf probe 0:0
2048 KiB M25P16 at 0:0 is now current device
B3> sf erase 0 80000
B3> sf write 0x800000 0 $filesize
B3> reset
resetting ...


U-Boot 2010.06 (Jun 10 2011 - 09:06:51)
BUBBA|3

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1116 Initializing on egiga0 @08 done
88E1116 Initializing on egiga1 @18 done
Hit any key to stop autoboot:  0

Other may be relevant stuff
I took apart my B3 yesterday evening and discoverd that the ground wire of my serial cable is disconnected from the B3 board. While this is not great news, since the charcters come through clean, I guess, that this shouldn't be an issue. However, I might be wrong when it comes to writing nor. I will get a soldering iron on Monday and fix this.

When I just got my B3, I tried to build my own serial cable, but didn't know back than, that I am _not_ supposed to connect it to the serial connector of my computer. Therefore, my B3 once had contact with, I guess, a 5V potential. If it turs out that something is wrong with my B3, this might be the reason. Also, I got the B3 used, so I can not give an account of its complete history.

Again thank you for your ongoing help.
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Re: Update UBOOT from OS

Post by ReedWood »

Sorry of the late update.

I redid the soldering and tried to flash the B3 manually, but still no luck. It is simply impossible to change the contect of the flash, while reading from it works perfectly. Is there an explanation for this situation?
Post Reply