The content of this page is contributed by tonido forum member pmcallihan.
This is a step by step procedure to build the original kernel that comes with your tp2. All responsibility is yours. The software built here is to replace the kernel and modules on an existing operational sata or usb disk. The purpose is to assure yourself that you can build a functional kernel. I highly recommend that you build a stable kernel before creating a new one with different capabilities.
The cross compiler used in this procedure is only functional on a linux desktop. This was done with a debian/ubuntu style os called Zonin. It is my current choice. Linux is linux, the procedure should be the same except for installing dependencies.
1) Open a command line terminal.
2) Download a cross compiler.
3) Install the cross compiler in the /opt directory.
sudo tar xvjpf arm-marvell-linux-gnueabi.tar.bz2 -C /opt/
4) Delete the download.
5) Install software dependencies.
sudo apt-get install build-essential automake autoconf libtool pkg-config intltool
sudo apt-get install libncurses5-dev uboot-mkimage
6) Make a working directory and go to it. Mines is called tonido
7) Download tonido kernel source code.
8) Install kernal source.
tar xvjpf kernel-2.6.31-topkick1281p2-codelathe-20111122.tar.bz2
9) Delete the download.
10) Simplify the package name and move to it.
mv kernel-2.6.31-topkick1281p2-codelathe-20111122 kernel-2.6.31
11) Set the environment for the build. The declarations are only valid for the life of the command shell. If you exit the shell and open a new shell to continue, you will need to set the enviroment again. Highly recommend cut and paste on these commands as the statement need to be exact.
12) Clean up build for start fresh.
13) Create a default configuration file for the build. This is the shipped kernel.
14) If were going to change the kernel or modules. This is where the configuration is modified. The README file in this directory tells you about different program that will make the changes. I will write another howto telling how to add audio to the tp2. That will change the configuration file. I suggest just building a clean kernel for now using the default configuration.
15) Build the kernel.
16) Build the modules
17) Make a directories to store the new software.
18) Store the modules.
make INSTALL_MOD_PATH=../current_kernel modules_install
19) Move the kernel into the new directory and change is access.
cp arch/arm/boot/uImage ../current_kernel/boot/
chmod 744 ../current_kernel/boot/uImage
The new kernel is at ../current_kernel/boot/uImage
The new modules are at ../current_kernel/lib/modules
I assuming your boot directly from the tp2 and that you have a bootable disk that is not booted but mounted at /media/disk1part1/.
Using the shell
ssh tp2 -l root
mv uImage uImage_save
mv modules modules_save
Now back at command shell at ~/tonido/kernel-2.6.31
scp ../current_kernel/boot/uImage root@tp2:/media/disk1part1/boot/
scp ../current_kernel/lib/modules/ root@tp2:/media/disk1part1/lib/
reboot and I hope it works.