Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

U-Boot Kirkwood - NSA310 - nandump segfault (no replies)

$
0
0
Hi,

I am trying to flash a Zyxel NSA310 that is branded as a "TDC HomeDisk" (Denmark).

I uart-booted a new uboot and tried out the first commands if the 2017.07 U-Boot Kirkwood-Thread.

/mnt/testmount/tools # cat /etc/fw_env.config 
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd1		0x0000		0x20000		0x20000			4

The guide says this line should be different (mtd0 instead of mtd0), can I continue with this?

The partitions are different, but according to the guide this is to be expected of NSA3xx devices:

/mnt/testmount/tools # cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

But what's an immediate showstopper was this segfault I got while running nandump from my USB stick.

/mnt/testmount/tools # ./nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0Segmentation fault


This is from the boot of the original uboot:

20:37:30.619 ->         |  \/  | __ _ _ ____   _____| | |
20:37:30.619 ->         | |\/| |/ _` | '__\ \ / / _ \ | |
20:37:30.619 ->         | |  | | (_| | |   \ V /  __/ | |
20:37:30.619 ->         |_|  |_|\__,_|_|    \_/ \___|_|_|
20:37:30.619 ->  _   _     ____              _
20:37:30.619 -> | | | |   | __ )  ___   ___ | |_ 
20:37:30.619 -> | | | |___|  _ \ / _ \ / _ \| __| 
20:37:30.619 -> | |_| |___| |_) | (_) | (_) | |_ 
20:37:30.619 ->  \___/    |____/ \___/ \___/ \__| 
20:37:30.619 ->  ** MARVELL BOARD: RD-88F6281A LE 
20:37:30.619 -> 
20:37:30.619 -> U-Boot 1.1.4 (Feb 22 2011 - 10:31:35) Marvell version: 3.4.19
20:37:30.619 -> 
20:37:30.619 -> U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0
20:37:30.685 -> 
20:37:30.685 -> Soc: 88F6281 A1 (DDR2)
20:37:30.685 -> CPU running @ 1200Mhz L2 running @ 400Mhz
20:37:30.685 -> SysClock = 400Mhz , TClock = 200Mhz 
20:37:30.685 -> 
20:37:30.685 -> DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
20:37:30.685 -> DRAM CS[0] base 0x00000000   size 256MB 
20:37:30.685 -> DRAM Total size 256MB  16bit width
20:37:30.685 -> Addresses 10M - 0M are saved for the U-Boot usage.
20:37:30.685 -> Mem malloc Initialization (10M - 7M): Done
20:37:30.738 -> NAND:128 MB
20:37:31.781 -> Flash:  0 kB
20:37:31.814 -> 
20:37:31.814 -> CPU : Marvell Feroceon (Rev 1)
20:37:32.379 -> Kernel address is 0xc80000.
20:37:32.379 -> 
20:37:32.379 -> Streaming disabled 
20:37:32.379 -> Write allocate disabled
20:37:32.379 -> 
20:37:32.379 -> Module 0 is RGMII
20:37:32.379 -> Module 1 is TDM
20:37:32.379 -> 
20:37:32.379 -> USB 0: host mode
20:37:32.911 -> PEX 0: PCI Express Root Complex Interface
20:37:32.911 -> PEX interface detected Link X1
20:37:32.944 -> Net:   egiga0, egiga1 [PRIME]
20:37:32.977 -> Hit any key to stop autoboot:  2 ??? 1 ??? 0 
20:37:34.969 -> 
20:37:34.969 -> NAND read: device 0 offset 0xc80000, size 0xa00000
20:37:35.002 -> 
20:37:35.002 -> 
Reading data from 0xc80000 --   0% complete.
[...]
Reading data from 0x167f800 -- 100% complete.
20:37:41.976 ->  10485760 bytes read: OK
20:37:41.976 -> ## Booting image at 02000000 ...
20:37:41.976 ->    Image Name:   Linux-2.6.22.18
20:37:41.976 ->    Created:      2011-02-22   3:33:51 UTC
20:37:41.976 ->    Image Type:   ARM Linux Kernel Image (uncompressed)
20:37:41.976 ->    Data Size:    5701144 Bytes =  5.4 MB
20:37:41.976 ->    Load Address: 00008000
20:37:41.976 ->    Entry Point:  00008000
20:37:41.976 ->    Verifying Checksum ... OK
20:37:43.304 -> OK
20:37:43.304 -> 
20:37:43.304 -> Starting kernel ...


Can I flash this box at all?

All internal partitions are mounted as ro, is that normal? I couldn't copy the tools folder to the internal disk to ditch the USB-drive:

/mnt/testmount/tools # mount
rootfs on / type rootfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/mtdblock6 on /zyxel/mnt/nand type yaffs2 (ro)
/dev/sda1 on /zyxel/mnt/sysdisk type ext3 (ro,data=ordered)
/dev/loop0 on /ram_bin type ext2 (ro)
/dev/loop0 on /usr type ext2 (ro)
/dev/loop0 on /lib/security type ext2 (ro)
/dev/loop0 on /lib/modules type ext2 (ro)
/dev/ram0 on /tmp/tmpfs type tmpfs (rw)
/dev/ram0 on /usr/local/etc type tmpfs (rw)
/dev/ram0 on /usr/local/var type tmpfs (rw)
/dev/mtdblock4 on /etc/zyxel type yaffs2 (rw)
/dev/md0 on /i-data/3c7e9e7c type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Musik type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Billeder type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Videoer type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Dokumenter type xfs (rw,usrquota,nouuid)
/dev/md0 on /usr/local/apache/web_framework/data/cache type xfs (rw,usrquota,nouuid)
/dev/mtdblock4 on /usr/local/apache/web_framework/data/config type yaffs2 (rw)
/dev/md0 on /usr/local/zy-pkgs type xfs (rw,usrquota,nouuid)
/dev/md0 on /etc/zyxel/zy-pkgs type xfs (rw,usrquota,nouuid)
/dev/md0 on /usr/local/apache/htdocs/zyxel/pkg type xfs (rw,usrquota,nouuid)
/dev/sdb1 on /mnt/testmount type ext3 (rw,data=ordered)
/mnt/testmount/tools #

I am happy about any help! Thanks!

Viewing all articles
Browse latest Browse all 3247

Trending Articles