Welcome! Log In Create A New Profile

Advanced

Linux Kernel 6.11.6 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 05, 2013 03:37PM
@pbg4,

I'm patching the kernel for individual ide disk LED triggers. Rebuilding the kernel and probably will have some time to test it this wekend.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 05, 2013 06:56PM
@pbg4 & enavarrocu & others,

If you have 2 SATA hard disks mounted on your NSA320, or GoFlex Net, could you list your devices and post the content here:
ls -lR /dev/disk/

I think even though we can use both SATA disks without problem, the mv sata driver does not seem to polulate the device list correcty (at least for my GoFlex Net).

Thanks!

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



Edited 1 time(s). Last edit at 10/05/2013 07:31PM by bodhi.
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 06, 2013 04:09AM
Hi bodhi,

in the nas-central forum thread on the nsa310/320 kernel in the zyxel subforum there was a while ago a patch for full
sata-disk and usb-disk activity, look for nsa3x0.patch_v5.2.txt where everything
was included, there are modified versions of "LED IDE-Disk Activity Trigger" subroutine in it,
however this means quite some work to adopt for newer kernel, it was on my todo list for
some time now, but I never had the time to look really into it,

best wishes pbg4
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 06, 2013 02:03PM
@bodhi, as I noticed the same LED behaviour:

root@mynas:/tmp$ ls -lR /dev/disk/
/dev/disk/:
total 0
drwxr-xr-x 2 root root 300 Oct  6 20:47 by-id
drwxr-xr-x 2 root root  80 Oct  6 20:47 by-label
drwxr-xr-x 2 root root 180 Oct  6 20:47 by-path
drwxr-xr-x 2 root root 120 Oct  6 20:47 by-uuid

/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root  9 Oct  6 20:09 ata-ST4000DM000-1F2168_W300FJ5X -> ../../sda
lrwxrwxrwx 1 root root 10 Oct  6 20:09 ata-ST4000DM000-1F2168_W300FJ5X-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  6 20:36 ata-ST4000DM000-1F2168_W300FJ5X-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Oct  6 20:09 scsi-SATA_ST4000DM000-1F2_W300FJ5X -> ../../sda
lrwxrwxrwx 1 root root 10 Oct  6 20:09 scsi-SATA_ST4000DM000-1F2_W300FJ5X-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  6 20:36 scsi-SATA_ST4000DM000-1F2_W300FJ5X-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Oct  6 20:09 usb-TOSHIBA_TransMemory_001D92DC47D9C8C1A3B401BF-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Oct  6 20:09 usb-TOSHIBA_TransMemory_001D92DC47D9C8C1A3B401BF-0:0-part1 -> 

../../sdb1
lrwxrwxrwx 1 root root  9 Oct  6 20:47 usb-WDC_WD20_EARS-00MVWB0_WDC_WD20EA_WD-WMAZ20161232-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Oct  6 20:47 usb-WDC_WD20_EARS-00MVWB0_WDC_WD20EA_WD-WMAZ20161232-0:0-part1 -> 

../../sdc1
lrwxrwxrwx 1 root root  9 Oct  6 20:09 wwn-0x5000c500699f0d64 -> ../../sda
lrwxrwxrwx 1 root root 10 Oct  6 20:09 wwn-0x5000c500699f0d64-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  6 20:36 wwn-0x5000c500699f0d64-part2 -> ../../sda2

/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root 10 Oct  6 20:47 EXTDATA -> ../../sdc1
lrwxrwxrwx 1 root root 10 Oct  6 20:09 USBROOT -> ../../sdb1

/dev/disk/by-path:
total 0
lrwxrwxrwx 1 root root  9 Oct  6 20:47 platform-orion-ehci.0-usb-0:1.2:1.0-scsi-0:0:0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Oct  6 20:47 platform-orion-ehci.0-usb-0:1.2:1.0-scsi-0:0:0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 Oct  6 20:09 platform-orion-ehci.0-usb-0:1.4:1.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Oct  6 20:09 platform-orion-ehci.0-usb-0:1.4:1.0-scsi-0:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Oct  6 20:09 platform-sata_mv.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Oct  6 20:09 platform-sata_mv.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  6 20:36 platform-sata_mv.0-scsi-0:0:0:0-part2 -> ../../sda2

/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 Oct  6 20:47 01CE84B87D7101D0 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Oct  6 20:36 1097679d-2d4d-49f5-b7cb-ea4979687c86 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct  6 20:09 5a695d91-56ba-426c-9e5a-ff5c647e30d9 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct  6 20:09 b13559e1-949d-465b-b9f6-c6ffef85cbcc -> ../../sda1
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 06, 2013 03:58PM
Hi gaogao,

I can see /dev/sda is one of your internal SATA disks. But the other one? which letter is that one assigned to?

dev/disk/by-path:
total 0
lrwxrwxrwx 1 root root  9 Oct  6 20:47 platform-orion-ehci.0-usb-0:1.2:1.0-scsi-0:0:0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Oct  6 20:47 platform-orion-ehci.0-usb-0:1.2:1.0-scsi-0:0:0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 Oct  6 20:09 platform-orion-ehci.0-usb-0:1.4:1.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Oct  6 20:09 platform-orion-ehci.0-usb-0:1.4:1.0-scsi-0:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Oct  6 20:09 platform-sata_mv.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Oct  6 20:09 platform-sata_mv.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  6 20:36 platform-sata_mv.0-scsi-0:0:0:0-part2 -> ../../sda2

I recalled someone reported this when he/she tried to implement RAID on GoFlex Net. It looks like we have this bug in both GoFlex Net and NSA320, where device-by-path does not populate both, onely one SATA disk is present.

Thanks,

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 06, 2013 04:01PM
BTW, the device-by-path is a different problem. Individual hardisk LEDs trigger is really not a problem, it just was not implemented. The implementation is not very complicated so I've added the code and tested my patch for controlling the 2 hadrdisk LED on the GoFlex Net individually and it works really well.

I will update the kernel with this patch.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 07, 2013 12:59AM
Kernel 3.11.1-kirkwood-tld-2 package was uploaded. Please see 1st post for download link.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 07, 2013 02:11AM
bodhi Wrote:
-------------------------------------------------------
> I can see /dev/sda is one of your internal SATA
> disks. But the other one? which letter is that one
> assigned to?
ah, I forgot to disconned the external usb disk (sdc). The SATA disks are sda and sdb.
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 07, 2013 04:15AM
pbg4 Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> in the nas-central forum thread on the nsa310/320
> kernel in the zyxel subforum there was a while ago
> a patch for full
> sata-disk and usb-disk activity, look for
> nsa3x0.patch_v5.2.txt where everything
> was included, there are modified versions of "LED
> IDE-Disk Activity Trigger" subroutine in it,
> however this means quite some work to adopt for
> newer kernel, it was on my todo list for
> some time now, but I never had the time to look
> really into it,
>
> best wishes pbg4

Hi pbg4,

I could not find this file at nas-central site (I'm not familiar with the navigation, and search did not turn up). I'd like to see what's in this patch, i.e. if it addresses the device-by-path problem.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 07, 2013 02:22PM
Hi bodhi,

the following link leads directly to the page where the patch mentioned (from Piotr Gozdur Nas-central forum member)
with the version v5.2 is linked to (see post no 9 down the page), I looked through it, there seems to be nothing concerning the device-by-path problem, the download link of the patch is still working,..

best wishes pbg4

nas-central zyxel subforum nsa310/320



Edited 1 time(s). Last edit at 10/07/2013 02:24PM by pbg4.
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 07, 2013 11:55PM
pbg4 Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> the following link leads directly to the page
> where the patch mentioned (from Piotr Gozdur
> Nas-central forum member)
> with the version v5.2 is linked to (see post no 9
> down the page), I looked through it, there seems
> to be nothing concerning the device-by-path
> problem, the download link of the patch is still
> working,..
>
> best wishes pbg4
>
> [url=http://forum.nas-central.org/viewtopic.php?f=
> 249&t=5145&start=45]nas-central zyxel subforum
> nsa310/320[/url]

Thanks pbg4!

Looks like Piotr Gozdur and I had the similar idea! but Piotr's patch is a little more elaborated. The patch also has a LED timer trigger, which I think is probably a little bit too much. But it might be useful for somebody.

BTW, if you want to extract the patch for LED triggers only then see these 3 files:

-rw-rw-r-- 1 root root 8803 Oct 6 16:06 leds.h
-rw-rw-r-- 1 root root 1449 Oct 6 16:06 ledtrig-ide-disk.c
-rw-rw-r-- 1 root root 123895 Oct 6 16:07 sata_mv.c

-bodhi
===========================
[color=#3333FF][url=http://forum.doozan.com/read.php?2,23630]Forum Wiki[/url][/color]
[url=https://mibodhi.blogspot.com]bodhi's corner (buy bodhi a beer)[/url]



Edited 1 time(s). Last edit at 10/08/2013 01:18AM by bodhi.
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 08, 2013 03:02PM
Hi bodhi,

yes, the timer trigger is not really necessary, and I favour your patch because it has the least amount
of code lines to get the leds for individual disks working, so its easy to incorporate into the next kernel
generations,..

best wishes pbg4
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 12, 2013 05:24PM
Everything is working smooth with the leds. Thanks bodhi and pbg4.

What about the temperature sensors and fan control?
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 14, 2013 05:02AM
enavarrocu Wrote:
-------------------------------------------------------
> Everything is working smooth with the leds. Thanks
> bodhi and pbg4.
>
> What about the temperature sensors and fan
> control?

Are they working? Or did you mean if can they be hooked to flash certain LEDs?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 14, 2013 01:32PM
@enavarrocu:

lm-sensors on the NSA320 can get activated quite easily,...

you will only need to get the nsa3xx_hwmon module compiled,
which is already included in the patch used for the
linux-3.11.1-kirkwood-tld-2-bodhi kernel, but not yet activated in the config,

if you want to compile it yourself you can use my recipe for recompiling all
the hwmon modules which is already posted in this thread a little
while ago,... with CONFIG_SENSORS_NSA3XX=m activated in the config,..

best wishes pbg4

p.s. I have not really investigated how to get pwmconfig working on the NSA320,
because the devices needed for pwmconfig to set up basic speeds in /etc/fancontrol
do not show up,...

on the other hand an adequately sized resistor soldered in the red cable of the NSA320 fan
also does the job quite nicely,... :)



Edited 1 time(s). Last edit at 10/14/2013 03:17PM by pbg4.
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 17, 2013 04:36AM
@bodhi

I mean everything is working perfect with the leds.

Thanks one more time.
Re: Linux Kernel 3.10.4 Kirkwood package and rootfs (Non Flattened Device Tree)
October 17, 2013 10:16AM
IIRC - the NSA320's MCU controls the PWM of the fan, same with the NSA325
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 19, 2013 09:37AM
Is there a version of the 3.11.1 rootfs that would be better suited to install and run on a partition on the hard drive (i.e. log to ram) rather than a usb? or would I be able to accomplish the same thing by uninstalling busybox-syslogd?

thanks
m
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 19, 2013 03:05PM
maihoa,

Yes, you can uninstall syslogd, and logging will go to /var/log/message.

Or keep it and change the option to log to a file.

cat /etc/init.d/busybox-syslogd

# Additional options that are passed to the daemons.  Default is to log
# to ring buffer (to be read with logread(1)) and drop duplicates.
SYSLOG_OPTS="-C128"
KLOG_OPTS=""


# busybox syslogd --help
BusyBox v1.20.2 (Debian 1:1.20.0-7) multi-call binary.

Usage: syslogd [OPTIONS]

System logging utility
(this version of syslogd ignores /etc/syslog.conf)

	-n		Run in foreground
	-O FILE		Log to FILE (default:/var/log/messages)
	-l N		Log only messages more urgent than prio N (1-8)
	-S		Smaller output
	-R HOST[:PORT]	Log to IP or hostname on PORT (default PORT=514/UDP)
	-L		Log locally and via network (default is network only if -R)
	-C[size_kb]	Log to shared mem buffer (use logread to read it)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 22, 2013 02:34AM
The second LED does not reflect second HDD accesses for me, the first one seems to be doing both hdd despite:

root@mynas:~$ cat /sys/class/leds/nsa320:red:hdd1/trigger
none nand-disk timer oneshot [ide-disk1] ide-disk2 heartbeat gpio default-on
root@mynas:~$ cat /sys/class/leds/nsa320:red:hdd2/trigger
none nand-disk timer oneshot ide-disk1 [ide-disk2] heartbeat gpio default-on

@pbg4: can you paste your rc.local LED-related commands?
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 22, 2013 02:50AM
Gaogao,

What is your output of:
ls -R /sys/class/leds

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 22, 2013 07:56AM
bodhi Wrote:

> What is your output of:
> ls -R /sys/class/leds

$ ls -lR /sys/class/leds
/sys/class/leds:
total 0
lrwxrwxrwx 1 root root 0 Oct 21 19:25 nsa320:green:copy -> ../../devices/platform/leds-gpio/leds/nsa320:green:copy
lrwxrwxrwx 1 root root 0 Oct 21 19:25 nsa320:green:hdd1 -> ../../devices/platform/leds-gpio/leds/nsa320:green:hdd1
lrwxrwxrwx 1 root root 0 Oct 21 19:25 nsa320:green:hdd2 -> ../../devices/platform/leds-gpio/leds/nsa320:green:hdd2
lrwxrwxrwx 1 root root 0 Oct 20 11:04 nsa320:green:sys -> ../../devices/platform/leds-gpio/leds/nsa320:green:sys
lrwxrwxrwx 1 root root 0 Oct 21 19:25 nsa320:green:usb -> ../../devices/platform/leds-gpio/leds/nsa320:green:usb
lrwxrwxrwx 1 root root 0 Oct 20 11:04 nsa320:orange:sys -> ../../devices/platform/leds-gpio/leds/nsa320:orange:sys
lrwxrwxrwx 1 root root 0 Oct 21 19:25 nsa320:red:copy -> ../../devices/platform/leds-gpio/leds/nsa320:red:copy
lrwxrwxrwx 1 root root 0 Oct 20 11:04 nsa320:red:hdd1 -> ../../devices/platform/leds-gpio/leds/nsa320:red:hdd1
lrwxrwxrwx 1 root root 0 Oct 21 19:25 nsa320:red:hdd2 -> ../../devices/platform/leds-gpio/leds/nsa320:red:hdd2
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 23, 2013 02:39AM
gaogao,

Did you try to turn on/off each HDD LED with echo? what do you see with these (in various order):

echo default_on > nsa320:green:hdd1
echo default_on > nsa320:green:hdd2
echo none > nsa320:green:hdd2
echo none > nsa320:green:hdd2

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2013 03:27AM
they do react properly both red and green.
What appears to be not working is the trigger to ide-disk2 (on both LEDs).
It seems as only ide-disk1 is ok.
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2013 03:47AM
Ah! then I am not sure. Because it works fine on GoFlex Net. I might have to check the ALARM patch to see if they have updated it since I extracted the patch a while ago. The new patch to the 3 files I mentioned above should work the same way on GoFlex Net and NSA320.

@pbg4,
Did this patch work in your build?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2013 11:15AM
..



Edited 1 time(s). Last edit at 10/24/2013 11:17AM by dinjo.
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
November 02, 2013 05:57AM
@bodhi:

I have not rebuild the 3.10 kernel used on my NSA320 to a newer version since quite a while,

but I see no reason why your ide-led patch should not work on the NSA320,
since I need s2-liplianin-v39 drivers for some dvbs usb dongles on my NSA320
boxes I'm going to stick to the 3.10 series and will test it and report back after a rebuild,....

best wishes pbg4
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
November 03, 2013 03:11PM
@pbg4,

If for what ever reason that it does not work in NSA320, then I think it might be something related to the SATA port number assignments (the GoFlexNet runs different uBoot patched version) .

Also, I've been wondering what the SATA port numbers assignment would be if we plug in a 4-disk eSata enclosure with port multiplier?!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
November 03, 2013 06:46PM
I just installed this kernel on Debian v7.2 (was using v3.3.2 kernel before), and my ipsec vpn has stopped working. What is missing from this kernel?

Nov 3 19:37:11 nas charon: 16[CFG] config: 13.15.0.1/32, received: 0.0.0.0/0 => match: 13.15.0.1/32
Nov 3 19:37:11 nas charon: 16[KNL] received netlink error: No such file or directory (2)
Nov 3 19:37:11 nas charon: 16[KNL] unable to add SAD entry with SPI c38bc290
Nov 3 19:37:11 nas charon: 16[KNL] received netlink error: No such file or directory (2)
Nov 3 19:37:11 nas charon: 16[KNL] unable to add SAD entry with SPI 87b93ee1
Nov 3 19:37:11 nas charon: 16[IKE] unable to install inbound and outbound IPsec SA (SAD) in kernel
Nov 3 19:37:11 nas charon: 16[IKE] failed to establish CHILD_SA, keeping IKE_SA

I saw an extra 10 MB/sec on FTP transfers on my LAN with this kernel...I hope to resolve this, because I need to have my vpn working. Rolling back to 3.3.2 for now. Thanks for your work on these kernels, it is truly amazing.



Edited 4 time(s). Last edit at 11/03/2013 07:51PM by gee-man.
Re: Linux Kernel 3.11.1 Kirkwood package and rootfs (Non Flattened Device Tree)
November 04, 2013 02:30AM
gee-man,

After you're back running 3.3.2, could you get the list of your modules with lsmod and post the output here? Could be some missing modules that are needed by ipsec.

Thanks,

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Sorry, you can't reply to this topic. It has been closed.