Welcome! Log In Create A New Profile

Advanced

Linux Kernel 6.10.11 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 27, 2014 06:05PM
I have not seen anything strange either. I've strreamed large video files from my GFHome NAS running 3.16.0-tld-1. However, Arch is rolling release, so it is always newer than Debian.

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



Edited 1 time(s). Last edit at 08/27/2014 06:07PM by bodhi.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 27, 2014 07:21PM
Dang! It looks like there is a problem. If I copy a file (size doesn't seem to matter) to my Windows laptop from a mapped Dockstar connected drive, it doesn't match the original file. I don't know what it means, but if I use fsum to just calculate the MD5 checksum directly on the file without copying it to a local drive first, the checksum matches. If I copy the file to a local drive and then use fsum, the checksums differ.

I don't know if I want to try 3.15 of the kernel or not. I'll have to go back and see what it takes to downgrade the kernel.

I also haven't checked to see if it's just reading from a mapped drive that's a problem or if writing is also a problem, although I'm thinking if writing was a problem I would have noticed by now.

-JT
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 27, 2014 10:12PM
Ok, this got pretty convoluted pretty quickly. It looks like writing to a mapped drive works, but reading from a mapped drive may or may not (see the fsum note above). Additionally, the format/type of drive may make a difference. I had no problem transferring files from my ext2 formatted flash drive, but copying files from my NTFS formatted SATA hard drive failed with the occasional corrupted byte. Using a Python based server I was able to transfer files off of the same NTFS drive without problem, so Samba seems to be the problem.

I downgraded to version 3.15.3 of the kernel and I was able to transfer files over 4GB in length without problem, so I guess I'll stick with 3.15 for now. I'd be happy to take a look at the 3.16 kernel if I had the slightest idea of where to start.

-JT
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 28, 2014 05:00PM
renojim,

Do you have NFS mounted? try copying that same file over NFS to see if it's OK.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 29, 2014 02:41AM
I haven't used NFS, but when I installed nfs-common I got the following somewhat worrisome message:
[ ok ] Starting NFS common utilities: statd idmapd.
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.16.0-kirkwood-tld-1
Kernel suffix 1 does not match any of the expected flavors (kirkwood), therefore not writing it to flash.

I went back to the 3.15.3 kernel, so I don't understand the message about 3.16.0. It makes me think I did something wrong when I went back to 3.15.3. Not having used NFS on anything in quite a long time I wasn't sure if I needed to install that package or not.

I'll have to re-educate myself about NFS mounts.

-JT
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 29, 2014 03:38AM
renojim,

> Processing triggers for initramfs-tools ...
> update-initramfs: Generating
> /boot/initrd.img-3.16.0-kirkwood-tld-1
> Kernel suffix 1 does not match any of the expected
> flavors (kirkwood), therefore not writing it to
> flash.[/code]

This is normal if you have flash-kernel package installed in your system. During kernel upgrade by dpkg, if flash-kernel is currently installed in your system, it will try to generate the initrd for you. However, it will fail because you are using my customed built kernel with suffix kirkwood-tld-1, which it would not recongnize as one of the official Linux standard names.

Quote
Instruction on 1st page
- And install it with dpkg. If you encounter error with flash-kernel when running dpkg, then remove flash-kernel first to avoid potential problem (It is much better to generate uImage and uInitrd manually anyway):
apt-get remove flash-kernel
dpkg -i linux-image-3.16.0-kirkwood-tld-1_1_armel.deb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 29, 2014 04:24PM
Quote
bodhi
This is normal if you have flash-kernel package installed in your system.

Thanks! As you may recall, I had a problem when I initially tried to upgrade to the 3.16 kernel and I may be (and probably am) mistaken, but if I recall correctly I had to install the flash-kernel package to get past some error message in the kernel install script that halted installation before creating the files necessary to create uInitd and/or uImage manually. Anyway, I've been switching back and forth between 3.15 and 3.16 with flash-kernel installed without any problem.

Back to your question about NFS. Sure enough, under the 3.16 kernel, NFS works but Samba corrupts data.

-JT
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 29, 2014 05:33PM
I've posted test results at Arch forum:
http://archlinuxarm.org/forum/viewtopic.php?f=9&t=7692&p=42160#p42163

Update:
Turning off TCP segmentation offload on kernel 3.16.0 seems to work great, thanks to ebbix for the tip:
ethtool -K eth0 tso off

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



Edited 1 time(s). Last edit at 08/29/2014 06:12PM by bodhi.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 30, 2014 01:14AM
Hey, I'm just writing to confirm I was able to duplicate this issue of corrupt samba transfer.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 30, 2014 01:29AM
Yep, that seems to work! I compared the output of ethtool -k under 3.15 and 3.16 and the only difference was the tx-tcp-segmentation setting (off by default under 3.15 and on under 3.16). I guess it would be interesting to see if changing the setting under 3.15 causes the same data corruption, but I don't know how useful that information would be.

Just out of curiosity, where should one put the "ethool -K eth0 tso off" command? I added it to rc.local, but my understanding of the various startup scripts is lacking at best.

-JT



Edited 1 time(s). Last edit at 08/30/2014 01:30AM by renojim.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 30, 2014 02:48AM
renojim,

> Yep, that seems to work! I compared the output of
> ethtool -k under 3.15 and 3.16 and the only
> difference was the tx-tcp-segmentation setting
> (off by default under 3.15 and on under 3.16). I
> guess it would be interesting to see if changing
> the setting under 3.15 causes the same data
> corruption, but I don't know how useful that
> information would be.

The commit was in 3.16. So it was not available in 3.15.

>
> Just out of curiosity, where should one put the
> "ethool -K eth0 tso off" command? I added it to
> rc.local, but my understanding of the various
> startup scripts is lacking at best.

I would put it in /etc/rc.local because it will be untouched by any upgrade. It will got wiped out if we put this in other startup script (ie. rc0-6/*,rcS/*).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 30, 2014 02:52AM
I have also created a step by step set of instructions at http://zyxel.nas-central.org/w/index.php?title=Debian_on_325 .

Buttzy's thead is much more comprehensive... but I found it hard to follow my first time with the NSA325 :)

EDIT: Sorry for the noise... If one has multiple threads open in different tabs in chrome the forum software does not always append a reply to the correct thread :(



Edited 1 time(s). Last edit at 08/30/2014 03:47AM by dfarning.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 30, 2014 03:53AM
dfarning,

Quote

> I have also created a step by step set of
> instructions at
> http://zyxel.nas-central.org/w/index.php?title=Debian_on_325 .

Very nicely done! it will be a great help to people who start hacking.

Typo correction:
Quote

Operating System
For this project we will download a prebuilt copy of Debian Wheezy for NSA325. This is minimal Debian Wheezy image with a few patches to work on the NSA325 and a custom kernel to run on the Marvell Kirkwood CPU.
Equipment needed:
NSA325 with attached serial cable
Unformatted USB flash drive larger than 8GB
Insert Unformatted USB flash drive.
Download the Debian Wheezy tarball for NSA325.
Extract the compressed file.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
August 30, 2014 04:17AM
Fixed. Thanks
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 02, 2014 10:06PM
Both 3.16.0-kirkwood-tld-2 kernel and rootfs have been uploaded. Please see 1st post for download links.

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



Edited 1 time(s). Last edit at 09/03/2014 09:14AM by bodhi.
i got this error with 3.16.0-kirkwood-tld-2:

Error: unrecognized/unsupported machine ID (r1 = 0x0000020f).
...
...
Please check your kernel config and/or bootloader.

installed the new kernel over 3.16.0-kirkwood-tld-1
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 03, 2014 03:47PM
sigma Wrote:
-------------------------------------------------------
> i got this error with 3.16.0-kirkwood-tld-2:
>
> Error: unrecognized/unsupported machine ID (r1 =
> 0x0000020f).
> ...
> ...
> Please check your kernel config and/or
> bootloader.
>
> installed the new kernel over
> 3.16.0-kirkwood-tld-1

Which box did you install this kernel on? It would be helpful to see the list of u-boot envs. The message about machine ID 0x20f makes no sense, it is not even a Kirkwood box!

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

bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env
),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
arcNumber=4495
bootargs_stock=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootargs_linux=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; ide reset; ext2load ide 0:2 $(loadaddr) /uImage; ext2load ide 0:2 0x01100000 /uInitrd; bootm $(loadaddr) 0x01100000
bootcmd_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock'\; saveenv; reset
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux'\; saveenv; reset
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
disaMvPnp=no
ethaddr=00:50:43:00:02:02
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
pcieTune1=no
ethact=egiga0
mainlineLinux=yes
bootcmd='run bootcmd_linux\; saveenv; reset
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 03, 2014 07:06PM
sigma,

Try this:
fw_setenv machid 118f

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Always the same, is 3.14 capable of writing new uboot to nand?
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 04, 2014 03:13PM
@sigma,

Your envs look odd:
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock'\; saveenv; reset 
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux'\; saveenv; reset 

bootcmd='run bootcmd_linux\; saveenv; reset

Have you tried to set it back to stock and back to linux again? in serial console:
run to_stock
run to_linux

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



Edited 1 time(s). Last edit at 09/04/2014 03:14PM by bodhi.
what axactly looks odd?

yes , i tried to set it back and again, alway ending in uboot
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 04, 2014 04:24PM
sigma,

This bootcmd should be:
bootcmd='run bootcmd_linux'

And to_stock and to_linux should be:
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset

BTW, you can post in this NSA325 thread to get help quicker: http://forum.doozan.com/read.php?2,14351

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



Edited 1 time(s). Last edit at 09/04/2014 04:28PM by bodhi.
that solved it, thank you bodhi! stupid copy and paste mistake
Hi bodhi,

after set up the power button for shutdown on my Zyxel NSA325, i have the following problem:

[FAIL] Loading ACPI kernel modules... failed!
[....] Starting ACPI services...RTNETLINK1 answers: No such file or directory
acpid: error talking to the kernel via netlink


-sunfire
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 21, 2014 03:57PM
@sunfire,

I saw the error below too, but have not got the time to investigate. If anybody know why, please respond!
[FAIL] Loading ACPI kernel modules... failed!
[....] Starting ACPI services...RTNETLINK1 answers: No such file or directory
acpid: error talking to the kernel via netlink
Please repost this in the NSA325 thread: http://forum.doozan.com/read.php?2,14351

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 28, 2014 04:27PM
Kernel 3.16.0-kirkwood-tld-3 package was uploaded. The only update in this kernel is to incorporate the fix for NSA325 watchdog. Please see 1st post for download link.

NOTE: for NSA325, don't install this kernel if you still have the stock u-boot. This kernel will not kill the watchdog by itself, it is assumed that the new u-boot was already installed and already turned off the watchdog during boot.

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



Edited 2 time(s). Last edit at 09/28/2014 04:36PM by bodhi.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 29, 2014 02:18AM
your instructions include running this: mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.16.0-kirkwood-tld-2 -d /boot/initrd.img-3.16.0-kirkwood-tld-2 /boot/uInitrd

I think you should add some documentation, because /boot/initrd.img-3.16.0-kirkwood-tld-2 doesn't exist even after installing the .deb.

Same thing with the oxnas instructions, but there I found an initrd in the previous update's .deb.

Also it's good practice to put a folder into the root of any archive file so that when you extract the folder you have it's files in it's own folder and not clutter the rest of your typical overfilled mess of a home folder :)



Edited 1 time(s). Last edit at 09/29/2014 02:22AM by h1ro.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 29, 2014 02:47AM
h1ro,

> your instructions include running this: mkimage -A
> arm -O linux -T ramdisk -C gzip -a 0x00000000 -e
> 0x00000000 -n initramfs-3.16.0-kirkwood-tld-2 -d
> /boot/initrd.img-3.16.0-kirkwood-tld-2
> /boot/uInitrd
>
> I think you should add some documentation, because
> /boot/initrd.img-3.16.0-kirkwood-tld-2 doesn't
> exist even after installing the .deb.
>

Are you sure? dpkg always generates the initrd.img-xxx for me. And so it seems for others (nobody has raised this question).

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



Edited 1 time(s). Last edit at 09/29/2014 02:54AM by bodhi.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
September 29, 2014 04:28AM
Yes, in the last 3 kirkwood releases it's not included, see here:
for x in 1 2 3; do echo `md5sum linux-3.16.0-kirkwood-tld-$x-bodhi/linux-image-*deb` `dpkg-deb -c linux-3.16.0-kirkwood-tld-$x-bodhi/linux-image-*deb|grep initrd` ; done
e1d7c0ae5c68ca7f8440d7100f58f707 linux-3.16.0-kirkwood-tld-1-bodhi/linux-image-3.16.0-kirkwood-tld-1_1_armel.deb
696f86d265848ff434f8e3480d9494e6 linux-3.16.0-kirkwood-tld-2-bodhi/linux-image-3.16.0-kirkwood-tld-2_2_armel.deb
1eff1128107314287208d90485dcd74c linux-3.16.0-kirkwood-tld-3-bodhi/linux-image-3.16.0-kirkwood-tld-3_3_armel.deb

For oxnas it's not included in the 3.16 image, but it is indeed included in the 3.15.3 package as you can see here:
$ dpkg-deb -c linux-image-3.15.3-oxnas-tld-1_1.0_armel.deb |grep initrd
-rw-r--r-- root/root 2053518 2014-07-04 23:26:41 ./boot/initrd.img-3.15.3-oxnas-tld-1

Now I also checked kirkwood's last 3.15 package, there initrd is also included.



Edited 2 time(s). Last edit at 09/29/2014 06:18AM by h1ro.
Sorry, you can't reply to this topic. It has been closed.