Welcome! Log In Create A New Profile

Advanced

NSA 325 V2 Debian Is Possible!

Posted by Buttzy10169 
Re: NSA 325 V2 Debian Is Possible!
June 12, 2014 08:39AM
IIRC, it is automatic in the MCU controlling it.
desigabri
Re: NSA 325 V2 Debian Is Possible!
June 16, 2014 02:50PM
SPuntte Wrote:
-------------------------------------------------------
> @kao
>
> I guess I know your situation pretty well. I was
> also rather skeptical of my skills and getting all
> this to work; just check my first post on page
> 4... And to be honest, the information in this
> thread is anything but easily accessible. In the
> this post, I'll try to outline the steps to get
> NSA325v2 to run Debian. In the end it's not as
> complicated as it first looks :)
>
> DISCLAIMER - I already did this to
> my NSA325v2 a while ago so I couldn't confirm
> whether the procedure works as a "fresh install".
> However, I tried to recall everything I had
> problems with and cover them as well I could.
> Furthermore, I am by no means an expert with these
> things so I take no responsibility if you manage
> to break something due to an error in this
> "guide".
>
> If anyone spots any errors in my post, please
> point it out so I can fix it, thanks :)
>
>
...
...
...
>
> *** As someone pointed out earlier, the USB3 port
> in the front panel won't work.


Thank you too much for this guide and for all the work made by the other users.

I saved it to a pdf to have it next to me when I'll try to set up Debian on my NSA325v2
kao
Re: NSA 325 V2 Debian Is Possible!
July 25, 2014 10:12AM
Hello all,
my NSA325v2 is running Debian for more than a week now, and it is really really great! :) So, I'd like to say big "Thank you!" to all of you who made this possible, especially - bodhi for the files and SPuntte for the wonderful tutorial.

Here are few notes of what can go wrong in the process, as I painfully learned myself..

#1 - if you're using 3+TB disks, you won't be able to boot Debian from them. Apparently it's an issue with the stock U-Boot in NSA325v2. It probably could be resolved by using custom U-Boot, but for me it was not worth the hassle. Stick to booting from USB.
#2 - U-Boot is *really* picky about USB sticks. None of the sticks I had at home worked, so I bought SanDisk Cruzer Fit as suggested in this thread. It worked, but not right away - I had to add rootdelay=10 parameter in the usb_key_func.sh.2. Rootdelay workaround is mentioned somewhere in this thread but wasn't immediately obvious.
#3 - cheap chinese USB-TTL converters are, well, cheap.. They also have a tendency to die in the most inconvenient moment - for me it was a moment when NAS was stuck in a reboot loop. Either buy 2 of them, or use Arduino or CA42 cable, they seem to be much more solid.
#4 - when making serial cable, remember that "RX and TX need to be *cross-connected* with each other". It makes total sense, yet I overlooked it and spent a good hour scratching my head.

Thanks again everyone!
kao.
Re: NSA 325 V2 Debian Is Possible!
July 30, 2014 10:11AM
At first - hey you all
Second - Ya i´m an idiot :D

I have tried to figure out, how this works and wanted to give it a try. I saw that i had to backup my /boot, so i looked it up using Telnet - but could not find it. Thought, maybe i have to boot in U-boot and find it there. Made a FAT32 USB stick as described and booted it up. It just made alot of stuff og rebooted... and made the same stuff and rebooted... thought, Let it work the night and it will be finish tomorrow - but no, it was still working and I pulled the plug, so i could try something else <-- now that was a bad idea... now it seems impossible to work with it. It shows this via UART:

------- BEGIN -------

__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ 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 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
** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
Bad Magic Number
Marvell>>

------- END -------

Here it freezes. I can´t type anything.

Anyone that have any idea if it is possible to get it to work - With or without debian. Or is the best solution to pull out hard-drive and expand my PC with an extra disk? :D

EDIT: Forgot to mention: I used this on the bootup: usb-debian-uboot.tar.gz (1.2 KB)



Edited 3 time(s). Last edit at 07/30/2014 02:22PM by hansenfiks.
Re: NSA 325 V2 Debian Is Possible!
July 30, 2014 07:46PM
Recreate your USB rootfs as described in this thread:
http://forum.doozan.com/read.php?2,12096

Boot with it and post the log if you can't.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
July 31, 2014 01:12PM
bad Flash-drive caused problem... I changed it to a new one and it worked... same configuration as i have been trying last 2-3 days ... doohhh

I´m in and connected

just still can´t use keyboard on U-Boot :/

Edit: Got everything working this morning. Works like a charm :)



Edited 3 time(s). Last edit at 08/01/2014 01:42AM by hansenfiks.
Attachments:
open | download - nsa325v2usb.txt (22.7 KB)
dfarning
Re: NSA 325 V2 Debian Is Possible!
August 04, 2014 03:53AM
I think that there needs to be an entry in /etc/fstab to point from the boot partition to the /boot/ directory in the rootfs partition.

This will enable apt-get to find and modify the kernel from which the system boots.
dfarning
Re: NSA 325 V2 Debian Is Possible!
August 04, 2014 01:57PM
Hey all,

I just wanted to let you know that I created a beginner focused Debian on NSA325 at http://zyxel.nas-central.org/w/index.php?title=Debian_on_325 . There is a lot of great information in this thread... but as a first time NSA325 hacker I kept getting bogged down in technical issues.
Re: NSA 325 V2 Debian Is Possible!
August 05, 2014 06:56PM
dfarning Wrote:
-------------------------------------------------------
> I think that there needs to be an entry in
> /etc/fstab to point from the boot partition to the
> /boot/ directory in the rootfs partition.
>
> This will enable apt-get to find and modify the
> kernel from which the system boots.

Good point! The typical installation is just a single partition but here I think the convention was 2 partitions.

FWIW, I did a manual installation and have only a single partition on USB.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 06, 2014 01:16PM
I just wish I had a way to perma-disable that watchdog clock... Would be so nice to be able to have time kwboot the 325
dfarning
Re: NSA 325 V2 Debian Is Possible!
August 06, 2014 02:13PM
Do you remember if that partition was ext4?

If I understand the situation. The boot partition needs to be ext2 or ext3 because uboot can't access ext4 file systems. Once the kernel is running it can access the root filesystem on the ext4 partition.

I'll test a one partition setup later this evening to see if anything has changed in uboot. It would reduce the number of step for a new user to upgrade their NSA325 to Debian.
Re: NSA 325 V2 Debian Is Possible!
August 06, 2014 02:22PM
WarheadsSE,

> I just wish I had a way to perma-disable that
> watchdog clock... Would be so nice to be able to
> have time kwboot the 325

Yeah, I got UART to load to 99% and it craps out. I've dowloaded the stock U-Boot source and looking at it to see if they have a way. I can't compile it yet (trying to change the make file to compile natively and it would not work, the make files are a mess!).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 06, 2014 02:24PM
@dfarning,

Use Ext3 and it should work (Ext4 not supported).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 07, 2014 07:22AM
@bodhi

Oh, I know.

The problem is almost that you need to load just barely enough to execute and turn off the watchdog, then somehow load the rest of the actual uboot. Absolutely despise their methodology.
Re: NSA 325 V2 Debian Is Possible!
August 07, 2014 01:49PM
@WarheadsSE,

So right you are! Upon reboot, I did get to completion with your new U-Boot and it froze when it started. Cold boot never got to 99%. Perhaps we need to whack the watchdog immediately in main.c?

I also extracted stock U-Boot from mtd0 and UART it succesfully (so it seems to run smoothly). But it works only when we reboot, not cold boot.

However, I can't verify that extracted image was the one running, because NAND and the UART'ed image are the same one :) So my conclusion is it is possible, but we will need to recompile stock to display a different banner to be absolutely sure.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 08/07/2014 01:52PM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
August 07, 2014 06:36PM
I did add the code to the new u-boot for whacking the watchdog didn't I? Hmm, now that I think of it, I might have to wedge in that damned PHY init code as well. And thats where "whacking it immediately" won't help. Since you have to have a lot of stuff popped in there, and I will not be polluting main.c like that.

I am not a manufacturer, and I like Linus NOT yelling at me for shit code.
Re: NSA 325 V2 Debian Is Possible!
August 07, 2014 07:19PM
> I am not a manufacturer, and I like Linus NOT
> yelling at me for shit code.

LOL!

Yeah, I think if we can at least Uart stock UBoot then we can flash yours to mtd0 and test it that way without the watchdog barking. I've searched the GPL tarball and did not find any documentation about ideas how to turn off the watchdog.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 08, 2014 03:52AM
@WarheadsSE,

Looking at your GitHub:

Shouldn't it be 6282?
#define CONFIG_KW88F6281	1	/* SOC Name */

And I don't see kw88f6282.h in here either ?!
-rw-r--r--  1 root root  1560 Mar 12 14:34 spi.h
-rw-r--r--  1 root root 15202 Mar 12 14:34 mpp.h
-rw-r--r--  1 root root   573 Mar 12 14:34 kw88f6281.h
-rw-r--r--  1 root root   538 Mar 12 14:34 kw88f6192.h
-rw-r--r--  1 root root  2428 Mar 12 14:34 kirkwood.h
-rw-r--r--  1 root root  1587 Mar 12 14:34 gpio.h
-rw-r--r--  1 root root  3515 Mar 12 14:34 cpu.h
-rw-r--r--  1 root root  3991 Mar 12 14:34 config.h


Puzzle. Am I looking at the correct version?

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 08/08/2014 04:27AM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
August 08, 2014 11:50AM
Technically, it is a 88F6283 according to Marvell, when in this 1.6Ghz variant. However, it is KW/6281 compatible for that.

Quote

model name : Feroceon 88FR131 rev 1 (v5l)

The way you have to turn off the watchdog is by turning the PHY up in the right way, (put LED2 into tristate, high) and then flip it the bird. In that order. This is all basically in my patch for the kernel adding the NSA325 (see https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/linux-kirkwood/archlinuxarm.patch#L3473)
Re: NSA 325 V2 Debian Is Possible!
August 08, 2014 02:08PM
Thanks WarheadsSE!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 10, 2014 07:15PM
Re: NSA 325 V2 Debian Is Possible!
August 12, 2014 03:42PM
@Peter,

This is in continuing with the NSA325 booting problem starting at this post in the 3.16 kernel thread.

Quote

The corrupted FS - guess where it does come from: the watchdog resets the nsa35 just right after the sda2 has been mounted!

Anyway:
I set bootdelay to 1 .
I fsck'ed sda2.

I cold rebooted, watchdog strikes again !

At which line in the kernellog.txt can we see that the watchdog is beeing disabled ?

Is it this line ?:
[ 18.189428] nsa3xx-hwmon nsa3xx-hwmon: initialized

Cheers,
Peter

Not really. Watchdog is turned off when the NSA325 is initialized, which is where WarheadsSE has code implemented. To see it we'll have to add an announcement printf there.

I would suggest to use only 1 partition for rootfs and a swap file in it. That way you can get it mounted quicker.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 13, 2014 06:46AM
Okey, the problem seems to be the command "ide reset" which takes a very long time to initialize the HDD.

Right now the system boots off USB stick and continues booting rootfs from HDD.

But I know: if the system is cold-started and there is reason to fsck a disk, then watchdog will be activated and the boot loop begins until I fsck manually.

So the only solution is a UBoot which disables the watchdog by his own. After this stage all devices are allowed to take as long time as they need.

May I ask what the problem is to create a working uboot ? Wouldn't it be possible to turn off watchdog by proper "mw.l" commands ? ;)
Re: NSA 325 V2 Debian Is Possible!
August 13, 2014 07:47AM
In theory, that may be possible. But it will be horribly complex.

Why?

- Interrupt the PHY init
- Initialize LED2 as trimode
- Bring up the PHY
- Bring up the GPIO
- Trip the GPIO.

The first four steps have already occurred by the time mw.l commands would be able to be executed.
Re: NSA 325 V2 Debian Is Possible!
August 13, 2014 01:49PM
@Warhead,

I've posted my further test result in the u-boot kirkwood thread.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 08/13/2014 03:01PM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
August 13, 2014 05:00PM
Quote

> So the only solution is a UBoot which disables the
> watchdog by his own. After this stage all devices
> are allowed to take as long time as they need.

We are working on it in the U-Boot Kirkwood thread. Hopefully the watchdog will be whacked early on in U-Boot!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 15, 2014 03:24PM
See here about the NSA325 watchdog:
http://forum.doozan.com/read.php?3,14697,17166#msg-17166

Once we got GitHub updated, I'll make a build from that version and release in the U-Boot thread. Atm, the testing build for UART booting is availabe if anybody is anxious to run it.

Note: it should be executed without the -p option.

kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2013.10-tld-1-test.nsa325.uart.kwb

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 08/15/2014 03:33PM by bodhi.
Attachments:
open | download - uboot.2013.10-tld-1-test.nsa325.uart.kwb (295.3 KB)
Re: NSA 325 V2 Debian Is Possible!
August 22, 2014 11:50AM
Need some help...

This has nothing to do with Debian, but problem came, after i dropped using Debian.

I made the run to_stock and NSA booted as it should. BUT... After playing around with the Debian trick, it is not possible to use Transmission, and it loads 100% CPU almost evertime I use it or any other program. Even if i copy anything it uses 100% CPU. RAM use is almost nothing. Temperature is about 35°C.

When I launch transmission and want to download anything, it runs for 1-2 min. and then it die. Theres nothing to see on the box itself, but web-interface, and all other services die... including network LAN shares.

Have tried to use the Reset button on the back on the NSA and let it beep twice, for a full reset. + reformatted both hard-drives.

Have tried to only install Transmission and have disabled twonkey.

Have included a file, with documentations from Putty, when it failes.

Hope for some help, cause i´m all lost here.
Attachments:
open | download - fail.txt (2.4 KB)
Re: NSA 325 V2 Debian Is Possible!
August 22, 2014 03:12PM
Please post the full output of these commands:
dmesg
free -a

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA 325 V2 Debian Is Possible!
August 22, 2014 11:06PM
bodhi Wrote:
-------------------------------------------------------
> Please post the full output of these commands:
>
> dmesg
> free -a
>

have included a *txt with output.

Edit: Seems like a faulty drive in my Raid0 setup... Maby i´m wrong. Will try later, to use a USB pendrive as destination for Transmission...



Edited 1 time(s). Last edit at 08/23/2014 01:08AM by hansenfiks.
Attachments:
open | download - dmesg.txt (15.6 KB)
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: