Welcome! Log In Create A New Profile

Advanced

Linux Kernel 6.6.3 Kirkwood package and Debian rootfs

Posted by bodhi 
Linux Kernel 6.6.3 Kirkwood package and Debian rootfs
March 31, 2013 05:53PM
Linux Kernel 6.6.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, Netgear Ready NAS Duo v2, Lenovo/Iomega ix2-dl, CTera C200 V1, Synology DS413j (work in progress), Check Point L-50, Synology DS411jv10, and all other Kirkwood plugs that are already in the mainline.

Latest released kernel: linux-6.6.3-kirkwood-tld-1-bodhi.tar.bz2 (01 Dec 2023)
Latest released rootfs: Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (01 Nov 2023)

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

I would recommed to install the latest U-Boot for Kirkwood, if your box is among the supported list. 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 or -marvell 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 01 Dec 2023:

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

- General kernel upgrade.
- Reconfigure MMC to built-in kernel module
- Update ds411jv10 DTS (binding and documentation only, no new functionality)
- See Important Note in Step 5 about uInitrd size.

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

Download at Dropbox:

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

md5:
2491894e135e3f07089be277de7b5257
sha256:
71ea3b3d6464c36eb74237709eac1762075cf8eadf9e59bdb4a87242e8f97026
And as always, please verify the hash of what you've downloaded!

This tarball contains 6 files:
linux-image-6.6.3-kirkwood-tld-1_1_armel.deb
linux-headers-6.6.3-kirkwood-tld-1_1_armel.deb
config-6.6.3-kirkwood-tld-1
zImage-6.6.3-kirkwood-tld-1
linux-dtb-6.6.3-kirkwood-tld-1.tar
linux-6.6.3-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):

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

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

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

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside 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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-6.6.3-kirkwood-tld-1 and initrd.img-6.6.3-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-6.6.3-kirkwood-tld-1 -d vmlinuz-6.6.3-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.6.3-kirkwood-tld-1 -d initrd.img-6.6.3-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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-6.6.3-kirkwood-tld-1 and initrd.img-6.6.3-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-6.6.3-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-6.6.3-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.6.3-kirkwood-tld-1 -d initrd.img-6.6.3-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, then do one of the 2 following alternatives.

1. (Recommended) Shrink the initramfs to get a smaller size than 11MB. This approach does not require changing u-boot envs. See here for tutorial: How To Shrink initramfs. You need to do this only once. In future kernel upgrade, the initramfs is shrunk automatically.

2. See Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
shutdown -r now

=======================================================================
Updated 01 Nov 2023:

Basic Debian bookworm Kirkwood rootfs for most Kirwood plugs:

- tarball size: 250MB
- install size: 714MB
- The init system used in this rootfs is sysvinit . To boot with systemd, see Notes 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, libubootenv-tool, mtd-utils, and orphan-sysvinit-scripts.
- see LED controls examples in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

NOTE: I had a typo in the file name Debian-5.6.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2. It should be Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2. After downloaded the tarball, please adjust it.

Download at Dropbox:

Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
398aff3717b0d739e82815650b5c7f81
sha256:
04a2dba61dc3284fbbfb5ac9b439655f2fc44293cd228dce2b774d37b4512fd3

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 (HDD would work fine too).

Warning: If you want to install this rootfs on SD card (such as for the Pogo V4 or Sheevaplug), then you need to see Note 8 below before doing the installation.

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. This step should be done at Linux command line using fdisk, mkfs.ext3 (don't use GUI or gparted). Once you have booted the box, then you could try GPT partition and/or Ext4.

If you are running the latest U-Boot for Kirkwood then you can use Ext4. But be aware that Ext4 file system format needs to be "finalized" before it can be used for booting.

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-6.5.7-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. (Stock u-boot only) 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, or running kwboot with latest u-boot image).

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-6.5.7-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-6.5.7-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.

If you are installing on a Kirkwood box that runs stock u-boot (it is not on the new u-boot support list) then see
Boot Kirkwood rootfs with stock u-boot.

Take this USB rootfs to your plug and cold start. After booted into Debian, see Note 1-6 below.

Note 1 (Strongly Recommended):

To keep the rootfs extremely basic and small, there is no swap space set up for it. The first thing you should do after the 1st boot is to set up a swap file to make the system run better. In fact, system upgrades oftently fail to run without swap. Please see here for instruction how to do that.


Note 2 (Optional):

The rootfs will automatically generate new SSH keys at 1st boot (see /etc/rc.local). However, if you would like to generate the keys again then do:

rm /etc/ssh/ssh_host*
ssh-keygen -A

Note 3 (Optional):

Update your rootfs to get the latest Debian package security updates (if the installation is done at a much later date than the time of this release).

Check the system clock to make sure it is the current time (boxes without RTC is using NTP so quite slow to update the clock).

date
And upgrade
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-6.5.7-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-6.5.7-kirkwood-tld-1 -d initrd.img-6.5.7-kirkwood-tld-1 uInitrd

For boxes without RTC , also consider install fake-hwclock to ensure the clock is relatively close to real time after a reboot or cold start.
apt-get install fake-hwclock

Note 4 (Optional):

Some network environment is not very robust in propagating the host name advertised by avahi. If you cannot find the host name (debian.local) of this rootfs in your network, you might need to install libnss-mdns.

apt-get install libnss-mdns

Note 5 (Optional):

Note 5.1. To boot with systemd

After loged into Debian, run:

apt-get install systemd
And then add parameter init=/usr/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=/usr/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=earlyprintk=serial init=/usr/bin/systemd

Note 5.2. To boot back to sysvinit

Reverse the env setting (there is no need to remove systemd, you can switch back and forth from/to sysvinit and systemd):
fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts'
Or if you've used uEnv.txt then just remove that from the custom_params env
custom_params=earlyprintk=serial

Note 6. Shrink initramfs to smaller size (Optional):

In Debian bookworm, the default compression is zstd. However, to keep it simple, the initramfs (initramfs-6.5.7-kirkwood-tld-1) in this rootfs was compressed using gzip, which is perfectly OK. If you need to have a smaller initramfs (for example, you are trying to fit it in a limited sized NAND partition), see here for tutorial: How To Shrink initramfs.

Note 7. Ethernet Naming Issue (Optional):

In Debian 12.4, the ethernet "Predictable Names" scheme is enabled. So the ethernet device assigned is no longer "eth0", but is "end0". This "predictable naming" scheme broke a lot of existing applications that still relying on "eth0" is the network device name. It does not affect this Kirkwood rootfs (due to some setup I had in the past).

However, if after a future Debian upgrade of this rootfs, the network is no longer eth0, then this is the way to bring it back.

cat /etc/network/interfaces
rename /end0=eth0
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
Beware of software apps, such as OMV, that do not respect users' configuration and so wiping out this change during its installation! I'd suggest to make a backup of this file, so you can compare that with any new /etc/network/interfaces after installing OMV, and restore the rename command.

There are also many other ways to force the eth0 name. However, it is more cumbersome to do than just watching out for this file being changed by OMV or other major apps installation. Also, other methods might not survive a future Debian upgrade :)

Note 8 (Required for SD card rootfs, Optional for all other storage devices):

If you are installing this rootfs for the Pogo V4 or the Sheevaplug on SD card, it is best to use a USB-SD adapter and install boot the box with USB first. After it booted successfully, install the latest kernel (linux-6.6.3-kirkwood-tld-1, at the time of this writing). Reboot to make sure it is running OK. Shutdown and then boot with the SD card in its slot.

Also see this post for further detailed explanation and other approaches in booting this rootfs on SD card.

=======================================================================
Updated 21 Oct 2023:

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

- General kernel upgrade.
- Added supports for Synology DS411jv10. Currently, this board must be booted with USB.
- Add CONFIG_POWER_RESET_QNAP to support Synology NAS poweroff.
- Add Zydas Wifi module.
- See Important Note in Step 5 about uInitrd size.

Credits:

- Thanks dmb4312 for doing all the testing to bring up the Synonology DS411jv10 board. See Debian and U-Boot working threads.

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

Download at Dropbox:

linux-6.5.7-kirkwood-tld-1-bodhi.tar.bz2
md5:
24ea567d7da41d2353452d436b673c4f
sha256:
0046d92a864b2f53490a70a0c4e1855feba959fb7a4a5121c5cd3731972ba39e
And as always, please verify the hash of what you've downloaded!

This tarball contains 6 files:
linux-image-6.5.7-kirkwood-tld-1_1_armel.deb
linux-headers-6.5.7-kirkwood-tld-1_1_armel.deb
config-6.5.7-kirkwood-tld-1
zImage-6.5.7-kirkwood-tld-1
linux-dtb-6.5.7-kirkwood-tld-1.tar
linux-6.5.7-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):

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

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

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

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside 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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-6.5.7-kirkwood-tld-1 and initrd.img-6.5.7-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-6.5.7-kirkwood-tld-1 -d vmlinuz-6.5.7-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.5.7-kirkwood-tld-1 -d initrd.img-6.5.7-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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-6.5.7-kirkwood-tld-1 and initrd.img-6.5.7-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-6.5.7-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-6.5.7-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.5.7-kirkwood-tld-1 -d initrd.img-6.5.7-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, then do one of the 2 following alternatives.

1. (Recommended) Shrink the initramfs to get a smaller size than 11MB. This approach does not require changing u-boot envs. See here for tutorial: How To Shrink initramfs. You need to do this only once. In future kernel upgrade, the initramfs is shrunk automatically.

2. See Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
shutdown -r now

=======================================================================
Updated 20 Aug 2023:

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

- General kernel upgrade.
- Added supports for docker (SECCOMP, SECCOMP_FILTER, CGROUP_BPF, BPFILTER).
- Removed support for running old binaries (OABI_COMPAT).
- See Important Note in Step 5 about uInitrd size.

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

Download at Dropbox:

linux-6.4.11-kirkwood-tld-1-bodhi.tar.bz2
md5:
6f2213de20b54d2199a46f660371084a
sha256:
d8ac8b0cf3a5a4b8c210e59c827b8f7b37988fd2765d2a300cc457b8be7d6aa4
And as always, please verify the hash of what you've downloaded!

This tarball contains 6 files:
linux-image-6.4.11-kirkwood-tld-1_1_armel.deb
linux-headers-6.4.11-kirkwood-tld-1_1_armel.deb
config-6.4.11-kirkwood-tld-1
zImage-6.4.11-kirkwood-tld-1
linux-dtb-6.4.11-kirkwood-tld-1.tar
linux-6.4.11-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):

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

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

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

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside 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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-6.4.11-kirkwood-tld-1 and initrd.img-6.4.11-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-6.4.11-kirkwood-tld-1 -d vmlinuz-6.4.11-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.4.11-kirkwood-tld-1 -d initrd.img-6.4.11-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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-6.4.11-kirkwood-tld-1 and initrd.img-6.4.11-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-6.4.11-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-6.4.11-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.4.11-kirkwood-tld-1 -d initrd.img-6.4.11-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, then do one of the 2 following alternatives.

1. (Recommended) Shrink the initramfs to get a smaller size than 11MB. This approach does not require changing u-boot envs. See here for tutorial: How To Shrink initramfs. You need to do this only once. In future kernel upgrade, the initramfs is shrunk automatically.

2. See Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
shutdown -r now

=======================================================================
Updated 02 Jun 2023:

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

Warning: PCI is broken (in mainline Linux) therefore in this kernel. So USB 3.0 is also broken if it is on PCI bus. And also for boxes with 4 SATA slots (2 slots are usually PCI). Please stay with kernel linux-6.2.7-kirkwood-tld-1 for now if you need these capabilities.

- General kernel upgrade. Some code rebase were needed in the patch.
- Add support for Check Point L-50 (Kirkwood 88F6821).
- Add CONFIG_LEDS_TRIGGER_CPU. This new trigger cpu can be used to blink the Status LED when there are system activities, and turn it off by default.
- See Important Note in Step 5 about uInitrd size.

Credits:

- Thanks Gravelrash for doing all the works to add support for the Check Point L-50.

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

Download at Dropbox:

linux-6.3.5-kirkwood-tld-1-bodhi.tar.bz2
md5:
978fe815306d448a5e5e4e8b2356fba0
sha256:
d48f19bf1064c24ef383d38134d2caa9e53c00c134f5484a26033b6fb24aea0c
And as always, please verify the hash of what you've downloaded!

This tarball contains 6 files:
linux-image-6.3.5-kirkwood-tld-1_1_armel.deb
linux-headers-6.3.5-kirkwood-tld-1_1_armel.deb
config-6.3.5-kirkwood-tld-1
zImage-6.3.5-kirkwood-tld-1
linux-dtb-6.3.5-kirkwood-tld-1.tar
linux-6.3.5-kirkwood-tld-1.patch

Installation:

1. Backup your current uImage and uInitrd. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):

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

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

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

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). 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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-6.3.5-kirkwood-tld-1 and initrd.img-6.3.5-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-6.3.5-kirkwood-tld-1 -d vmlinuz-6.3.5-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.3.5-kirkwood-tld-1 -d initrd.img-6.3.5-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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-6.3.5-kirkwood-tld-1 and initrd.img-6.3.5-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-6.3.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-6.3.5-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.3.5-kirkwood-tld-1 -d initrd.img-6.3.5-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, then do one of the 2 following alternatives.

1. (Recommended) Shrink the initramfs to get a smaller size than 11MB. This approach does not require changing u-boot envs. See here for tutorial: How To Shrink initramfs.

2. See Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
shutdown -r now

=======================================================================
Updated 23 Mar 2023:

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

- General kernel upgrade.
- Add USBIP supports.
- Add initial support for Synology DS413j (work-in-progress).
- See Important Note in Step 5 about uInitrd size.
- Warning: NFS server support for NFS version 2 was removed in mainline, so is removed from this kernel.


Credits:

- Thanks BillyIT for doing most of the testing to bring up the Synology DS413j box.

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

Download at Dropbox:

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

md5:
9b152b6b924cadfd2e26b25d8d58ec38
sha256:
f375312e3d4b26fc0529622b678b23f8f6b9471e60487f9b70678925e9412f4e

This tarball contains 6 files:
linux-image-6.2.7-kirkwood-tld-1_1.0_armel.deb
linux-headers-6.2.7-kirkwood-tld-1_1.0_armel.deb
config-6.2.7-kirkwood-tld-1
zImage-6.2.7-kirkwood-tld-1
linux-dtb-6.2.7-kirkwood-tld-1.tar
linux-6.2.7-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-6.2.7-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-6.2.7-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-6.2.7-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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-6.2.7-kirkwood-tld-1 and initrd.img-6.2.7-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-6.2.7-kirkwood-tld-1 -d vmlinuz-6.2.7-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.2.7-kirkwood-tld-1 -d initrd.img-6.2.7-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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-6.2.7-kirkwood-tld-1 and initrd.img-6.2.7-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-6.2.7-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-6.2.7-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.2.7-kirkwood-tld-1 -d initrd.img-6.2.7-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, see Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
shutdown -r now

=======================================================================
Updated 23 Jan 2023:

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

- General kernel upgrade.
- Add CONFIG_USER_NS and CONFIG_MEMCG
- See Important Note in Step 5 about uInitrd size.

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

Download at Dropbox:

linux-6.1.7-kirkwood-tld-1-bodhi.tar.bz2
md5:
94a3668bc58e92c55ab70f45dfbe1099
sha256:
9575596f1cff69b3bf444ac26c3d18ede393dfa0af09555800deeec81951edcb

This tarball contains 6 files:
linux-image-6.1.7-kirkwood-tld-1_1.0_armel.deb
linux-headers-6.1.7-kirkwood-tld-1_1.0_armel.deb
config-6.1.7-kirkwood-tld-1
zImage-6.1.7-kirkwood-tld-1
linux-dtb-6.1.7-kirkwood-tld-1.tar
linux-6.1.7-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-6.1.7-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-6.1.7-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-6.1.7-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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-6.1.7-kirkwood-tld-1 and initrd.img-6.1.7-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-6.1.7-kirkwood-tld-1 -d vmlinuz-6.1.7-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.1.7-kirkwood-tld-1 -d initrd.img-6.1.7-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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-6.1.7-kirkwood-tld-1 and initrd.img-6.1.7-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-6.1.7-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-6.1.7-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.1.7-kirkwood-tld-1 -d initrd.img-6.1.7-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, see Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
sync
shutdown -r now

=======================================================================
Updated 08 Nov 2022:

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

- General kernel upgrade.
- See Important Note in Step 5 about uInitrd size.

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

Download at Dropbox:

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

md5:
389124ec74782d6a670b9303d63038eb
sha256:
70c9a47df29dd299fc84e5cc0775d952b1e2860334b629b752d30cc17aa751e4

This tarball contains 6 files:
linux-image-6.0.7-kirkwood-tld-1_1.0_armel.deb
linux-headers-6.0.7-kirkwood-tld-1_1.0_armel.deb
config-6.0.7-kirkwood-tld-1
zImage-6.0.7-kirkwood-tld-1
linux-dtb-6.0.7-kirkwood-tld-1.tar
linux-6.0.7-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-6.0.7-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-6.0.7-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-6.0.7-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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-5.19.2-kirkwood-tld-1 and initrd.img-5.19.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-6.0.7-kirkwood-tld-1 -d vmlinuz-6.0.7-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.0.7-kirkwood-tld-1 -d initrd.img-6.0.7-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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-6.0.7-kirkwood-tld-1 and initrd.img-6.0.7-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-6.0.7-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-6.0.7-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-6.0.7-kirkwood-tld-1 -d initrd.img-6.0.7-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, see Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
sync
shutdown -r now

=======================================================================
Updated Jun 25 Apr 2022:

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

- General kernel upgrade
- See new Important Note in Step 5 about uInitrd size.

Addendum: I missed the kirkwood-asus_m25.dtb in this build. Please see this post if you have the Asus M25 box.

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

Download at Dropbox:
linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2 (please let me know if this link does not work for you from your location)

md5:
61c10fd0c3f298b994435cfc1ac57fb7 linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2
sha256:
84b8c763a02c8d93ec7168356e40c8a2412b5aa82a61cede7912d5652c23e884 linux-5.18.6-kirkwood-tld-1-bodhi.tar.bz2

This tarball contains 6 files:
linux-image-5.18.6-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.18.6-kirkwood-tld-1_1.0_armel.deb
config-5.18.6-kirkwood-tld-1
zImage-5.18.6-kirkwood-tld-1
linux-dtb-5.18.6-kirkwood-tld-1.tar
linux-5.18.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-5.18.6-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.18.6-kirkwood-tld-1.tar

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-5.18.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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-5.18.6-kirkwood-tld-1 and initrd.img-5.18.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-5.18.6-kirkwood-tld-1 -d vmlinuz-5.18.6-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.18.6-kirkwood-tld-1 -d initrd.img-5.18.6-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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.18.6-kirkwood-tld-1 and initrd.img-5.18.6-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.18.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-5.18.6-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.18.6-kirkwood-tld-1 -d initrd.img-5.18.6-kirkwood-tld-1 uInitrd

5. The new uImage and uInitrd files should be created in /boot directory now.

5.a Important Note: Check your uInitrd size to see if it is larger than 11 MB.

ls -lh /boot/uInitrd
If it is, see Section B in the u-boot installation thread B. Load addresses for large systems for how to adjust u-boot envs before reboot.

5.b You're ready to reboot the system:
sync 
sync
sync
shutdown -r now

=======================================================================
Updated 27 Apr 2022:

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

- General kernel upgrade
- USB 3.0 is working again in this version.

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

Download at Dropbox:

linux-5.17.4-kirkwood-tld-1-bodhi.tar.bz2
md5:
ed983c15315761e9b39e471b4f376ca6
sha256:
334e3a2cdeccd53cd6920746670b687b2386c95341fdab40adf93694e83ee962

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

Updated: apparently the kernel headers has some problem. So I've rebuilt it and uploaded to Dropbox. Please use this headers package instead if you need to build out-of-tree module. Otherwise, ignore this kernel headers update.

https://www.dropbox.com/s/55rsqliecssdphi/linux-headers-5.17.4-kirkwood-tld-1_1.0_armel.deb
md5:
0b2b1e5e5193c247a89eef4680296f20
sha256sum
3da6edcb85bb8869801d40a0b01543364550f355474d36c3fc3dfdf5ada9bded

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

3. And install it with dpkg. Remove flash-kernel first to avoid potential problem (if flash-kernel was not installed then you'll see some error output):

cd /boot
apt-get remove flash-kernel 
dpkg -i linux-image-5.17.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 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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-5.17.4-kirkwood-tld-1 and initrd.img-5.17.4-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.17.4-kirkwood-tld-1 -d vmlinuz-5.17.4-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.17.4-kirkwood-tld-1 -d initrd.img-5.17.4-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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.17.4-kirkwood-tld-1 and initrd.img-5.17.4-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.17.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-5.17.4-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.17.4-kirkwood-tld-1 -d initrd.img-5.17.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

=======================================================================
Some old kernels and rootfs were removed here.
=====================================================================

Please see next post for older released rootfs and kernels.

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



Edited 303 time(s). Last edit at 02/10/2024 06:10PM by bodhi.
Older rootfs and kernel releases
March 31, 2013 11:19PM
Older rootfs and kernel releases.

=======================================================================
Updated 07 Feb 2022:

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

- General kernel upgrade
- Add supports for CTera C200 V1 box.
- Move MTD block devices to loadable module.

Warning: looks like USB 3.0 is broken in this version. If you need USB 3.0 port (such as with Pogo V4 and NSA325), do not upgrade, previous kernel (5.15.5-tld-1) USB 3.0 is working.

Credits:

- Thanks daviddyer for doing all the testing to bring up the CTera C200 v1 box.
- Thanks the OpenWrt folks for the CTera C200 v1 DTS.

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

Download at Dropbox:

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

md5:
ccb853d1d81eabe24f34cd228e92c2c3 linux-5.16.5-kirkwood-tld-1-bodhi.tar.bz2
sha256:
58d87387d59f61d494d2d6ca954927d26e05e9663a150dd46880b476967ab226

This tarball contains 6 files:
linux-image-5.16.5-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.16.5-kirkwood-tld-1_1.0_armel.deb
config-5.16.5-kirkwood-tld-1
zImage-5.16.5-kirkwood-tld-1
linux-dtb-5.16.5-kirkwood-tld-1.tar
linux-5.16.5-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.16.5-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.16.5-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.16.5-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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-5.16.5-kirkwood-tld-1 and initrd.img-5.16.5-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.16.5-kirkwood-tld-1 -d vmlinuz-5.16.5-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.16.5-kirkwood-tld-1 -d initrd.img-5.16.5-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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.15.5-kirkwood-tld-1 and initrd.img-5.15.5-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.16.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.16.5-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.16.5-kirkwood-tld-1 -d initrd.img-5.16.5-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 26 Sept 2021:

Basic Debian bullseye Kirkwood rootfs for most Kirwood plugs:

- tarball size: 234M
- install size: 668M
- The init system used in this rootfs is sysvinit . To boot with systemd, see Notes 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 examples in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Important Correction:

After releasing this rootfs,

1. I realized I've missed one package that needs to be installed in order to make fw_printenv and fw_setenv available (these binaries have been moved to package libubootenv-tool in bullseye) . So do this if you want to list or set envs in Debian.
apt-get install libubootenv-tool

2. There was an obsolete source in /etc/apt/source.list. Please change the old security repo to
deb https://security.debian.org/debian-security bullseye-security main contrib non-free


Download at Dropbox:

Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (Bitly short link, use this if you can)
Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (Direct Dropbox URL)

md5:
3414d7ad038b402836f232a575d3433f
sha256:
ab11b7ca5a85b22f44a0fd8d204a837705711509b8cde0bc338e97228767f0c7

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. But be aware that Ext4 file system format needs to be "finalized" before it can be used for booting.

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.13.6-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. (Stock u-boot only) 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, or running kwboot with latest u-boot image).

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.13.6-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.13.6-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.

If you are installing on a Kirkwood box that runs stock u-boot (it is not on the new u-boot support list) then see
Boot Kirkwood rootfs with stock u-boot.

Take this USB rootfs to your plug and cold start. After booted into Debian, see Note 1-5 below.

Note 1 (Strongly Recommended):

To keep the rootfs extremely basic and small, there is no swap space set up for it. The first thing you should do after the 1st boot is to set up a swap file to make the system run better. In fact, system upgrades oftently fail to run without swap. Please see here for instruction how to do that.


Note 2 (Optional):

The rootfs will automatically generate new SSH keys at 1st boot (see /etc/rc.local). However, if you would like to generate the keys again then do:

rm /etc/ssh/ssh_host*
ssh-keygen -A

Note 3 (Optional):

Update your rootfs to get the latest Debian package security updates (if the installation is done at a much later date than the time of this release).

Check the system clock to make sure it is the current time (boxes without RTC is using NTP so quite slow to update the clock).

date
And upgrade
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.13.6-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.13.6-kirkwood-tld-1 -d initrd.img-5.13.6-kirkwood-tld-1 uInitrd

For boxes without RTC , also consider install fake-hwclock to ensure the clock is relatively close to real time after a reboot or cold start.
apt-get install fake-hwclock

Note 4 (Optional):

Some network environment is not very robust in propagating the host name advertised by avahi. If you cannot find the host name of this rootfs in your network, you might need to install libnss-mdns.

apt-get install libnss-mdns

Note 5 (Optional):

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 01 Dec 2021:

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

- General kernel upgrade
- NTFS3 (as kernel loadable module)
- SMB_SERVER (as kernel loadable module)

Note: I've moved my build enviroment to Linux Mint in this build, so the system version will show:

Quote

Linux version 5.15.5-kirkwood-tld-1 (root@tldDebianVM) (arm-linux-gnueabi-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 PREEMPT Sun Nov 28 23:08:13 PST 2021

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

Download at Dropbox:

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

md5:
4bb11f348b0d37372257d77429124588 linux-5.15.5-kirkwood-tld-1-bodhi.tar.bz2
sha256:
00593fd95558487a41a0b68e7a73b02e81090aeb14f342ecf25cbe82cc7081de linux-5.15.5-kirkwood-tld-1-bodhi.tar.bz2

This tarball contains 6 files:
linux-image-5.15.5-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.15.5-kirkwood-tld-1_1.0_armel.deb
config-5.15.5-kirkwood-tld-1
zImage-5.15.5-kirkwood-tld-1
linux-dtb-5.15.5-kirkwood-tld-1.tar
linux-5.15.5-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.15.5-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.15.5-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.15.5-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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-5.15.5-kirkwood-tld-1 and initrd.img-5.15.5-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.15.5-kirkwood-tld-1 -d vmlinuz-5.15.5-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.15.5-kirkwood-tld-1 -d initrd.img-5.15.5-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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.15.5-kirkwood-tld-1 and initrd.img-5.15.5-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.15.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.15.5-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.15.5-kirkwood-tld-1 -d initrd.img-5.15.5-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 06 Oct 2021:

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

- General kernel upgrade
- Add sensor module G762 for Netgear Ready NAS Duo v2
- Add supports for Lenovo ix2-dl box

Credits:

- Thanks hippi-viking, jdwl101, and luo for working on the Lenovo ix2-dl bringup.

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

Download at Dropbox:

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

md5:
c8d112640e9c7753c50b35941e767e26
sha256:
845e20ee711313bd804b86c84881b213dc8df32a280c79e306087ff16037605b

This tarball contains 6 files:
linux-image-5.14.9-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.14.9-kirkwood-tld-1_1.0_armel.deb
config-5.14.9-kirkwood-tld-1
zImage-5.14.9-kirkwood-tld-1
linux-dtb-5.14.9-kirkwood-tld-1.tar
linux-5.14.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.14.9-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.14.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.14.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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see Boot Kirkwood rootfs with stock u-boot for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-5.14.9-kirkwood-tld-1 and initrd.img-5.14.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.14.9-kirkwood-tld-1 -d vmlinuz-5.14.9-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.14.9-kirkwood-tld-1 -d initrd.img-5.14.9-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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.14.9-kirkwood-tld-1 and initrd.img-5.14.9-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.14.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 5.14.9-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.14.9-kirkwood-tld-1 -d initrd.img-5.14.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
shutdown -r now

=======================================================================
Updated 04 Aug 2021:

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

- General kernel upgrade.
- Add 4K sector for Macronix SPI flash mx25l8005.

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

Download at Dropbox:

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

md5sum
af544f96175b1843414bd16e9bd4640d
sha256
0453f298fc2a45e889a2039c6fa8676a8d504f73f009650b53e0561dc7251726

This tarball contains 6 files:
linux-image-5.13.6-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.13.6-kirkwood-tld-1_1.0_armel.deb
config-5.13.6-kirkwood-tld-1
zImage-5.13.6-kirkwood-tld-1
linux-dtb-5.13.6-kirkwood-tld-1.tar
linux-5.13.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-5.13.6-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.13.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-5.13.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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please see https://forum.doozan.com/read.php?2,102054,105374#msg-105374 for how to set up the envs in serial console).

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

Generate the uImage and uInitrd (the kernel files vmlinuz-5.13.6-kirkwood-tld-1 and initrd.img-5.13.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-5.13.6-kirkwood-tld-1 -d vmlinuz-5.13.6-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.13.6-kirkwood-tld-1 -d initrd.img-5.13.6-kirkwood-tld-1 uInitrd

4b. Boot with DTB file embedded in the kernel image.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.13.6-kirkwood-tld-1 and initrd.img-5.13.6-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.13.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 5.13.6-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.13.6-kirkwood-tld-1 -d initrd.img-5.13.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 25 May 2021:

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

- General kernel upgrade.
- Patch to work around jumbo frame bug on Marvell 6171 DSA switch (Linksys EA4500). Thanks wacke!

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

Download at Dropbox:

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

md5:
f32ef0c1cd596f896cd76440d203774d
sha256
d99d5c633d2d025315d6596514ce91e290dcf517f1b25c61c5c43655c102ddc5

This tarball contains 6 files:
linux-image-5.12.6-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.12.6-kirkwood-tld-1_1.0_armel.deb
config-5.12.6-kirkwood-tld-1
zImage-5.12.6-kirkwood-tld-1
linux-dtb-5.12.6-kirkwood-tld-1.tar
linux-5.12.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-5.12.6-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.12.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-5.12.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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. 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.12.6-kirkwood-tld-1 and initrd.img-5.12.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-5.12.6-kirkwood-tld-1 -d vmlinuz-5.12.6-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.12.6-kirkwood-tld-1 -d initrd.img-5.12.6-kirkwood-tld-1 uInitrd


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.12.6-kirkwood-tld-1 and initrd.img-5.12.6-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.12.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 5.12.6-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.12.6-kirkwood-tld-1 -d initrd.img-5.12.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 13 Mar 2021:

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

- General kernel upgrade only.

Warning: the Linksys EA4500 has a regression in this kernel and 5.10.x version. Please use 5.9.12-kirkwood-tld-1 for EA4500. Thanks wacke.

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

Download at Dropbox:

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

md5:
3a9476552738c467cd86af966843feb3
sha256:
96a4ad7d4676bf9a3a168a119e071d1983b3410ec841ac2c5e3458f1cc27b978

This tarball contains 6 files:
linux-image-5.11.4-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.11.4-kirkwood-tld-1_1.0_armel.deb
config-5.11.4-kirkwood-tld-1
zImage-5.11.4-kirkwood-tld-1
linux-dtb-5.11.4-kirkwood-tld-1.tar
linux-5.11.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-5.11.4-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.11.4-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.11.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 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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. 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.11.4-kirkwood-tld-1 and initrd.img-5.11.4-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.11.4-kirkwood-tld-1 -d vmlinuz-5.11.4-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.11.4-kirkwood-tld-1 -d initrd.img-5.11.4-kirkwood-tld-1 uInitrd


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.11.4-kirkwood-tld-1 and initrd.img-5.11.4-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.11.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 5.11.4-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.11.4-kirkwood-tld-1 -d initrd.img-5.11.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 17 Jan 2021:

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

- Added XFRM Interface.
- Fixed kernel regression in uncompression with debug on.
- Change kernel compression mode to use xz. The kernel image size was reduced by a few 100's MB.

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

Download at Dropbox:

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

md5:
af446d23e5db9337fe9e045d99ad9660
sha256:
ed6bed2a8c71e3eeccc7926a31aa75f14b56650bec068384ece88a7e226451d9

This tarball contains 6 files:
linux-image-5.10.7-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.10.7-kirkwood-tld-1_1.0_armel.deb
config-5.10.7-kirkwood-tld-1
zImage-5.10.7-kirkwood-tld-1
linux-dtb-5.10.7-kirkwood-tld-1.tar
linux-5.10.7-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.10.7-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.10.7-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.10.7-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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. 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.10.7-kirkwood-tld-1 and initrd.img-5.10.7-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.10.7-kirkwood-tld-1 -d vmlinuz-5.10.7-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.10.7-kirkwood-tld-1 -d initrd.img-5.10.7-kirkwood-tld-1 uInitrd


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.10.7-kirkwood-tld-1 and initrd.img-5.10.7-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.10.7-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 5.10.7-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.10.7-kirkwood-tld-1 -d initrd.img-5.10.7-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 08 Dec 2020:

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

- Remove old patch for TSO (TCP Segment Offload) to improve network performance.
- Update the DTB for Freecom Silverstore 2 NAS (thanks garagoyun)


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

Download at Dropbox:

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

md5:
bbe876b9ceb0d2afc5958b2114eb16d4
sha256:
391efb83fb1b533fa50fe5ec6e9c2f47c3654ab4cd39eda2e793223af582f7a5

This tarball contains 6 files:
linux-image-5.9.12-kirkwood-tld-1_1.0_armel.deb
linux-headers-5.9.12-kirkwood-tld-1_1.0_armel.deb
config-5.9.12-kirkwood-tld-1
zImage-5.9.12-kirkwood-tld-1
linux-dtb-5.9.12-kirkwood-tld-1.tar
linux-5.9.12-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.9.12-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.9.12-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.9.12-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 (if you are installing both the new u-boot and rootfs for the first time, too). This is the preferred method.

- Choose option 4b (This method is required for booting with older U-Boot that does not support FDT) if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. 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.9.12-kirkwood-tld-1 and initrd.img-5.9.12-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.9.12-kirkwood-tld-1 -d vmlinuz-5.9.12-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.9.12-kirkwood-tld-1 -d initrd.img-5.9.12-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.9.12-kirkwood-tld-1 and initrd.img-5.9.12-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
mv uInitrd uInitrd.orig
cp -a zImage-5.9.12-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 5.9.12-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.9.12-kirkwood-tld-1 -d initrd.img-5.9.12-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

=======================================================================
Some older kernels were removed here.

=======================================================================
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.

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.

If you are booting this rootfs with stock u-boot, please see https://forum.doozan.com/read.php?2,102054,105374#msg-105374 for how to set up the envs in serial console.

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

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

Some older kernel releases were removed here.

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

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 kernel releases were removed here.

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

Updated 24 Feb 2015:

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

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


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


Installation:

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

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

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

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

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

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

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

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

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

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

Note1:

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

apt-get update
apt-get upgrade

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

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

Note4:

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

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

====

end of Older rootfs and kernel releases.

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



Edited 27 time(s). Last edit at 10/21/2023 02:57PM 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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)
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 (buy bodhi a beer)



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 (buy bodhi a beer)
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 (buy bodhi a beer)
Sorry, you can't reply to this topic. It has been closed.