Restore MTD backup via serial April 29, 2012 01:00PM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial April 29, 2012 04:22PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial April 29, 2012 04:43PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial April 30, 2012 03:26PM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial May 01, 2012 02:16AM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial May 01, 2012 04:08PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 02, 2012 10:54AM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial May 02, 2012 04:21PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 02, 2012 11:30PM |
Admin Registered: 13 years ago Posts: 18,621 |
Re: Restore MTD backup via serial May 03, 2012 05:51AM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial May 03, 2012 04:27PM |
Registered: 12 years ago Posts: 33 |
root@bt:~/picocom-debug# ./picocom -b 115200 /dev/ttyUSB0 picocom v1.6 port is : /dev/ttyUSB0 flowcontrol : none baudrate is : 115200 parity is : none databits are : 8 escape is : C-a local echo is : no noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv imap is : omap is : emap is : crcrlf,delbs, Terminal ready *** file to upload: '/root/picocom-debug/uboot.uart' Sending DEBUG for about 5 seconds. Power on device NOW! Waiting NAK... Press 'x' to escape. sx -vv -b '/root/picocom-debug/uboot.uart' Sending /root/picocom-debug/uboot.uart, 4096 blocks: Give your local XMODEM receive command now. Bytes Sent: 524416 BPS:6346 Transfer complete *** exit status: 0 done. U-Boot 1.1.4 Cloud Engines 1.1.2 (3.4.22) SATA PHYADDR=0 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 00691750 Soc: 88F6281 A1 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 256MB DRAM CS[1] base 0x10000000 size 256MB DRAM Total size 512MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:Bad block table not found for chip 0 Bad block table not found for chip 0 No space left to write bad block table 128 MB *** Warning - bad CRC or NAND, using default environment Flash: 0 kB CPU : Marvell Feroceon (Rev 1) CLOUD ENGINES BOARD (GUESSED): DISCOVERY:0.1 Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME] Hit any key to stop autoboot: 0 no devices available ## Booting image at 00800000 ... Bad Magic Number CE>> setenv ipaddr 192.168.1.104 CE>> setenv serverip 192.168.1.100 CE>> tftp 0x800000 mtd0 Using egiga0 device TFTP from server 192.168.1.100; our IP address is 192.168.1.104 Filename 'mtd0'. Load address: 0x800000 Loading: ################################################################# ################################################################# ################################################################# ################# done Bytes transferred = 1081344 (108000 hex) CE>> bootm 0x800000 ## Booting image at 00800000 ... Bad Magic Number CE>> bootm 0x108000 ## Booting image at 00108000 ... Bad Magic Number CE>> tftp 0x800000 ce_kernel_redstone_v63.img Using egiga0 device TFTP from server 192.168.1.100; our IP address is 192.168.1.104 Filename 'ce_kernel_redstone_v63.img'. Load address: 0x800000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################################## done Bytes transferred = 1978608 (1e30f0 hex) CE>> bootm 0x800000 ## Booting image at 00800000 ... Image Name: Linux-2.6.22.18 Created: 2009-10-14 20:23:19 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1978544 Bytes = 1.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK Starting kernel ... Uncompressing Linux............................................................................................................................ done, booting the kernel.
Re: Restore MTD backup via serial May 03, 2012 04:49PM |
Registered: 12 years ago Posts: 501 |
> root@bt:~/picocom-debug# ./picocom -b 115200 > /dev/ttyUSB0 > picocom v1.6 > > port is : /dev/ttyUSB0 > flowcontrol : none > baudrate is : 115200 > parity is : none > databits are : 8 > escape is : C-a > local echo is : no > noinit is : no > noreset is : no > nolock is : no > send_cmd is : sz -vv > receive_cmd is : rz -vv > imap is : > omap is : > emap is : crcrlf,delbs, > > Terminal ready > > *** file to upload: > '/root/picocom-debug/uboot.uart' > Sending DEBUG for about 5 seconds. Power on device > NOW! > Waiting NAK... Press 'x' to escape. > sx -vv -b '/root/picocom-debug/uboot.uart' > Sending /root/picocom-debug/uboot.uart, 4096 > blocks: Give your local XMODEM receive command > now. > Bytes Sent: 524416 BPS:6346 > > > Transfer complete > > *** exit status: 0 > done. > > > U-Boot 1.1.4 Cloud Engines 1.1.2 (3.4.22) SATA > PHYADDR=0 > > U-Boot code: 00600000 -> 0067FFF0 BSS: -> > 00691750 > > Soc: 88F6281 A1 (DDR2) > CPU running @ 1200Mhz L2 running @ 400Mhz > SysClock = 400Mhz , TClock = 200Mhz > > DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 > DRAM CS[0] base 0x00000000 size 256MB > DRAM CS[1] base 0x10000000 size 256MB > DRAM Total size 512MB 16bit width > Addresses 8M - 0M are saved for the U-Boot usage. > Mem malloc Initialization (8M - 7M): Done > NAND:Bad block table not found for chip 0 > Bad block table not found for chip 0 > No space left to write bad block table > 128 MB > *** Warning - bad CRC or NAND, using default > environment > > Flash: 0 kB > > CPU : Marvell Feroceon (Rev 1) > CLOUD ENGINES BOARD (GUESSED): DISCOVERY:0.1 > > Streaming disabled > Write allocate disabled > > > USB 0: host mode > PEX 0: interface detected no Link. > Net: egiga0 [PRIME] > Hit any key to stop autoboot: 0 > > no devices available > ## Booting image at 00800000 ... > Bad Magic Number > CE>> setenv ipaddr 192.168.1.104 > CE>> setenv serverip 192.168.1.100 > CE>> tftp 0x800000 mtd0 > Using egiga0 device > TFTP from server 192.168.1.100; our IP address is > 192.168.1.104 > Filename 'mtd0'. > Load address: 0x800000 > Loading: To me, mtd0 looks like it is an apt name for uboot partition contents. Is that what mtd0 actually is in your case? > ################################################## > ############### > > ################################################## > ############### > > ################################################## > ############### > ################# > done > Bytes transferred = 1081344 (108000 hex) > CE>> bootm 0x800000 > ## Booting image at 00800000 ... > Bad Magic Number > CE>> bootm 0x108000 > ## Booting image at 00108000 ... > Bad Magic Number Not sure I understand here: you are tftploading mtd0 to offset x800000, but then you try to bootm w/ the contents at 00108000... don't you mean bootm 00800100 ?? Also, are you trying to boot a kernel & initrd? > CE>> tftp 0x800000 ce_kernel_redstone_v63.img > Using egiga0 device > TFTP from server 192.168.1.100; our IP address is > 192.168.1.104 > Filename 'ce_kernel_redstone_v63.img'. > Load address: 0x800000 > Loading: > ################################################## > ############### > > ################################################## > ############### > > ################################################## > ############### > > ################################################## > ############### > > ################################################## > ############### > > ################################################## > ############ > done > Bytes transferred = 1978608 (1e30f0 hex) > CE>> bootm 0x800000 > ## Booting image at 00800000 ... > Image Name: Linux-2.6.22.18 > Created: 2009-10-14 20:23:19 UTC > Image Type: ARM Linux Kernel Image > (uncompressed) > Data Size: 1978544 Bytes = 1.9 MB > Load Address: 00008000 > Entry Point: 00008000 > Verifying Checksum ... OK > OK > > Starting kernel ... > > Uncompressing > Linux............................................. > .................................................. > ............................. done, booting the > kernel. > > >
Re: Restore MTD backup via serial May 03, 2012 05:14PM |
Registered: 12 years ago Posts: 33 |
> U-Boot 1.1.4 Cloud Engines 1.1.2 (3.4.22) SATA > PHYADDR=0 > > U-Boot code: 00600000 -> 0067FFF0 BSS: -> > 00691750 > > Soc: 88F6281 A1 (DDR2) > CPU running @ 1200Mhz L2 running @ 400Mhz > SysClock = 400Mhz , TClock = 200Mhz > > DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 > DRAM CS[0] base 0x00000000 size 256MB > DRAM CS[1] base 0x10000000 size 256MB > DRAM Total size 512MB 16bit width > Addresses 8M - 0M are saved for the U-Boot usage. > Mem malloc Initialization (8M - 7M): Done > NAND:Bad block table not found for chip 0 > Bad block table not found for chip 0 > No space left to write bad block table > 128 MB > *** Warning - bad CRC or NAND, using default > environment > > Flash: 0 kB > > CPU : Marvell Feroceon (Rev 1) > CLOUD ENGINES BOARD (GUESSED): DISCOVERY:0.1
Re: Restore MTD backup via serial May 03, 2012 07:11PM |
Registered: 12 years ago Posts: 501 |
davygravy@bitbaker64:~/Desktop/picocom-debug$ ./picocom -b 115200 /dev/ttyUSB0 picocom v1.6 port is : /dev/ttyUSB0 flowcontrol : none baudrate is : 115200 parity is : none databits are : 8 escape is : C-a local echo is : no noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv imap is : omap is : emap is : crcrlf,delbs, Removing stale lock: /var/lock/LCK..ttyUSB0 Terminal ready U-Boot 2011.12 (Apr 18 2012 - 23:08:20) Seagate GoFlexNet SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 256 MiB In: serial Out: serial Err: serial Net: egiga0 88E1116 Initialized on egiga0 Using egiga0 device ping failed; host 192.168.11.149 is not alive Hit any key to stop autoboot: 0 GoFlexNet> GoFlexNet> *** file to upload: uboot.UARTgoflexnet-IDEpatched-netconsoleON.kwb Sending DEBUG for about 5 seconds. Power on device NOW! Waiting NAK... Press 'x' to escape. sx -vv -b uboot.UARTgoflexnet-IDEpatched-netconsoleON.kwb Sending uboot.UARTgoflexnet-IDEpatched-netconsoleON.kwb, 4096 blocks: Give your local XMODEM receive command now. Bytes Sent: 524288 BPS:6341 Transfer complete *** exit status: 0 done. WARNING: Caches not enabled NAND: 256 MiB In: serial Out: serial Err: serial Net: egiga0 88E1116 Initialized on egiga0 Using egiga0 device ping failed; host 192.168.11.149 is not alive Hit any key to stop autoboot: 0 GoFlexNet> GoFlexNet> help ? - alias for 'help' bdinfo - print Board Info structure mtdparts- define flash/nand partitions nand - NAND sub-system usb - USB sub-system version - print monitor, compiler and linker version GoFlexNet> version U-Boot 2011.12 (May 03 2012 - 20:14:15) Seagate GoFlexNet arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1 GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709 GoFlexNet> arcNumber=3089 baudrate=115200 ... usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot usb_device=0:1 usb_init=run usb_scan; setenv usb_root LABEL=rootfs usb_root=/dev/sda1 usb_rootdelay=10 Environment size: 3789/131068 bytes GoFlexNet> usb start (Re)start USB... USB: Register 10011 NbrPorts 1 USB EHCI 1.00 scanning bus for devices... 2 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found GoFlexNet> run usb_bootcmd Loading file "/boot/uImage" from usb device 0:1 (usbda1) 1 bytes read Found bootable drive on usb 0:1 Loading file "/boot/uImage" from usb device 0:1 (usbda1) 2279256 bytes read Loading file "/boot/uInitrd" from usb device 0:1 (usbda1) 7575688 bytes read ## Booting kernel from Legacy Image at 00800000 ... Image Name: Linux-3.3.2 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2279192 Bytes = 2.2 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK ## Loading init Ramdisk from Legacy Image at 01100000 ... Image Name: initramfs-3.3.2-kirkwood-dg Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 7575624 Bytes = 7.2 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.3.2-kirkwood-dg (davygravy@bitbaker64) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-70) ) #1 Mon Apr 23 17:09:27 CDT 2012 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine: Seagate GoFlex Net [ 0.000000] Memory policy: ECC disabled, Data cache writeback [ 10.265811] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A [ 10.730416] console [ttyS0] enabled [ 10.734875] NAND device: Manufacturer ID: 0x98, Chip ID: 0xda (Toshiba NAND 256MiB 3,3V 8-bit) [ 10.743549] Scanning device for bad blocks [ 10.961563] 4 cmdlinepart partitions found on MTD device orion_nand [ 10.967874] Creating 4 MTD partitions on "orion_nand": [ 10.973038] 0x000000000000-0x000000100000 : "u-boot" [ 10.978836] 0x000000100000-0x000000500000 : "uImage" [ 10.984592] 0x000000500000-0x000002500000 : "rootfs" [ 10.990397] 0x000002500000-0x000010000000 : "data" [ 10.996843] mousedev: PS/2 mouse device common for all mice [ 12.004997] rtc-mv rtc-mv: internal RTC not ticking [ 12.009977] i2c /dev entries driver [ 12.013600] cpuidle: using governor ladder Debian GNU/Linux 6.0 nsa320-usb ttyS0 nsa320-usb login:
Re: Restore MTD backup via serial May 03, 2012 10:02PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 04, 2012 08:35AM |
Registered: 12 years ago Posts: 33 |
nand write.e 0x800000 0x0 0x100000I've then done the same for mtd1 and mtd2.
Re: Restore MTD backup via serial May 04, 2012 12:19PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 04, 2012 01:56PM |
Registered: 12 years ago Posts: 33 |
root@debian-kirkwood-wide:~# ./flash_erase /dev/mtd1 0 4 Erase Total 4 Units Performing Flash Erase of length 131072 at offset 0x60000 done root@debian-kirkwood-wide:~# ./nandwrite /dev/mtd1 mtd1 Image 4325376 bytes, NAND page 2048 bytes, OOB area 2048 bytes, device size 4194304 bytes Input file does not fit into device: Success Data was only partially written due to error : Success root@debian-kirkwood-wide:~#
Re: Restore MTD backup via serial May 04, 2012 04:35PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 05, 2012 04:23AM |
Registered: 12 years ago Posts: 33 |
nanddump -nf mtd0 /dev/mtd0
Re: Restore MTD backup via serial May 05, 2012 06:10AM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 06, 2012 01:22PM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial May 06, 2012 01:37PM |
Registered: 12 years ago Posts: 501 |
# dump the first 512k of mtd0 to /tmp $NANDDUMP -no -l 0x80000 -f /tmp/uboot-mtd0-dump /dev/mtd0
cd /tmp wget http://jeff.doozan.com/debian/uboot/nanddumpIf your fs is read-only, then you'd have to find a way around that...
chmod +x nanddump
./nanddump -no -l 0x80000 -f /tmp/uboot-mtd0-dump /dev/mtd0would dump the 512k of u-boot image
Re: Restore MTD backup via serial May 06, 2012 02:27PM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial May 06, 2012 04:20PM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 06, 2012 04:36PM |
Registered: 12 years ago Posts: 501 |
root@GoFlexHome:/# ./nanddump -no -l 0x400000 -f uImage-mtd1-dump /dev/mtd1 Block size 131072, page size 2048, OOB size 64 Dumping data starting at 0x00000000 and ending at 0x00400000... root@GoFlexHome:/# ./nanddump -no -l 0x2000000 -f rootfs-mtd2-dump /dev/mtd2 Block size 131072, page size 2048, OOB size 64 Dumping data starting at 0x00000000 and ending at 0x02000000...
davygravy@bitbaker64:~/Desktop$ ./kwboot -t -B 115200 /dev/ttyUSB0 -p -b mtddumps-goflexnet/uboot-mtd0-orig-goflexhome.kwb Sending boot message. Please reboot the target...\ Sending boot image... 0 % [......................................................................] 1 % [......................................................................] 3 % [......................................................................] ... 97 % [......................................................................] 99 % [....................................] [Type Ctrl-\ + c to quit] -- NAS EXPLORER -- _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** QSI BOARD: NAS-PLUG LE U-Boot 1.1.4 (Jun 10 2010 - 08:28:13) Marvell version: 3.4.27 QSI NAS version: 1.0.4 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00 Soc: 88F6281 A1 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 128MB DRAM Total size 128MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:256 MB Flash: 0 kB CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME] Hit any key to stop autoboot: 0 NAS>> NAS>> print baudrate=115200 loads_echo=0 ipaddr=169.254.254.253 serverip=169.254.254.254 rootpath=/mnt/ARM_FS/ netmask=255.255.0.0 run_diag=yes console=console=ttyS0,115200 CASset=min MALLOC_len=1 ethprime=egiga0 bootargs_root=root=/dev/mtdblock2 ro ethmtu=1500 usb0Mode=host nandEcc=1bit ethact=egiga0 ethaddr=00:10:75:xx:xx:xx cesvcid=xxxxxxxxxxxxxxxxxxxxxxxxxxx ceserialno=xxxxxxxxxx ceboardver=DISCOVERY:0.1 bootcmd=nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000 stdin=serial stdout=serial stderr=serial nandEnvBase=x=no mainlineLinux=no enaMonExt=no enaCpuStream=no enaWrAllo=no pexMode=RC disL2Cache=no setL2CacheWT=yes disL2Prefetch=yes enaICPref=yes enaDCPref=yes sata_dma_mode=yes netbsd_en=no vxworks_en=no 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; bootdelay=3 disaMvPnp=no netretry=no rcvrip=169.254.100.100 loadaddr=0x02000000 autoload=no enaAutoRecovery=yes pcieTune=no NAS>> set ipaddr 192.168.11.150 NAS>> set serverip 192.168.11.149 NAS>> tftpboot 0x800000 uboot-mtd0-orig-goflexhome.kwb Using egiga0 device TFTP from server 192.168.11.149; our IP address is 192.168.11.150 Filename 'uboot-mtd0-orig-goflexhome.kwb'. Load address: 0x800000 Loading: ################################################################# ###################################### done Bytes transferred = 524288 (80000 hex) NAS>> nand erase 0x0 0x80000 NAND erase: device 0 offset 0x0, size 0x80000 Erasing at 0x60000 -- 100% complete. OK NAS>> nand write.e 0x800000 0x0 0x80000 NAND write: device 0 offset 0x0, size 0x80000 Writing data at 0x7f800 -- 100% complete. 524288 bytes written: OK NAS>> reset -- NAS EXPLORER -- _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** QSI BOARD: NAS-PLUG LE U-Boot 1.1.4 (Jun 10 2010 - 08:28:13) Marvell version: 3.4.27 QSI NAS version: 1.0.4 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00 Soc: 88F6281 A1 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 128MB DRAM Total size 128MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:256 MB Flash: 0 kB CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME] Hit any key to stop autoboot: 0 NAND read: device 0 offset 0x100000, size 0x300000 Reading data from 0x3ff800 -- 100% complete. 3145728 bytes read: OK ## Booting image at 00800000 ... Image Name: Linux-2.6.22.18 Created: 2010-10-19 23:05:02 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1979140 Bytes = 1.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK Starting kernel ... Uncompressing Linux............................................................................................................................ done, booting the kernel. [ 0.000000] Linux version 2.6.22.18 (bdietrich@buildman) (gcc version 4.2.1) #81 Tue Oct 19 16:05:00 PDT 2010 [ 0.000000] CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977 [ 0.000000] Machine: Feroceon-KW [ 0.000000] Using UBoot passing parameters structure [ 0.000000] Memory policy: ECC disabled, Data cache writeback [ 0.000000] CPU0: D VIVT write-back cache ... Loading xce.ko: [ 17.110000] Cloud Engines XCE Init [Version: 2.0.5.10] [ 17.120000] XCE: CPU MEMORY MAP: [ 17.120000] XCE: -- 0x00001000 - 0xbeffffff (3055 MB) User Space Mappings [ 17.130000] XCE: -- 0xbf000000 - 0xbfffffff ( 16 MB) Kernel module space ... [ 17.280000] XCE: GPIO H POL: 0x00000000 [ 17.280000] XCE: GPIO H IN: 0x0000c00d [ 17.290000] XCE: Kernel thread starting PID: 400 Success Starting hbplug: Success starting pid 402, tty '': '/bin/sh' -sh-3.2# [ 18.390000] XCE: BLPARAMS: reading 2048 bytes @ a0000 [ 18.390000] XCE: BLPARAMS: reading 2048 bytes @ a0800 [ 18.400000] XCE: BLPARAMS: reading 2048 bytes @ a1000 [ 18.410000] XCE: BLPARAMS: reading 2048 bytes @ a1800 [ 23.860000] XCE: XCE: LED -> CONNECTED -sh-3.2#======================================
NAS>> set serverip 192.168.11.149 NAS>> set ipaddr 192.168.11.150 NAS>> tftpboot 0x800000 uImage-mtd1-dump Unknown command 'tftpboot' - try 'help' NAS>> tftpboot 0x800000 uImage-mtd1-dump Using egiga0 device TFTP from server 192.168.11.149; our IP address is 192.168.11.150 Filename 'uImage-mtd1-dump'. Load address: 0x800000 Loading: ################################################################# ################################################################# ################################################################# ... ################################################################# ######################################## done Bytes transferred = 4194304 (400000 hex) NAS>> nand erase 0x100000 0x400000 NAND erase: device 0 offset 0x100000, size 0x400000 Erasing at 0x4e0000 -- 100% complete. OK NAS>> nand write.e 0x800000 0x100000 0x400000 NAND write: device 0 offset 0x100000, size 0x400000 Writing data at 0x4ff800 -- 100% complete. 4194304 bytes written: OK NAS>> NAS>> tftpboot 0x800000 rootfs-mtd2-dump Unknown command 'NAS>>' - try 'help' NAS>> tftpboot 0x800000 rootfs-mtd2-dump Using egiga0 device TFTP from server 192.168.11.149; our IP address is 192.168.11.150 Filename 'rootfs-mtd2-dump'. Load address: 0x800000 Loading: ################################################################# ################################################################# ################################################################# ... ################################################################# ###################################################### 32 MB reveived # done Bytes transferred = 33554432 (2000000 hex) NAS>> nand erase 0x500000 0x02000000 NAND erase: device 0 offset 0x500000, size 0x2000000 Erasing at 0x24e0000 -- 100% complete. OK NAS>> nand write.e 0x800000 0x500000 0x02000000 NAND write: device 0 offset 0x500000, size 0x2000000 Writing data at 0x24ff800 -- 100% complete. 33554432 bytes written: OK NAS>> reset -- NAS EXPLORER -- _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** QSI BOARD: NAS-PLUG LE U-Boot 1.1.4 (Jun 10 2010 - 08:28:13) Marvell version: 3.4.27 QSI NAS version: 1.0.4 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00 Soc: 88F6281 A1 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 128MB DRAM Total size 128MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:256 MB Flash: 0 kB CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME] Hit any key to stop autoboot: 0 NAND read: device 0 offset 0x100000, size 0x300000 Reading data from 0x3ff800 -- 100% complete. 3145728 bytes read: OK ## Booting image at 00800000 ... Image Name: Linux-2.6.22.18 Created: 2010-10-19 23:05:02 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1979140 Bytes = 1.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK Starting kernel ... Uncompressing Linux............................................................................................................................ done, booting the kernel. [ 0.000000] Linux version 2.6.22.18 (bdietrich@buildman) (gcc version 4.2.1) #81 Tue Oct 19 16:05:00 PDT 2010 [ 0.000000] CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977 [ 0.000000] Machine: Feroceon-KW [ 0.000000] Using UBoot passing parameters structure [ 0.000000] Memory policy: ECC disabled, Data cache writeback [ 0.000000] CPU0: D VIVT write-back cache [ 0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets [ 0.000000] CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
nanddump -nof uboot.environment-for-pogoplugOS -s 0xa0000 -l 0x20000 /dev/mtd0
NAS>> set ipaddr 192.168.11.150 NAS>> set serverip 192.168.11.149 NAS>> tftpboot 0x800000 uboot.environment-for-pogoplugOS Using egiga0 device TFTP from server 192.168.11.149; our IP address is 192.168.11.150 Filename 'uboot.environment-for-pogoplugOS'. Load address: 0x800000 Loading: ########################## done Bytes transferred = 131072 (20000 hex) NAS>> nand erase 0xa0000 0x20000 NAND erase: device 0 offset 0xa0000, size 0x20000 Erasing at 0xa0000 -- 100% complete. OK NAS>> nand write.e 0x800000 0xa0000 0x20000 NAND write: device 0 offset 0xa0000, size 0x20000 Writing data at 0xbf800 -- 100% complete. 131072 bytes written: OK
set bootargs_root 'root=/dev/mtdblock2 ro' set ethaddr '00:10:75:xx:xx:xx' set cesvcid XATV5KXME93F7TKTWN95xxxxxx set ceserialno NA1Yxxxx set ceboardver 'DISCOVERY:0.1' set bootcmd 'nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000' saveenv
Re: Restore MTD backup via serial May 07, 2012 05:10AM |
Registered: 12 years ago Posts: 33 |
Re: Restore MTD backup via serial May 07, 2012 07:02AM |
Registered: 12 years ago Posts: 501 |
Re: Restore MTD backup via serial May 07, 2012 12:25PM |
Registered: 12 years ago Posts: 33 |
CE>> reset U-Boot 1.1.4 Cloud Engines 1.1.2 (3.4.22) SATA PHYADDR=0 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 00691750 Soc: 88F6281 A1 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 128MB DRAM Total size 128MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:256 MB Flash: 0 kB CPU : Marvell Feroceon (Rev 1) CLOUD ENGINES BOARD: DISCOVERY:0.1 Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME] Hit any key to stop autoboot: 0 NAND read: device 0 offset 0x100000, size 0x300000 Reading data from 0x3ff800 -- 100% complete. 3145728 bytes read: OK ## Booting image at 00800000 ... Bad Magic Number CE>>
Re: Restore MTD backup via serial May 07, 2012 04:32PM |
Registered: 12 years ago Posts: 501 |
-sh-3.2# cat rcS #! /bin/sh mount -t proc none /proc mount -t sysfs none /sys mount -t devpts none /dev/pts mount -t tmpfs none /tmp mount -t usbfs none /proc/bus/usb mkdir /tmp/var echo "/tmp/core_%e_%t" > /proc/sys/kernel/core_pattern hostname Pogoplug ifconfig lo 127.0.0.1 ifconfig eth0 169.254.37.133 udhcpc -b -H `hostname` #telnetd /etc/init.d/db #ntpd -g /etc/init.d/hbmgr.sh start #/bin/mount -a
-sh-3.2# cat db #!/bin/sh if [ ! -e /etc/dropbear/dropbear_rsa_host_key ]; then cat /proc/mounts | grep ' / ' | grep ro > /dev/null isro=$? if [ $isro == 0 ]; then mount / -o remount,rw,noatime fi mkdir -p /etc/dropbear /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key if [ $isro == 0 ]; then mount / -o remount,ro fi fi #/usr/sbin/dropbear
NAND read: device 0 offset 0x100000, size 0x300000 Reading data from 0x3ff800 -- 100% complete. 3145728 bytes read: OK ## Booting image at 00800000 ... Bad Magic NumberIt does sound like the uImage was clobbered. Yes, try reflashing just that section, uImage, which is mtd1, IIRC.