NS2 lite wrong uboot

NS2 lite wrong uboot

Postby lucca1x » Wed Jul 06, 2016 7:21 am

Hello everyone. I've got a big problem. I've burnt the u-boot-nwsp2-classic-gpt-usbboot-80b image to a ns2 v2 lite ( I was sure it was a v2 classic ... and I was stupid enough not to check the board......). Now the ns2 lite does boot but does't register on the network. I have a usb -ttl adapter and it works just fine via putty with the NS2. Bellow is the boot sequence hdd and network cable plugged in.
Is there any way to restore an working uboot and how to do that via serial ? Any help would be appreciated ...


Thanks
Code: Select all
  _           ____ _
          | |    __ _ / ___(_) ___
          | |   / _` | |   | |/ _ \
          | |___ (_| | |___| |  __/
          |_____\__,_|\____|_|\___|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__| fvdw vs80
 ** LOADER **
 ** MARVELL BOARD: ASTON_NS LE
Hold rear button - long :

U-Boot 1.1.4 (Jan  7 2013 - 21:15:04) Marvell version: 3.4.16  LaCie 1.3.9 256MB fvdw gpt usbboot vs80

U-Boot code: 00600000 -> 006701D0  BSS: -> 006BDAE0

Soc: MV88F6192 Rev 3 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz

DRAM CAS Latency = 3 tRP = 3 tRAS = 9 tRCD=3
DRAM CS[0] base 0x00000000   size 256MB
DRAM Total size 256MB  16bit width
[512kB@f8000000] Flash: 512 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done

CPU : Marvell Feroceon (Rev 1)
.
Un-Protected 1 sectors
Erasing Flash...
.
Erased 1 sectors
Writing to Flash... done
.
Protected 1 sectors

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
egiga0 no link
Waiting for LUMP (3)

Abort
no lump receive; continuing
egiga0 no link
Waiting for LUMP (0)
no lump receive; continuing
Marvell>> <INTERRUPT>
Marvell>> version

U-Boot 1.1.4 (Jan  7 2013 - 21:15:04) Marvell version: 3.4.16  LaCie 1.3.9 256MB fvdw gpt usbboot vs80
lucca1x
 
Posts: 5
Joined: Wed May 09, 2012 7:24 am

Re: NS2 lite wrong uboot

Postby fvdw » Wed Jul 06, 2016 4:37 pm

If u-boot is still accessible there is hope. If also the network interface is working or usb port, we can repair by uploading a new uboot image via network or usb and writing this correct image to flash. I remember we have done this in the past, I will look this evening if I can find the topic were we discussed this.

One question, did you try if the uboot console of the fvdw-sl console (see download forum) is able to access uboot? If so then network interface works and restore is easy. If not then you have probably only access via serial console and will it become difficult. Probably we will need the "kwboot" trick by using early stage boot interrupt via uart. I know this may sound as abacadabra but I think it can be solved
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: NS2 lite wrong uboot

Postby lucca1x » Wed Jul 06, 2016 7:00 pm

I`ve tried uboot console from netconsole 6.0 without results. It seems that somethink about the ethernet assignation is wrong; physically the ethernet adapter works, it detects the cable, leds are blinking, but:
- in u-boot: with the network cable plugged (network leds ok) u-boot says there is no link on egiga0 . The ip´s returned by printenv are from a strange class. I´ve tried to set ip manually with setenv ipaddr, serverip and gatewayip then saveenv; after saveenv the print returned the values I´ve set but there was no ping nor registration in router´s IP list; u-boot console doesn´t find the ns2.
- if I let the ns2 to boot in linux, ifconfig returns eth0 with link, configured with the ip set before the uboot disaster. also the rx tx packets values are changing and there are no transmission errors. Even so there is no ping to that ip and also no registration in router´s list. wireshark doesn´t find the ip or mac address.
Tftf also doesn´t connect.
Even if I would like to, I don´t think the network way it´s going to work - please correct me , please....:)
Any info about the other methods would be great.

Thanks again
lucca1x
 
Posts: 5
Joined: Wed May 09, 2012 7:24 am

Re: NS2 lite wrong uboot

Postby fvdw » Wed Jul 06, 2016 9:52 pm

seems your problem is the same as described and finally solved in this topic
viewtopic.php?f=11&t=2279

The topic start with different problem definition but finally it appears he put the ns2 classic u-boot on a ns2 liet, just like you did. he gets similar u-boot output on the serial console, showing ns2 classic u-boot but wrong socket (MV88F6192 = ns2 lite)

Code: Select all
U-Boot 1.1.4 (Jan 7 2013 - 21:15:04) Marvell version: 3.4.16 LaCie 1.3.9 256MB fvdw gpt usbboot vs80

U-Boot code: 00600000 -> 006701D0 BSS: -> 006BDAE0

Soc: MV88F6192 Rev 3 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz


please read it , it contains all info how to solved it.
The lucky thing is that despite the u-boot version is wrong it is still able to load a kernel from sda6
I made a special kernel that will make the the network interface work on a lite with wring u-boot in flash
viewtopic.php?f=11&t=2279&start=20#p19775

And using that kernel enables you than to flash u-boot from userland when running linux via the network interface and using putty (ssh client)

NOTE: if the new flash is installed and the nas still boots you will need to replace the kernel on /dev/sda6 by a normal one !
The special kernel will not load on a nwsp2-lite with correct u-boot in flash as the machine id assignment is wrong.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: NS2 lite wrong uboot

Postby lucca1x » Thu Jul 07, 2016 9:02 am

I have replaced the kernel on sda6 with the one in the thread you pointed and the ns2 showed in the network. I have wtitten the u-boot with the one also kindly provided by you in the same thread u-boot-nwsp2-lite.bin
Code: Select all
dd if=/share/1000/public/u-boot-nwsp2-lite.bin of=/dev/mtdblock0

but after checking the dump the end of files differ and the size of the files is different. u-boot-nwsp2-lite.bin has 524,288 bytes and the U-boot-old2.bin (that's the dump after burning the lite u-boot) has 512,000 bytes.
Is it something about the block size maybe. What do you think?
Now I'm afraid to reboot the ns2.
Attached the 2 files.
Tnx
You do not have the required permissions to view the files attached to this post.
lucca1x
 
Posts: 5
Joined: Wed May 09, 2012 7:24 am

Re: NS2 lite wrong uboot

Postby lucca1x » Thu Jul 07, 2016 10:14 am

Forget about the previous post. NS2 froze while waiting so I had no ssh anymore ( putty disconnected - network error). I had to power cycle.
Now it doesn't boot the kernel but I have netconsole. Now the serial returns:
Code: Select all
| |    __ _ / ___(_) ___
          | |   / _` | |   | |/ _ \
          | |___ (_| | |___| |  __/
          |_____\__,_|\____|_|\___|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: ASTON_NS_CR REV: 1 LE
Hold rear button - long :  FAIL


U-Boot 1.1.4 (Mar 23 2011 - 19:09:28) Marvell version: 3.4.16  LaCie 1.5.19 128MB

U-Boot code: 06000000 -> 060701D0  BSS: -> 060BDAC0

Soc: MV88F6192 Rev 3 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz

DRAM CAS Latency = 3 tRP = 3 tRAS = 9 tRCD=3
DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB  16bit width
[512kB@f8000000] Flash: 512 kB
Addresses 98M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (98M - 97M): Done
*** Warning - bad CRC, using default environment


CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Waiting for LUMP (3)

Abort
no lump receive; continuing
Waiting for LUMP (0)

Abort
no lump receive; continuing

Printenv returns:
Code: Select all
Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=spi_flash:0x80000@0(uboot)ro,0x300000@0x100000(root)
mainlineLinux=no
CASset=min
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
disaMvPnp=no
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
enaAutoRecovery=yes
uboot_capabilities=gpt,lba64
start_lump=lump 3
pre_lump=lump 1
resetdisk=ide reset
bootdelay=0
boot_fail=lump
kernel_addr=0x800000
productType_env=ASTON_KW
primaryPart=6
secondaryPart=A
boot_usb=usb start;usbboot 0x800000 0:1;bootm;
resetFlag_env=0
bootargs=console=ttyS0,115200 root=/dev/sda7 ro reset=0 productType=ASTON_KW
bootcmd=run disk_disk
boot_disk4=disk ${kernel_addr} 1:${primaryPart}; setenv rootfs /dev/sdb7;
boot_disk3=if disk ${kernel_addr} 0:${primaryPart}; then setenv rootfs /dev/sda7; else run boot_disk4; fi
boot_disk2=if disk ${kernel_addr} 1:${secondaryPart}; then setenv rootfs /dev/sdb7; else run boot_disk3; fi
boot_disk1=if disk ${kernel_addr} 0:${secondaryPart}; then setenv rootfs /dev/sda7; else run boot_disk2; fi
boot_disk=if test ${resetFlag_env} -eq 0; then run boot_disk1; else run boot_disk3; fi
disk_disk=run boot_disk; setenv bootargs console=ttyS0,115200 root=${rootfs} ro reset=${resetFlag_env} productType=${productType_env}; bootm ${kernel_addr};
ethaddr=00:D0:4B:92:01:D4
ethact=egiga0

Environment size: 2022/4092 bytes


There is a bad CRC error upon boot ... What should I do next ?
Tnx
lucca1x
 
Posts: 5
Joined: Wed May 09, 2012 7:24 am

Re: NS2 lite wrong uboot

Postby lucca1x » Thu Jul 07, 2016 4:12 pm

All solved out. I don't understand why there is a difference between the burned u-boot and the dump, I've written the u-boot once more via netconsole. I can't identify any "production" fault. Everything works just fine. Netconsole is a real life saver once you get used to it.

Thank you very much fvdw
lucca1x
 
Posts: 5
Joined: Wed May 09, 2012 7:24 am

Re: NS2 lite wrong uboot

Postby fvdw » Thu Jul 07, 2016 9:25 pm

ok nice to see that you repaired the boot loader
the output of serial confirms it (for example this line: U-Boot 1.1.4 (Mar 23 2011 - 19:09:28) Marvell version: 3.4.16 LaCie 1.5.19 128MB and the correct SOC number


Code: Select all
 ** MARVELL BOARD: ASTON_NS_CR REV: 1 LE
Hold rear button - long :  FAIL


U-Boot 1.1.4 (Mar 23 2011 - 19:09:28) Marvell version: 3.4.16  LaCie 1.5.19 128MB

U-Boot code: 06000000 -> 060701D0  BSS: -> 060BDAC0

Soc: MV88F6192 Rev 3 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz

DRAM CAS Latency = 3 tRP = 3 tRAS = 9 tRCD=3
DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB  16bit width
[512kB@f8000000] Flash: 512 kB
Addresses 98M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (98M - 97M): Done
*** Warning - bad CRC, using default environment


The bad CRC message can be ignored. It concern a block in the image containing a set of environment variables. This should be loaded as separate partition. But because the lacie u-boot verison defines the important environment variables when booting (they are hard coded in the u-boot image) and stores them when u-boot loading has finished this message doesn't harm.

It has been a while ago, need to check why the image I supplied is somewhat larger then your dump.
I guess that my image also contains the environment variable block en your not. I will compare them later and let you know.
Anyhow problem seems to be solved. I assume you have restored the correct kernel back on sda6 to let it boot the firmware using the restored u-boot

----edit
I checked the files you sent, and yes the dumped version does not contain the partition with the environmental variables while my image contains it.
So my image contains a partition with u-boot and a partition with environment variables = total flash content.(so flash has two partitions)
You dump contains only u-boot partition as we used mtdblock0 to copy the data.
The u-boot partition in flash is mounted on mtdblock0 and environment variables partition on mtdblock1

I should take out the environment partition in my image if we write it to mtdblock0.
But it will not harm as these bytes will not be written as the size of mtdblock0 is only 512000 bytes.

If you write the image via u-boot command line using bubt command it will use total flash size and write both partitions
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 10 guests