Welcome! Log In Create A New Profile

Advanced

Debian on NSA325 V1/V2

Posted by Buttzy10169 
Re: NSA 325 V2 Debian Is Possible!
September 05, 2014 03:31PM
@Davide,

Quote

As I understood from your reply to sigma, new Uboot has different location for its env and won't touch the stock one.
But, since it's new uboot, I may as well create a new more powerful environment (scripting), correct?

Also, did you include EFI partition support?

Yes, it has all the good stuff: EFI, Hush shell scripting, boot with Ext4, >2TB HDD … I mentioned the env location because when you boot with UART, the first time in, you might want to cut/paste the envs from your current settings and then saveenv, to save time on the subsequence UART bootings (don't have to retype them).

Quote

root@debian:~/nas/uboot/u-boot-2014.01/tools# ./kwboot -b ~/nas/nsa325/uboot-t1/uboot.2013.10-tld-1.nsa325.mtd0.kwb -p -t /dev/ttyS1 -B 115200

You should use the smaller uart version from the tarball re-uploaded here. The mtd0 version is 384K and it will have problem loading completely.

uboot.2013.10-tld-1.nsa325.uart.kwb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 05, 2014 03:47PM
bodhi Wrote:
-------------------------------------------------------

> You should use the smaller
> uart version from the tarball re-uploaded here. > The mtd0 version is 384K and it will have problem loading completely.
>
>
> uboot.2013.10-tld-1.nsa325.uart.kwb
>

45%, but no farther.
What I've noticed, though, is that I have to use "-p" switch even with uart image, otherwise it blocks at 0% with
"xmodem: Bad message"

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 05, 2014 04:19PM
davidedg

> 45%, but no farther.

This sounds to me that your serial connection is probably not full speed?

> What I've noticed, though, is that I have to use
> "-p" switch even with uart image, otherwise it
> blocks at 0% with
> "xmodem: Bad message"

True, because it is also NAND version, not UART built version. This is small enough to boot with UART. For flashing to NAND, it must be multiple of 128k so the mtd0 version is exactly the same as for uart-booting version, with padding to 384k. I know, I should have named it differently :)

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



Edited 1 time(s). Last edit at 09/05/2014 04:21PM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
September 05, 2014 05:53PM
bodhi Wrote:
-------------------------------------------------------
> This sounds to me that your serial connection is
> probably not full speed?

Virtualization ruined it :D
Worked at first shot now on native Linux Mint (with pl2303 usb serial adapter).
I did not understand until some minutes ago that the watchdog is actually still there UNTIL new u-boot has done booting.

Tomorrow I'll do some serious tests, happen to have my main disk in GPT partitioning.

Has the code been release on github yet? Is there a chance that eventually will be merged with upstream u-boot?

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 05, 2014 06:08PM
davidedg,

> Virtualization ruined it :D

:)

> Worked at first shot now on native Linux Mint
> (with pl2303 usb serial adapter).

Awesome.

> I did not understand until some minutes ago that
> the watchdog is actually still there UNTIL new
> u-boot has done booting.

To be precise, we shut it down at at the 1st second when U-Boot starts (when HW devices are detected), if we coded it after the countdown then it is too late for Uart booting. However, the NAND version is instantly run, so that always work (if UART image loading takes too long then the watchdog would timed out before u-boot can start running).

> Has the code been release on github yet? Is there
> a chance that eventually will be merged with
> upstream u-boot?

WarheadsSE is the developer for NSAxxx in our effort, so it depends when he can update his GitHub. My GitHub is just sharing the works and I can update it any time. But Arch Linux ARM's goal is to mainstream their packages, so I'd say there is a good chance this pariticular version will be mainstreamed.

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



Edited 3 time(s). Last edit at 09/05/2014 06:52PM by bodhi.
Re: NSA 325 V2 Debian Is Possible!
September 05, 2014 06:16PM
@DavideDG,

I've been looking at your NSA325 mod page: https://github.com/davidedg/NAS-NSA325-mod/ and I really like a lot of what you've done.

In particular:
https://github.com/davidedg/NAS-DNS325-mod/blob/master/rootfs-initramfs/rootfs-nand.txt#L268

So do you use EseKeyD to control the buttons currently?

Quote

## Set up EseKeyD to control NAS buttons

sed --in-place -e 's/^START_ESEKEYD=false/START_ESEKEYD=true/' $RFSnand/etc/default/esekeyd

cat <<END > $RFSnand/etc/esekeyd.conf
POWER:/sbin/shutdown -h now
RESTART:/sbin/halt -f -p
EJECTCD:/usr/local/sbin/button-usbcopy
END

This seems to be better than using acpid.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 06, 2014 09:16AM
bodhi Wrote:
-------------------------------------------------------
> I've been looking at your NSA325 mod page:
> https://github.com/davidedg/NAS-NSA325-mod/ and I really like a lot of what you've done.
>
> In particular:
> https://github.com/davidedg/NAS-DNS325-mod/blob/master/rootfs-initramfs/rootfs-nand.txt#L268

actually this is for my former nas (dlink dns325), but much of the work is shared among all my 3 nas mods.

> So do you use EseKeyD to control the buttons
> currently?

Yes, last time I tried acpid it was with dlink, but I remember it was awfully slow.

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 06, 2014 11:09AM
After booting uboot with UART, I'm trying to boot my kernel image.

after usb reset, I try:

ext2load usb 0:1 ${uInitramfsAddr} /boot/uInitramfs


I answers back:

3155024 bytes read in 550 ms (5.5 MiB/s)
## Error inserting "filesize" variable, errno=12


Then, same thing for initramfs (it reads file, but barks on filesize variable)

Trying to boot:
bootm 0x02000000 0x01100000

## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-3.14.3+mach+bt+vga
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3154960 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   NSA-325-v2-Initramfs
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    632222 Bytes = 617.4 KiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Error inserting "fdtaddr" variable, errno=12
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.


It then just stays there, with POWER LED in AMBER.

EDIT: I tried also with your latest kernel (vmlinuz-3.16.0-kirkwood-tld-2), same results.


Any clues?

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod



Edited 1 time(s). Last edit at 09/06/2014 11:44AM by davidedg.
Re: NSA 325 V2 Debian Is Possible!
September 06, 2014 12:26PM
Don't know exactly what I've done... but now it works!
It seems there was something wrong with "$(" variable calling.
Stock u-boot allowed to call smth like:
bootm $(loadaddr) $(uInitramfsAddr)'

and I used it almost everywhere.
New Uboot seems to not always like it - I just removed the parenthesis.

I also thought that the "arcNumber=4495" was the culprit, but then set it back and kept working.

I can boot my old 3.14 kernel with no problems, via USB or even loading it from EFI (GPT partitioning, used gdisk) HDD (both ext2 and ext4).

I feel kinda safe now to write it to NAND... but that's a task for tomorrow :D
Any special instructions on this?

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 06, 2014 04:33PM
davidedg,

> It seems there was something wrong with "$("
> variable calling.
> New Uboot seems to not always like it - I just
> removed the parenthesis.

Yes, I forgot to mention this! new u-boot has hush shell scripting. And the parentheses style, iirc, was deprecated.

> I can boot my old 3.14 kernel with no problems,
> via USB or even loading it from EFI (GPT
> partitioning, used gdisk) HDD (both ext2 and
> ext4).

Awesome!

> I feel kinda safe now to write it to NAND... but
> that's a task for tomorrow :D
> Any special instructions on this?

I'll update the upload post to include flashing instruction. It is quite simple just like in the u-boot thread.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 06, 2014 05:45PM
I've updated the instruction in the NSA325 u-boot upload post.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 07, 2014 08:08AM
Flashed to nand and booted without problems.
Now working on better environment to take advantage of scripting.

Do you know what is the minumum env ? I mean, do I still need all stuff like:


CONTRY_TYPE=FF
FEATURE_BIT=00
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
VENDOR_NAME=MitraStar Technology Corp.
disL2Cache=no
disL2Prefetch=yes
disaMvPnp=no
enaAutoRecovery=yes
enaCpuStream=no
enaDCPref=yes
enaICPref=yes
enaMonExt=no
enaWrAllo=no

etc etc... ?

Or can I reset env to default and build from there?

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 07, 2014 03:09PM
davidedg Wrote:
-------------------------------------------------------
> Do you know what is the minumum env ?
> Or can I reset env to default and build from there?

Ok I'm having success with this (minimal) environment, hope I did not leave out too much ;P

https://github.com/davidedg/NAS-NSA325-mod/blob/master/uboot/upstream_u-boot.txt

A big thanks to WarheadsSE and Bodhi for the new U-Boot version ^_^

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 07, 2014 04:02PM
@davidedg,

Excellent :) thanks for testing.

So the remaining tests we need to see before we can declare victory are:

1. bootz
2. Large HDD >2TB

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 18, 2014 10:47AM
I received my NSA325 and have been trying to uart load bodhi's uboot.2013.10-tld-1.nsa325.uart.kwb to test it out.
I did get it to load twice but have been unsuccessful since (over 30 to 40 attempts).
Every time it fails it fails on the 97% line just near the end. I've tried to uart boot with and without a hard drive in case that might have an impact but no change.
I'm suspicious that my NSA325 has a slightly shorter watchdog and that makes it VERY frustrating to be so close.
You sound like the testing is almost completed and I have a 4TB drive that I can use to test but I might just flash the nand version and update to the real release after I test 4TB booting.
What tests do you want done on a 4TB drive? Partition with fdisk and gdisk and a hybrid gdisk? Anything else?

Herb
Re: NSA 325 V2 Debian Is Possible!
September 18, 2014 11:12AM
Hi Herb,

Did you time the UART loading? on mine it's 30 seconds. The test we need is internal SATA, GPT larger than 2 TB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 18, 2014 12:05PM
command line:
time ./kwboot -t -B 115200 /dev/ttyUSB0 -b ./uboot.2013.10-tld-1.nsa325.uart.kwb -p

result:
real 0m32.111s
user 0m0.076s
sys 0m0.270s

bodhi, you say you've been using the nand version. Are there any problems???
I'll flash it to nand but I'm backing up my 4TB drive (less than 599GB used) before I try this.
I'll post when I get done.

Herb
Re: NSA 325 V2 Debian Is Possible!
September 18, 2014 03:36PM
herb Wrote:
-------------------------------------------------------
> command line:
> time ./kwboot -t -B 115200 /dev/ttyUSB0 -b
> ./uboot.2013.10-tld-1.nsa325.uart.kwb -p
>
> result:
> real 0m32.111s
> user 0m0.076s
> sys 0m0.270s
>
> bodhi, you say you've been using the nand version.
> Are there any problems???
> I'll flash it to nand but I'm backing up my 4TB
> drive (less than 599GB used) before I try this.
> I'll post when I get done.
>
> Herb

Interesting time it took on your box. Mine took about 20s to load ( I meant the watchdog should fire periodically at 30s). Are you sure you ran the correct version? Note that I've updated the tarball once.

Nand version is solid. No problem whatsoever.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 18, 2014 04:45PM
bodhi Wrote:

> Interesting time it took on your box. Mine took about 20s to load

Herb, what serial adapter are you using?
Going obvious... did you set it to 115200 bauds? What is the size of the file you're trying to boot? What version of kwboot you're using?

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 19, 2014 07:07PM
bodhi consider the 4TB a full success!
I pulled the drive from my NSA320 and stuffed it in the NSA325 and it simoly came up no problems;-)

Herb
Re: NSA 325 V2 Debian Is Possible!
September 19, 2014 08:18PM
herb Wrote:
-------------------------------------------------------
> bodhi consider the 4TB a full success!
> I pulled the drive from my NSA320 and stuffed it
> in the NSA325 and it simoly came up no
> problems;-)
>
> Herb

Cool! thanks for testing. That's the last checkmark. I am adding the uEnv loading capability, and we'll be done.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 20, 2014 04:05PM
I'm using: Bus 005 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
I specified the port speed on the command line.
The uart boot was:
312 -rw-r--r-- 1 herbr herbr 312828 Aug 29 22:12 uboot.2013.10-tld-1.nsa325.uart.kwb
The version of kwboot is unlnown. I cannot see any version info anywhere!

Herb
Re: NSA 325 V2 Debian Is Possible!
September 20, 2014 06:33PM
herb,

Try this test version, it is a little bit smaller:
http://forum.doozan.com/read.php?2,14351,17193#msg-17193

If it works then save it as a rescue mechanism.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 20, 2014 07:52PM
herb,

> The version of kwboot is unlnown. I cannot see any
> version info anywhere!

It is in the mainline u-boot, so it takes the u-boot version implicitly. If you've downloaded my uploaded kwboot binary then it's ARM, circa sometime 2013 (check the timestamp).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA 325 V2 Debian Is Possible!
September 21, 2014 04:47AM
herb Wrote:
-------------------------------------------------------
> I'm using: Bus 005 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

It's the very same I'm using.

> The version of kwboot is unlnown. I cannot see any version info anywhere!

I'm using the one from mailine U-boot 2014.01, self compiled for x86 with sourcery codebench codesourcery 2013.05.23, though I hardly think it changes anything.

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: NSA 325 V2 Debian Is Possible!
September 21, 2014 04:06PM
Herb & Davidedg,

I agree with Davide, kwboot would not really affect the serial speed. The speed varies due to the condition or hardware, though. I've noticed that sometime it took different time to load the UART image on my box. The last time I looked at the stopwatch, it took 28 seconds to load (could be 27 seconds, since I used the phone's stopwatch).

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



Edited 1 time(s). Last edit at 09/21/2014 05:29PM by bodhi.
sunfire
Re: NSA 325 V2 Debian Is Possible!
September 22, 2014 11:14AM
Hi,

has some the same problem?

After set up the power button for shutdown on my
Zyxel NSA325 with kernel 3.16, i have the following problem:

[FAIL] Loading ACPI kernel modules... failed!
[....] Starting ACPI services...RTNETLINK1
answers: No such file or directory
acpid: error talking to the kernel via netlink

And my second problem:

Wake on Lan is not working.

ethtool said:

        Supports Wake-on: g
        Wake-on: g

Green lights flashing at the lan port, but it won't wake up.


-sunfire
Re: NSA 325 V2 Debian Is Possible!
September 22, 2014 11:20AM
Re: NSA 325 V2 Debian Is Possible!
September 22, 2014 11:57AM
I actually use esekeyd for my buttons, and my own kernel config; but I tried anyway stopping esekeyd and installing acpid and it does the same error.
I tried running an strace -f , but could not grasp any usable info.

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
sunfire
Re: NSA 325 V2 Debian Is Possible!
September 22, 2014 06:33PM
I found the problem.

In /etc/default/acpi it want to load a module "button", but it is not there / can not be loaded?
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: