Welcome! Log In Create A New Profile

Advanced

Linux Kernel 4.12.8 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 08, 2017 01:36PM
bastel Wrote:

> The kirkwood-nsa320.dtb, 13691 bytes, from linux-4
> .11.3-kirkwood-tld-1-bodhi.tar.bz2 is the same as
> at
> http://http.us.debian.org/debian/dists/stretch/mai
> n/installer-armel/current/images/kirkwood/device-t
> ree/
> so it seems I am using the right one.

Cool! then If the ethernet works fine in mainline then not much to switch kernel. Other things are minor in my kernel patches, such as individual HDD LEDs setting.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
I have those led triggers: none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer disk-activity ide-disk mtd nand-disk cpu0 default-on panic usb-gadget usb-host
disk-activity is similar to ide-disk, usb-host covers usb drives. No network trigger I guess. Nor heartbeat.
I am using
echo cpu0      > /sys/class/leds/nsa320\:orange\:sys/trigger
echo timer     > /sys/class/leds/nsa320\:green\:sys/trigger
echo 5000      > /sys/class/leds/nsa320\:green\:sys/delay_off
echo 50        > /sys/class/leds/nsa320\:green\:sys/delay_on

echo ide-disk  > /sys/class/leds/nsa320\:red\:copy/trigger
echo usb-host  > /sys/class/leds/nsa320\:green\:copy/trigger

echo panic     > /sys/class/leds/nsa320\:green\:usb/trigger

if [ -e /dev/disk/by-path/*sata-ata-1 ]; then
        echo default-on > /sys/class/leds/nsa320\:green\:hdd1/trigger
        echo none       > /sys/class/leds/nsa320\:red\:hdd1/trigger
else
        echo none       > /sys/class/leds/nsa320\:green\:hdd1/trigger
        echo default-on > /sys/class/leds/nsa320\:red\:hdd1/trigger
fi

if [ -e /dev/disk/by-path/*sata-ata-2 ]; then
        echo default-on > /sys/class/leds/nsa320\:green\:hdd2/trigger
        echo none       > /sys/class/leds/nsa320\:red\:hdd2/trigger
else
        echo none       > /sys/class/leds/nsa320\:green\:hdd2/trigger
        echo default-on > /sys/class/leds/nsa320\:red\:hdd2/trigger
fi
For now, the panic one is LED I have no use yet for.
I can still make some background script that will alter LED settings depending on load or something similar.
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 08, 2017 04:00PM
bastel,

> disk-activity is similar to ide-disk

This is where my patch differs. Since there are 2 HDDs, with the patch, you will be able to set them individually (ide-disk1, or ide-disk2).

The full list:

cat /sys/class/leds/nsa325\:green\:sys/trigger
Quote

none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock f1072004.mdio-bus-mii:01:1Gbps f1072004.mdio-bus-mii:01:100Mbps f1072004.mdio-bus-mii:01:10Mbps usbport usb-gadget usb-host timer oneshot disk-activity ide-disk1 ide-disk2 mtd nand-disk heartbeat gpio [default-on] panic

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Hmm, maybe I will try out the kernel then. It's not a problem of the dtb file.
Also might improve performance. Although IDE read speed goes over 100 MB/s, CPU is at 100% then, too. SMB reads reach 45 MB/s with increased read ahead settings (37 MB/s before), writing is like 27 MB/s. (which are all ok values, but I do remember old debian 6 dockstar days where I think loads for reading/writing were lower)
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 08, 2017 06:16PM
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 09, 2017 02:32PM
bodhi
linux-4.11.3-kirkwood-tld-2
modules loading problem is now fixed (at least for my case).


lsmod output
Module                  Size  Used by
ip6table_filter        16384  0
ip6_tables             20480  1 ip6table_filter
tun                    28672  2
nfnetlink_queue        20480  1
nfnetlink              16384  2 nfnetlink_queue
nf_conntrack_ipv4      16384  3
nf_defrag_ipv4         16384  1 nf_conntrack_ipv4
xt_tcpudp              16384  8
iptable_filter         16384  1
ip_tables              20480  1 iptable_filter
xt_iprange             16384  0
xt_conntrack           16384  3
nf_conntrack          102400  2 nf_conntrack_ipv4,xt_conntrack
ipt_REJECT             16384  1
nf_reject_ipv4         16384  1 ipt_REJECT
xt_mark                16384  6
xt_NFQUEUE             16384  3
x_tables               20480  10 ipt_REJECT,ip_tables,iptable_filter,xt_mark,xt_tcpudp,xt_NFQUEUE,ip6table_filter,xt_iprange,xt_conntrack,ip6_tables
ipv6                  352256  48
sg                     32768  0
marvell_cesa           32768  0
orion_wdt              16384  0
uio_pdrv_genirq        16384  0
uio                    16384  1 uio_pdrv_genirq
sd_mod                 40960  3
uas                    20480  0
fixed                  16384  0
usb_storage            49152  3 uas



Edited 1 time(s). Last edit at 06/09/2017 02:32PM by jst818.
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 09, 2017 05:54PM
Any idea why I can boot fine from USB with stock debian stretch kernel but not from IDE?
Looks like the IDE init happens after root filesystem load. At least there is no sata log output at all. I guess this might be some left over from the dockstar trick. Since the kernel should be the same for all kirkwoods, only the dtb file different, it probably is in the initrd image?

bastel
Figured it out myself, had to add sata_mv to /etc/initramfs-tools/modules.
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
July 02, 2017 03:12PM
bastel,

The kernel 4.11.x has modules loading regression (sata_mv runs as module). I've fixed the regression in linux-4.11.3-kirkwood-tld-2. And also make SATA a builtin kernel module so it will be more resilient.

Updated 08 June 2017: 

Kernel linux-4.11.3-kirkwood-tld-2 package has been uploaded. 

New in this version: 

- Fixed modules loading regression in linux-4.11.3-kirkwood-tld-1.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 07/02/2017 03:15PM by bodhi.
Dmitriy
Netgear stora
July 14, 2017 05:38AM
I ask to include the module, TC654 in the next kernel assembly.

This will provide control of the built-in PWM fan in the device. Although if you tell me how to rebuild the kernel with the support of this module, I will be very grateful.
Re: Netgear stora
July 14, 2017 03:50PM
Dmitriy
Re: Netgear stora
July 14, 2017 11:23PM
bodhi Wrote:
-------------------------------------------------------
> Dmitriy,
>
> > I ask to include the module, TC654 in the next k
> er
> > nel assembly.
>
> Sure, I will.

Can I ask you to describe the kernel build procedure?
I think many of this is useful. Thank you!
Could you please prepare rootfs with Debian 9?
My upgrade failed with many errors. It would be nice to start with clean image of latest version.
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
July 19, 2017 04:46PM
Pawel Wrote:
-------------------------------------------------------
> Could you please prepare rootfs with Debian 9?
> My upgrade failed with many errors. It would be ni
> ce to start with clean image of latest version.

If I can find some free time this week, yes I will.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 20, 2017 04:35AM
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 21, 2017 11:21PM
FYI.

There seems to be a syntax change in NFS rootfs. I'm having trouble loading the NFS rootfs with what used to work in kernel 4.11.3.

So beware if you are booting with NFS rootfs. I'm investigating this.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 22, 2017 02:58AM
> 'm having trouble loading the NFS rootfs with what
> used to work in kernel 4.11.3.
>

False alarm! my NFS rootfs is booting OK with no change in u-boot envs in the client u-boot. Might have been that I rebooted the NFS server and that has fixed it the loading problem.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Dmitriy
Re: Netgear stora
July 22, 2017 04:02PM
bodhi Wrote:
-------------------------------------------------------
> Dmitriy,
>
> > I ask to include the module, TC654 in the next k
> er
> > nel assembly.
>
> Sure, I will.

Good job!
Yet here it needs to be added to kirkwood-netgear_stora_ms2000.dts

i2c@11000 {
status = "okay";

tc654: tc654@1b {
compatible = "microchip,tc654";
reg = <0x1b>;
};


lm75: lm75@48 {
compatible = "national,lm75";
reg = <0x48>;
};

pcf8563: pcf8563@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
Re: Netgear stora
July 22, 2017 05:25PM
> tc654: tc65
> 4@1b {
> compatible = "microchip,tc654";
> reg = <0x1b>;
> };


Thanks Dmitriy! is this i2c sensor native to the Stora or has to be installed afterward?

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Dmitriy
Re: Netgear stora
July 23, 2017 01:17AM
bodhi Wrote:
-------------------------------------------------------
> > tc654: tc65
> > 4@1b {
> > compatible = "microchip,tc654";
> > reg = <0x1b>;
> > };

>
> Thanks Dmitriy! is this i2c sensor native to the S
> tora or has to be installed afterward?

Sensor built-in Native.

http://www.openstora.com/wiki/index.php?title=Parts_List

https://wikidevi.com/wiki/Netgear_Stora_MS2110
Dmitriy
Re: Netgear stora
July 23, 2017 01:52AM
Dmitriy Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > > tc654: tc65
> > > 4@1b {
> > > compatible = "microchip,tc654";
> > > reg = <0x1b>;
> > > };

> >
> > Thanks Dmitriy! is this i2c sensor native to the
> S
> > tora or has to be installed afterward?
>
> Sensor built-in Native.
>
> http://www.openstora.com/wiki/index.php?title=Part
> s_List
>
> https://wikidevi.com/wiki/Netgear_Stora_MS2110

There is one feature, it seems that the sensor incorrectly determines the RPM .....

root@stora:/# sensors -u
tc654-i2c-0-1b
Adapter: mv64xxx_i2c adapter
System Fan:
  fan1_input: 100.000
  fan1_min: 0.000
  fan1_alarm: 0.000
  fan1_pulses: 2.000


With a change in the speed pwm = 1-255,
The value of rpm is practically unchanged, and at the maximum speed it sometimes displays 0-RPM.

I noticed the following entry in the file, kirkwood-netgear_stora_ms2000.dts

ocp@f1000000 {
		pmx_fan_tacho: pmx-fan-tacho {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};
		};


I understand RPM as it is reported through gpio? Could you tell me how to check this?

Thank bodhi!
Re: Netgear stora
July 23, 2017 03:23AM
Dmitriy,

ocp@f1000000 {
		pmx_fan_tacho: pmx-fan-tacho {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};
		};

When you have GPIO defined in the DTS like the above, the kernel populates the /sys/class/gpio (listing the directory will show export and unexport). There are convenient GPIO tools to manipulate it in userspace, if you google for it, somebody might have created this tool. But here is how we usually do it manually


To expose this GPIO to the userspace to set/unset it manually. Try this.

You know it is a GPIO that can be set so the direction is "out" (if it is an "input only" GPIO then you can only read it, and the direction is "in").
/bin/echo 41 > /sys/class/gpio/export
/bin/echo "out" > /sys/class/gpio/gpio41/direction

Set it
/bin/echo 1 > /sys/class/gpio/gpio41/value

and clear it
/bin/echo 0 > /sys/class/gpio/gpio41/value

If there is no clock involved in setting this GPIO then the above should work.

When you are done, put it back to unexport to avoid exposing it.

/bin/echo 41 > /sys/class/gpio/unexport

When you don't see it does what you think it should, list the directory tree to see what was the result of an export (i.e. what directories were created).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 07/23/2017 03:26AM by bodhi.
Re: Netgear stora
July 23, 2017 03:29AM
BTW,

For i2c sensor, you might not be able to read it with GPIO. You usually use a i2c get tool to read the sensor, or the lmsensors tool suite to read it.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Dmitriy
Re: Netgear stora
July 23, 2017 08:17AM
bodhi Wrote:
-------------------------------------------------------
> BTW,
>
> For i2c sensor, you might not be able to read it w
> ith GPIO. You usually use a i2c get tool to read t
> he sensor, or the lmsensors tool suite to read it.

Yes, all right gpio41 produces 1 when reading is not rpm

root@stora:/sys/class/gpio/gpio41# cat /sys/class/gpio/gpio41/value 
1

It's a pity, it seems that rpm is incorrectly displayed when using sensors -u

It is possible that the driver issues incorrect information.

I tried to read the readings from the i2c bus as described at this link http://www.openstora.com/forum/viewtopic.php?f=6&t=486&sid=c67edbab0a33b68baee13d5a2a408f69, it gives me only 4 bits and the sensor gives 8 or 9 depending From the settings so described in its servicemanual.
Dmitriy
Re: Netgear stora
July 23, 2017 08:30AM
Dmitriy Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > BTW,
> >
> > For i2c sensor, you might not be able to read it
> w
> > ith GPIO. You usually use a i2c get tool to read
> t
> > he sensor, or the lmsensors tool suite to read i
> t.
>
> Yes, all right gpio41 produces 1 when reading is n
> ot rpm
>
>
> root@stora:/sys/class/gpio/gpio41# cat /sys/class/
> gpio/gpio41/value
> 1
>
>
> It's a pity, it seems that rpm is incorrectly disp
> layed when using sensors -u
>
> It is possible that the driver issues incorrect in
> formation.
>
> I tried to read the readings from the i2c bus as d
> escribed at this link [url=http://www.openstora.co
> m/forum/viewtopic.php?f=6&t=486&sid=c67edbab0a33b6
> 8baee13d5a2a408f69]http://www.openstora.com/forum/
> viewtopic.php?f=6&t=486&sid=c67edbab0a33b68baee13d
> 5a2a408f69[/url], it gives me only 4 bits and the
> sensor gives 8 or 9 depending From the settings so
> described in its servicemanual.

Bodhi I'm sorry!

Did not carefully read the text, it turned out that [u][color=#FF0000]Trying to read the rpm is useless, the corresponding pin is not connected![/color][/u]
In any case, it's better than nothing.
I made the fan turn off when it's not needed using the fanspeed program, depends on the temperature of the hdd.

I have a question, is it possible to control the LED from UBOOT for example to blink until the kernel has booted. The matter is that in an environment the green and orange LED is indicated.
And STORA uses blue LED
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 23, 2017 04:16PM
This is probably a stupid question, but I wanted to ask anyway just to be sure. I'm using a Pogo-E02 running wheezy and the linux-4.1.0-kirkwood-tld-1 kernel along with the 2016.05 U-Boot version.

Still running wheezy, can I upgrade directly to the latest kernel (4.12.1) or would/should I be on a Jessie rootfs before using that 4.12.1 kernel?

Thanks
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 23, 2017 04:57PM
Dmitriy,


> I have a question, is it possible to control the L
> ED from UBOOT for example to blink until the kerne
> l has booted. The matter is that in an environment
> the green and orange LED is indicated.
> And STORA uses blue LED

Yes. I'm glad you asked. I forgot to include the some boxes such as the Stora LED controls in the rootfs!

The control is in /etc/rc.local.

They look like this:

if [ -d /sys/class/leds/nsa325:green:sys ]; then
   echo default-on  > /sys/class/leds/nsa325:green:sys/trigger 
   echo none        > /sys/class/leds/nsa325:orange:sys/trigger
fi

So the Stora should have similar triggers in /sys/class/leds. Please post your output of

ls -l /sys/class/leds

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 23, 2017 04:59PM
cadre Wrote:
-------------------------------------------------------
> This is probably a stupid question, but I wanted t
> o ask anyway just to be sure. I'm using a Pogo-E02
> running wheezy and the linux-4.1.0-kirkwood-tld-1
> kernel along with the 2016.05 U-Boot version.
>
> Still running wheezy, can I upgrade directly to th
> e latest kernel (4.12.1) or would/should I be on a
> Jessie rootfs before using that 4.12.1 kernel?
>
> Thanks

You can update the kernel to the latest, regardless of wheezy, jessie, or stretch.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
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: