Welcome! Log In Create A New Profile

Advanced

Linux Kernel 4.12.1 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 08, 2017 03: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 06: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 08:16PM
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 09, 2017 04: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 04:32PM by jst818.
Re: Linux Kernel 4.11.3 Kirkwood package and Debian rootfs
June 09, 2017 07: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 05: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 05:15PM by bodhi.
Dmitriy
Netgear stora
July 14, 2017 07: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 05:50PM
Dmitriy
Re: Netgear stora
July 15, 2017 01:23AM
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 06: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 06:35AM
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 22, 2017 01:21AM
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 04: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 06: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 07: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 03: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 03: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!
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: