Welcome! Log In Create A New Profile

Advanced

Linux Kernel 5.3.2 Kirkwood package and Debian rootfs

Posted by bodhi 
Linux Kernel 5.3.2 Kirkwood package and Debian rootfs
March 31, 2013 05:53PM
Linux Kernel 5.3.x Kirkwood package and rootfs 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, Lenovo/Iomega ix2-ng, Toshiba Canvio Home NAS, Lenovo Iomega EZ, Dell KACE M300, Freecom Silverstore HNCN2, DNS-320-B1, Medion P89634, and all other Kirkwood plugs that are already in the mainline.

Latest released kernel: linux-5.3.2-kirkwood-tld-1-bodhi.tar.bz2 (06 Oct 2019)
Latest released rootfs: Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (25 Aug 2019)

Note: If this is your first time installation, then you need rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (this has kernel linux-5.2.9-kirkwood-tld-1 already installed). Please scroll down to 25 Aug 2019 section for download link and installation instruction.

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.

Summary description:

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 a basic armel rootfs (a complete Debian system with kernel already installed) for Kirkwood boxes ready to be used. It is a basic 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.

Credits:

There are many users who have contributed to this kernel. I plan to take inventory and list the working and/or installation threads here in the near future.


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

Updated 06 Oct 2019:

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

- This kernel is now configured to run with Kirkwood boxes up to 2GB RAM.
- Updated Dell Kace M300 DTS.
- This kernel header now can be installed and used to build cryptodev module, without any special tweaks.

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


Download at Dropbox:

linux-5.3.2-kirkwood-tld-1-bodhi.tar.bz2
md5:
34bad231278eea02a5b2cf9e1b9edc82
sha256:
21e8bef672e0c62e10e87bd4466f64e4f174ed1720cd2d5b22e3df75bf70d7b6

This tarball contains 6 files:
linux-image-5.3.2-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.3.2-kirkwood-tld-1_1.0_armel.deb
config-5.3.2-kirkwood-tld-1
zImage-5.3.2-kirkwood-tld-1
linux-dtb-5.3.2-kirkwood-tld-1.tar
linux-5.3.2-kirkwood-tld-1.patch

And as always, please verify the hash of what you've downloaded!

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

Quote

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-5.3.2-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.3.2-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem:

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-5.3.2-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 the rootfs /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, but should not be used if running latest u-boot).

- Choose option 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-5.3.2-kirkwood-tld-1 and initramfs-5.3.2-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.3.2-kirkwood-tld-1 -d vmlinuz-5.3.2-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.3.2-kirkwood-tld-1 -d initrd.img-5.3.2-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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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, this step 4b is for stock U-Boot only.

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd (the kernel files vmlinuz-5.3.2-kirkwood-tld-1 and initramfs-5.3.2-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-5.3.2-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-5.3.2-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.3.2-kirkwood-tld-1 -d initrd.img-5.3.2-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 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- 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, sysvinit-utils, u-boot-tools, and mtd-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-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
cd8ad170aa1a9fdc2a0a1c43ab1c0721
sha256:
8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf


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. If you are running the latest U-Boot for Kirkwood then you can use Ext4.

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-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. Adjust fstab (optional).

Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.

LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do 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 for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.2.9-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-5.2.9-kirkwood-tld-1 -d zImage.fdt  uImage
sync

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

Warning: Watch the apt-get upgrade progress. If the apt-get upgrade results in a new initramfs, the log would shows this message:

update-initramfs: Generating /boot/initrd.img-5.2.9-kirkwood-tld-1

Then you need to regenerate the uInitrd boot file:
cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.2.9-kirkwood-tld-1 -d initrd.img-5.2.9-kirkwood-tld-1 uInitrd

Note2:

To boot with systemd, add parameter init=/bin/systemd to your u-boot env bootargs (beware that in later Debian distribution, the location of systemd binary might have changed).

- For example,
fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd'

- Or, if you are booting with my latest u-boot images you can also use the uEnv.txt capability to do this. In the default envs, custom_params is a variable that allows you to add extra bootargs. So add the following line to uEnv.txt:
custom_params=init=/bin/systemd

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


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

Updated 18 Aug 2019:

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

- Keep MTD and NAND drivers as builtin kernel drivers (to overcome a mainline kernel regression for MTD and NAND).
- Pickup security patches from mainline.

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

Download at Dropbox:

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

md5:
a75f4dbcde8f5d4135d52139971abf91
sha256:
d02343502d3ab91e4e53a43855f35ce62e03203d159497324c2cdd702b6641b2

This tarball contains 6 files:
linux-image-5.2.9-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.2.9-kirkwood-tld-1_1.0_armel.deb
config-5.2.9-kirkwood-tld-1
zImage-5.2.9-kirkwood-tld-1
linux-dtb-5.2.9-kirkwood-tld-1.tar
linux-5.2.9-kirkwood-tld-1.patch

And as always, please verify the hash of what you've downloaded!

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

Quote

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-5.2.9-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.2.9-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem:

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-5.2.9-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 the rootfs /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, but should not be used if running latest u-boot).

- Choose option 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-5.2.9-kirkwood-tld-1 and initramfs-5.2.9-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d vmlinuz-5.2.9-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.2.9-kirkwood-tld-1 -d initrd.img-5.2.9-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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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, this step 4b is for stock U-Boot only.

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd (the kernel files vmlinuz-5.2.9-kirkwood-tld-1 and initramfs-5.2.9-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-5.2.9-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-5.2.9-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.2.9-kirkwood-tld-1 -d initrd.img-5.2.9-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 01 Jul 2019:

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

- Pick up mainline kernel security patch for TCPSACK.
- The SSD and Device Mapper mainline bug was fixed in this version.
- Enable RAID and LVM as kernel builtin modules (we can boot with RAID or LVM without needing to load uInitrd first. In previous kernel version RAID and LVM drivers were loadable modules).


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

Download at Dropbox:

linux-5.1.11-kirkwood-tld-2-bodhi.tar.bz2
md5:
0c1e64599ca5c03d0dbf045add65c1ad
sha256:
37543ef8d4fba5eff0addf417e7a7f865ad08f3e4d6aa8baf5b818993a8759fd

This tarball contains 6 files:
linux-image-5.1.11-kirkwood-tld-2_2.0_armel.deb
linux-headers-5.1.11-kirkwood-tld-2_2.0_armel.deb
config-5.1.11-kirkwood-tld-2
zImage-5.1.11-kirkwood-tld-2
linux-dtb-5.1.11-kirkwood-tld-2.tar
linux-5.1.11-kirkwood-tld-2.patch

And as always, please verify the hash of what you've downloaded!

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

Quote

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-5.1.11-kirkwood-tld-2-bodhi.tar.bz2
tar -xf  linux-dtb-5.1.11-kirkwood-tld-2.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem:

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-5.1.11-kirkwood-tld-2_2.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 the rootfs /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, but should not be used if running latest u-boot).

- Choose option 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-5.1.11-kirkwood-tld-2 and initramfs-5.1.11-kirkwood-tld-2 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.1.11-kirkwood-tld-2 -d vmlinuz-5.1.11-kirkwood-tld-2 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.1.11-kirkwood-tld-2 -d initrd.img-5.1.11-kirkwood-tld-2 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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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, this step 4b is for stock U-Boot only.

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd (the kernel files vmlinuz-5.1.11-kirkwood-tld-2 and initramfs-5.1.11-kirkwood-tld-2 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-5.1.11-kirkwood-tld-2  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.1.11-kirkwood-tld-2 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.1.11-kirkwood-tld-2 -d initrd.img-5.1.11-kirkwood-tld-2 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 May 13, 2019:

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

- Added support for new Kirkwood box: Medion P89634.
- Ethernet should work for the NSA310 in this kernel.

Warning: if you use SSD and Device Mapper please see this mainline bug.

Credits:

- Thanks Damien for bringing up the Medion P89634 box and publishing the DTS in this working thread.

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

Download at Dropbox:

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

md5sum
11f4a0583fdf392a0cb910618c99c9f9
sha256sum
29c1c63bb25b199a0351aa1fe00366ed9054d0a1abba646e4c9826cadaabca1c

This tarball contains 6 files:
linux-image-5.1.0-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.1.0-kirkwood-tld-1_1.0_armel.deb
config-5.1.0-kirkwood-tld-1
zImage-5.1.0-kirkwood-tld-1
linux-dtb-5.1.0-kirkwood-tld-1.tar
linux-5.1.0-kirkwood-tld-1.patch

And as always, please verify the hash of what you've downloaded!

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

Quote

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-5.1.0-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.1.0-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem:

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-5.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 the rootfs /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, but should not be used if running latest u-boot).

- Choose option 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-5.1.0-kirkwood-tld-1 and initramfs-5.1.0-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.1.0-kirkwood-tld-1 -d vmlinuz-5.1.0-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.1.0-kirkwood-tld-1 -d initrd.img-5.1.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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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, this step 4b is for stock U-Boot only.

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd (the kernel files vmlinuz-5.1.0-kirkwood-tld-1 and initramfs-5.1.0-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-5.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-5.1.0-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.1.0-kirkwood-tld-1 -d initrd.img-5.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 
sync
sync
shutdown -r now


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

Updated 03 Feb 2019:

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

- Added support for new Kirkwood box DNS-320-B1
- Added GPIO fan module
- Added CONFIG_BLK_CGROUP_IOLATENCY
- Updated Freecom Silverstore HNCN2 support.

WARNING: Ethernet is broken for the NSA310 in this kernel. Please use previous kernel version if you have this device.

Credits:

- Thanks Ironaxe for doing research and testing in bringing up this DNS-320-B1 board in this working thread
- Thanks generik for the clock and DTS patches in the Freecom Silverstore HNCN2 working thread

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

Download at Dropbox:

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

md5sum
754e1857b738074616976cc5c1accdf0
sha256sum
755229ad850dae469366ca9a8d4839019331107196a1c24d3695cb73b8deef4f


This tarball contains 6 files:

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

And as always, please verify the hash of what you've downloaded!

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

Quote

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.20.6-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.20.6-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem:

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-4.20.6-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 the rootfs /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, but should not be used if running latest u-boot).

- Choose option 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-4.20.6-kirkwood-tld-1 and initramfs-4.20.6-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.20.6-kirkwood-tld-1 -d vmlinuz-4.20.6-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.20.6-kirkwood-tld-1 -d initrd.img-4.20.6-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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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, this step 4b is for stock U-Boot only.

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd (the kernel files vmlinuz-4.20.6-kirkwood-tld-1 and initramfs-4.20.6-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-4.20.6-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.20.6-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.20.6-kirkwood-tld-1 -d initrd.img-4.20.6-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 27 Oct 2018:

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

- Added support for the Freecom Silverstore HNCN2. Limitation: currently we can only boot Debian on this box using serial console. See working thread.

Credits:
- Thanks garagoyun for doing research and testing in bringing up this board in this working thread.

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

Download at Dropbox:

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

md5:
873274370c57c11be718edac1fd92659
sha256:
fda4f7468ab4da56cc77e7666189323b6e194b9df365e955f98d31a8a19a8edc

This tarball contains 6 files:

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

And as always, please verify the hash of what you've downloaded!

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

Quote

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.19.0-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.19.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.19.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 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-4.19.0-kirkwood-tld-1 and initramfs-4.19.0-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.19.0-kirkwood-tld-1 -d vmlinuz-4.19.0-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.19.0-kirkwood-tld-1 -d initrd.img-4.19.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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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 (the kernel files vmlinuz-4.19.0-kirkwood-tld-1 and initramfs-4.19.0-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-4.19.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.19.0-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.19.0-kirkwood-tld-1 -d initrd.img-4.19.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 27 Aug 2018:

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

- Added support for the Dell KACE M300. This release limits the total visible RAM to 1GB, with 768MB in low memory. Please see this working thread for installation instruction (work-in-progress).

- Added Read/Write access to mtd0 for Zyxel NSA310 (all 3 variants of this box), to allow flashing new u-boot and/or envs.

Credits:
- Dell KACE M300 board bringup : thanks JDS420, renojim, and rayknight.

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

Download at Dropbox:

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

md5:
6c4d28929bd121635154e14eb102105a
sha256:
a0a7803e819be228ef4db24d8ce739b20f6363abfe69f2558bc9a553cde3225a

This tarball contains 6 files:

Quote

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


And as always, please verify the hash of what you've downloaded!

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

Quote

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.18.4-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.18.4-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.18.4-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 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-4.17.2-kirkwood-tld-1 and initramfs-4.17.2-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.18.4-kirkwood-tld-1 -d vmlinuz-4.18.4-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.18.4-kirkwood-tld-1 -d initrd.img-4.18.4-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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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 (the kernel files vmlinuz-4.18.4-kirkwood-tld-1 and initramfs-4.18.4-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-4.18.4-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.18.4-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.18.4-kirkwood-tld-1 -d initrd.img-4.18.4-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 23 June 2018:

Kernel linux-4.17.2-kirkwood-tld-1 package has been uploaded.

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

Download at Dropbox:

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

md5:
cba58ed6f52efe2ea3fffa7e397b725a
sha256:
d4a3558072982dd8663cc54cb863998e15708916ad04b874a584909a3cb376a6

This tarball contains 6 files:

Quote

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

And as always, please verify the hash of what you've downloaded!

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.17.2-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.17.2-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.17.2-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 4a 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 4b 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.

- Generate the uImage and uInitrd (the kernel files vmlinuz-4.17.2-kirkwood-tld-1 and initramfs-4.17.2-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.17.2-kirkwood-tld-1 -d vmlinuz-4.17.2-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.17.2-kirkwood-tld-1 -d initrd.img-4.17.2-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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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 (the kernel files vmlinuz-4.17.2-kirkwood-tld-1 and initramfs-4.17.2-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-4.17.2-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.17.2-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.17.2-kirkwood-tld-1 -d initrd.img-4.17.2-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 14 Apr 2018:

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

- Add GENERIC_CPU_VULNERABILITIES config to track mainline future security reports.

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

Download at Dropbox:

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

md5:
ac1aff7c9848ff949dfa081cf5ac094c
sha256:
8779493bf8319b712b2f8ed3519305e61abee9e2bcc9630fc28d7c6d1d420bb8


This tarball contains 6 files:

Quote

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

And as always, please verify the hash of what you've downloaded!

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.16.1-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.16.1-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.16.1-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 4a 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 4b 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.


- Generate the uImage and uInitrd.
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.16.1-kirkwood-tld-1 -d vmlinuz-4.16.1-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.16.1-kirkwood-tld-1 -d initrd.img-4.16.1-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. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name 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.16.1-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.16.1-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.16.1-kirkwood-tld-1 -d initrd.img-4.16.1-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 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

- tarball size: 188M
- install size: 488M
- 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.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
bf3d29569943875df348fb5ca03b348c
sha256:
4ed5714fdb123cdb40e973f3d0754e91cd199b75a9874018f2b5dc9cfa8ae8bb

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. If you are running the latest U-Boot for Kirkwood then you can use Ext4.

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.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. Adjust fstab (optional).

Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.

LABEL=rootfs    /               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 for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-4.12.1-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.12.1-kirkwood-tld-1 -d zImage.fdt  uImage
sync

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

Warning: Watch the apt-get upgrade progress. If the apt-get upgrade results in a new initramfs, the log would shows this message:

update-initramfs: Generating /boot/initrd.img-4.12.1-kirkwood-tld-1

Then you need to regenerate the uInitrd boot file:

cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.12.1-kirkwood-tld-1 -d initrd.img-4.12.1-kirkwood-tld-1 uInitrd

Note2:

To boot with systemd, add parameter init=/bin/systemd to your u-boot env bootargs.

- For example,
fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd'

- Or, if you are booting with my latest u-boot images you can also use the uEnv.txt capability to do this. In the default envs, custom_params is a variable that allows you to add extra bootargs. So add the following line to uEnv.txt:
custom_params=init=/bin/systemd

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

=========

Some older released posts were removed here. Please ask question if you are looking for old kernel releases.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 212 time(s). Last edit at 10/12/2019 06:03PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flatten Device Tree)
March 31, 2013 11:19PM
Reserved for old kernel releases info.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 11/25/2017 11:16PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 02, 2013 03: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 02, 2013 11:48PM
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 12: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
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 03, 2013 12: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
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 03, 2013 03: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 08: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 01: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
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 05, 2013 01: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 05, 2013 11:38PM
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 05, 2013 11:48PM
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 01: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
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 02:37PM
The patch was updated and reattached.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 06, 2013 02: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 03: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 03: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 04:18PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 07, 2013 09: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 02: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
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 08, 2013 03: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 07:54AM by David.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 01, 2013 07: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 11:03AM
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 12: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
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 07, 2013 08: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 03: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
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 05/11/2013 03:44PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 12, 2013 09: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 02: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
===========================
Forum Wiki
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.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 12, 2013 04:20PM
>
> 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.

This is interesting. Thanks SiruS!

BTW, when you see this error, are you running your boot HDD as USB or SATA?

I've moved the swap file to a different stick other than the boot USB stick to see if I can reproduce the same error.

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: