boot the nas and connect to it using the ssh server and give the command
- Code: Select all
dd if=/dev/mtdblock0 of=/share/1000/public/U-boot-old.bin
Copy this file to you windows or linux pc (it will be in the shared folder with name public), put it in a zip file and post it here
If we check the content we are sure that the flash driver works ok. After that we can try tp put he nwsp2 lite u-boot in flash
If you want to check yourself then you need a hex editor to view the file or use xxd command to convert it.
The first 576 bytes should look like this
- Code: Select all
0000000: 5a00 0000 d401 0700 0000 0000 0002 0000 Z...............
0000010: 0000 6000 0000 6700 0000 0000 0000 0100 ..`...g.........
0000020: 4000 0000 0000 0000 0000 0000 0000 0000 @...............
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: e000 d1ff 9b1b 1b1b 0014 d0ff 1806 0043 ...............C
0000050: 0414 d0ff 0030 1435 0814 d0ff 2822 0111 .....0.5....("..
0000060: 0c14 d0ff 190a 0000 1014 d0ff cccc 0000 ................
0000070: 1414 d0ff 0000 0000 1814 d0ff 0000 0000 ................
0000080: 1c14 d0ff 3206 0000 2014 d0ff 0400 0000 ....2... .......
0000090: 2414 d0ff 7ff0 0000 0415 d0ff f1ff ff0f $...............
00000a0: 0815 d0ff 0000 0000 0c15 d0ff 0000 0000 ................
00000b0: 1415 d0ff 0000 0000 1c15 d0ff 0000 0000 ................
00000c0: 9414 d0ff 0000 0100 9814 d0ff 0000 0000 ................
00000d0: 9c14 d0ff 0fe4 0000 8014 d0ff 0100 0000 ................
00000e0: 0000 d1ff 2222 1101 0c00 d1ff 0000 0000 ....""..........
00000f0: 0401 d1ff 0000 0000 0001 d1ff 0000 0040 ...............@
0000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000130: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000140: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000170: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000190: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 0075 ...............u
0000200: 1200 00ea 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
0000210: 14f0 9fe5 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
0000220: a001 6000 0002 6000 6002 6000 c002 6000 ..`...`.`.`...`.
0000230: 2003 6000 8003 6000 e003 6000 efbe adde .`...`...`.....
0000240: 0000 6000 0000 6000 d001 6700 80de 6b00 ..`...`...g...k.
<snip>
In principle writing goes the same only use input file the new u-boot file and as output /dev/mtdblock0
- Code: Select all
if=/share/1000/public/u-boot-nwsp2-lite.bin of=/dev/mtdblock0
Before rebooting repeat the first command and again sent the file, we should check if the the flash now contains the new u-boot and is equal to the original u-boot lite image
If the conetent deviates form the old u-boot but content is not the same a the nwsp2-lite u-boot image file then don't reboot. It means the flash is corrupt. Then we should try to restore the old version that we copied above
If the flash conetnt is equal to the old u-boot that we copied earlier it means the writing did not happen because of write protection of the flash, then we need to disable write protection of the flash first.
For that you need to reboot the nas, interrupt boot with using the serial console to enter u-boot and at u-boot prompt (Marvell>>)
give this commands
- Code: Select all
Marvell>> flinfo
if the response contains this line, then it is protected
- Code: Select all
Write Protection : Upper 1 of 2
to remove it give this command
- Code: Select all
Marvell>> protect off all
Now let it continue boot by giving the command
- Code: Select all
Marvell>> disk 0x800000 0:6
this should load the kernel and then
- Code: Select all
Marvell>> bootm
this should boot the kernel
After that and when nas is up and running connect via ssh server and use the earlier described command to replace the u-boot in flash
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.
NOTE: I strongly advise that we first check the content of the flash before attempting to write to the flash and after writing check the new content. As said if the flash is corrupt or contains the wrong data, it will not boot and restoring flash might not be possible.
performing writing to flash is fully at your own risk