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

Having trouble with an NSA310S, freezing after loading kernel (no replies)

$
0
0
Hey folks,

First, just wanted to say, thanks to everyone who put all this effort into Debian-ising these devices, some fantastic resources here!

I have a ZyXEL NSA310S. I'm fed up with its limitations and want to completely replace the OS with Debian. I'm an experienced Linux user and live behind a bash prompt so I'm not scared :)

I have a USB-TTL adapter hooked up to the serial header and an Ubuntu computer available. I've followed bodhi's instructions in this thread: https://forum.doozan.com/read.php?2,12096 for 5.2.9. I have functioning USB and can load the necessary files into memory. However, when I try to bootm, u-boot freezes after attempting to start the kernel:

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

And I then have to hard-reset the device. It does this with both bodhi's 5.2.9 kernel and my attempt to debootstrap Debian Buster on 4.19. The U-Boot commands I'm using are:

usb start
setenv bootargs console=ttyS0,115200 root=/dev/sda1 usb-storage.delay_use=0 rootdelay=1 rw
ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-nsa310s.dtb
ext2load usb 0:1 0x1100000 /boot/uInitrd
ext2load usb 0:1 0x800000 /boot/uImage
bootm 0x800000 0x1100000 0x1c00000

The NSA was running the latest available firmware (4.75) before I started this. U-Boot version is
U-Boot 1.1.4 (May 28 2013 - 16:07:08) Marvell version: 3.6.0
. I investigated updating the version of U-Boot based on https://forum.doozan.com/read.php?3,12381 where I noticed the step to check for bad blocks:

/ # dmesg | grep -i bad
Scanning device for bad blocks
Bad eraseblock 452 at 0x000003880000
Bad eraseblock 504 at 0x000003f00000

I'm not sure if this is in the first 1M but it seems significant. Other data pertaining to my NAS:

/ # 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

/ # 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"

Marvell>> printenv
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=
/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AD03
PRODUCT_NAME=STG-315
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=28:28:5D:1F:2D:42
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
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=dev[0]:fxs,dev[1]:fxo
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
image_multi=yes
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
ethact=egiga0

Can anyone point me in the right direction please? Many thanks.

Viewing all articles
Browse latest Browse all 3247

Trending Articles