studying my hobby


Dockstar: Crosscompile a newer Kernel, set up Toolchain

(3 votes, average: 5.00 out of 5)

Some days ago I wanted to test the performance of a partition with XFS as its filesystem. But I wasn't able to mount it. After a look into the kernelconfig of gorgone's heavykernel I noticed that he obviously didn't build it with XFS-support.

I do want to make the test and take a look at kernelbuilding things anyway. Well, I don't want to keep it back, so I decided to verbalize the steps I took.
In this guide you will learn how to set up the crosscompile toolchain to let a more powerful CPU do the job. If you prefer doing the whole thing on the dockstar it will take you several hours.
Further more we will go through the build process until we have a deb-file with the built kernel.

1. The CodeSourcery's Toolchain

There already is a great HowTo how to set this up here:
I stripped it a bit as follows. If you have debian running on the machine you want to use for the build process download and run this script to install the toolchain:

Just to know, you don't have to type this now:
When you want to enter the toolchain, type

To get back to the normal environment just exit:

That's it.

2. The Kernel

2.1 Get the Sources

First of all you have to decide which kernel you want to compile, take a look at and download the sources. For example 2.6.37:

2.2 Edit the Configuration

If you already have a proper .config just copy it into the current folder.
Then run

Then make your changes in the new .config. It is that long that I prefer doing this with WinSCP or any other remote editor than using vim.
In newer kernel there is no need to add a special patch for the dockstar LED.
Once you are done run:

Lean back, this is going to take some time.

2.3 Install the new Kernel

If everything works fine, you should have a deb-file in /usr/src. Copy this to your dockstar and install it.
I don't have to say that you should backup your data first.
Change the names to your compiled kernel:

To tell the kernel your device is a dockstar, change its machine ID in case you haven't done before:

But remember to change it back to 2097 (sheevaplug's ID) if you downgrade to a kernel that doesn't support the dockstar.

If you didn't edit the files for LED support, do it:
Add to

and in


add after

to set it off, when the system halts.

Now reboot and prey that everything works flawlessly.

3. References,524

Tagged as: , , , | 15,144 views Leave a comment
  • Thanks for the guide. My first kernel for the dockstar is compiling right now. I wonder how long it takes. Lol :P

    • It took about an hour or so on my old laptop running VirtualBox. Anyway the kernel is working great. :)

      • shyd

        It’s about how long it takes for me, too :)
        Great to hear everything is working fine for you!


  • la_tristesse

    I followed your instruction step-by-step but I keep getting Errors when starting to compile the kernel in the toolchain:

    dpkg-architecture: warning: Specified GNU system type arm-linux-gnueabi does not match gcc system type x86_64-linux-gnu.

    Since I dont know how to configure the .config I used the one from the default install from Jeff Dozans Script with this command:

    # Get the config from your current Dockstar kernel
    scp root@YOUR.DOCKSTAR.IP.ADDRESS:/boot/config-2.6.32-5-kirkwood .config,524

    Any suggestions?

    • sri

      i had same problems

    • shyd

      Maybe it’s an issue with 64bit. I run the toolchain in a VM with squeeze 32bit.

      • sri

        i use 32bit squeeze vmware
        dpkg-architecture: warning: Specified GNU system type arm-linux-gnueabi does not match gcc system type i486-linux-gnu

        • shyd

          I have to look if I will get this error when I compile the next kernel.

  • Fredl

    You wrote: “Some days ago I wanted to test the performance of a partition with XFS as its filesystem.”

    I had always in mind to implement this too, because I use XFS almost everywhere. But recently I found why it’s not a good idea on a dockstar. (

    Now I wonder what results you’ve got with XFS and if it is safe to use by now?

    • shyd

      Well, just yesterday I switched back to ext4 on my buffalo linkstation because of dataloss with xfs. On my dockstar and goflex devices I use ext3/4 due to better file security. xfs is slightly faster when writing large files over samba. ext3/4 does fit my needs more than xfs (-> resizing partitions, file security)

      With ext3/4 I didn’t have any dataloss during the last two years. So my choice would be clear, obviously.

  • Fred Clo

    I have a dockstar under squeeze debian, but it’s impossible to compile the program (after 5 hour, I stop because the compilation is blocking at 42 %). I tried several time.
    So I decided to try to cross compile. Could you say me, if this lines below, are correct ? (I copy your tutorial but don’t understand all) : I want to execute all this command on a ubuntu PC (ok ?).
    1 wget
    2 chmod +x
    3 ./

    4 cd /usr/src
    5 svn checkout svn://
    6 cd domoticz

    7 yes “” | make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- oldconfig

    8 # enter the toolchain
    11 # run the final build process
    12 # you may want to edit –append-to-version and –revision
    13 # try out the effects :)
    14 make-kpkg –rootcmd fakeroot –arch armel –cross-compile arm-none-linux-gnueabi- –append-to-version=-dockstar –revision=1.1 –initrd domoticz_image

    and the deb-file is in /usr/src

    I think there is several error, but I don’t know.
    Thanks very much.

    • Hi Fred!
      What you are trying to compile is not a kernel, right? I guess the command should be something like this:

      make-kpkg –rootcmd fakeroot –arch armel –cross-compile arm-none-linux-gnueabi-

      • Fred Clo

        Hi Shyd,
        thanks Shyd for your reply.
        Yes I’m trying to compile a domotic program.
        You wrote “make-kpkg –rootcmd fakeroot –arch armel –cross-compile arm-none-linux-gnueabi-”
        but i don’t see the following. I’m crazy ?


        • Fred, ich checked out the code and took a look at it. It seems this is a bit more than just crosscompiling. Please consider asking the developer how to (cross)compile this piece of software. My article describes how to build a kernel, not a tool. I’m sorry I can’t help you out with this!

          • Fred Clo

            ok, thanks for your reply.