Quantcast
Viewing all articles
Browse latest Browse all 902

NSA325v2 uBoot messed up after upgrade (1 reply)

Hi guys,
at first: Thank you, especially Bodhi, for all the work you set into this project.

I have a NSA325v2 with UART-access. I' ve been using Debian 4.4 since february 2016. Last weekend my USB flash key is broken - no partitions, no block-device-access, no recognition via fdisk.

So I bought a new one and downloaded the debian-4.12.1-rootfs. There is only one partition and I formatted it to ext3 and labeled it "rootfs". Then I got root an expanded the tarball in this partition. I've checked /etc/fstab for the fs-type of the root-partition.

I could not boot into the new OS, therefore I tried to upgrade uBoot from stock to 2017.07.

I followed the instructions in this thread https://forum.doozan.com/read.php?3,12381, but I am not sure, if I missed some point.

  • I backed up the env and mtd0, but in an overhasty act I destroyed the backup on the flash key.
  • I checked for bad blocks, but there were none.
  • I erased /mtd0 and wrote the uboot.2017.07-tld-1-nsa325.mtd0.kwb to /mtd0. The output was as expected.
  • I think, I might have skipped flashing the default u-boot envs.

I've put the uEnv.txt-file in the /boot-folder and when I start the NAS and can get to the "NSA325>" prompt.

When I try to autoboot to Debian I get stuck either at
"Uncompressing Linux... done, booting the kernel."
when I build the uImage with
cp -a zImage-4.12.1-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt  uImage

or at
Error: unrecognized/unsupported machine ID (r1 = 0x0000118f).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
when I use the original image file without embedded dtb file.

I've double checked, but "machid" is neither set in uEnv.txt nor in "setenv".


Screen of my NAS with skipped autoboot:
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
NSA325>

This is the environment:
arcNumber=4495
baudrate=115200
bootargs=$(bootargs_linux)
bootargs_0000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)=root=LABEL=rootfs loglevel=8
bootargs_inux=consol=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0A00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
bootargs_linux=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) earlyprintk=serial
bootargs_stock=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=echo Booting Linux... ; run bootcmd_linux; echo booting from NAND... ; run bootcmd_stock; reset
bootcmd_largs=)
bootcmd_linux=setenv mainlineLinux yes; setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-nsa325.dtb; ext2load usb 0:1 0x800000  /boot/uImage; ext2load usb 0:1 0x02100000 /boot/uInitrd; bootm 0x800000 0x02100000
bootcmd_lnv=bootargs $(bootargs_linux)
bootcmd_ls=$(bootargs_linux)
bootcmd_stock=setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=3
devices=usb ide
disks=0 1 2 3 4 5 6 7
ethact=egiga0
ethaddr=00:50:43:00:02:02
fileaddr=1100000
filesize=6e8f80
ipaddr=192.168.1.5
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-nsa325.dtb
load_init=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
loadaddr=0x02000000
mainlineLinux=yes
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)
serverip=192.168.152.24
stderr=serial
stdin=serial
stdout=serial
to_linux=setenv mainlineLinux yes; setenv bootcmd \\'run bootcmd_linux\\'; saveenv; reset
to_stock=setenv mainlineLinux no; setenv bootcmd \\'run bootcmd_stock\\'; saveenv; reset
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts init=/bin/systemd


My OS on the PC is openSUSE, so at the moment I can't use kwboot to rebuild the uBoot-Environment at the moment. (Yes, I've already tried that...).

Can anybody tell me, what I've missed or what I can do to get this box up and running again?


-andy-

Viewing all articles
Browse latest Browse all 902

Trending Articles