Welcome! Log In Create A New Profile

Advanced

Linux Kernel 6.7.5 Kirkwood package and Debian rootfs

Posted by bodhi 
I'm setting up a nsa310 atm (not a 310s),
stock uboot, with kernel/rootfs version 3.17 (wheezy, need this for OpenMediaVault),
I see that sensor module lm85 is loaded but I cannot get any reading about temp nor RPM and the fan spins at max speed.

Any idea?
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 12, 2015 04:13AM
bobafetthotmail Wrote:
-------------------------------------------------------
> I'm setting up a nsa310 atm (not a 310s),
> stock uboot, with kernel/rootfs version 3.17
> (wheezy, need this for OpenMediaVault),
> I see that sensor module lm85 is loaded but I
> cannot get any reading about temp nor RPM and the
> fan spins at max speed.
>
> Any idea?

Do you have lm_sensors installed and sensord is running?

ATM, the NSA320 hwmon module is not working (since the time we transitioned to FDT).. If the NSA310 uses the same one then it is the problem (but I'm not sure whether it uses that).

Let me check the DTS.

Update:

It does look different. I'll have to look into 3.16 source.

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



Edited 1 time(s). Last edit at 08/12/2015 04:18AM by bodhi.
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 12, 2015 04:28AM
bobafetthotmail,

Looks like it has the same MCU controls and use the same nsa3xx-hwmon.c module. So you are out of luck right now. To use it, you'll have to go back to kernel linux-3.16.0-kirkwood-tld-3.

pbg4 is working on this topic on his NSA320.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
thanks for checking :)

I don't know if I'm reading this correctly http://forum.doozan.com/read.php?2,16532,22608#msg-22608

but does that mean I can use a script to control the fan by sending GPIO signals?

I'm probably going to try.

Also, if pbg4 makes a patch I'm available for testing on the nsa310 (if needed at all).

Sadly I'm little more than a tinkerer, I know too little of actual programming to be of any assistence.
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 12, 2015 11:40AM
Bodhi, I've updated one of my NSA320's to the latest u-boot 2014.7 and that's good.
I then installed 3.18.5 filesystem (including the kernel) and try the ususl apt-get update and I get the error as seen in the attached file.
Ever seen this before?? I haven't.

Herb
Attachments:
open | download - apt-get-fail-3.18.5-txt (2 KB)
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 12, 2015 02:53PM
bobafetthotmail,

> but does that mean I can use a script to control
> the fan by sending GPIO signals?
>
> I'm probably going to try.

Yes, pls try. It should work to activate the MCU with GPIO pins.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 12, 2015 03:19PM
herbr Wrote:
-------------------------------------------------------
> Bodhi, I've updated one of my NSA320's to the
> latest u-boot 2014.7 and that's good.
> I then installed 3.18.5 filesystem (including the
> kernel) and try the ususl apt-get update and I get
> the error as seen in the attached file.
> Ever seen this before?? I haven't.
>
> Herb

Hi Herb,

No I haven't either. I think your dpkg database probably hosed from the look of these errors. If this rootfs is new, then just recreate from scratch. Or you could try to clean it first and try apt-get update again.
apt-get clean
dpkg --clear-avail
rm /var/lib/apt/lists/* --force
dpkg --configure -a

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 12, 2015 05:08PM
Thanks Bodhi.
Unfortunately that didn't help I got the same error.

How do I recreate it from scratch?

Herb
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 12, 2015 05:44PM
herbr Wrote:
-------------------------------------------------------
> Thanks Bodhi.
> Unfortunately that didn't help I got the same
> error.
>
> How do I recreate it from scratch?
>
> Herb

Download the tarball Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi.tar.bz2, extract it to an empty USB or HDD drive following the instruction (format it as a single Ext3 partition, label it as rootfs,...)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> bobafetthotmail,
>
> > but does that mean I can use a script to
> control
> > the fan by sending GPIO signals?
> >
> > I'm probably going to try.
>
> Yes, pls try. It should work to activate the MCU
> with GPIO pins.

I tried but the last command (write 0 to GPIO 14 fails).
No sensors work afterwards.

I went looking at the source of the driver that is talking with GPIO to see what should have been done to get some data out of the MCU, but I'm unable to read some parts of the code (probably because I'm not a developer).
This is it https://github.com/peeter123/NSA310-320-debian/blob/master/3.4.3/arch/arm/mach-kirkwood/mcu.c

It is clearly working with the GPIO pins I'm working with, but I don't understand what it is doing to read them.

It writes 1 to GPIO 16, it reads GPIO 14 somehow (can't understand what it is doing), it writes 1 again to GPIO 16.

For 32 times, then it does something I don't understand again to the data before spitting it out.

Any clues on what it is happening there?
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 14, 2015 03:08PM
Hi,

the kirkwood soc gpios 16,17 (i.e. act and clk) direction are set as output, gpio 14 (i.e. data) as input, than in
mcu_status_read_fn the inner loop simply clocks out the data on the falling edge, i.e.1/0
transitions of the clock signal and writes the content bitwise in mcu_data, 16 bit temp, 8 bit rpss
and 8 bit magic number,

the mcu sits outside the kirkwood soc, so output direction means feeding a signal into the mcu
via gpio, input means reading back something via gpio,..

setting the directions can be done in a script in rc.local, the rest in another script,
but if the clk signal is timing sensitive this will fail,

best is perhaps to wait until I have some time to finish the work on the transition of nsa3xx-hwmon.c
to device tree on the next weekends, most is done for a patch, to get this mainline will be more work but
one of the linux devs offered me his assistance,

best wishes pbg4
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 19, 2015 01:41PM
Hi bodhi,

the final testing of my conversion of nsa3xx-hwmon.c to devicetree structures just has finished,
it is working now, the debugging went faster because one of the linux arm kernel devs kindly helped me
in the debugging phase, it is tested now for NSA320,

root@debian-jessie:/usr/src/linux-4.1.0# sensors
nsa3xx-isa-0000
Adapter: ISA adapter
Chassis Fan:        4800 RPM
System Temperature:  +43.6°C

and sysfs looks a little bit different because of the new of_node

root@debian-jessie:/sys/devices/platform/nsa3xx-hwmon# ll
insgesamt 0
drwxr-xr-x  4 root root    0 Aug 19 18:34 .
drwxr-xr-x 17 root root    0 Aug 19 18:34 ..
lrwxrwxrwx  1 root root    0 Aug 19 18:34 driver -> ../../../bus/platform/drivers/nsa3xx-hwmon
-rw-r--r--  1 root root 4096 Aug 19 18:34 driver_override
-r--r--r--  1 root root 4096 Aug 19 18:34 fan1_input
-r--r--r--  1 root root 4096 Aug 19 18:34 fan1_label
drwxr-xr-x  3 root root    0 Aug 19 18:34 hwmon
-r--r--r--  1 root root 4096 Aug 19 18:34 modalias
-r--r--r--  1 root root 4096 Aug 19 18:34 name
lrwxrwxrwx  1 root root    0 Aug 19 18:34 of_node -> ../../../firmware/devicetree/base/nsa3xx-hwmon
drwxr-xr-x  2 root root    0 Aug 19 18:34 power
lrwxrwxrwx  1 root root    0 Aug 19 18:34 subsystem -> ../../../bus/platform
-r--r--r--  1 root root 4096 Aug 19 18:34 temp1_input
-r--r--r--  1 root root 4096 Aug 19 18:34 temp1_label
-rw-r--r--  1 root root 4096 Aug 19 18:34 uevent

and in /proc/device-tree there is a new nsa3xx-hwmon entry

root@debian-jessie:/proc/device-tree/nsa3xx-hwmon# ll
insgesamt 0
drwxr-xr-x  2 root root  0 Aug 19 18:33 .
drwxr-xr-x 13 root root  0 Aug 19 18:33 ..
-r--r--r--  1 root root 12 Aug 19 19:18 act-gpios
-r--r--r--  1 root root 12 Aug 19 19:18 clk-gpios
-r--r--r--  1 root root 17 Aug 19 19:18 compatible
-r--r--r--  1 root root 12 Aug 19 19:18 data-gpios
-r--r--r--  1 root root 13 Aug 19 19:18 name
-r--r--r--  1 root root 12 Aug 19 19:18 pinctrl-0
-r--r--r--  1 root root  8 Aug 19 19:18 pinctrl-names

with compatible = "zyxel,nsa320-mcu"

my plan is to send you the patches for the next kernel release with debug printouts included,
so when testing in doozan forum for NSA310 than with CONFIG_HWMON_DEBUG_CHIP = y in the kernel
config some printouts would be generated for debugging purposes, i.e.

[ 1615.809435] data-gpios value id 0x0e!
[ 1615.809459] clk-gpios value id 0x10!
[ 1615.809472] act-gpios value id 0x11!
[ 1615.809729] nsa3xx-hwmon nsa3xx-hwmon: initialized

when the driver is loaded the gpio numbers are printed in hex, and for each sensors call

[ 1620.327976] nsa3xx-hwmon nsa3xx-hwmon: Reading MCU data
[ 1620.328002] nsa3xx-hwmon nsa3xx-hwmon: gpio set value MCU act pin 0
[ 1620.439730] nsa3xx-hwmon nsa3xx-hwmon: gpio set value MCU act pin 1
[ 1620.439749] channel value 0x01!
[ 1620.440609] channel value 0x00!
[ 1620.440814] channel value 0x00!

the phase of reading MCU data between the act pin 0/1 change is printed out, for later kernel
releases when everything is tested these printouts can get deactivated with
CONFIG_HWMON_DEBUG_CHIP as "is not set" in the config,

best wishes pbg4
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 19, 2015 03:27PM
@pbg4,

Fantastic! please send the patches through email. Mainline kernel 4.2 is probably going to be released the end of this month. And my plan is for the week following that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 19, 2015 07:41PM
That is great! I am looking forward to controlling the temperature on my NSA320!

Paul



Edited 1 time(s). Last edit at 08/20/2015 09:05AM by z3bram3n.
Cool. My nsa 310 is ready for testing, just give me the link with the testing kernel.
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 20, 2015 05:48AM
bobafetthotmail Wrote:
-------------------------------------------------------
> Cool. My nsa 310 is ready for testing, just give
> me the link with the testing kernel.

And check out the new u-boot too:
http://forum.doozan.com/read.php?3,23407

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 21, 2015 11:46AM
Hi,

the patches for the DT port of nsa3xx-hwmon are out per email to bodhi,
as this was tested on my NSA320 successfully, just a hint,

when looking through the sources I have found that at least three versions of NSA310 must be around,

an older one with a pcf8563 realtime clock at i2c adress 0x51 which has an mcu
and should be able to use nsa3xx-hwmon driver, this one very similar to NSA320,

than there are two other devices with DT descriptions in kirkwood-nsa310.dts and kirkwood-nsa310a.dts
which have both i2c attached sensor chips, one with an adi,adt7476 and the other a national,lm85
both at adress 0x2e, the latter does not have the red USB Led, that is the only difference, these two
will not work with nsa3xx-hwmon, only the old version which was a clone of the NSA320 in design,

so before anybody starts testing with nsa3xx-hwmon driver on NSA310 first check which variant you
have, with i2detect -l or i2cdetect -y 0 if there is something at adress 0x2e,

best wishes pbg4
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 21, 2015 01:15PM
pbg4,

Thanks! will try it shortly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hello Guys
I have problems with nsa 325 v2.
I did everything, step by step on the solution but stil have problems , i dont have any more patient for that ..
I try to start linux from USB storage formated to ext2 but i have that information in console :

U-Boot 2014.07-tld-3 (Mar 06 2015 - 21:30:53)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_??
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     63              15728577        100615b5-01     83 Boot
loading envs from usb 0 ...
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
2931288 bytes read in 599 ms (4.7 MiB/s)
6535284 bytes read in 934 ms (6.7 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.0.0-kirkwood-tld-1
   Created:      2015-08-21  19:28:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2931224 Bytes = 2.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.0.0-kirkwood-tld-1
   Created:      2015-08-21  19:31:12 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6535220 Bytes = 6.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x118f from environment

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.

Printenv:
MODEL_ID=4495
arcNumber=4495
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; usb stop; run bootcmd_sata; reset
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=b6:d0:5e:0f:a1:17
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=118f
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=nand_mtd:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot=setenv stderr serial; setenv stdin serial; setenv stdout serial; setenv baudrate 115200; setenv console ttyS0,115200; setenv bootdelay 10
rootdelay=10
rootfstype=ext2
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1

Environment size: 2248/131068 bytes


I trying change kernel from 3.18 to new one but without succesful

Maybe some of You Guys can help me ?

Best Regards!



Edited 1 time(s). Last edit at 08/21/2015 03:21PM by hawryszka.
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 21, 2015 03:07PM
hawryszka Wrote:
-------------------------------------------------------
> Hello Guys
> I have problems with nsa 325 v2.
> I did everything, step by step on the solution but
> stil have problems , i dont have any more patient
> for that ..
> I try to start linux from USB storage formated to
> ext2 but i have that information in console :
>
> Part    Start Sector    Num Sectors     UUID      
>      Type
>   1     63              15728577       
> 100615b5-01     83 Boot
> loading envs from usb 0 ...
> ** File not found /boot/uEnv.txt **
> (Re)start USB...
> USB0:   USB EHCI 1.00
> scanning bus 0 for devices... 3 USB Device(s)
> found
>        scanning usb for storage devices... 1
> Storage Device(s) found
> 2931288 bytes read in 607 ms (4.6 MiB/s)
> 6535284 bytes read in 909 ms (6.9 MiB/s)
> ## Booting kernel from Legacy Image at 00800000
> ...
>    Image Name:   Linux-4.0.0-kirkwood-tld-1
>    Created:      2015-08-21  19:28:15 UTC
>    Image Type:   ARM Linux Kernel Image
> (uncompressed)
>    Data Size:    2931224 Bytes = 2.8 MiB
>    Load Address: 00008000
>    Entry Point:  00008000
>    Verifying Checksum ... OK
> ## Loading init Ramdisk from Legacy Image at
> 01100000 ...
>    Image Name:   initramfs-4.0.0-kirkwood-tld-1
>    Created:      2015-08-21  19:31:12 UTC
>    Image Type:   ARM Linux RAMDisk Image (gzip
> compressed)
>    Data Size:    6535220 Bytes = 6.2 MiB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
> Using machid 0x118f from environment
> 
> 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.
>
>
> I trying change kernel from 3.18 to new one but
> without succesful
>
> Maybe some of You Guys can help me ?
>
> Best Regards!


First step: boot with 3.16 rootfs (simpler to setup):
http://forum.doozan.com/read.php?4,23425,23427#msg-23427

And then come back, we'll cover device tree for it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 21, 2015 03:08PM
hawryszka Wrote:
-------------------------------------------------------

> Using machid 0x118f from environment
> 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)

It seems you are missing dtb file?
What's your printenv and uboot version?

Edit: try follow bodhi's advice and start with simpler setup!

--
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 08/21/2015 03:11PM by davidedg.
I have edited my previous post with printenv cmd and add uEnv.txt file.
Thanks for answer asap i try with 3.16 kernel, give me moment (i have hope it will be moment .. ;/ )
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 22, 2015 11:37AM
PBG4 wrote that the NSA320 has been tested and validated. Will this be available for uploading? Thanks.

Paul
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 22, 2015 03:29PM
z3bram3n Wrote:
-------------------------------------------------------
> PBG4 wrote that the NSA320 has been tested and
> validated. Will this be available for uploading?
> Thanks.
>
> Paul

Hi Paul,

See my post above:
http://forum.doozan.com/read.php?2,12096,23388#msg-23388

I'm building a test kernel, and will check out on other Kirkwood boxes. Will let you know.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> hawryszka Wrote:
> --------------------------------------------------
> -----
> > Hello Guys
> > I have problems with nsa 325 v2.
> > I did everything, step by step on the solution
> but
> > stil have problems , i dont have any more
> patient
> > for that ..
> > I try to start linux from USB storage formated
> to
> > ext2 but i have that information in console :
> >
> > Part    Start Sector    Num Sectors     UUID    
>  
> >      Type
> >   1     63              15728577       
> > 100615b5-01     83 Boot
> > loading envs from usb 0 ...
> > ** File not found /boot/uEnv.txt **
> > (Re)start USB...
> > USB0:   USB EHCI 1.00
> > scanning bus 0 for devices... 3 USB Device(s)
> > found
> >        scanning usb for storage devices... 1
> > Storage Device(s) found
> > 2931288 bytes read in 607 ms (4.6 MiB/s)
> > 6535284 bytes read in 909 ms (6.9 MiB/s)
> > ## Booting kernel from Legacy Image at 00800000
> > ...
> >    Image Name:   Linux-4.0.0-kirkwood-tld-1
> >    Created:      2015-08-21  19:28:15 UTC
> >    Image Type:   ARM Linux Kernel Image
> > (uncompressed)
> >    Data Size:    2931224 Bytes = 2.8 MiB
> >    Load Address: 00008000
> >    Entry Point:  00008000
> >    Verifying Checksum ... OK
> > ## Loading init Ramdisk from Legacy Image at
> > 01100000 ...
> >    Image Name:   initramfs-4.0.0-kirkwood-tld-1
> >    Created:      2015-08-21  19:31:12 UTC
> >    Image Type:   ARM Linux RAMDisk Image (gzip
> > compressed)
> >    Data Size:    6535220 Bytes = 6.2 MiB
> >    Load Address: 00000000
> >    Entry Point:  00000000
> >    Verifying Checksum ... OK
> >    Loading Kernel Image ... OK
> > Using machid 0x118f from environment
> > 
> > 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.
> >
> >
> > I trying change kernel from 3.18 to new one but
> > without succesful
> >
> > Maybe some of You Guys can help me ?
> >
> > Best Regards!
>
>
> First step: boot with 3.16 rootfs (simpler to
> setup):
> http://forum.doozan.com/read.php?4,23425,23427#msg
> -23427
>
> And then come back, we'll cover device tree for
> it.

I can't believe ! After long time it's works !
Believe me or not but i searching information about solution aprox 1 month before write my post here, i try to start every i think available kernels and rootfs but no 3.16
Thanks bodhi !
Should or could i update/upgrade it to 4.0/4.1 rootfs version ?
From which instruction should i take it ?

Best Regards !
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 22, 2015 05:53PM
hawryszka,

Glad it works for you!

> Should or could i update/upgrade it to 4.0/4.1
> rootfs version ?
> From which instruction should i take it ?

The reason you've had trouble trying out many different kernel versions was the issue of device tree (FDT) kernel vs. older non-FDT kernels. My kernel build 3.16.x or earlier were non-FDT. You should upgrade to get all the latest fixes for the NSA325. But as always, pls back up your rootfs first!

Some u-boot installation on the net are tailored to detect FDT kernel and boot that. But a simple and typical u-boot installation don't. So to upgrade to the latest kernel, see the same kernel thread and install the latest kernel (Linux-4.1.0-kirkwood-tld-2).

Pay special attention to section 4 (4. Create uImage and uInitrd and setup for booting), and the DTB-related steps.

- Use method 4b (appended DTB), this does not require changing u-boot envs. You are running the latest u-boot, so you could choose method 4a, but save it for later when you have become familiar with booting using 4a (separate DTB).

- Look for the correct DTB file in /boot/dts. For the NSA325v1/2, it is kirkwood-nsa325.dtb.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Reactivated the NSA320.
Flashed on the latest bodhi u-boot (using my own boot environment)
Testing the linux-4.1.0-kirkwood-tld-2 and Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi and everything seems to work fine so far.
Leds don't work as promised :)
Fan as noisy as ever (there is a unsoldered 4 pin fan connector next to the 3 pin, I do wonder if it would work to solder one there, probably simpler to buy resister-in-between-cable on ebay)
Wake on lan works, even after power disconnect.

RTC Wake: Funny story: there is rtc0 and rtc1. rtcwake can use both. In mode "no", it works with both, rtc1 will show wrong time, though:
root@nsa320:~# rtcwake -d rtc0 -s 120 -m no
rtcwake: wakeup using /dev/rtc0 at Mon Aug 24 21:08:07 2015
root@nsa320:~# rtcwake -d rtc1 -s 120 -m no
rtcwake: wakeup using /dev/rtc1 at Mon Aug 24 20:36:32 2015

If not "no" mode, only rtc0 works, rtc1 does not support events (which can be fixed).

If rtc0 is set, /proc/driver/rtc will show the alarm time:
rtc_time        : 21:35:36
rtc_date        : 2015-08-24
alrm_time       : 21:36:30
alrm_date       : 2015-08-24
alarm_IRQ       : yes
alrm_pending    : no
update IRQ enabled      : no
periodic IRQ enabled    : no
periodic IRQ frequency  : 1
max user IRQ frequency  : 64
24hr            : yes
But the Box will not wake up...

If I set rtc1 with "no" mode and then powerdown, it will wake up.
I can actually enable the wakeup event support via
echo enabled > /sys/class/rtc/rtc1/device/power/wakeup
and then -m off will work with rtcwake.
So all is good, except rtc1 can only be set with -s seconds because the time is off, and I have no idea how to set the clock.
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 25, 2015 02:29AM
bastel,

> Leds don't work as promised :)

LED settings might be missing in the rootfs when you run with NSA320 :)

Look for them in /sys/class/leds and set them in /etc/rc/local and /etc/init.d/halt (similar to other boxes).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 4.1 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
August 25, 2015 11:30AM
Updated
With u-boot 2014.07-tld-4 and linux-4.1.0-kirkwood-tld-2-bodhi.tar.bz2 on my NSA325 v2
Everything works, I haven't check network issue (is this fixed or no).
Thank you all!!!
bodhi Wrote:
-------------------------------------------------------
> bastel,
>
> > Leds don't work as promised :)
>
> LED settings might be missing in the rootfs when
> you run with NSA320 :)
>
> Look for them in /sys/class/leds and set them in
> /etc/rc/local and /etc/init.d/halt (similar to
> other boxes).

Yeah, were missing
if [ -d /sys/class/leds/nsa320:green:sys ]; then
   echo default-on > /sys/class/leds/nsa320:green:sys/trigger
   echo none       > /sys/class/leds/nsa320:orange:sys/trigger
fi

if [ -d /sys/class/leds/nsa320:green:hdd1 ]; then echo ide-disk1 > /sys/class/leds/nsa320:green:hdd1/trigger; fi
if [ -d /sys/class/leds/nsa320:green:hdd2 ]; then echo ide-disk2 > /sys/class/leds/nsa320:green:hdd2/trigger; fi
if [ -d /sys/class/leds/nsa320:green:usb ];  then echo usb-host  > /sys/class/leds/nsa320:green:usb/trigger; fi
Sorry, you can't reply to this topic. It has been closed.