General NAS-Central Forums

Welcome to the NAS community
It is currently Sat Dec 16, 2017 12:54 pm

All times are UTC




Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: ix2-ng recovery usb
PostPosted: Wed May 18, 2016 3:48 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
Quote:
But not consistently...
Great. A hardware random generator.
Quote:
Any ideas?
Well, you don't have to save the environment. setenv serverip followed by a tftpboot should work, AFAIK.

But it's frightening. Your kernel is corrupted in flash, and u-boot doesn't seem to be able to save it's environment. Maybe the flash itself is broken? On the other hand, u-boot itself is fine, and is stored in the same flash chip. Did you ever see a environment checksum mismatch error?


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Thu May 19, 2016 2:37 pm 
Offline

Joined: Mon Jan 16, 2012 9:34 pm
Posts: 28
Mijzelf wrote:
Quote:
But not consistently...
Great. A hardware random generator.
Quote:
Any ideas?
Well, you don't have to save the environment. setenv serverip followed by a tftpboot should work, AFAIK.

But it's frightening. Your kernel is corrupted in flash, and u-boot doesn't seem to be able to save it's environment. Maybe the flash itself is broken? On the other hand, u-boot itself is fine, and is stored in the same flash chip. Did you ever see a environment checksum mismatch error?


Ah! This might be important. I see from other's boot console output, this:

Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
Found ADT7473, program PWM1 ... OK
[1024kB@f8000000] Flash: 1 MB

Mine is:

Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:1024 MB
Found ADT7473, program PWM1 ... OK
Flash: 0 kB

Which is NOT good! I have no flash memory, even though I have a U44 device on the PCB. Does the jumper at position JP1 do anything that would help me?

I guess I could de-solder U44 from the board to make it an IX2-NG model. Would that be sufficient?

Or is there a procedure I could use assuming this is now a IX2-NG model?

Thanks,

A


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Thu May 19, 2016 6:08 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
amr42 wrote:
Flash: 0 kB

Which is NOT good! I have no flash memory, even though I have a U44 device on the PCB.
No, it's okay. The NG has 1MiB NOR flash (at least I think it's NOR flash), while your box has 1GiB NAND flash, as your listing also shows.
And u-boot is located in NAND:
Code:
mtdparts=nand_mtd:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x400000@0x400000(initrd),0x3f800000@0x800000(boot),1024m@0x0(flash)
That is clearly 1GiB containing u-boot (and some other stuff).

Quote:
I guess I could de-solder U44 from the board to make it an IX2-NG model. Would that be sufficient?
Only if you solder a NOR chip on another socket, which already contains a capable u-boot.


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Thu May 19, 2016 10:59 pm 
Offline

Joined: Mon Jan 16, 2012 9:34 pm
Posts: 28
Mijzelf wrote:
amr42 wrote:
Flash: 0 kB

Which is NOT good! I have no flash memory, even though I have a U44 device on the PCB.
No, it's okay. The NG has 1MiB NOR flash (at least I think it's NOR flash), while your box has 1GiB NAND flash, as your listing also shows.
And u-boot is located in NAND:
Code:
mtdparts=nand_mtd:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x400000@0x400000(initrd),0x3f800000@0x800000(boot),1024m@0x0(flash)
That is clearly 1GiB containing u-boot (and some other stuff).

Quote:
I guess I could de-solder U44 from the board to make it an IX2-NG model. Would that be sufficient?
Only if you solder a NOR chip on another socket, which already contains a capable u-boot.


OK, I'm willing to listen more...

I have 1GB NAND containing uboot (which works fine). I can exit the autoboot by pressing a key at the right time.

Now what? I cannot set the serverip environment variable?

Can I reprogram the NAND with firmware from USB memory stick instead of via TFTP?


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Fri May 20, 2016 7:26 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
amr42 wrote:
Now what? I cannot set the serverip environment variable?
Are you sure about that? I can imagine you can't store it, but the current copy in memory should be modifiable.
Quote:
Can I reprogram the NAND with firmware from USB memory stick instead of via TFTP?
Depends. A full u-boot implementation can do something like that, but I don't know what exactly is implemented.
To load the kernel from usb stick you should execute something like
Code:
usb start
fatload usb 0 0x2000000 kernel
where it loads a file named kernel from the first usb partition (which has a fat filesystem) to memory address 0x2000000


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Fri May 20, 2016 9:03 pm 
Offline

Joined: Mon Jan 16, 2012 9:34 pm
Posts: 28
Mijzelf wrote:
Code:
usb start
fatload usb 0 0x2000000 kernel
where it loads a file named kernel from the first usb partition (which has a fat filesystem) to memory address 0x2000000


OK, that seems to work I can copy kernel (zImage file) to memory.

Can I combine the fatload command above with this (replacing tftpboot with fatload commands):

Code:
tftpboot 0x2000000 kernel
nand erase 0x100000 $filesize
nand write.e 0x2000000 0x100000 $filesize

tftpboot 0x2000000 initrd
nand erase 0x400000 $filesize
nand write.e 0x2000000 0x400000 $filesize


To write the good kernel into NAND now?

You'll need to help me with commands please...

Thanks,

A


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Sat May 21, 2016 7:49 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
amr42 wrote:
Can I combine the fatload command above with this (replacing tftpboot with fatload commands):
Yes. Both fatload and tftpboot put some data in memory, and so the starting condition for nand write is the same. I'm not sure about the filesize variabele. I know it's set by tftpboot, but I don't know about fatload. But of course you can provide the filesize yourself. (Just type the filesize)


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Sat May 21, 2016 6:06 pm 
Offline

Joined: Mon Jan 16, 2012 9:34 pm
Posts: 28
Mijzelf wrote:
amr42 wrote:
Can I combine the fatload command above with this (replacing tftpboot with fatload commands):
Yes. Both fatload and tftpboot put some data in memory, and so the starting condition for nand write is the same. I'm not sure about the filesize variabele. I know it's set by tftpboot, but I don't know about fatload. But of course you can provide the filesize yourself. (Just type the filesize)


Bingo! We have progress. Many thanks for help so far. Just need a little bit more (hope that is OK)...

Used the following (with FAT32 format USB drive inserted with zImage and initrd files in root directory of USB):
Code:
fatload usb 0 0x2000000 zImage
nand erase 0x100000 262FF8
nand write.e 0x2000000 0x100000 262FF8

fatload usb 0 0x2000000 initrd
nand erase 0x400000 2D8616
nand write.e 0x2000000 0x400000 2D8616

reset


Now I have a kernel that boots. Yippee!

However, I now see this from console boot output, with no way to get to device from web browsing to IP = 192.168.1.114:

Code:
<snip>
Sending select for 192.168.1.114...
Lease of 192.168.1.114 obtained, lease time 7200
deleting routers
route: ioctl 0x890c failed: No such process
adding dns 75.75.75.75
adding dns 75.75.76.76
eth0      Link encap:Ethernet  HWaddr 00:D0:B8:1D:79:FE 
          inet addr:192.168.1.114  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:3448 (3.3 KiB)  TX bytes:656 (656.0 B)
          Interrupt:11
mknod: /dev/zero: File exists
No need to create fw_env.config
Device is nand_diskless device.
Device Serial Num is 0,01k73WRBatfHfpctOyFcqruuHJxJa/Rrz38eKRhp8DFCAM36QUUCkmEpO
mFN1pXONZ,USAC0201NA,
Device Model- ix2-ng
DEPP Client version: 1.02
INITRD Build version: 4.1.206.33777
Device: Socket Listening on: 2081
Mac address = 00:d0:b8:1d:79:fe
Device: Sent a broadcast packet
Device: Waiting for Hello Response...
No response received
Device: Going to send a broadcast again
Mac address = 00:d0:b8:1d:79:fe
Device: Sent a broadcast packet
Device: Waiting for Hello Response...
No response received
Device: Going to send a broadcast again
<repeats forever...>


Any ideas on next steps? Also notice - device = ix2-ng according to this boot output! :)


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Sat May 21, 2016 6:37 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
An ng should be able to initialize the harddisk from an image in nand. But I guess that is also destroyed.

When the initrd init script doesn't find a prepared harddisk, it tries to initialize from either an imager stick, or from network. I never tried to reverse engineer the needed network protocol, but I guess you are looking at the client side implementation.

Do you have the imager stick inserted?


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Sat May 21, 2016 6:38 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
An ng should be able to initialize the harddisk from an image in nand. But I guess that is also destroyed.

When the initrd init script doesn't find a prepared harddisk, it tries to initialize from either an imager stick, or from network. I never tried to reverse engineer the needed network protocol, but I guess you are looking at the client side implementation.

Do you have the imager stick inserted? If yes, can to post the first part of the bootlog, where it tries to use that stick?


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Sat May 21, 2016 9:04 pm 
Offline

Joined: Mon Jan 16, 2012 9:34 pm
Posts: 28
Mijzelf wrote:
An ng should be able to initialize the harddisk from an image in nand. But I guess that is also destroyed.

When the initrd init script doesn't find a prepared harddisk, it tries to initialize from either an imager stick, or from network. I never tried to reverse engineer the needed network protocol, but I guess you are looking at the client side implementation.

Do you have the imager stick inserted? If yes, can to post the first part of the bootlog, where it tries to use that stick?


So I renamed the folder with the image to emctools/ix2-ng_images/

I had placed the boot.tgz file in the folder /ix2-200_images/ instead.

So now it created the boot image on the hard drive! More progress. Then it powered down unit as expected. All good so far!

But then when I booted back up (expecting all to be well), it just kept looping trying to boot a kernel. So now I'm stuck again.

See console output below
Code:
** ix2-nand ** ** uboot_ver:0.0.8 **

 ** MARVELL BOARD: DB-88F6282A-BP LE
             
U-Boot 1.1.4 (Oct 28 2011 - 15:19:29) Marvell version: 3.6.1 - EMC
U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00
Soc: 88F6282 A1 CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz
                                       
DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000   size 256MB
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:1024 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB
Marvell Serial ATA Adapter
Integrated Sata device found
[0 1 0]: Enable DMA mode (6)
  Device 1 @ 0 1:
Model: WDC WD30EFRX-68EUZN0      Firm: 82.00A82 Ser#:      WD-WMC
4N0MAMPXU
            Type: Hard Disk
             Supports 48-bit addressing
            Capacity: 764436.4 MB = 746.5 GB (1565565872 x 512)
CPU : Marvell Feroceon (Rev 1)         
Found kernel at 0x100000
Found initrd at 0x400000

Streaming disabled
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  3  2  1  0

NAND read: device 0 offset 0x100000, size 0x300000

Reading data from 0x100000
Reading data from 0x3ff800 -- 100% complete.
                                 
 3145728 bytes read: OK
                           
NAND read: device 0 offset 0x400000, size 0x400000

Reading data from 0x400000 
Reading data from 0x7ff800 -- 100% complete.
                                 
 4194304 bytes read: OK
                                                       
## Booting image at 00040000 ...
   Image Name:   Linux-2.6.31.8
   Created:      2011-07-22  16:54:23 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2479992 Bytes =  2.4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
                                                 
OK
                                                                           
## Loading Ramdisk Image at 00900000 ...
   Image Name:   
   Created:      2011-07-29  14:10:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2793445 Bytes =  2.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
                             
                                               
Starting kernel ...

<waits about 60 seconds then re-starts...>


Any ideas now?


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Sun May 22, 2016 7:08 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
No kernel log at all? What happens if you pull the disk? Do you get a 'normal' kernel log then?


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Mon May 23, 2016 6:35 pm 
Offline

Joined: Mon Jan 16, 2012 9:34 pm
Posts: 28
Mijzelf wrote:
No kernel log at all? What happens if you pull the disk? Do you get a 'normal' kernel log then?


No. With disk pulled the kernel will still not start. So it seems that the kernel and initrd files I wrote to the NAND are not working. Perhaps I should review the instructions for that again...

Anything I should watch out for? Source of known working zImage and initrd files? method to copy them to USb that preserves binary format, etc. etc...

?


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Tue May 24, 2016 6:08 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6091
amr42 wrote:
Mijzelf wrote:
No kernel log at all? What happens if you pull the disk? Do you get a 'normal' kernel log then?


No. With disk pulled the kernel will still not start.
With disk kernel loads but doesn't show any output, but without disk the kernel doesn't even load? Very strange. According to the environment the bootcmd is:
Code:
bootcmd=run loadzimage; run loadinitrd; run mk_mtdparts; setenv bootargs $(console) $(bootargs_root) $(bootargs_end) $(mtdparts); bootm 0x40000 0x900000
while loadzimage and loadinitrd are
Code:
loadzimage=nand read.e 0x40000 $(kernel_start) $(kernel_size)
loadinitrd=nand read.e 0x900000 $(initrd_start) $(initrd_size)
Actually I would have expected something like 'load kernel from disk, and only if that fails, load kernel from nand'.

Quote:
So it seems that the kernel and initrd files I wrote to the NAND are not working. Perhaps I should review the instructions for that again...

Anything I should watch out for? Source of known working zImage and initrd files?
The only source I'm aware of is the recovery image. BTW, you can also load them using fatload or tftpboot in memory, and then call bootm to boot them directly. The sequence should be something like
Code:
fatload kernel 0x40000
fatload initrd 0x900000
setenv bootargs $(console) $(bootargs_root) $(bootargs_end) $(mtdparts)
bootm 0x40000 0x900000
The 'setenv bootargs' part is because u-boot passes a commandline to the kernel on boot. This should work as good as loading the kernel and initrd in any other way.
Quote:
method to copy them to USb that preserves binary format, etc. etc...
No. Just copy them. They have an internal checksum. Bootm will tell if the image is correct.


Top
 Profile  
 
 Post subject: Re: ix2-ng recovery usb
PostPosted: Tue Jun 07, 2016 10:19 pm 
Offline

Joined: Mon Jan 16, 2012 9:34 pm
Posts: 28
Mijzelf

Seems that I have now successfully created a kernel and re-imaged drives.... I think....

HOWEVER - all I am getting from the unit is now a solid blue light, and a flashing power (white) light. No web access.

So, I'm really at the end of my tether as to what to do next?

This unit started as working fine, then a firmware update created a solid red light, not able to do anything unit.

Reminder - IX2-DL now with 2 fresh 3TB WD Red drives.... But no web access - so cannot enable ssh access.

What would you suggest I do as next steps? I'm committed to getting this unit working - so suggestions welcome!

A


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group