N9 Kernel update project

Summary
The N9 kernel currently used with various Mer images is based on old 2.6.32 maemo kernel. This page collects needed info for any developers who might want to help in updating that kernel to latest linux-stable version.

Note for N950 users: the N950 support is there but it's not tested very well as we develop with N9 mostly, so issues may appear. N950 patches also very welcome though.

Contact info

 * IRC: #mer and #nemomobile @irc.freenode.net
 * Mailing list: mer-general@lists.merproject.org

Development git:

 * NOTE: Kernel tree moved from bitbucket to github starting 1st of October 2012!
 * WWW github project: https://github.com/nemomobile/kernel-adaptation-n950-n9
 * Command line shortcut to clone the repo:

git clone git@github.com:nemomobile/kernel-adaptation-n950-n9.git


 * master branch is the latest development branch
 * The git tree is public, if you want to contribute patches, read process below:
 * Patch process:
 * 1. Send patches first to relevant upstream subsystem list (like linux-omap, linux-usb, etc.)
 * [Subscribe to relevant linux subsystem mailing list here]
 * 2. Once patches seem to be ok for upstream create a pull request in github like following:
 * NOTE: Pull request section below is under construction, instructions incomplete!
 * 2.1 fork the nemomobile/kernel-adaptation-n950-n9 tree into a personal kernel repo in github (use the "fork" button in github web interface)
 * 2.2 push your changes to your forked PERSONAL kernel github tree
 * 2.3 send a pull request from your personal repo to nemo-mobile/kernel-adaptation-n950-n9 tree (again from the github web interface)
 * 3. If the patch seems ok for N9 kernel, we'll take it in, if not, you will receive comments what to fix.
 * Exceptions:
 * Mer/Nemo specific patches (like config changes) can skip step 1.
 * Drivers that cannot be made upstream compatible, can skip step 1. (like PVR, etc.)

Build instructions from git
sudo zypper in make sb2 -t nemo-n950 -m sdk-install -R zypper in perl ncurses-devel sb2 make n9_mer_defconfig sb2 make -j4 zImage sb2 make -j4 modules sb2 make modules_install INSTALL_MOD_PATH=./mods
 * Use Mer SDK and SB2 to build. NOTE: install the nemo-n950 target to SB2.
 * Install needed packages (inside Mer-SDK chroot)
 * Building (inside Mer-SDK chroot):

Deploying to device (kind of "flashing")
./prepare_modules.sh sudo ./copy_kernel.sh // /
 * Pre-requisite: have MOSLO set up on your N9 like this
 * We use helper scripts that prepare the modules etc
 * Then use copy script (NOTE: do this outside Mer-SDK chroot)
 * Plug N9 to USB and let it boot so the filesystem gets mounted
 * Then "flash" the kernel (it's just a simple cp actually...)

Packaging

 * OBS used: https://build.pub.meego.com
 * OBS API: https://api.pub.meego.com

Packaging development project:
 * https://build.pub.meego.com/project/show?project=home%3Akjokinie%3AN9update
 * Includes kernel, and any possible userspace packages needed for new 3.5.y based kernel

updating kernel package
osc co git tag nemo-n9-3.5.3.YYYYMMDD.X # e.g. "git tag nemo-n9-3.5.3.20121018.1" git archive --format=tar --prefix=kernel-3.5.3.YYYYMMDD.X/ nemo-n9-3.5.3.YYYYMMDD.X |bzip2 > kernel-3.5.3.YYYYMMDD.X.tar.bz2 rm *.tar.bz2 mv path/to/kernel-3.5.3.YYYYMMDD.X.tar.bz2. gedit kernel-adaptation-n950.changes # manually add changelog entry osc addremove osc ci -m "latest changes from git..."
 * do changes in your local mer-n9-linux git master branch
 * tag the kernel:
 * create a tarball from the package (replace YYYYMMDD.X with date and a running number X for that date starting from 1)
 * remove the old tarball in your local OBS checkout of kernel-adaptation-n950
 * move the tarball to your OBS checkout of kernel-adaptation-n950
 * update changelog:
 * update changes and commit

TO DO list for kernel update

 * Port needed device drivers from 2.6.32 kernel to latest kernel
 * Some hint may come from missing kernel config options found in initial kernel config migration from 2.6.32 to 3.5.3
 * Currently work is being done here: https://github.com/filippz/kernel-adaptation-n950-n9
 * Updated June 2014

2.6.32 Kernel Update
Update to the 3.5.x series is a huge step. While it is going on 2.6.32-20112201+0m6 kernel used in Nemo Mobile is updated to the 2.6.32-20121301+0m8 (corresponding to Harmattan PR 1.3 N9 kernel, information about update can be found here.