Flash U-Boot 5big2 after flash failure

Flash U-Boot 5big2 after flash failure

Postby wvwaard » Sat Mar 18, 2023 8:51 pm

Hi,
Made a mess.
Wanted to try a newer Uboot and crashed the 5big2. Now i have it running again via kwboot and using serial interface to upload the Uboot that comes with fvdw-sl. But it's not persistent in memory ofcourse. So how do I flash the Uboot back. I cannot use the fvdw-sl console app for it as i start u boot from the serial interface... Any tips are welcome. Tried bubt, Nand etc no luck
wvwaard
Donator VIP
Donator VIP
 
Posts: 36
Joined: Thu Nov 28, 2013 9:11 am
Location: The Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby fvdw » Sun Mar 19, 2023 4:13 pm

It has been a while since I looked into kwboot. Need to read some archives. What about do you get when giving commands
Code: Select all
help

And
Code: Select all
printenv

This nay be helpful to determine which options we have to write uboot to flash memory.
Do you know if your 5big2 uses nand or spi flash memory?
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby wvwaard » Mon Mar 20, 2023 6:02 am

Hi good morning,

The system uses nand. I have been painstakingly working on this.
I was able erase the nand via a different Uboot file. The only thing now
that i need is the U boot starting point in mem. I tried 0x060000 as i could
read that in the U boot that i used to KWBoot the system with your supplied U boot version
for the system. I would be already helped if you could write down the commans you
use with the installation of the fvdw firmware as i could replicate this manualy on the system now ;-)

I will let you know the printenv etc

Thanks
Walter
wvwaard
Donator VIP
Donator VIP
 
Posts: 36
Joined: Thu Nov 28, 2013 9:11 am
Location: The Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby wvwaard » Mon Mar 20, 2023 7:50 am

Ok so the latest news is , i got a running linux fvdw firmware again by using kwboot and running the standalone kernel.
I downloaded the tools from Doozan forum and tried if the flash could be found. to no avail. there dont seem to be any mtd devices under the linux version i am running now.

Sofar i only managed to get a reading and writing of flash memmory by using a U boot from a Sheeva plug system.
And via the bubt command in the U boot i found for the 5big2 spi version.

What i could really use is a Uboot for the 5big2 NAND version. I think that would be awesome.

And yes STUPID me for not backing up my original NAND
wvwaard
Donator VIP
Donator VIP
 
Posts: 36
Joined: Thu Nov 28, 2013 9:11 am
Location: The Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby fvdw » Mon Mar 20, 2023 12:56 pm

well the nand setup is somewhat more complicated
It has three partitions
one for uboot (1MB)
one containing an uImage (16MB)
one containing a lacie root file system (239 MB)
adresses
Code: Select all
u-boot: 0x000000000000-0x000000100000
uImage: 0x000000100000-0x000001100000
root: 0x000001100000-0x000010000000


I attached for you the uboot image, the other ones you don't need.

It would be good to make 3 MTD partitions on the nand and then write uboot to the first partition.
AFAIK The bootloader should load uboot from the first partition.

PS the fvdw-sl console package doesn't contain an uboot suitable for 5big2, you probably used the the one for 2big2 ??
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby fvdw » Mon Mar 20, 2023 2:04 pm

a remark
The fvdw-sl kernel will be able to access the nand
In dmesg output of the kernel you should see see this
Code: Select all
[    2.956612] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xda
[    2.963715] nand: Hynix NAND 256MiB 3,3V 8-bit
[    2.968229] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.975774] Scanning device for bad blocks
[    3.146773] Creating 3 MTD partitions on "orion_nand":
[    3.151934] 0x000000000000-0x000000100000 : "u-boot"
[    3.157779] 0x000000100000-0x000001100000 : "uImage"
[    3.163913] 0x000001100000-0x000010000000 : "root"

If that is the case then in principle when running fvdw-sl kernel you should be able to write the u-boot binary to flash using dd command
Code: Select all
dd if=/path-to/u-boot-5big2-nand.bin of=/dev/mtd0

I never tried it but it should be possible.
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby wvwaard » Mon Mar 20, 2023 8:03 pm

Awesome thanks so much.
I used the nas2big kwb file that contains the Nand
Command in it's Uboot file.
I was able to fatload the other Uboot file for the 5big2 spi nas. But this didn't boot. I also flashed a kernel that worked. Anyway thanks for the Uboot version i am going to try it tomorrow.

Have a good night and thanks for your support again ....
wvwaard
Donator VIP
Donator VIP
 
Posts: 36
Joined: Thu Nov 28, 2013 9:11 am
Location: The Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby wvwaard » Mon Mar 20, 2023 8:19 pm

To answer your question I found a 5big2 spi Uboot somewhere in the forum here i think it came from Jocko ... So indeed it's not part of the fvdw console package. Maybe something for the future releases ....
wvwaard
Donator VIP
Donator VIP
 
Posts: 36
Joined: Thu Nov 28, 2013 9:11 am
Location: The Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby fvdw » Mon Mar 20, 2023 9:37 pm

Oke, some more info about nand flash
flash devices, either NAND or NOR, there is no partition table on the device itself. That is, you can't read the device in a flash reader and find some table that indicates how many partitions are on the device and where each partition begins and ends. There is only an undifferentiated sequence of blocks. This is a fundamental difference between MTD flash devices and devices such as disks or FTL devices such as MMC.

The partitioning of the flash device is therefore in the eyes of the beholder, that is, either U-Boot or the kernel, and the partitions are "created" when beholder runs. That's why you see the message Creating 3 MTD partitions. It reflects the fact that the flash partitions really only exist in the MTD system of the running kernel, not on the flash device itself.

This leads to a situation in which U-Boot and the kernel can have different definitions of the flash partitions

In U-Boot, you define the flash partitions in the mtdparts environment variable.

The uboot command mtdparts of the 5big2 nand uboot will list the information of the partitions it created. The 2big2 spi uboot will not create the correct partitions which may lead failing to load uboot environmental variables to continue boot.
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Flash U-Boot 5big2 after flash failure

Postby wvwaard » Tue Mar 21, 2023 7:27 am

Thanks for your post about the mtd parts. As you showed the offset for the "parts" for the 5big2 i will make a new memory table with those offset values and after that proceed with flashing the nand.

I wasnt able to start the attached nand file over kwboot. I dont know why exactly but will try to flash it with
the nand option and the provided offsets.
wvwaard
Donator VIP
Donator VIP
 
Posts: 36
Joined: Thu Nov 28, 2013 9:11 am
Location: The Netherlands

Next

Return to Lacie 5big Network vs2

Who is online

Users browsing this forum: Bing Bot and 2 guests