Welcome! Log In Create A New Profile

Advanced

Debian on NSA325 V1/V2

Posted by Buttzy10169 
Re: NSA 325 V2 Debian Is Possible!
October 08, 2016 03:35PM
Unknown532 Wrote:
-------------------------------------------------------
> How is it possible to boot back to stock? If I
> unplug the usb stick, the device stuck at "Bad
> magic number" like described at the guide, but I
> have read, that normally if there is no usb
> device, the NAS will boot to stock...
>
> Edit:
>
> I have tried it with "setenv bootcmd 'run
> to_stock', but the system is not booting with ##
> "Error: "bootcmd_stock" not defined"
>
> Any Ideas?

If you are still running stock u-boot then yes, it possible to boot into stock.

If you have installed the new u-boot then no, it won't boot into stock again (not yet). This is something on my TODO list, but low priority.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Kuki
Re: NSA 325 V2 Debian Is Possible!
February 07, 2017 07:23AM
Hi!

I'm not sure, in which of the existing threads I shall ask, but I'll try it here:

In the German Zyxel support forum there is a new "project" for booting Debian 8 from a USB pendrive. OMV is included: http://www.zyxelforum.de/debian-8-auf-usb-stick-oder-sd-karte-t11232.html

I tried it on the NSA325v2 but there is a problem with a too old kernel.

Now my questions:
1. Is it possible to update the kernel and still boot without issues into the standard firmware (4.81)?
2. Which kernel should I take (and from where) for the NSA325v2? The linked Kirkwood kernel?
Re: NSA 325 V2 Debian Is Possible!
February 07, 2017 05:35PM
Kuki,

There are 2 installation threads here:

Released kernel/rootfs: http://forum.doozan.com/read.php?2,12096
Released u-boot: http://forum.doozan.com/read.php?3,12381

It will not be possible to boot stock FW after installing new u-boot. At least not yet (I have not tried this, since it is low priority on my list).

> Which kernel should I take (and from where) for
> the NSA325v2? The linked Kirkwood kernel?

Take the kernel from the release thread above if you want to keep your rootfs and run with new kernel. If you just want to install new kernel, then it is best that you post the dmesg output from the existing Debian installation on your box, so I can be sure if it will work.

Take the rootfs from the release thread above if you can start from beginning. This is the best way. And also install new u-boot if you don't care about stock FW.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 16, 2017 02:29AM
how can I reset the U-boot env to default state?
Re: NSA 325 V2 Debian Is Possible!
May 16, 2017 04:33AM
lille,

> how can I reset the U-boot env to default state?

Of course you can. But I need to know what you have on this box.

1. If you have serial console,

- Post the entire serial boot log
- Log into stock OS or Debian and get the output of

cat /proc/mtd
fw_printenv


2. If you dont have serial console,

- Log into stock OS or Debian and get the output of

dmesg
cat /proc/mtd
fw_printenv

- Which u-boot do you have? stock or my released u-boot here: http://forum.doozan.com/read.php?3,12381 ?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 16, 2017 07:59AM
bodhi Wrote:
-------------------------------------------------------
> lille,
>
> > how can I reset the U-boot env to default state?
>
> Of course you can. But I need to know what you hav
> e on this box.
>
> 1. If you have serial console,
>
> - Post the entire serial boot log
> - Log into stock OS or Debian and get the output o
> f
>
>
> cat /proc/mtd
> fw_printenv
>

how can i manually load the kernel with u-boot? Kernel address is 0xc80000

Marvell>> printinfo
kernel_addr_1=0xc80000
kernel_mtd_1=5
sysimg_mtd_1=6
kernel_addr_2=0x4640000
kernel_mtd_2=7
sysimg_mtd_2=8
fwversion_1=V4.70(AALS.0)
revision_1=40851
modelid_1=AE03
core_checksum_1=c88aa66ac2623a6bd3875f894438bc83
zld_checksum_1=da3348df3a75f8035033c71337f7a3f9
romfile_checksum_1=37F2
img_checksum_1=4eeedf21ca3a24dcd066a35bd2a0d343
fwversion_2=V4.81(AALS.0)
revision_2=49602
modelid_2=AE03
core_checksum_2=4e9058c7b6905ec6320936363821ee74
zld_checksum_2=90ded3c13fd2863f3e7112fdc5bcaf4b
romfile_checksum_2=DBFE
img_checksum_2=01d015594fab4afb6710aa9a41c045e0
next_bootfrom=1
curr_bootfrom=1
change_boot_part=0


> - Which u-boot do you have? stock or my released u
> -boot here: http://forum.doozan.com/read.php?3,123
> 81 ?

stock:

Marvell>> version

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


Thanks!
Re: NSA 325 V2 Debian Is Possible!
May 16, 2017 11:42AM
Quote

1. If you have serial console,

- Post the entire serial boot log
- Log into stock OS or Debian and get the output of

cat /proc/mtd
fw_printenv


The entire bootlog means from the u-boot prompt until the failed boot.

Marvell>> boot

And seeing this entore serial boot log I will be able to see if you failed or succcessful booting to stock OS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 16, 2017 11:51PM
bodhi Wrote:
-------------------------------------------------------
>
Quote

1. If you have serial console,
>

>
>
> Marvell>> boot
>
>
> And seeing this entore serial boot log I will be a
> ble to see if you failed or succcessful booting to
> stock OS.

thank you for your support! here we go:

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 0x4640000.
Erasing Nand...Writing to Nand... done

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... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
Bad Magic Number
Re: NSA 325 V2 Debian Is Possible!
May 17, 2017 06:40AM
lille,

Power up, interrupt serial console and

printenv
boot

Please post the entire serial console log (meaning from u-boot banner till the end, where it fails to boot).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 17, 2017 07:13AM

__  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ 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 @ 533Mhz
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 0x4640000.

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
Marvell>> printenv
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_en                                                                                                                                                             v),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(r                                                                                                                                                             ootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
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
arcNumber=4495
bootargs_stock=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(ub                                                                                                                                                             oot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC                                                                                                                                                             0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootargs_linux=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(ub                                                                                                                                                             oot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC                                                                                                                                                             0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb res                                                                                                                                                             et; 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) $(kerne                                                                                                                                                             l_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
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x10                                                                                                                                                             0000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/m                                                                                                                                                             tdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x20                                                                                                                                                             00000;
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
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=0x4640000
pcieTune=no
pcieTune1=no

Environment size: 2494/131068 bytes
Marvell>> boot
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
Bad Magic Number
Marvell>>



Edited 3 time(s). Last edit at 05/17/2017 07:54AM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
May 17, 2017 07:55AM
The envs got cut off on the right side. Please repost.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 17, 2017 11:51PM
bodhi Wrote:
-------------------------------------------------------
> The envs got cut off on the right side. Please rep
> ost.

It is in my post above, it is only visible by scrolling horizontally within the frame.

For a better reading, and not to prolong this thread with never-ending logs, I have copied it for you here:

serial console log

have a look at the raw paste data at the bottom of that page, no scrolling needed over there.

Thanks!

----------------------------------------------EDIT ----------------------------------------------

I have now installed your Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on an USB-stick to boot this rootfs from there.

Unfortunately, this also is not booting because of the error msg you´ll find in the serial console log below:


__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ 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 @ 533Mhz
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 0x4640000.

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
.
.
...
......
............
.
........................
.
.........................
........................
.
.........................
.........................
.........................
........................
.
.........................
.........................
.........................
.........................

3154896 bytes read
.
.
...
......
............
.
........................
.
.........................
........................
.
.........................
.........................
.........................
........................
.
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
.........................
........

7179935 bytes read
## Booting image at 02000000 ...
Image Name: Linux-4.4.0-kirkwood-tld-1
Created: 2016-02-19 5:55:25 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3154832 Bytes = 3 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
Image Name: initramfs-4.4.0-kirkwood-tld-1
Created: 2016-02-19 7:33:04 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 7179871 Bytes = 6.8 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

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.


BTW, I am not willing to install your U-boot, because I want to boot to stock rootfs and your U-boot version doesn't allow this until today afaik.



Edited 7 time(s). Last edit at 05/19/2017 07:45AM by lille.
Re: NSA 325 V2 Debian Is Possible!
May 19, 2017 08:38AM
lille,

>
> BTW, I am not willing to install your U-boot, beca
> use I want to boot to stock rootfs and your U-boot
> version doesn't allow this until today afaik.

That's OK. No need to install new u-boot if you still want to boot stock.

This booting problem is simple. Your rootfs uImage needs to have the DTB appended to it (because you are booting with stock u-boot). Use the kirkwood-nsa325.dtb insteadt of kirkwood-goflexnet.dtb in the instruction quoted below.

Quote

4. Create uImage and uInitrd and setup for booting.

....

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD)

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd:
cd /boot
mv uImage uImage.orig
cp -a zImage-4.8.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.8.0-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.8.0-kirkwood-tld-1 -d initrd.img-4.8.0-kirkwood-tld-1 uInitrd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 19, 2017 08:49AM
bodhi Wrote:
-------------------------------------------------------
> lille,
>
> >
> > BTW, I am not willing to install your U-boot, be
> ca
> > use I want to boot to stock rootfs and your U-bo
> ot
> > version doesn't allow this until today afaik.
>
> That's OK. No need to install new u-boot if you st
> ill want to boot stock.
>
> This booting problem is simple. Your rootfs uImage
> needs to have the DTB appended to it (because you
> are booting with stock u-boot). Use the kirkwood-
> nsa325.dtb insteadt of kirkwood-goflexnet.dtb in t
> he instruction quoted below.
>
>
Quote

4. Create uImage and uInitrd and setup for
> booting.
>
> ....
>
> 4b. Boot with DTB file embedded in the kernel imag
> e (no U-Boot envs changes are needed if your syste
> m already booting on USB or HDD)
>
> Again, please replace kirkwood-goflexnet.dtb below
> with the correct DTB name for your box.
>
> Generate the uImage and uInitrd:
>
> cd /boot
> mv uImage uImage.orig
> cp -a zImage-4.8.0-kirkwood-tld-1  zImage.fdt
> cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
> mkimage -A arm -O linux -T kernel -C none -a 0x000
> 08000 -e 0x00008000 -n Linux-4.8.0-kirkwood-tld-1
> -d zImage.fdt  uImage
> mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00
> 000000 -e 0x00000000 -n initramfs-4.8.0-kirkwood-t
> ld-1 -d initrd.img-4.8.0-kirkwood-tld-1 uInitrd
> 

sorted this out already by reading the http://forum.doozan.com/read.php?2,12096 thread properly, sorry my fault.

but how to boot to stock rootfs when usb stick with your debian rootfs is not inserted?



Edited 2 time(s). Last edit at 05/19/2017 11:51PM by lille.
Re: NSA 325 V2 Debian Is Possible!
May 20, 2017 08:17AM
lille,

> sorted this out already by reading the http://foru
> m.doozan.com/read.php?2,12096 thread properly, sor
> ry my fault.

Cool!

>
> but how to boot to stock rootfs when usb stick wit
> h your debian rootfs is not inserted?

Interrupt serial console and

setenv bootcmd 'if run bootcmd_linux; then; else bootcmd_stock; fi; reset'
boot

Try 2 tests:

1. If it boots all the way into Debian successfully, and then
2. if it boots to stok successfully, when the stick is not inserted.

then you can come back to serial console and save it.

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



Edited 1 time(s). Last edit at 05/21/2017 01:58AM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
May 21, 2017 01:59AM
There was a typo and I've corrected it above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 01:55AM
bodhi Wrote:
-------------------------------------------------------
> There was a typo and I've corrected it above.

Thank you for your tremendous support!

First of all I had to set the environment variable 'enaMonExt' to 'yes' because if, then & else could not be interpreted

Marvell>> setenv bootcmd 'if run bootcmd_linux; then; else bootcmd_stock; fi; re set'
Marvell>> boot
Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
This command can be used only if enaMonExt is set!

The examination passed afterwards but the next issue arises

Marvell>> setenv enaMonExt yes
Marvell>> setenv bootcmd 'if run bootcmd_linux; then; else bootcmd_stock; fi; reset'
Marvell>> boot
Unknown command 'FSrun' - try 'help'
Unknown command 'FSrun' - try 'help'
Unknown command 'FSrun' - try 'help'
Usage:
fi - Find value in the memory.

So no, that didn´t help because FSrun command doesn´t work here on my machine with stock U-boot (U-Boot 1.1.4 (Jul 18 2013 - 10:47:29) Marvell version: 3.5.9).

Any further ideas?
.



Edited 1 time(s). Last edit at 05/22/2017 03:20AM by lille.
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 03:27AM
lille,

Interrupt serial console and

setenv bootcmd 'bootcmd_linux; bootcmd_stock; reset'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 04:32AM
bodhi Wrote:
-------------------------------------------------------
> lille,
>
> Interrupt serial console and
>
>
> setenv bootcmd 'bootcmd_linux; bootcmd_stock; rese
> t'
> boot
>

does also nothing

Hit any key to stop autoboot: 0
Marvell>> setenv bootcmd 'bootcmd_linux; bootcmd_stock; reset'
Marvell>> boot
Unknown command 'bootcmd_linux' - try 'help'
Unknown command 'bootcmd_stock' - try 'help'
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 05:34AM
lille,

Sorry that was a typo!

setenv bootcmd 'run bootcmd_linux; run bootcmd_stock; reset'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 05:41AM
bodhi Wrote:
-------------------------------------------------------
> lille,
>
> Sorry that was a typo!
>
>
> setenv bootcmd 'run bootcmd_linux; run bootcmd_sto
> ck; reset'
> boot
>

thanks, I´m too stupid to see this immediately ;)

now it tries to boot the kernel, but it stops, no ramfs is loaded afterwards

Marvell>> setenv bootcmd 'run bootcmd_linux; run bootcmd_stock; reset'
Marvell>> boot
(Re)start USB...
USB: scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
Bad Magic Number

NAND read: device 0 offset 0xc80000, size 0xa00000

Bad block at 0xc80000 in erase block from 0xc80000 will be skipped
Reading data from 0x169f800 -- 100% complete.
10485760 bytes read: OK
## Booting image at 02000000 ...
Image Name: Linux-2.6.31.8
Created: 2013-12-19 6:31:22 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5756136 Bytes = 5.5 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................................................................................................................................................................................................................................. done, booting the kernel.
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 07:48AM
lille,

Try the revised envs:

setenv bootcmd_stock 'setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)'
setenv bootcmd 'run bootcmd_linux; run bootcmd_stock; reset'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 08:15AM
bodhi Wrote:
-------------------------------------------------------
> lille,
>
> Try the revised envs:
>
>
> setenv bootcmd_stock 'setenv mainlineLinux no; set
> env bootargs $(bootargs_stock); nand read.e $(load
> addr) $(kernel_addr) 0xA00000; bootm $(loadadr)'
> setenv bootcmd 'run bootcmd_linux; run bootcmd_sto
> ck; reset'
> boot
>

still stopping after 'done, booting the kernel' with no usb stick inserted

Hit any key to stop autoboot: 0
Marvell>> setenv bootcmd_stock 'setenv mainlineLinux no; setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)'
Marvell>> setenv bootcmd 'run bootcmd_linux; run bootcmd_stock; reset'
Marvell>> boot
(Re)start USB...
USB: scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
Bad Magic Number

NAND read: device 0 offset 0xc80000, size 0xa00000

Bad block at 0xc80000 in erase block from 0xc80000 will be skipped
Reading data from 0x169f800 -- 100% complete.
10485760 bytes read: OK
## Booting image at 02000000 ...
Image Name: Linux-2.6.31.8
Created: 2013-12-19 6:31:22 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5756136 Bytes = 5.5 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................................................................................................................................................................................................................................. done, booting the kernel.



Edited 1 time(s). Last edit at 05/22/2017 08:17AM by lille.
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 08:44AM
lille,

Has this box booted stock OS successfully right before you've started to set envs to boot both Debian and stock? If true, do you have the serial boot log for stock?

If not, was this bad block shown since begining or only recently?

Bad block at 0xc80000 in erase block from 0xc80000 will be skipped

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 09:30AM
bodhi Wrote:
-------------------------------------------------------
> lille,
>
> Has this box booted stock OS successfully right be
> fore you've started to set envs to boot both Debia
> n and stock? If true, do you have the serial boot
> log for stock?
>
> If not, was this bad block shown since begining or
> only recently?
>
>
> Bad block at 0xc80000 in erase block from 0xc80000
> will be skipped
>

yes , it booted to stock OS already before I have started to change the envs. I can´t remember if the bad block error occured the first time I´ve used the serial console. what exactly shoud be there at 0xc80000?
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 10:22AM
lille,

Get a listing of envs in serial console

printenv

And post the output here, in code tags (it will get truncated if you dont use code tags).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 22, 2017 11:58PM
bodhi Wrote:
-------------------------------------------------------
> lille,
>
> Get a listing of envs in serial console
>
>
> printenv
>
>
> And post the output here, in code tags (it will ge
> t truncated if you dont use code tags).

bodhi,

you´ll find 2 text files attached to this post. one is called booting (with this environment variables it is booting to stock OS), the other is called not_booting. please do a comparison and find out what is going on here. thank you in advance.



Edited 1 time(s). Last edit at 05/23/2017 12:00AM by lille.
Attachments:
open | download - booting.txt (1.7 KB)
open | download - not_booting.txt (2.8 KB)
Re: NSA 325 V2 Debian Is Possible!
May 23, 2017 04:36AM
booting

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=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
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;
lcd0_enable=0
lcd0_params=640x480-16@60
disaMvPnp=no
ethaddr=00:50:43:xx:xx:xx
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
pcieTune1=no
ethact=egiga0

Environment size: 1565/131068 bytes
Marvell>>

Not booting

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
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
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
bootargs_linux=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=LABEL=rootfs loglevel=8
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
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion: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:xx:xx:xx
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
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=0x4640000
pcieTune=no
pcieTune1=no

Environment size: 2494/131068 bytes
Marvell>> boot
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
Bad Magic Number
Marvell>>

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 23, 2017 01:29PM
lille,

Power up, interrupt serial console and try executing the stock boot command right away. See if you can boot to stock.

run bootcmd_stock

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
May 26, 2017 03:53AM
Noted that no cpufreq folder is created unter /sys/devices/system/cpu/cpu0. Therefore the CPU-clock is 1,6GHz all time. I am using latest rootfs and kernel image.
cpufreq-info gives the following error:
analyzing CPU 0:
no or unknown cpufreq-driver active

What's happening? The kirkwood cpufreq-driver is not supported by the kernel?
Author:

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: