Welcome! Log In Create A New Profile

Advanced

Linux Kernel 4.6 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs

Posted by bodhi 
Linux Kernel 4.6 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
March 31, 2013 06:53PM
Linux Kernel 4.6 Kirkwood package and rootfs (Flattened Device Tree) for GoFlex Home/Net, Pogoplug E02/Mobile/V4, iConnect, Dockstar, Sheevaplug, NSA320, NSA320S, NSA325, NSA310S, NSA310, Topkick, Netgear Stora, ASUS-M25, Iomega ix4-200d, QiZhiTong 501mv2, HP Thin Client T5325, LG N1T1, Linksys EA4500, and all other Kirkwood plugs that are already in the mainline.

It is not absolute necessary to update to newer U-Boot to run this rootfs and or kernel. It should boot with older U-Boot as far back as 2011, perhaps even 2009 or earlier. However, I would recommed to install the latest U-Boot for Kirkwood. This new u-boot default envs are set up to boot this rootfs. And there is a lot of modern features in the new U-Boot that power users would need in a NAS.

Important note:

There are 2 different ways to boot FDT kernel (since version 3.17). One with no change in U-Boot envs from the way we boot kernel 3.16.x. One with a small change in U-Boot envs with the way we load kernel files. So please read the new instruction if your current kernel is 3.16 or earlier.

Summary decription:

These are my ongoing released Kirkwood kernel builds. tld-xx is my naming convention for a minor version in a kernel. For example, 3.xx.0-kirkwood-tld-1 is version 3.xx.0, custom version tld-1. When you see -kirkwood-tld-xx postfix, it's my custom build (where mainline build has -kirkwood postfix).

The released tarball linux-x.xx.x-kirkwood-tld-x-bodhi.tar.bz2 includes everything you need to build your own kernel from mainline kernel source tree (patches and config file are all that needed). The kernel image is included in it for users who just want to install kernel.

The released tarball Debian-x.xx.x-kirkwood-tld-xx-rootfs-bodhi.tar.bz2 is the basic rootfs which is a complete Debian system for Kirkwood boxes ready to be used. It is basic Debian system where you can build upon by installing packages. This rootfs was created by Debian debootstrap and then a few packages were installed for user’s convenience. This rootfs is dedicated for the purpose of upgrading and release distribution.

Latest kernel: linux-4.6.0-kirkwood-tld-1-bodhi.tar.bz2 (20 May 2016)
Latest rootfs: Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (20 Feb 2016)

========================================================================

Updated 20 May 2016:

Kernel linux-4.6.0-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- Supports for Linksys EA4500. Use kirkwood-ea4500.dtb to boot this box. DSA (kirkwood-ea4500-dsa.dtb) is still a work-in-progress.
- HP T5325: Enable internal sound chip.
- Fix network issue with Zyxel NSA320S and NSA310S.
- New file system is enabled in the kernel: OrangeFS.

Credits:
- Thanks megal0maniac and bobafetthotmail for testing and providing the DTS for Linksys EA4500
- Thanks syong for testing HP T5325 sound system.


Latest Linux kernel 4.6 general release information can be found at:
LinuxChanges log

Download at Dropbox:
linux-4.6.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
aea582fdfebfcce7846f83434e543030
sha256:
697364455c86578a4e346de357f5a29a8754dbee8c207085031c59c80577b02b

This tarball contains 6 files:

linux-image-4.6.0-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.6.0-kirkwood-tld-1_1.0_armel.deb
config-4.6.0-kirkwood-tld-1
zImage-4.6.0-kirkwood-tld-1
linux-dtb-4.6.0-kirkwood-tld-1.tar
linux-4.6.0-kirkwood-tld-1.patch

Installation:


1. Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood-xxx
System.map-xx.xx.xx-kirkwood-xxx
vmlinuz-xx.xx.xx-kirkwood-xxx
config-xx.xx.xx-kirkwood-xxx
dts/

2. Extract the kernel and the DTB files in the archive:

cd /boot
tar -xjf linux-4.6.0-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.6.0-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (It is much better to generate uImage and uInitrd manually anyway):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-4.6.0-kirkwood-tld-1_1.0_armel.deb

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside /boot/dts/ for the correct DTB file name for your box.

Below are the 2 different alternatives in booting (method 4b is required for booting with older U-Boot that does not support FDT).

- Choose option a if you are going to use the current rootfs for many different Kirkwood boxes, as is. It should boot most of the Kirkwood boxes. And with the latest U-Boot for Kirkwood that suports FDT. This is the preferred method.

- Choose option b if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. This method is required for booting with older U-Boot that does not support FDT. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please post questions, since each box has a different flavor in setting up the envs).

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

- Generate the uImage and uInitrd.
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.6.0-kirkwood-tld-1 -d vmlinuz-4.6.0-kirkwood-tld-1 uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.6.0-kirkwood-tld-1 -d initrd.img-4.6.0-kirkwood-tld-1 uInitrd

- Set U-Boot envs for booting. The u-boot envs below are for 1st time upgrading, you don't need to do this step if you've installed the latest U-Boot for Kirkwood. Just make sure the DTB file is the correct one for your box.
fw_setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-goflexnet.dtb'    
fw_setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD)

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd:
cd /boot
mv uImage uImage.orig
cp -a zImage-4.6.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.6.0-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.6.0-kirkwood-tld-1 -d initrd.img-4.6.0-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
sync
sync
shutdown -r now


========================================================================

Updated 20 Mar 2016:

Kernel linux-4.5.0-kirkwood-tld-1 package has been uploaded. The following features were updated/added:

NOTE: The Zyxel NSA320S box needs more testing. Beware that Ethernet might not work in NSA320S! If you have this box, please report your finding in this thread whether it works for you.

1. Added support for new Kirkwood box: HP Thin Client T5325
2. Added support for new Kirkwood box: LG N1T1 NAS
3. Added support for the 3rd version of Zyxel NSA310 (kirkwood-nsa310b-lmsensor-redusbled.dtb)
4. Enabled Marvell CESA crypto

Credits:

- Gravelrash, CV, bobafetthotmail, LeggoMyEggo for testing this kernel for HP Thin Client T5325
- ron for contributing a new DTS to bring up the LG N1T1 NAS box
- pbg4 and bobafetthotmail for idea about the 3rd Zyxel NSA310 DTS
- pld for the Marvell Cesa config finding

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.5.0-kirkwood-tld-1-bodhi.tar.bz2

md5
3af01feae9d1baa2a0eacf3f60ba7223
sha256
1ecb8648587f51c1db8bc9045b939e741b99eb96548b536bcc02863182020c85

Installation:

Please use the same installation instruction in kernel 4.1.0-kirkwood-tld-1 (Updated 30 June 2015) below. Simply replace 4.1.0-kirkwood-tld-1 with 4.5.0-kirkwood-tld-1 in the instruction.

========================================================================

Updated 20 Feb 2016:

This Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 is to keep in sync with kernel Linux-4.4.0-kirkwood-tld-1.

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:

- tarball size: 137M
- install size: 398M
- a basic jessie rootfs.
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
9f957e1dc5a36f90a285ab4615cb02fd
sha256:
d33349118e34bd078ca635cd2d6776f3e312accfc77d29da5870b9980add5c36

And remember to check the hash of what you download, as always.

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).

Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.

1. Format a new USB drive with a single Ext3 partition, and label it rootfs.

2. Mount the drive on a Linux box. cd to top level directory and extract it. It is assuming the USB drive is mounted at /media/sdb1
cd /media/sdb1 
tar -xjf Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. Adjust fstab. Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Edit /media/sdb1/etc/fstab entry for /dev/root to match the rootfstype of your usb_rootfstype. However, you can keep it as is without problem in booting since the u-boot env bootargs takes precedent.
/dev/root      /               ext3    noatime,errors=remount-ro 0 1

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-4.4.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.4.0-kirkwood-tld-1 -d zImage.fdt  uImage
sync

Note: if your Linux box does not have mkimage, then install it

apt-get install u-boot-tools

5. Done. Take this USB rootfs to your plug and cold start. After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box.

Note1:

After logging in this rootf the first time, remember to generate new SSH key to make it your own unique rootfs. And also update your rootfs to get the latest Debian package security updates:
rm /etc/ssh/ssh_host*
ssh-keygen -A

apt-get update
apt-get upgrade

Note2:

To boot with systemd, add this parameter to your u-boot env bootargs. If you are booting with my latest u-boot images then use the uEnv.txt capability to do this. See the instruction about uEnvt.txt in that thread.
init=/bin/systemd
For example,
fw_setenv usb_set_bootargs 'setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts init=/bin/systemd'

If that's still not possible to run systemd, you might want to install it again:
apt-get install systemd



========================================================================

Updated 31 Jan 2015:

Kernel linux-4.4.0-kirkwood-tld-1 package has been uploaded. The following features were updated/added:

1. Add support for new Kirkwood box: QiZhiTong 501mv2.
2. Add kernel support for Distributed Switch Architecture (DSA)
3. Correct NAND chip delay in kirkwood-pogo_e02.dts
4. Add NAND chip delay in kirkwood-iomega_ix4_200d.dts
5. Fix various typos in DTS files.

Credits:

- wacke for the QiZhiTong 501mv2 bringup and patch

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.4.0-kirkwood-tld-1-bodhi.tar.bz2
md5
32dcb6d71d2f5333b2067e8a2d8220bd

Installation:

Please use the same installation instruction in kernel 4.1.0-kirkwood-tld-1 (Updated 30 June 2015) below. Simply replace 4.1.0-kirkwood-tld-1 with 4.4.0-kirkwood-tld-1 in the instruction.

========================================================================
Updated 05 Sept 2015:

Kernel linux-4.2.0-kirkwood-tld-1 package has been uploaded. The following features were updated/added:

1. Incorprate patched nsa3xx-hwmon module for NSA320 and NSA310 (some variant of). This patch allows these boxes to use the nsa3xx-hwmon like before (Device Tree transition in kernel 3.17 has broken this module). It also streams line the way NSA3xx hwmon is implemented in the kernel.
2. New Marvell CESA crypto driver is activated in this kernel.
3. Netgear Stora DTS was modified to correct NAND chip deday and enable write access to mtd0 (u-boot and u-boot envs).

Credits:
- pbg4 for the NSA3xx hwmon patches.
- pengu for testing the kernel for Netgear Stora.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.2.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
ba496ab080dfb54a0d79b1aad707fdfe

Installation:

Please use the same installation instruction in kernel 4.1.0-kirkwood-tld-1 (Updated 30 June 2015) below. Simply replace 4.1.0-kirkwood-tld-1 with 4.2.0-kirkwood-tld-1 in the instruction.

========================================================================

Updated 09 Aug 2015:

Kernel linux-4.1.0-kirkwood-tld-2 package has been uploaded. The following features were added:

1. Ethernet link PHY fixup for NSA 310s, 320s, 320, 325. To fix up the Ethernet PHY during kernel booting after a shutdown/powerdown (i.e no network link problem).
2. Added NSA310S DTB. Please use this DTB file to boot the NSA310S box. Note that the LED triggers are now properly named with nsa310s prefix.
3. Support for Iomega ix4 200d box
4. Correct datetime setting for Kirkwood boxes that use ht1382 RTC
5. Ext4 Encryption built into the kernel (to enable encrypted rootfs)
6. Kirkwood Thermal module (this is still a work-in-progress, more to be added later)

Credits:
- osa for the NSA3xx PHY fixup patch and HT1382 RTC patch.
- superelchi for the NSA3xx PHY fixup userland workaround script.
- JohnnyUSA, pengu, and superelchi for testing many NSA3xx PHY fixup solutions.
- damacc for the Iomega ix4-200d bringup and the patch.
- pbg4 for the info about Kirkwood Thermal module.

Latest Linux kernel 4.1 general release information can be found at:
LinuxChanges log

Download at Dropbox:
linux-4.1.0-kirkwood-tld-2-bodhi.tar.bz2
md5:
cad08aa8e1d48d680f89b860d08f4498

Please use the same installation instruction in kernel 4.1.0-kirkwood-tld-1 (Updated 30 June 2015) right below. Simply replace 4.1.0-kirkwood-tld-1 with 4.1.0-kirkwood-tld-2 in the instruction.

========================================================================

Updated 30 June 2015:

Kernel linux-4.1.0-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- Modifed patch for dvb-usb-dw2102 device
- Modified DTS for Netgear Stora (Note: the Stora LED trigger names were changed in this kernel, please update your LED controls as needed)
- Support for NSA310S box (Note: please use NSA320S DTB file to run this kernel, this will be updated in future release to the right name)
- Added various kernel configuration for new capabilities and per forum members requests (eg. MTD_BLOCK, SPI NOR, QMI_WWAN)

Known problems:
- The NSA320 hwmon module is not working properly in this kernel since we transitioned to FDT version 3.18.5. pbg4 has indentified and explained the root cause here.

Credits:
- pbg4 for the modified patch for dvb-usb-dw2102
- Hiro.AK47 for the modified Netgear Stora DTS
- pengu for doing all the testing needed to bring up the NSA310S box.

Latest Linux kernel 4.1 general release information can be found at:
LinuxChanges log

Download at Dropbox:
linux-4.1.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
557f31dc4b58d226a92cd57b4f3c396c

This tarball contains 6 files:

linux-image-4.1.0-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.1.0-kirkwood-tld-1_1.0_armel.deb
config-4.1.0-kirkwood-tld-1
zImage-4.1.0-kirkwood-tld-1
linux-dtb-4.1.0-kirkwood-tld-1.tar
linux-4.1.0-kirkwood-tld-1.patch

Installation:


1. Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood-xxx
System.map-xx.xx.xx-kirkwood-xxx
vmlinuz-xx.xx.xx-kirkwood-xxx
config-xx.xx.xx-kirkwood-xxx

2. Extract the kernel and the DTB files in the archive:

cd /boot
tar -xjf linux-4.1.0-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.1.0-kirkwood-tld-1.tar

3. 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):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-4.1.0-kirkwood-tld-1_1.0_armel.deb

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside /boot/dts/ for the correct DTB file name for your box.

Below are the 2 different alternatives in booting (method 4b is required for booting with older U-Boot that does not support FDT).

- Choose option a if you are going to use the current rootfs for many different Kirkwood boxes, as is. It should boot most of the Kirkwood boxes. And with newer U-boot that suports FDT. This is the preferred method.

- Choose option b if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. This method is required for booting with older U-Boot that does not support FDT. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please post questions, since each box has a different flavor in setting up the envs).

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd, and set U-Boot envs for booting (the u-boot envs below are for first time upgrading, you might already have these set up):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.1.0-kirkwood-tld-1 -d vmlinuz-4.1.0-kirkwood-tld-1 uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.1.0-kirkwood-tld-1 -d initrd.img-4.1.0-kirkwood-tld-1 uInitrd

fw_setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-goflexnet.dtb'    
fw_setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD)

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd:
cd /boot
cp -a zImage-4.1.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.1.0-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.1.0-kirkwood-tld-1 -d initrd.img-4.1.0-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now

========================================================================

Updated 1 May 2015:

Kernel linux-4.0.0-kirkwood-tld-2 package has been uploaded. The following features were added:

1. Fixed kernel regression with USB 3.0 on NSA325 and Pogo V4, and PCI wifi card on iConnect. This is a PCI problem that effect all Kirkwood platforms with devices attached to PCI.
2. Added Intel Wifi PCI cards (CONFIG_IWLWIFI), and a few others RealTech wifi devices.
3. Add other miscellaneous kernel configs (e.g. CONFIG_DYNAMIC_DEBUG)

Credits:
Thanks pbg4 for helps in debugging the bug, and researching info about the kernel regression patch.

Note: Only NSA325, PogoV4, and iConnect boxes (i.e. any Kirkwood boxes with PCI) need to upgrade to this kernel from linux-4.0.0-kirkwood-tld-1. Or if you need the newly added wifi devices. Otherwise, nothing important has changed.

Please use the same installation instruction in kernel 4.0.0-kirkwood-tld-1 (updated 16 April 2015) right below. Simply replace 4.0.0-kirkwood-tld-1 with 4.0.0-kirkwood-tld-2 in the instruction.

Download at Dropbox:
linux-4.0.0-kirkwood-tld-2-bodhi.tar.bz2
md5:
c2a304c2c66fd0cef8cc74d2fdfd3030

========================================================================

Updated 16 April 2015:

Kernel 4.0.0-kirkwood-tld-1 package has been uploaded. The following features were added:

1. This FDT kernel now supports NSA320S, Asus M25, and Netgear Stora. They are still under test, so please post feeback if you try this kernel.
2. Added back the NSA3xx Hardware Monitoring module (missing in previous kernel version)
3. Add module lirc_rpi
4. Added various kernel configs that are new in 4.0 (e.g. device tree overlay), and also various requested configs from forum members.

Warning1: This kernel has introduced a regression regarding USB 3.0 (USB 2.0 still works fine). This kernel version has problem initializing the USB 3.0 port for Kirkwood plugs that has this (e.g. NSA325 and Pogoplug V4). So if it is important to you on these boxes, please stay with kernel 3.18.5.

Warning2: For iConnect, please stay with kernel 3.18.5. We're seeing some problem with initializing the Wifi card.


Credits: Thanks to chrlee for the NSA320S patch, moonman at Arch site for noticing the missing NSA3xx Hwmon module, TEN for lirc_rpi suggestion, balbes150 for Asus-M25 DTS, and t00 for the Netgear Stora DTS.

Latest Linux kernel 4.0 general release information can be found at:
LinuxChanges log

Download at Dropbox:
linux-4.0.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
51c1669a9dafe99395446931a3eb3905

This tarball contains 6 files:

linux-image-4.0.0-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.0.0-kirkwood-tld-1_1.0_armel.deb
config-4.0.0-kirkwood-tld-1
zImage-4.0.0-kirkwood-tld-1
linux-dtb-4.0.0-kirkwood-tld-1.tar
linux-4.0.0-kirkwood-tld-1.patch

Installation:


1. Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood-xxx
System.map-xx.xx.xx-kirkwood-xxx
vmlinuz-xx.xx.xx-kirkwood-xxx
config-xx.xx.xx-kirkwood-xxx

2. Extract the kernel and the DTB files in the archive:

cd /boot
tar -xjf linux-4.0.0-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.0.0-kirkwood-tld-1.tar

3. 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):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-4.0.0-kirkwood-tld-1_1_armel.deb

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside /boot/dts/ for the correct DTB file name for your box.

Below are the 2 different alternatives in booting (method 4b is required for booting with older U-Boot that does not support FDT).

- Choose option a if you are going to use the current rootfs for many different Kirkwood boxes, as is. It should boot most of the Kirkwood boxes. And with newer U-boot that suports FDT. This is the preferred method.

- Choose option b if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. This method is required for booting with older U-Boot that does not support FDT. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please post questions, since each box has a different flavor in setting up the envs).

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd, and set U-Boot envs for booting (the u-boot envs below are for first time upgrading, you might already have these set up):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.0.0-kirkwood-tld-1 -d vmlinuz-4.0.0-kirkwood-tld-1 uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.0.0-kirkwood-tld-1 -d initrd.img-4.0.0-kirkwood-tld-1 uInitrd

fw_setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-goflexnet.dtb'    
fw_setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD)

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd:
cd /boot
cp -a zImage-4.0.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.0.0-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.0.0-kirkwood-tld-1 -d initrd.img-4.0.0-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now

========================================================================

Updated 24 Feb 2015:

This rootfs is the first Debian jessie rootfs in my Kirkwood kernel/rootfs release series, and to keep in sync with kernel Linux-3.18.5-kirkwood-tld-1.

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:
- tarball size: 134M
- install size: 388M
- a basic jessie rootfs.
- The init system used in this rootfs is sysvinit (same as in the previous wheezy rootfs). To boot with systemd, see note 4 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root


Download at Dropbox:
Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
b5057448e7e08c747793f205e7027395


Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too). It is assuming the USB drive is mounted at /media/sdb1.

Note: all steps below must be done while logging in as root user (not sudo).

1. Format a new USB drive with a single Ext3 partition, and label it rootfs. Note: if your existing uBoot env for rootfs type is ext2, then you might want to keep it consistent and use Ext2 USB drive. It will work with Ext3 drive without problem, though.

For example:
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
rootfstype=ext2

2. Mount the drive on a Linux box. cd to top level directory and extract it.
cd /media/sdb1 
tar -xjf Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. edit /media/sdb1/etc/fstab entry for /dev/root to match the rootfstype of your usb_rootfstype (however, you can keep it as Ext2 without problem in booting an Ext3 partition).
/dev/root      /               ext2    noatime,errors=remount-ro 0 1

4. Create uImage with embbeded DTB (If this is not first time installation, please see Note 2 below).

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Look inside /media/sdb1/boot/dts/ for the correct DTB file name for your box.

cd /media/sdb1/boot
cp -a zImage-3.18.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d zImage.fdt uImage
sync

5. Done. Take this USB rootfs to your plug and cold start.

Note1:

After logging in this rootf the first time, remember to generate new SSH key to make it your own unique rootfs. And also update your rootfs to get the latest Debian package updates:
rm /etc/ssh/ssh_host*
ssh-keygen -A

apt-get update
apt-get upgrade

Note2: To simplify the first time installation process, the uImage is recreated with the DTB embedded in step 4. If you are familiar with FDT kernel booting, and want to boot with separate DTB, see the Kernel 3.18 installation section 4a in this thread for instruction about setting up u-boot envs.

Note3: if the Linux box that you are using to create rootfs does not already have mkimage installed then install u-boot-tools package to make it available:
apt-get install u-boot-tools

Note4:

To boot with systemd, add this parameter to your u-boot env bootargs:

init=/bin/systemd
For example,
fw_setenv usb_set_bootargs 'setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts init=/bin/systemd'

========================================================================

Updated 07 Feb 2015:

Kernel 3.18.5-kirkwood-tld-1 package has been uploaded. The following features were added:

1. USB LED trigger. For boxes that have LEDs for USB drives (e.g. NSA325 and iConnect), the trigger files now contain new options to turn on the LED for each USB drive activity. Please see USB LED setting example in this post.

2. Added various kernel configuration that are newly available in 3.18, and also various kernel configuration per forum users requests.

Latest Linux kernel 3.18 general release information can be found at:
LinuxChanges log

Download at Dropbox:
linux-3.18.5-kirkwood-tld-1-bodhi.tar.bz2
md5:
68c96df62427c69bc7599ff31859b9b4

This tarball contains 6 files:

linux-image-3.18.5-kirkwood-tld-1_1_armel.deb
linux-headers-3.18.5-kirkwood-tld-1_1_armel.deb
config-3.18.5-kirkwood-tld-1
zImage-3.18.5-kirkwood-tld-1
linux-dtb-3.18.5-kirkwood-tld-1.tar
linux-3.18.5-kirkwood-tld-1.patch

Installation:


1. Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood-xxx
System.map-xx.xx.xx-kirkwood-xxx
vmlinuz-xx.xx.xx-kirkwood-xxx
config-xx.xx.xx-kirkwood-xxx

2. Extract the kernel and the DTB files in the archive:

cd /boot
tar -xjf linux-3.18.5-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-3.18.5-kirkwood-tld-1.tar

3. 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):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-3.18.5-kirkwood-tld-1_1_armel.deb

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Look inside /boot/dts/ for the correct DTB file name for your box.

Below are the 2 different alternatives in booting (method 4b is required for booting with older U-Boot that does not support FDT).

- Choose option a if you are going to use the current rootfs for many different Kirkwood boxes, as is. It should boot most of the Kirkwood boxes. And with newer U-boot that suports FDT. This is the preferred method.

- Choose option b if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. This method is required for booting with older U-Boot that does not support FDT.

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.

Generate the uImage and uInitrd, and set U-Boot envs for booting:
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d /boot/vmlinuz-3.18.5-kirkwood-tld-1 /boot/uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d /boot/initrd.img-3.18.5-kirkwood-tld-1 /boot/uInitrd

fw_setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-goflexnet.dtb'    
fw_setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs change needed)

Generate the uImage and uInitrd:
cd /boot
cp -a zImage-3.18.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d /boot/zImage.fdt /boot/uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d /boot/initrd.img-3.18.5-kirkwood-tld-1 /boot/uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now

========================================================================

Updated 31 Oct 2014:

Rootfs Debian-3.17.0-kirkwood-tld-1 was uploaded. This rootfs is to keep in sync with kernel Linux-3.17.0-kirkwood-tld-1.

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:
- tarball size: 99M
- install size: 298M
- a basic wheezy rootfs
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, and ethtool.
- see LED controls in /etc/rc.local, and /etc/rc0.d/K07halt (updated in this version to include all Kirkwood boxes LED controls). Note: for LED controls, look in /sys/class/leds after the system is booted (I might have some old settings in this rootfs rc.local that need to be adjusted to the correct trigger names).
- see some useful aliases in /root/.profile
- root password: root


Download at Dropbox:
Debian-3.17.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
fae6cfbec8c58da0066af1041cf89f2a

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too). It is assuming the USB drive is mounted at /media/sdb1.

Note: all steps below must be done while logging in as root user (not sudo).

1. Format a new single partition Ext3 USB drive, and label it rootfs. Note: if your existing uBoot env for rootfs type is ext2, then you might want to keep it consistent and use Ext2 USB drive. It will work with Ext3 drive without problem, though.

For example:
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
rootfstype=ext2

2. Mount the drive on a Linux box. cd to top level directory and extract it.
cd /media/sdb1 
tar -xjf Debian-3.17.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. edit /media/sdb1/etc/fstab entry for /dev/root to match the rootfstype of your usb_rootfstype (however, you can keep it as Ext2 without problem in booting an Ext3 partition).
/dev/root      /               ext2    noatime,errors=remount-ro 0 1

4. Create uImage with embbeded DTB (If this is not first time installation, please see Note 2 below).

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Look inside /media/sdb1/boot/dts/ for the correct DTB file name for your box.

cd /media/sdb1/boot
cp -a zImage-3.17.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.17.0-kirkwood-tld-1 -d /media/sdb1/boot/zImage.fdt /media/sdb1/boot/uImage
sync

5. Done. Take this USB rootfs to your plug and cold start.

Note1:

After logging in this rootf the first time, remember to do update your rootfs to get the latest Debian package updates:
apt-get update
apt-get upgrade

Note2: To simplify the first time installation process, the uImage is recreated with the DTB embedded in step 4. If you are familiar with FDT kernel booting, and want to boot with separate DTB, see the Kernel 3.17 installation section 4a in this thread for instruction about setting up u-boot envs.

Note3: if the Linux box that you are using to create rootfs does not already have mkimage installed then install u-boot-tools package to make it available:
apt-get install u-boot-tools

========================================================================

Updated 26 Oct 2014:

Kernel 3.17.0-kirkwood-tld-1 package was uploaded. This is the first FDT kernel in my continuing release series for Debian Kirkwood boxex.

Latest Linux kernel 3.17 general release information can be found at:
LinuxChanges log

Credits: Thanks the ALARM devs at Arch site for the GoFlex Home and Pogo E02 DTS, and forum member ebbix for Pogo V4 DTS, and pkirchhofer for the NSA325 DTS.

Download at Dropbox:
linux-3.17.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
3fdee09de0e150298d1b04f485a0a698

This tarball contains 6 files:

linux-image-3.17.0-kirkwood-tld-1_1_armel.deb
linux-headers-3.17.0-kirkwood-tld-1_1_armel.deb
config-3.17.0-kirkwood-tld-1
zImage-3.17.0-kirkwood-tld-1
linux-dtb-3.17.0-kirkwood-tld-1.tar
linux-3.17.0-kirkwood-tld-1.patch

NOTE for NSA325: the patch file was missing compile option for nsa325 DTB in arch/arm/boot/dts/Makefile (thanks balbes150). So if you are compiling your own kernel, one more line is needed as described here.

Installation:


1. Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood-xxx
System.map-xx.xx.xx-kirkwood-xxx
vmlinuz-xx.xx.xx-kirkwood-xxx
config-xx.xx.xx-kirkwood-xxx

2. Extract the kernel and the DTB files in the archive:

cd /boot
tar -xjf linux-3.17.0-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-3.17.0-kirkwood-tld-1.tar

3. 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):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-3.17.0-kirkwood-tld-1_1_armel.deb

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Look inside /boot/dts/ for the correct DTB file name for your box.

Below are the 2 different alternatives in booting (method 4b is required for booting with older U-Boot that does not support FDT).

- Choose option a if you are going to use the current rootfs for many different Kirkwood boxes, as is. It should boot most of the Kirkwood boxes. And with newer U-boot that suports FDT. This is the preferred method.

- Choose option b if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. This method is required for booting with older U-Boot that does not support FDT.

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.

Generate the uImage and uInitrd, and set U-Boot envs for booting:
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.17.0-kirkwood-tld-1 -d /boot/vmlinuz-3.17.0-kirkwood-tld-1 /boot/uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.17.0-kirkwood-tld-1 -d /boot/initrd.img-3.17.0-kirkwood-tld-1 /boot/uInitrd

fw_setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-goflexnet.dtb'    
fw_setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs change needed)

Generate the uImage and uInitrd:
cd /boot
cp -a zImage-3.17.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.17.0-kirkwood-tld-1 -d /boot/zImage.fdt /boot/uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.17.0-kirkwood-tld-1 -d /boot/initrd.img-3.17.0-kirkwood-tld-1 /boot/uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now

========================================================================

Updated 28 Sept 2014:

Kernel 3.16.0-kirkwood-tld-3 package was uploaded. The only change in this version from 3.16.0-kirkwood-tld-2 is to incorporate the fix for the NSA325 watchdog.

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.

Download at Dropbox:
linux-3.16.0-kirkwood-tld-3-bodhi.tar.bz2
md5:
2138c369514630977a6b961376d0800b

This tarball contains 4 files:

linux-image-3.16.0-kirkwood-tld-3_3_armel.deb
linux-headers-3.16.0-kirkwood-tld-3_3_armel.deb
config-3.16.0-kirkwood-tld-3
linux-3.16.0-kirkwood-tld-3.patch

Please follow the installation instruction for kernel 3.16.0-kirkwood-tld-2 below.

========================================================================

Updated 02 Sept 2014 (kernel):

Kernel 3.16.0-kirkwood-tld-2 package was uploaded. The following updates were implemented:

1. Add CONFIG_PM and all associated kernel config options for Suspend, Hibernate…
2. TCP segmentation offload is set to OFF by default (to work around problem with SAMBA files transfer).
3. Make mtd0 writeable for NSA325 and NSA320.

Important Note: if you are running RAID, please watch and pay attention to the new kernel feature for PM (number 1 above). Make sure that it is by default not activated so that it does not affect RAID (i.e. Sleep, Suspend, and Hibernate could potentially mess up RAID).

Also, latest Linux kernel 3.16 general release information can be found at:
LinuxChanges log

Download at Dropbox:
linux-3.16.0-kirkwood-tld-2-bodhi.tar.bz2
md5:
5a2a090d604dd016ebf266936264d2ec

This tarball contains 4 files:

linux-image-3.16.0-kirkwood-tld-2_2_armel.deb
linux-headers-3.16.0-kirkwood-tld-2_2_armel.deb
config-3.16.0-kirkwood-tld-2
linux-3.16.0-kirkwood-tld-2.patch

Installation:

- Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood 
System.map-xx.xx.xx-kirkwood 
vmlinuz-xx.xx.xx-kirkwood 
config-xx.xx.xx-kirkwood

- Extract the kernel in the archive:

tar -xjf linux-3.16.0-kirkwood-tld-2-bodhi.tar.bz2

- 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-2_2_armel.deb

- Create uImage and uInitrd manually:
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.16.0-kirkwood-tld-2 -d /boot/vmlinuz-3.16.0-kirkwood-tld-2 /boot/uImage 
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

- The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now

========================================================================

Updated 02 Sept 2014 (rootfs):

Rootfs Debian-3.16.0-kirkwood-tld-2 was uploaded. This rootfs is to keep in sync with kernel Linux-3.16.0-kirkwood-tld-2 (and its new features).

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:
- tarball size: 117M
- install size: 316M
- a basic wheezy rootfs
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, and ethtool.
- see LED controls in /etc/rc.local, and /etc/rc0.d/K07halt (for NSAxxx LEDs control, see pbg4, and buttzy)
- see some useful aliases in /root/.profile
- root password: root

Important Note: if you are running RAID, please watch and pay attention to the new kernel feature for PM (number 1 above). Make sure that it is by default not activated so that it does not affect RAID (i.e. Sleep, Suspend, and Hibernate could potentially mess up RAID).

Download at Dropbox:
Debian-3.16.0-kirkwood-tld-2-rootfs-bodhi.tar.bz2
md5:
c70033d09a82832ba75fd9cfa361c2c5

Installation:

- Format a new USB drive with a single Ext3 partition, and label it rootfs. Note: if your uBoot env for rootfs type is ext2, then you might want to keep it consistemt and use Ext2 USB drive. It will work with Ext3 drive without problem, though (If unsure how to set this u-boot env on the installation target, then don't worry, it can be safely skipped. Usually Ext3 rootfs will boot with most new and old u-boot versions).

example of how to set u-boot env on the target machine:
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_rootfstype=ext2
or:
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
rootfstype=ext2

- As root user, cd to top level directory and extract it (assuming the USB drive is mounted at /media/sdb1)
cd /media/sdb1 
tar -xjf Debian-3.16.0-kirkwood-tld-2-rootfs-bodhi.tar.bz2
- edit /media/sdb1/etc/fstab entry for /dev/root to match the rootfstype of your usb_rootfstype.
- sync to complete .
sync

- Take this USB rootfs to your plug and cold start.

Note:

After logging in this rootf the first time, remember to do update your rootfs to get the latest Debian package updates:

apt-get update
apt-get upgrade

========================================================================

Updated 10 Aug 2014:

Kernel 3.16.0-kirkwood-tld-1 package was uploaded. Latest kernel release information can be found at:
LinuxChanges log

Download at Dropbox:
linux-3.16.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
2c5772b642ff44f57e4a93a4a4e6eea9

This tarball contains 4 files:

linux-image-3.16.0-kirkwood-tld-1_1_armel.deb
linux-headers-3.16.0-kirkwood-tld-1_1_armel.deb
config-3.16.0-kirkwood-tld-1
linux-3.16.0-kirkwood-tld-1.patch

Installation:

- Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood 
System.map-xx.xx.xx-kirkwood 
vmlinuz-xx.xx.xx-kirkwood 
config-xx.xx.xx-kirkwood

- Extract the kernel in the archive:

tar -xjf linux-3.16.0-kirkwood-tld-1-bodhi.tar.bz2

- 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

- Create uImage and uInitrd manually:
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.16.0-kirkwood-tld-1 -d /boot/vmlinuz-3.16.0-kirkwood-tld-1 /boot/uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.16.0-kirkwood-tld-1 -d /boot/initrd.img-3.16.0-kirkwood-tld-1 /boot/uInitrd

- The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now


------------------------------------------
Updated 03 July 2014:

Kernel 3.15.3-kirkwood-tld-1 package was uploaded. This kernel 3.15 release has lots of new features:
LinuxChanges log

NOTE Aug 10th, 2014: kernel 3.15.3-kirkwood-tld-1 was not working for NSAxxx with stock U-Boot (all other boxes work fine). This has been fixed in 3.16 above.

Download at Dropbox:
linux-3.15.3-kirkwood-tld-1-bodhi.tar.bz2
md5:
6619b7632ae07c7f7ad8df93431ba22b

This tarball contains 4 files:

linux-image-3.15.3-kirkwood-tld-1_1.0_armel.deb
linux-headers-3.15.3-kirkwood-tld-1_1.0_armel.deb
config-3.15.3-tld-1
linux-3.15.3-tld-1.patch


Installation:

- Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood 
System.map-xx.xx.xx-kirkwood 
vmlinuz-xx.xx.xx-kirkwood 
config-xx.xx.xx-kirkwood

- Extract the kernel in the archive:

tar -xjf linux-3.15.3-kirkwood-tld-1-bodhi.tar.bz2

- 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.15.3-kirkwood-tld-1_1.0_armel.deb

- Create uImage and uInitrd manually:
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.15.3-kirkwood-tld-1 -d /boot/vmlinuz-3.15.3-kirkwood-tld-1 /boot/uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.15.3-kirkwood-tld-1 -d /boot/initrd.img-3.15.3-kirkwood-tld-1 /boot/uInitrd

- The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now

- Note:
For completeness, create symlinks for the kernel in your / directory (in case the rootfs is ever used with different bootloader). But it is not necessary to do this for uBoot.
cd / 
ln -s boot/vmlinuz-3.15.3-kirkwood-tld-1 vmlinuz 
ln -s boot/initrd.img-3.15.3-kirkwood-tld-1 initrd.img

-------------------------------------------------------

Updated 29 May 2014:

I've removed kernel linux-3.14.0-kirkwood-tld-2 temporarily, to investigate possible missconfiguration regarding the NSAxxx boxes sensors. Since then it was tested to be working OK, if you're already running kernel linux-3.14.0-kirkwood-tld-2 there is no need to do anything.

-------------------------------------------------------

Updated 21 April 2014:

Kernel linux-3.14.0-kirkwood-tld-2 package was uploaded. This is an update to kernel linux-3.14.0-kirkwood-tld-1:
- Supports Netgear Stora (still under testing). Please post feedback if you try this kernel on the Stora.
- pbg4's patch for dvb-usb-dw2102, tt-s2-4600 and some other dvb-usb S2 devices.

Temporarily removed (see reason above).

-------------------------------------------------------
Updated 15 April 2014:

Rootfs Debian-3.14.0-kirkwood-tld-1 was uploaded. This rootfs is to keep in sync with kernel Linux-3.14.0-kirkwood-tld-1 (and its new features).

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:
- tarball size: 95M
- install size: 293M
- a basic wheezy rootfs
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, and nfs server/client packages.
- see LED controls in /etc/rc.local, and /etc/rc0.d/K07halt (for NSAxxx LEDs control, see pbg4, and buttzy)
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:
Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
3c55093a67ea6166b31c9d111d896727

Installation:

- format a new ext3 USB drive, and label it rootfs. Note: if your uBoot env for rootfs type is ext2, then use an ext2 USB drive.

example:
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_rootfstype=ext2
or:
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
rootfstype=ext2

- As root user, cd to top level directory and extract it (assuming the USB drive is mounted at /media/sdb1)
cd /media/sdb1 
tar -xjf Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
- edit /media/sdb1/etc/fstab entry for /dev/root to match the rootfstype of your usb_rootfstype.
- sync to complete .
sync

- Take this USB rootfs to your plug and cold start.

Note:

After logging in this rootf the first time, remember to do update your rootfs to get the latest Debian package updates:

apt-get update
apt-get upgrade

------------------------------------------
Updated 04 April 2014:

Kernel 3.14.0-kirkwood-tld-1 package was uploaded. This kernel 3.14 release has lots of new features:
LinuxChanges log

I have also incorporated the following requests:
pbg4's patch for dvb-usb-dw2102, tt-s2-4600 and some other dvb-usb S2 devices
Request for more USB HIDDEV kernel config options

Download at Dropbox:
linux-3.14.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
3885d603208e83af36524a42c6a6f119

This tarball contains 4 files:

linux-image-3.14.0-kirkwood-tld-1_1.0_armel.deb
linux-headers-3.14.0-kirkwood-tld-1_1.0_armel.deb
config-3.14-kirkwood-tld-1
linux-3.14.0-tld-1-kirkwood.patch

Installation:

- Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):
uInitrd 
uImage 
initrd.img-xx.xx.xx-kirkwood 
System.map-xx.xx.xx-kirkwood 
vmlinuz-xx.xx.xx-kirkwood 
config-xx.xx.xx-kirkwood

- Extract the kernel in the archive:

tar -xjf linux-3.14.0-kirkwood-tld-1-bodhi.tar.bz2

- 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.14.0-kirkwood-tld-1_1.0_armel.deb

- Create uImage and uInitrd manually:
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.14.0-kirkwood-tld-1 -d /boot/vmlinuz-3.14.0-kirkwood-tld-1 /boot/uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.14.0-kirkwood-tld-1 -d /boot/initrd.img-3.14.0-kirkwood-tld-1 /boot/uInitrd

- The new uImage and uInitrd files should be created in /boot directory now. You're ready to reboot the system:
sync 
shutdown -r now

- Note:
For completeness, create symlinks for the kernel in your / directory (in case the rootfs is ever used with different bootloader). But it is not necessary to do this for uBoot.
cd / 
ln -s boot/vmlinuz-3.14.0-kirkwood-tld-1 vmlinuz 
ln -s boot/initrd.img-3.14.0-kirkwood-tld-1 initrd.img

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 156 time(s). Last edit at 08/18/2016 01:36AM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flatten Device Tree)
March 31, 2013 11:10PM
bodhi,

I have tried your kernel on my e02 and it works every time.

I hope I could test more but that is the only kind of plug that I have.

Well done and thank you for your effort.

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flatten Device Tree)
April 01, 2013 12:19AM
syong,

You're welcome, great to hear it works for your E02!

I'd like to hear feedback from others also, from anyone who tried this kernel on other Kirkwood plugs.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 02, 2013 04:18AM
Updated 1st post to attach patch file and kernel config file.
I have tried your kernel on my Goflex net, but ufortunatly it is not working.
I saw there are no modules for DVB S2 usb included, so i can not use the kernel, since i have my VDR running on the Goflex Net.
Anyway Thanks for your work.

Carlos
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 03, 2013 12:48AM
bodhi,

Two observations about your kernel and .config:
  1. No need to tar and zip the only kernel deb file, as it actually increases its size a little.
  2. No need to post the .config, as it already in the kernel deb file.
Also thank you for your patch which I tried to understand.

Now I am just wondering what is the usage of two newly added files:
security/tomoyo/builtin-policy.h
security/tomoyo/policy/exception_policy.conf
Thanks,

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 03, 2013 01:15AM
syong,

It's true, there is no need to tar+zip it. It was just out of a habit of doing that so it can be mailed easily. About the config file, some people might just want the config and patch file to build their own kernel, so I attached it anyway!

I forgot about the security policy files, it might have been because my build environment always as securiy update in sources list? I'll take a look later.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 03, 2013 01:24AM
Carlos Wrote:
-------------------------------------------------------
> I have tried your kernel on my Goflex net, but
> ufortunatly it is not working.
> I saw there are no modules for DVB S2 usb
> included, so i can not use the kernel, since i
> have my VDR running on the Goflex Net.
> Anyway Thanks for your work.
>
> Carlos

Carlos,

I will take a look. Do you know the exact name of the module? it's no trouble for me to compile it and upload separately.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 03, 2013 04:59AM
Hi bodhi,
I am using the following usb DVB S2 stick:
PCTV DVB-S2 Stick 460e (identifies as "PCTV Systems" "PCTV 460e")

As far as i know there are the following modules involved:

em28xx

Also i am booting from my sata disk so the sata modules should be also in the uInitrd.
I just installed your kernel and the Goflex Net didn't come up again. I have no console attached, so i was not able to see where the problem is.
Just went back to kernel 3.3.2 from davygravy
Attached is a dmesg output with my working kernel, may be that's of help for you.

Regards

Carlos
Attachments:
open | download - dmesg.0 (12.5 KB)
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 03, 2013 09:53AM
bodhi Wrote:
-------------------------------------------------------
> syong,
>
> It's true, there is no need to tar+zip it. It was
> just out of a habit of doing that so it can be
> mailed easily. About the config file, some people
> might just want the config and patch file to build
> their own kernel, so I attached it anyway!
>
> I forgot about the security policy files, it might
> have been because my build environment always as
> securiy update in sources list? I'll take a look
> later.

Thank you for caring for the details. For the security policy files, I just found the following:

http://lkml.indiana.edu/hypermail/linux/kernel/1202.1/02969.html

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 04, 2013 02:02AM
carlos Wrote:
-------------------------------------------------------
> Hi bodhi,
> I am using the following usb DVB S2 stick:
> PCTV DVB-S2 Stick 460e (identifies as "PCTV
> Systems" "PCTV 460e")
>
> As far as i know there are the following modules
> involved:
>
> em28xx
>
> Also i am booting from my sata disk so the sata
> modules should be also in the uInitrd.
> I just installed your kernel and the Goflex Net
> didn't come up again. I have no console attached,
> so i was not able to see where the problem is.
> Just went back to kernel 3.3.2 from
> davyg
> ravy

> Attached is a dmesg output with my working kernel,
> may be that's of help for you.
>
> Regards
>
> Carlos

Carlos,

I'm running my GoFlex Net with this kernel. If you're interested in see why it's not booting, you can setup netconsole and watch the booting progress. The dmesg log is very similar to what we usually see on the GoFlex Net.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 05, 2013 02:14PM
Hi,

is this kernel compiled with kernel modules for USB/P?

Thanks

SefanV3
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 12:38AM
SefanV3,

The answer should be in config-3.6.11-kirkwood-tld.

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 12:48AM
bodhi,

FYI, I just did a native compile with your kernel patch on 3.6.11 kernel.

The build worked fine. Here is the time it took:
real    406m3.601s
user    325m43.260s
sys     29m15.030s
I got a LZMA kernel by replacing 256M swap partition with a 32M swap file on usb and a 512M swap file on nfs. The /tmp on tmpfs is actually decreased from 100M to 57M, but it works!

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 02:58AM
syong,

Cool! glad it works. Looks like yours took the same time as my build did on the Goflex Net. There are quite a few modules that we don't really need, but I did not take them out. I figure somebody will need them someday.

Also, what I found regarding the security policy files was that it somehow got into the build and the patch was created with those changes. I've updated the patch to take out that portion and will reattach it.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 03:37PM
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 03:46PM
Thanks!

(%8)(14:41)(punk)~/ws> diff linux-3.6.11-kirkwood.patch pogo/kernel/3.6.11-patch
(%8)(14:41)(punk)~/ws>

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 04:43PM
Working on my dockstar, the only thing bad is the LED activity (stays green since power-on, no led activity).
By the way, I'm running only transmission, tightvncserver and lxde desktop. Running debian from a 500GB usb HDD.
Thanks! :)
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 04:49PM
Cool!

You can check your LEDs:
ls /sys/class/leds

If the Dockstar LED triggers are defined then you should see green and orange LED triggers. ArchNumber should be 2998.

# turn on green LED
echo default-on > /sys/class/leds/dockstar:green:health/trigger

# turn off orange LED
echo none > /sys/class/leds/dockstar:orange:misc/trigger

You can put these in your /etc/rc.local to turn on/off the LEDs (add them to the end of rc.local before the exit statement).



Edited 1 time(s). Last edit at 04/06/2013 05:18PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 07, 2013 10:43AM
Hi bodhi,
I tried with netcat to see what's the console output, but for me it looks all the same with the old kernel and with your kernel. The old one boots fine, but with yours i can not connect to the goflex anymore.
Is there a way to see the kernel output or the initrd output ?
See attached output.
Regards

Carlos
Attachments:
open | download - console.txt (5.5 KB)
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 07, 2013 03:17PM
Carlos,

I suspect this problem is with loading /dev/root during the time the initrd is trying to load the rootfs on the HDD. This can be observed if you have serial console. I had run into this problem from time to time when I use a rootfs that has been heavily used in installing new kernels.

If you have a fresh rootfs on a USB stick, e.g. created with davy's NSA320 rootfs or other means, then you could install the kernel on top of that and try booting with it. I know it probably does not help you because you're running a rootfs on HDD. But it could test the theory that the kernel is working or not. For my GoFlex Net, I started with a backup USB image, and installed this kernel on it.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 08, 2013 04:13PM
Well the leds were working. It was just the first time after flash, who knows!
After that it lasted 24h and dead :P. No longer booting at all. I suspect disk corruption.
Anyway, I reinstalled everything, working ok for now.
Thanks bodhi!



Edited 1 time(s). Last edit at 05/01/2013 08:54AM by David.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 01, 2013 08:57AM
root@debian:~# uname -a
Linux debian 3.6.11-kirkwood-tld #1 PREEMPT Sun Mar 31 01:19:22 PDT 2013 armv5tel GNU/Linux
root@debian:~# uptime
12:53:16 up 23 days, 17:47, 1 user, load average: 1.97, 1.85, 1.24

Wow...definitely this kernel is working great! :)
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 06, 2013 12:03PM
I just found this from dmesg:

[121225.583630] fetchmail: page allocation failure: order:1, mode:0x20
[121225.589958] [<c001329c>] (unwind_backtrace+0x0/0xe0) from [<c0098930>] (warn_alloc_failed+0xec/0x118)
[121225.599314] [<c0098930>] (warn_alloc_failed+0xec/0x118) from [<c009ae28>] (__alloc_pages_nodemask+0x6bc/0x7e0)
[121225.609458] [<c009ae28>] (__alloc_pages_nodemask+0x6bc/0x7e0) from [<c00c75bc>] (cache_alloc_refill+0x2e0/0x65c)
[121225.619767] [<c00c75bc>] (cache_alloc_refill+0x2e0/0x65c) from [<c00c7f14>] (kmem_cache_alloc+0x84/0x190)
[121225.629472] [<c00c7f14>] (kmem_cache_alloc+0x84/0x190) from [<c0278534>] (sk_prot_alloc+0x28/0xe8)
[121225.638564] [<c0278534>] (sk_prot_alloc+0x28/0xe8) from [<c02786e4>] (sk_clone_lock+0x14/0x270)
[121225.647397] [<c02786e4>] (sk_clone_lock+0x14/0x270) from [<c02ba724>] (inet_csk_clone_lock+0x10/0x90)
[121225.656755] [<c02ba724>] (inet_csk_clone_lock+0x10/0x90) from [<c02d1c54>] (tcp_create_openreq_child+0x18/0x440)
[121225.667205] [<c02d1c54>] (tcp_create_openreq_child+0x18/0x440) from [<bf22650c>] (tcp_v6_syn_recv_sock+0x144/0x4bc [ipv6])
[121225.678485] [<bf22650c>] (tcp_v6_syn_recv_sock+0x144/0x4bc [ipv6]) from [<c02d1a94>] (tcp_check_req+0x2c8/0x470)
[121225.688884] [<c02d1a94>] (tcp_check_req+0x2c8/0x470) from [<bf227fac>] (tcp_v6_do_rcv+0x288/0x4f4 [ipv6])
[121225.698745] [<bf227fac>] (tcp_v6_do_rcv+0x288/0x4f4 [ipv6]) from [<bf228890>] (tcp_v6_rcv+0x4d4/0x898 [ipv6])
[121225.708927] [<bf228890>] (tcp_v6_rcv+0x4d4/0x898 [ipv6]) from [<bf2087cc>] (ip6_input_finish+0x228/0x3e4 [ipv6])
[121225.719346] [<bf2087cc>] (ip6_input_finish+0x228/0x3e4 [ipv6]) from [<bf2089fc>] (ip6_rcv_finish+0x74/0x80 [ipv6])
[121225.729890] [<bf2089fc>] (ip6_rcv_finish+0x74/0x80 [ipv6]) from [<c0284f3c>] (__netif_receive_skb+0x7b8/0x848)
[121225.740035] [<c0284f3c>] (__netif_receive_skb+0x7b8/0x848) from [<c0285048>] (process_backlog+0x7c/0x140)
[121225.749739] [<c0285048>] (process_backlog+0x7c/0x140) from [<c0287120>] (net_rx_action+0x94/0x284)
[121225.758838] [<c0287120>] (net_rx_action+0x94/0x284) from [<c00238b0>] (__do_softirq+0x128/0x27c)
[121225.767755] [<c00238b0>] (__do_softirq+0x128/0x27c) from [<c0023bd0>] (do_softirq+0x4c/0x64)
[121225.776325] [<c0023bd0>] (do_softirq+0x4c/0x64) from [<c0023d58>] (local_bh_enable+0x98/0xd8)
[121225.784979] [<c0023d58>] (local_bh_enable+0x98/0xd8) from [<c02dee7c>] (__inet_stream_connect+0x160/0x294)
[121225.794769] [<c02dee7c>] (__inet_stream_connect+0x160/0x294) from [<c02defe4>] (inet_stream_connect+0x34/0x48)
[121225.804914] [<c02defe4>] (inet_stream_connect+0x34/0x48) from [<c02762ec>] (sys_connect+0x7c/0xa0)
[121225.814008] [<c02762ec>] (sys_connect+0x7c/0xa0) from [<c000de60>] (ret_fast_syscall+0x0/0x2c)
[121225.822740] Mem-info:
[121225.825103] Normal per-cpu:
[121225.827991] CPU    0: hi:   90, btch:  15 usd:  66
[121225.832903] active_anon:6540 inactive_anon:15815 isolated_anon:0
[121225.832903]  active_file:10225 inactive_file:23823 isolated_file:0
[121225.832903]  unevictable:0 dirty:6 writeback:0 unstable:0
[121225.832903]  free:766 slab_reclaimable:1830 slab_unreclaimable:1174
[121225.832903]  mapped:4361 shmem:328 pagetables:428 bounce:0
[121225.862769] Normal free:3064kB min:2036kB low:2544kB high:3052kB active_anon:26160kB inactive_anon:63260kB active_file:40900kB inactive_file:95292kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:260096kB mlocked:0kB dirty:24kB writeback:0kB mapped:17444kB shmem:1312kB slab_reclaimable:7320kB slab_unreclaimable:4696kB kernel_stack:880kB pagetables:1712kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[121225.902632] lowmem_reserve[]: 0 0
[121225.906067] Normal: 682*4kB 42*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3064kB
[121225.916733] 34376 total pagecache pages
[121225.920666] 0 pages in swap cache
[121225.924076] Swap cache stats: add 0, delete 0, find 0/0
[121225.929402] Free swap  = 557048kB
[121225.932812] Total swap = 557048kB
[121225.943463] 65536 pages of RAM
[121225.946616] 1119 free pages
[121225.949502] 1824 reserved pages
[121225.952737] 3004 slab pages
[121225.955624] 18683 pages shared
[121225.958771] 0 pages swap cached
[121225.962010] SLAB: Unable to allocate memory on node 0 (gfp=0x20)
[121225.968130]   cache: TCPv6, object size: 1408, order: 1
[121225.973460]   node 0: slabs: 3/3, objs: 15/15, free: 0

I recalled doing rsync 2T hd at that time. Beside fetchmail, page allocation failure happens to rsync and ssh. The failure stops when cpu is idle. I googled and found this

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666021

And seems it related to TCPv6 which I did not use. Should I disable TCPv6?

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 07, 2013 01:20AM
Syong,

I think TCPv6 is just a red herring :) are you using swap on USB? I've seen this error on my plug with USB swap file. Once I've switched to a HDD swap file I have not seen the error again. IMO, it's OK to have swap file on USB as precaution, if you don't expect to swap at all. However, if you use your plug as a NAS and a swap file/partition on USB, I think eventually you will see this.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 07, 2013 09:44AM
Bodhi,

I am using swap file on both USB(32M, priority 0) and HDD(512M, priority -1).

I also set some parameters to save the USB flash by the following which I found somewhere online:

(%16)(21:56)(punk)~> cat /etc/init.d/kernel-params 
#! /bin/sh

### BEGIN INIT INFO
# Provides: kernel-params
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop directadmin
# Description: DirectAdmin
### END INIT INFO

PATH=/sbin:/bin

# Max time to wait for writeout
MAX_AGE=120
CENT_AGE=$((100 * $MAX_AGE))
# Max percent of mem to use for dirty pages
DRATIO=10
# Once we write, do so until this many percent of mem is still in use
DBRATIO=1

case "$1" in
   start)
         echo -n 0         >> /proc/sys/vm/swappiness
         echo -n $MAX_AGE  >> /proc/sys/vm/laptop_mode
         echo -n $CENT_AGE >> /proc/sys/vm/dirty_writeback_centisecs
         echo -n $CENT_AGE >> /proc/sys/vm/dirty_expire_centisecs
         echo -n $DRATIO   >> /proc/sys/vm/dirty_ratio
         echo -n $DBRATIO  >> /proc/sys/vm/dirty_background_ratio
         ;;
   restart|reload|force-reload)
         echo "Error: argument '$1' not supported" >&2
         exit 3
         ;;
   stop)
         # No-op
         ;;
   *)
         echo "Usage: $0 start|stop" >&2
         exit 3
         ;;
esac
exit 0
(%16)(08:35)(punk)~>

The swap usage is always 0 from top. And the page allocation failure does not have any noticeable effects.

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 11, 2013 04:41PM
Syong,

Right now, I'm seeing a similar error (rsync other ethernet related) you got. This is in my plug that has USB swap. Not on another plug with only HDD swap. And both are being used heavily as NAS.

I think I will try to use another ext3 USB for swap to see if I can isolate this. And then perhaps kernel 3.8.x. To see if this error is just with ethernet activity.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 05/11/2013 04:44PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 12, 2013 10:53AM
Kernel 3.8.x may worth a try. Do you notice any effects of the error?

-syong
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 12, 2013 03:01PM
syong,
No effect of the error. Everything works normally. It occured while rsync was coppying 11GB file over wire. The plug that showed error was the source plug, the destination plug runs identical kernel with HDD swap, and showed no error.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
Wiki - Debian on ARM Topics and Tutorials
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
bodhi,

Having the same page allocation failures on kswapd, swapper, smbd and ksoftirq when copying large amount of data (~1T) over samba and GbE link. swap remains intact as syong mentioned before.

I've made my GFN a few days ago. It's clean debian wheezy installed on HDD using debootstrap + your kernel 3.6.11 with samba and nfs, so I can reproduce a problem and post here any related info, if you ask.

p.s. a few blogs/forum threads related to openwrt and similar lowmem devices I've found recommended setting /proc/sys/vm/min_free_kbytes at least 8192 bytes to eliminate this failtures.
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: