Welcome! Log In Create A New Profile

Advanced

NSA325V2 - Installation of Debian-4.4.0-kirkwood-tld-1-rootfs fails

Posted by haarwurm 
NSA325V2 - Installation of Debian-4.4.0-kirkwood-tld-1-rootfs fails
November 27, 2016 01:55AM
Hello everyone,

this is my third thread in order to update my NSA325v2 - it seems, I've no luck with this box... :/

Anyways, I'm trying to install Debian 4.4.0 rootfs, in order to be able to install the newest U-Boot - seeNSA325V2 u-boot installation - Problem with permission denied.

In order to install Debian 4.4.0 rootfs, i've followed the instructions on http://forum.doozan.com/read.php?2,12096, starting from "Updated 20 Feb 2016:".

I've done the following steps:
1. Format a new USB drive with a single Ext3 partition, and label it rootfs. In addition, I've set the bootflag for this partition.
cd /media/sdb1 
tar -xjf Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
Adjust fstab. ext2 -> ext3
Generate the uImage with DTB embedded inside: 
cd /media/sdb1/boot
cp -a zImage-4.4.0-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.4.0-kirkwood-tld-1 -d zImage.fdt  uImage
sync
Done. Take this USB rootfs to your plug and cold start.
My NAS isn't booting. The bootlog is:
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Jul 18 2013 - 10:47:29) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 800Mhz
SysClock = 533Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 8 tRAS = 24 tRCD=8
DRAM CS[0] base 0x00000000   size 512MB
DRAM Total size 512MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0xc80000.

Streaming disabled
Write allocate disabled


USB 0: host mode
        [BlueDBG] reseting SoC Pex[0]  0 ...
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
        [BlueDBG] reseting SoC Pex[1]  0 ...
        [BlueDBG] reseting SoC Pex[1]  1 ...
        [BlueDBG] reseting SoC Pex[1]  2 ...
        [BlueDBG] reseting SoC Pex[1]  3 ...
        [BlueDBG] reseting SoC Pex[1]  4 ...
        [BlueDBG] reseting SoC Pex[1]  5 ...
        [BlueDBG] reseting SoC Pex[1]  6 ...
        [BlueDBG] reseting SoC Pex[1]  7 ...
        [BlueDBG] reseting SoC Pex[1]  8 ...
        [BlueDBG] reseting SoC Pex[1]  9 ...
        [BlueDBG] reseting SoC Pex[1]  10 ...
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found

** Unable to read "/uImage" from usb 0:1 **

** Unable to read "/uInitrd" from usb 0:1 **
## Booting image at 02000000 ...
Bad Magic Number
Marvell>>
The USB card is located in the left rear USB slot, when seen from behind. I've adjusted the boot envs as bescribed here, but no luck
Marvell>> printenv
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=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
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;
lcd0_enable=0
lcd0_params=640x480-16@60
ethaddr=00:50:43:00:02:02
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
ethact=egiga0
arcNumber=4495
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_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /uImage; ext2load usb 0:1 0x01100000 /uInitrd; bootm $(loadaddr) 0x01100000
bootcmd_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset
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)=root=LABEL=rootfs loglevel=8
bootargs_linux=console=ttyS0,115200 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) root=LABEL=rootfs loglevel=8
bootcmd='run bootcmd_linux'
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
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
disaMvPnp=no
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
pcieTune1=no
bootargs=console=ttyS0,115200 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) root=LABEL=rootfs loglevel=8
I've searched a lot in this forum and google, desperately tried some suggestions, but as stated at the begin of this thread, no luck for me.
Re: NSA325V2 - Installation of Debian-4.4.0-kirkwood-tld-1-rootfs fails
November 27, 2016 02:48AM
haarwurm,

2 things.

1. This step should be done with the NSA325v2 DTB

Wrong command:
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt

This is the correct command:
cat dts/kirkwood-nsa325.dtb >> zImage.fdt


2. Since you are booting with stock u-boot, and a new Debian rootfs, the envs must be adjusted.

Wrong command:
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /uImage; ext2load usb 0:1 0x01100000 /uInitrd; bootm $(loadaddr) 0x01100000

Correct command:
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 11/27/2016 02:56AM by bodhi.
Re: NSA325V2 - Installation of Debian-4.4.0-kirkwood-tld-1-rootfs fails
November 27, 2016 03:37AM
bodhi, are you ever sleeping? Again, you answered my question almost instantly, thank you - and by the way, thank you for your indispensable work.

Concerning the DTS part, I used the nsa325 file, but forgot to alter the pasted text, sorry.

The correct envs did the trick, my NSA325v2 is booting! :)
Now I'll try to update the U-Boot, I'm curious, what happens now...
Re: NSA325V2 - Installation of Debian-4.4.0-kirkwood-tld-1-rootfs fails
November 27, 2016 04:05AM
haarwurm Wrote:
-------------------------------------------------------
> bodhi, are you ever sleeping? Again, you answered
> my question almost instantly, thank you - and by
> the way, thank you for your indispensable work.
>
> Concerning the DTS part, I used the nsa325 file,
> but forgot to alter the pasted text, sorry.
>
> The correct envs did the trick, my NSA325v2 is
> booting! :)
> Now I'll try to update the U-Boot, I'm curious,
> what happens now...

It's bed time now actually, I was surfing and just squeezed in 5 minutes to write that post :))

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325V2 - Installation of Debian-4.4.0-kirkwood-tld-1-rootfs fails
November 29, 2016 03:41AM
For further reference, since I needed some attempts, to find the correct syntax: The working command is:

setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /boot/uImage; ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm $(loadaddr) 0x01100000'

Furthermore, I had to set :
setenv 'bootargs=console=ttyS0,115200 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) root=LABEL=rootfs loglevel=8'

After this, I issued a "run to_linux" and the system saved the configuration booted as expected.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: