Welcome! Log In Create A New Profile

Advanced

Linux Kernel 4.19.0 Kirkwood package and Debian rootfs

Posted by bodhi 
Linux Kernel 4.19.0 Kirkwood package and Debian rootfs
March 31, 2013 04:53PM
Linux Kernel 4.19.0 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 and all other Kirkwood plugs that are already in the mainline.

Latest released kernel: linux-4.19.0-kirkwood-tld-1-bodhi.tar.bz2 (27 Oct 2018)
Latest released rootfs: Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017)

Note: If this is your first time installation, then you need rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (this has kernel 4.12.1-kirkwood-tld-1 already installed).

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.

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

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 11 Feb 2018:

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

- Added HP T5325 flash type mx25l8005.
- Added USBIP supports.


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

Download at Dropbox:

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

md5
11f4c87ffb53b5adfd0a5405fc1ba247
sha256
90c3fd5f6a0628dfbde1403ae43ab4625688350435dec95eab08b95f7a43cfc8

This tarball contains 6 files:

Quote

linux-image-4.15.2-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.15.2-kirkwood-tld-1_1.0_armel.deb
config-4.15.2-kirkwood-tld-1
zImage-4.15.2-kirkwood-tld-1
linux-dtb-4.15.2-kirkwood-tld-1.tar
linux-4.15.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.15.2-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.15.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.15.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.
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.15.2-kirkwood-tld-1 -d vmlinuz-4.15.2-kirkwood-tld-1 uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.15.2-kirkwood-tld-1 -d initrd.img-4.15.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:
cd /boot
mv uImage uImage.orig
cp -a zImage-4.15.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.15.2-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.15.2-kirkwood-tld-1 -d initrd.img-4.15.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 Nov 2017:

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

New/update in this version:

- Modified NSA3xx boxes DTS files to set system LED to green right after the kernel has booted.


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

Download at Dropbox:

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

md5:
b2370e95e316d619dc3e075c04fb0cda
sha256:
33bb76dc0e1072d681ae68ce1a5e9952b434f4d1dac51baf412fa2c6cb8ec127

And remeber to check the hash of what you download, as always!

Installation:

Please use the same installation instruction in kernel 4.13.5-kirkwood-tld-1 (Updated 10 Oct 2017) below. Simply replace 4.13.5-kirkwood-tld-1 with 4.14.1-kirkwood-tld-1 in the instruction.


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

Updated 10 Oct 2017:

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

New/update in this version:

- Incorporated upstream Linux security fixes.
- Updated Qizitong DTB to fully support Mavell DSA switch.
- Updated Netgear Stora DTB to add tc654 fan sensor.

Credits:
- Qizitong DTB (thanks wacke for contributing to this new version)
- Netgear Stora DTB (thanks Dmitriy for contributing to this new version)

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

Download at Dropbox:

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

md5:
6a87f09790ad8a9c6ce5640fa966f14c
sha256:
6a7c36af8fc5aae0e5b0350a2ef19c0c569210a3666b3da34c823ac577dc5f66

And remeber to check the hash of what you download, as always!

Installation:

Please use the same installation instruction in kernel 4.12.8-kirkwood-tld-1 (Updated 21 Aug 2017) below. Simply replace 4.12.8-kirkwood-tld-1 with 4.13.5-kirkwood-tld-1 in the instruction.


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

Updated 21 Aug 2017:

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

New/update in this version:

- Pick up security patches from mainline.
- Update the Linksys EA4500 to correctly activate the DSA switch (use the kirkwood-ea4500.dtb for booting)
- Update the Qizitong 501mv2 to correctly activate the DSA switch (please see this post for the updated Qizitong DTB which was not included in the tarball).
- Turn off the lirc_rpi in this version. Please use previous kernel version if you need lirc_rpi.

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

Download at Dropbox:

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

md5:
1c7ad19acb36a9a77a813e7c27b908e6
sha256:
4d59aa4ad925d2e99bfafd5552bae486fcd5e3c2fc6c8e50fb749589972d58c3

Installation:

Please use the same installation instruction in kernel 4.12.1-kirkwood-tld-1 (Updated 20 July 2017) below. Simply replace 4.12.1-kirkwood-tld-1 with 4.12.8-kirkwood-tld-1 in the instruction.

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

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

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

Updated 20 July 2017:

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

New/update in this version:

- Add support for Toshiba Canvio Home NAS (boot this box with kirkwood-canvio-home-nas.dtb)
- Add support for Lenovo Iomega EZ (still under Beta testing)
- Add support for SPI chip MX25L8006E (still under Beta testing)
- Initial USB Type C support.
- Make usb_storage builtin kernel module.
- Add sensor TC654
- Move CIFS file system from kernel to loadable module to reduce kernel image size.

Credits:
- Thanks Robert for the works to bring up the new box: Toshiba Canvio Home NAS.
- Thanks iomega_ez and eine for the works to bring up the new box: Lenovo Iomega EZ.

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

Download at Dropbox:

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

md5:
c10e11fec208c5c855e396b89b04e25e
sha256:
16bb09f67890d5f2ec0c214b70f9409bd93e25ec8187cd1940b444ccfdfdf4a2


Installation:

Please use the same installation instruction in kernel 4.11.3-kirkwood-tld-2 (Updated 08 June 2017) below. Simply replace 4.11.3-kirkwood-tld-2 with 4.12.1-kirkwood-tld-1 in the instruction.


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

Updated 08 June 2017:

Kernel linux-4.11.3-kirkwood-tld-2 package has been uploaded.

New in this version:

- Fixed modules loading regression in linux-4.11.3-kirkwood-tld-1.
- XFS and loop device are now builtin kernel modules.

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

Download at Dropbox:
linux-4.11.3-kirkwood-tld-2-bodhi.tar.bz2

md5:
37f64ba8c6fecaaf2ae1a5472fe9dc10
sha256:
a3c5503927f8a6dc874c5c723968ff482193500a641bc5b50920093e0b59a59b


Installation:

Please use the same installation instruction in kernel 4.10.9-kirkwood-tld-1 (Updated 14 April 2017) below. Simply replace 4.10.9-kirkwood-tld-1 with 4.11.3-kirkwood-tld-1 in the instruction.


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

Updated 01 June 2017:

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

Warning: There is some behavioral changes in kernel 4.11.3: The modules are not loaded automatically when an application starts. We need to modprobe the modules explicitly to run. I'm investigating this and will moslt likely release a new kernel. In the mean time, stay with kernel 4.10.9 if you don't want to do modprobe explicitly.
UPDATED: fixed in linux-4.11.3-kirkwood-tld-2


New in this version:

- Add Realtek r8152 driver .
- Add CPU_FREQUENCY governor options (default is PERFORMANCE).
- Activate 2nd SATA in Pogo V4/Mobile.
- Fixed sata_mv regression in kernel 4.11.x

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

Download at Dropbox:
linux-4.11.3-kirkwood-tld-1-bodhi.tar.bz2

md5:
c2ce9302365a772913e23095f28bae03
sha256:
8ad4264239a5352f74b157c97f830e77a44d7b690c183b0c075e801a8c9a3e98

Installation:

Please use the same installation instruction in kernel 4.10.9-kirkwood-tld-1 (Updated 14 April 2017) below. Simply replace 4.10.9-kirkwood-tld-1 with 4.11.3-kirkwood-tld-1 in the instruction.

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

Updated 14 April 2017:

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

New in this version:

- Incorporated kernel 4.10.9 mainline to fix security bugs.
- Change kernel config to start SATA driver in kernel (instead of as a module).

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

Download at Dropbox:
linux-4.10.9-kirkwood-tld-1-bodhi.tar.bz2

md5:
28418d909b6b1f0c0517c6681d277eaa
sha256:
1e255594c91560e61895c62d726975f19f7ee17ecec63d50f75551aea27b7db4

Installation:

Please use the same installation instruction in kernel 4.10.0-kirkwood-tld-1 (Updated 28 Feb 2017) below. Simply replace 4.10.0-kirkwood-tld-1 with 4.10.9-kirkwood-tld-1 in the instruction.

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

Updated 28 Feb 2017:

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

- Added the Lenovo/Iomega ix2-ng support.
- Modified all supported boxes DTS to allow ethaddr (MAC address) setting in Linux.

Credits: thanks sarcastic.mannequin for the works to bring up the new box: Lenovo/Iomega ix2-ng.

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

Download at Dropbox:
linux-4.10.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
32f960b73074bc04f9be5d655205808b
sha256:
7cd6532c5c5be2161141d9df1c3a1ec1ef88d4988032994a30ecacc8104ada5d

Installation:

Please use the same installation instruction in kernel 4.9.0-kirkwood-tld-1 (Updated 17 Dec 2016) below. Simply replace 4.9.0-kirkwood-tld-1 with 4.10.0-kirkwood-tld-1 in the instruction.

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

Updated 17 Dec 2016:

Kernel linux-4.9.0-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.9.0-kirkwood-tld-1-bodhi.tar.bz2

md5:
ab0bb342c16daa9f5429eb5c2663bb2b
sha256:
ee3d9700a69b3954a1b6d4f0669cb13a1e2a02f2a3d64b377e1b36b426519b1e

NOTE: if you are installing on Pogo V4, please see this post to download the new Pogo V4 DTB file. This DTB fixed the problem with a read-only mtd0 while flashing new u-boot.


Installation:

Please use the same installation instruction in kernel 4.8.3-kirkwood-tld-1 (Updated 24 Oct 2016) below. Simply replace 4.8.3-kirkwood-tld-1 with 4.9.0-kirkwood-tld-1 in the instruction.

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

Updated 24 Oct 2016:

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

1. Modify DTS for NSA325, Nsa310s, Nsa320s, Pogo_V4, Iomega ix4-200d, Asus_M25, Netgear_Stora, Qizhitong_501m_v2, Linksys_Ea4500-DSA to fix the PCI problem in kernel 4.8.0-kirkwood-tld-1.
2. Kernel upstream fix for the Dirty COW security issue.

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

Download at Dropbox:
linux-4.8.3-kirkwood-tld-1-bodhi.tar.bz2

md5:
5cf117f660cbdbf7d4fedff5d76c03ef
sha256:
16f7322ad5e97b8800f839e82747d4fe4b75a266d315946700dd2900d906edb3

Installation:

Please use the same installation instruction in kernel 4.8.0-kirkwood-tld-1 (Updated 10 Oct 2016) below. Simply replace 4.8.0-kirkwood-tld-1 with 4.8.3-kirkwood-tld-1 in the instruction.

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

Updated 10 Oct 2016:

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

- Marvell CESA driver improvement
- NSA320 hwmon: hardware monitoring module name is now named nsa320-hwmon. This module might work for other Zyxel NSA3xx also.
- CONFIG_HARDENED_USERCOPY: this kernel config "kills entire classes of heap overflow exploits and similar kernel memory exposures."

Note: If you are installing this kernel on NSA325, Nsa310s, Nsa320s, Pogo V4, Iomega ix4-200d, Asus M25, Netgear Stora, or Qizhitong_501m_v2, please upgrade to kernel 4.8.3-kirkwood-tld-1 above instead of this kernel, or see posts about the corrected DTB file (PCI related issue): here, here, and here.

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

Download at Dropbox:
linux-4.8.0-kirkwood-tld-1-bodhi.tar.bz2
md5:
1a64507b13466b73ab08d8bed8dc6f86
sha256:
8d92480fc265299e27fbcca4fb6b378589bfc6fcf21341b47362e0a2aa06853a


This tarball contains 6 files:

linux-image-4.8.0-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.8.0-kirkwood-tld-1_1.0_armel.deb
config-4.8.0-kirkwood-tld-1
zImage-4.8.0-kirkwood-tld-1
linux-dtb-4.8.0-kirkwood-tld-1.tar
linux-4.8.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.8.0-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-4.8.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.8.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.
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.8.0-kirkwood-tld-1 -d vmlinuz-4.8.0-kirkwood-tld-1 uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.8.0-kirkwood-tld-1 -d initrd.img-4.8.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, 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.8.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.8.0-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.8.0-kirkwood-tld-1 -d initrd.img-4.8.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 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.

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

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 198 time(s). Last edit at 10/27/2018 04:32PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flatten Device Tree)
March 31, 2013 10:19PM
Reserved for old kernel releases info.

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



Edited 1 time(s). Last edit at 11/25/2017 10:16PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 02, 2013 02: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 10: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 02, 2013 11:15PM
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 02, 2013 11:24PM
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 02: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 07: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 12: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 12: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 10: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 10: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 12: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 01: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 01: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 02: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 02: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 03:18PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
April 07, 2013 08: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 01: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 02: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 06:54AM by David.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 01, 2013 06: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 10: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 06, 2013 11:20PM
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 07: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 02: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 02:44PM by bodhi.
Re: Linux Kernel 3.6.11 Kirkwood package (Non Flattened Device Tree)
May 12, 2013 08: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 01: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 03: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: