User:Jebba/Kernel

=Kernel= Stock kernel: uname -a Linux Nokia-N900-42-11 2.6.28-omap1 #1 PREEMPT Wed Oct 28 15:32:55 EET 2009 armv7l unknown

kernel, kernel-modules, kernel-flasher: 2.6.28-20094102.3+0m5

Custom Kernel Modules
I have built a pile of kernel modules which should work with the stock N900 kernel. See here:

http://www.freemoe.org/users/jebba/kernel/modules/

Installing my custom kernel
Linux Nokia-N900-42-11 2.6.28-omap1-jebba5 #1 PREEMPT Mon Dec 14 00:54:55 MST 2009 armv7l unknown

I have built custom kernel packages closely based on the standard kernel that ships with the N900. Differences:


 * FRAMEBUFFER_CONSOLE=y - This fantastic option means you can see console when the kernel boots up, so you see all the text you usually see when booting up a Linux kernel.

zcat /proc/config.gz
 * IKCONFIG, IKCONFIG_PROC=y - The kernel configuration is available in /proc. To grab it:


 * CONFIG_LOGO=y, CONFIG_LOGO_LINUX_CLUT224=y - Tux, the Linux penguin, at boot! :)


 * The kernel name is 2.6.28-omap1-jebba5 so as to not confuse it with the stock kernel.

You can install this kernel via my repo with apt-get (untested), or manually, which is recommended for now. Procedure (assuming you are running the kernel that ships with the device):

cp -a /lib/modules/2.6.28-omap1 /lib/modules/2.6.28-omap1.orig
 * Make a backup of your current kernel's modules. That way if you want to revert, you can flash it via USB cable and the modules will be there. (You can also revert via dpkg, but this is just in case of "emergencies").

wget \ http://www.freemoe.org/users/jebba/dists/unstable/main/binary-armel/kernel_2.6.28-20094102.3+0m10_armel.deb \ http://www.freemoe.org/users/jebba/dists/unstable/main/binary-armel/kernel-modules_2.6.28-20094102.3+0m10_armel.deb \ http://www.freemoe.org/users/jebba/dists/unstable/main/binary-armel/kernel-flasher_2.6.28-20094102.3+0m10_armel.deb
 * Grab my kernels with wget or whatever (check the dir for more recent versions too).

dpkg -i \ kernel_2.6.28-20094102.3+0m10_armel.deb \ kernel-modules_2.6.28-20094102.3+0m10_armel.deb
 * Install the .debs with dpkg. Note the flasher has to be installed last. If you install them with dpkg all at once, dpkg will prioritize the flasher first, so it won't move the kernel into place. Point of no return:

dpkg -i kernel-flasher_2.6.28-20094102.3+0m10_armel.deb
 * Now install the flasher, which will automatically flash when installed:

rm -rf /lib/modules/2.6.28-omap1 cp -a /lib/modules/2.6.28-omap1.orig /lib/modules/2.6.28-omap1
 * Ok, so the kernel is there, but lets move the original stock modules back into place so you can flash the zImage via flasher-3.5 and USB cable should it be necessary. First we need to remove the mostly empty old dir, then copy the backup:

sudo reboot
 * Now just reboot, yee haw!


 * Enjoy. :)

Compile custom kernel
I followed the procedure in the Maemo Kernel Guide, without making changes. This gave me a bootable kernel. :)

sb-conf select FREMANTLE_ARMEL sb-conf setup MaemoKernel \ -c cs2007q3-glibc2.5-arm7 \ -d qemu:perl:svn:apt-https -t /scratchbox/devkits/qemu/bin/qemu-arm-sb sb-conf select MaemoKernel sb-conf rs MaemoKernel \ /home/jebba/maemo-sdk-rootstrap_5.0_armel.tgz mkdir ~/maemo_kernel sb-conf select MaemoKernel fakeroot apt-get update cd ~/maemo_kernel apt-get source kernel cd kernel-2.6.28 make EXTRAVERSION=-omap1 bzImage ls -lh arch/arm/boot/zImage flasher-3.5 -f -k /scratchbox/users/jebba/home/jebba/\ maemo_kernel/kernel-2.6.28/arch/arm/boot/zImage
 * 1) disable other stuff in apt sources.list
 * 1) flash the thing
 * 1) wow, sure flashes fast, like in 1 second

To unbrick if something goes wrong, unpack the main N900 .bin flash image and flash with the kernel from there. See unpacking flash image section.

Random kernel notes
~ $ cat /sys/power/sr_vdd1_autocomp 0 ~ $ cat /sys/power/sr_vdd2_autocomp 0
 * "SmartReflex can perform continuous dynamic voltage scaling around the nominal operating point voltage according to silicon characteristics and operating conditions. Enabling SmartReflex reduces power consumption. Please note, that by default SmartReflex is only initialized. To enable the automatic voltage compensation for VDD1 and VDD2, user must write 1 to /sys/power/sr_vddX_autocomp, where X is 1 or 2.


 * Enable framebuffer console so bootup messages can be seen.


 * linux-omap mailing list archives