General NAS-Central Forums

Welcome to the NAS community
It is currently Sun Sep 24, 2017 8:37 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sat Mar 16, 2013 2:44 pm 
Offline

Joined: Wed Dec 19, 2012 11:46 am
Posts: 39
Hello,

I have successfuly modified peeter123 patches for Linux 3.8:

https://github.com/peeter123/NSA310-320-debian

but when I try to boot the new kernel, I have:

Code:
3278280 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-3.8.1
   Created:      2013-03-02  23:10:14 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3278216 Bytes =  3.1 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000d0b).
                                                             
Available machine support:
                         
ID (hex)        NAME
ffffffff        Marvell Kirkwood (Flattened Device Tree)
                                                       
Please check your kernel config and/or bootloader.


Any tips what do I miss?

Here is the patch I have created: http://lzap.fedorapeople.org/patches/ns ... .8.1.patch

The question is if we need this patch, it looks like NSA310 support is there, including LED diods. The patch now only holdds CPUFREQ capabilities. Does ARM need cpufreq scaling at all?

I am trying to build 3.8.3 vanilla now. Maybe we don't need patches anymore.


Top
 Profile  
 
PostPosted: Mon Mar 18, 2013 9:37 am 
Offline

Joined: Wed Dec 19, 2012 11:46 am
Posts: 39
And here is the resolution: http://lukas.zapletalovi.com/2013/03/bo ... a-310.html

Unfortunately this does not work yet for me:

- LED diods
- console on UART

I think there is already LED support in the mainline kernel, but it does not work for me (they are all green).

For the console, I had to modify some kernel configuration parameter or something. I do have this commandline which was working with peeter123 pathes, but not anymore:

setenv bootargs 'console=ttyS0,115200 root=/dev/sda3 zcache'


Top
 Profile  
 
PostPosted: Mon Mar 18, 2013 12:21 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
lzap wrote:
Unfortunately this does not work yet for me:

- console on UART
AFAIK the Kirkwood has 2 serial ports. Maybe they got swapped. You could try a 'console=ttyS1,115200' in the command line.


Top
 Profile  
 
PostPosted: Mon Mar 18, 2013 12:51 pm 
Offline

Joined: Wed Dec 19, 2012 11:46 am
Posts: 39
Nope, did not help :-( What can I be missing? I think I do have everything in this kernel. Strange.

Also I noticed when I do "poweroff" it does not go down.


Top
 Profile  
 
PostPosted: Mon Mar 18, 2013 3:35 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
lzap wrote:
- LED diods
Quote:
Also I noticed when I do "poweroff" it does not go down.
I suppose that is related. Some gpio pin has to be set on powerdown to tell the NAS hardware to switch off.


Top
 Profile  
 
PostPosted: Mon Apr 08, 2013 12:33 pm 
Offline

Joined: Fri Apr 05, 2013 9:42 pm
Posts: 6
I did some investigation ;-)
Code:
root@kirkwood-NSA310:~# stty -F /dev/ttyS0
stty: /dev/ttyS0: Input/output error
root@kirkwood-NSA310:~# stty -F /dev/ttyS1
stty: /dev/ttyS1: Input/output error

It looks like the uart isn't initialized. I tried to modify kernel's source to old (non flattened device tree) way, but no success yet :(
I think, gpio is the same problem.

For lzap: budeme pokracovat tady, vic hlav vic vi :) Radek


Top
 Profile  
 
PostPosted: Mon Apr 08, 2013 2:52 pm 
Offline

Joined: Wed Dec 19, 2012 11:46 am
Posts: 39
The best idea would be linux-arm list if you think you found an issue. For myself, I have a resigned a bit on the 3.8 kernel because I was not able to get f2fs running so far and I am happy with 3.6. Feel free to ping here as well if you have any news about that - interested and appreciated.


Top
 Profile  
 
PostPosted: Mon Apr 08, 2013 9:42 pm 
Offline

Joined: Fri Apr 05, 2013 9:42 pm
Posts: 6
I got a little finding about console dysfunction.

Dmesg says:
Code:
...
Warning: unable to open an initial console.
Waiting 10 sec before mounting root device.
...


And kernel's source /init/main.c says:
Code:
/* Open the /dev/console on the rootfs, this should never fail */
   if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
      printk(KERN_WARNING "Warning: unable to open an initial console.\n");


It looks like there is no rootfs mounted when it's trying to open console ...


Top
 Profile  
 
PostPosted: Thu Jul 25, 2013 7:08 am 
Offline

Joined: Fri Aug 31, 2012 9:46 pm
Posts: 25
Any success so far? How much output did you have on serial Console?
More than:
Code:
Uncompressing Linux... done, booting the kernel.


Top
 Profile  
 
PostPosted: Thu Jul 25, 2013 4:44 pm 
Offline

Joined: Fri Aug 31, 2012 9:46 pm
Posts: 25
Thx for the info, FDT works and I am able to boot 3.10.2 Kernel:
kernel: Machine: Marvell Kirkwood (Flattened Device Tree), model: ZyXEL NSA310
Network is working.
Serial, GPIO, USB do not work:
kernel: USB Power Off: Failed to request enable GPIO21: -517
kernel: reg-fixed-voltage 1.regulator: Failed to register regulator: -517
Serial is recognized but output is not initialized:
kernel: Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
Missing ttyS0 like in patched linux-3.5 kernel for example:
kernel: serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A

Seems like something is wrong with the kirkwood-nsa310.dts file where GPIO and Serial are defined for FDT.


Top
 Profile  
 
PostPosted: Sun Jul 28, 2013 4:08 pm 
Offline

Joined: Fri Aug 31, 2012 9:46 pm
Posts: 25
Ok, I have serial, USB and Sensors working now only LED and GPIO are not working yet.
I had to start over with
Code:
make kirkwood_defconfig

Then LM85 and Realtek Network r8169 had to be re enabled.
Additionally I had to modify arch/arm/boot/dts/kirkwood-nsa310.dts which made sensors and fancontrol work.
adt7476 has to be replaced with lm85.
Code:
i2c@11000 {
         status = "okay";

         lm85: lm85@2e {
            compatible = "lm85";
            reg = <0x2e>;
         };
      };

What helped me was this post and the follow ups on the linux-arm-kernel list


Top
 Profile  
 
PostPosted: Wed Nov 13, 2013 11:15 am 
Offline

Joined: Wed Dec 19, 2012 11:46 am
Posts: 39
Hey DesertF0x,

please share how did you manage the console to get working please. I gave up, but next week I would like to give latest kernel a try.

Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider], MrDini, Yahoo [Bot] and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group