The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


N9 Kernel update project

From Mer Wiki
(Difference between revisions)
Jump to: navigation, search
(Development git:)
m (TO DO list for kernel update)
 
(38 intermediate revisions by 8 users not shown)
Line 2: Line 2:
  
 
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.
 
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 ==
 
== Contact info ==
Line 27: Line 29:
 
*** 2.3 send a pull request from your personal repo to nemo-mobile/kernel-adaptation-n950-n9 tree (again from the github web interface)
 
*** 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.
 
** 3. If the patch seems ok for N9 kernel, we'll take it in, if not, you will receive comments what to fix.
** Exception: Mer/Nemo specific patches (like config changes) can be sent as pull request directly.
+
** 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 ===
 
=== Build instructions from git ===
** Use [https://wiki.merproject.org/wiki/Platform_SDK Mer SDK] and [https://wiki.merproject.org/wiki/Platform_SDK_and_SB2 SB2] to build.
+
** Use [https://wiki.merproject.org/wiki/Platform_SDK Mer SDK] and [https://wiki.merproject.org/wiki/Platform_SDK_and_SB2 SB2] to build. NOTE: install the [https://wiki.merproject.org/wiki/Platform_SDK_and_SB2#N950_Nemo_Mobile nemo-n950] target to SB2.
 +
** Install needed packages (inside Mer-SDK chroot)
 +
sudo zypper in make
 +
sb2 -t nemo-n950 -m sdk-install -R zypper in perl ncurses-devel
 
** Building (inside Mer-SDK chroot):
 
** Building (inside Mer-SDK chroot):
 
  sb2 make n9_mer_defconfig
 
  sb2 make n9_mer_defconfig
Line 41: Line 48:
 
* Pre-requisite: have MOSLO set up on your N9 [https://wiki.merproject.org/wiki/Nemo/Installing#Persistent_Single_Boot_by_Flashing_the_Dual_Boot like this]
 
* Pre-requisite: have MOSLO set up on your N9 [https://wiki.merproject.org/wiki/Nemo/Installing#Persistent_Single_Boot_by_Flashing_the_Dual_Boot like this]
 
* We use helper scripts that prepare the modules etc
 
* We use helper scripts that prepare the modules etc
  ./prepare_kernel.sh
+
  ./prepare_modules.sh
 
* Then use copy script (NOTE: do this outside Mer-SDK chroot)
 
* Then use copy script (NOTE: do this outside Mer-SDK chroot)
 
** Plug N9 to USB and let it boot so the filesystem gets mounted
 
** Plug N9 to USB and let it boot so the filesystem gets mounted
Line 53: Line 60:
  
 
Packaging development project:
 
Packaging development project:
* https://build.pub.meego.com/package/show?package=kernel-adaptation-n950&project=home%3Akjokinie%3Abranches%3AMer%3AMDS%3ACore%3Aarmv7hl
+
* 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 pack with git-pkg ===
+
* setup [https://github.com/lbt/git-pkg git-pkg] by cloning it out and copy gp_make_src to PATH
+
* then do following to update patch set for the OBS pack
+
  
 +
=== updating kernel package ===
 
  osc co <kernel pack>
 
  osc co <kernel pack>
* do changes in your local mer-n9-linux git mer-latest branch
+
* do changes in your local mer-n9-linux git '''master''' branch
* if you change base kernel tag version, edit '''_src''' to point to right initial commit
+
* tag the kernel:
* then
+
  git tag nemo-n9-3.5.3.YYYYMMDD.X # e.g. "git tag nemo-n9-3.5.3.20121018.1"
  #symlink .git from your git tree
+
* create a tarball from the package (replace YYYYMMDD.X with date and a running number X for that date starting from 1)
  ln -s /path-to/mer-n9-linux/.git .git
+
  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
#run git-pkg script to generate tar and latest patches
+
* remove the old tarball in your local OBS checkout of kernel-adaptation-n950
  gp_make_src
+
  rm *.tar.bz2
* then copy the "Patches:" lines to your .yaml
+
* move the tarball to your OBS checkout of kernel-adaptation-n950
  specify *.yaml
+
  mv path/to/kernel-3.5.3.YYYYMMDD.X.tar.bz2 .
 +
* update changelog:
 +
gedit kernel-adaptation-n950.changes # manually add changelog entry
 +
* update changes and commit
 
  osc addremove
 
  osc addremove
 
  osc ci -m "latest changes from git..."
 
  osc ci -m "latest changes from git..."
Line 75: Line 83:
 
* Port needed device drivers from 2.6.32 kernel to latest kernel
 
* Port needed device drivers from 2.6.32 kernel to latest kernel
 
** Some hint may come from missing kernel config options found in [https://gitorious.org/mer-n9-kernel/mer-n9-kernel/commit/7ed0b297185497c4015921a92aed9ee90dce6fde initial kernel config migration from 2.6.32 to 3.5.3]
 
** Some hint may come from missing kernel config options found in [https://gitorious.org/mer-n9-kernel/mer-n9-kernel/commit/7ed0b297185497c4015921a92aed9ee90dce6fde 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 https://github.com/filippz/kernel-adaptation-n950-n9]
 +
**Updated June 2014
  
 
{| border="1"
 
{| border="1"
Line 80: Line 90:
 
! Work item  !! Person fixing it !! Other comments
 
! Work item  !! Person fixing it !! Other comments
 
|-
 
|-
| USB networking || phdeswert ||  
+
| <span style="color:green">USB networking</span> || phdeswer || 2 different patches have been sent to linux-omap, can also be solved by using CONFIG_SOC_OMAP3430 (as it only influences USB and is in no way specific to 3430. This option will be removed though at some point in time.)
 
|-
 
|-
| Display drivers || jnikula ||  
+
| <span style="color:green">Display drivers</span> || jnikula || DONE
 
|-
 
|-
| PowerVR 3D drivers missing || jnikula?? ||
+
| <span style="color:green">PowerVR 3D drivers missing</span> || jnikula || DONE
 
|-
 
|-
| Audio driver parts missing || free for taking! ||
+
| <span style="color:orange">Audio driver parts missing</span> || filippz || Commits to upstream repo pending: [https://github.com/filippz/kernel-adaptation-n950-n9/commit/19408185001277185c1b7923819b7906b07942c1 1] [https://github.com/filippz/kernel-adaptation-n950-n9/commit/33f7bb07c4215f2afcd97430618a0ff1e61632dc 2]
 
|-
 
|-
| CMT (cellular modem) drivers || free for taking! ||
+
| <span style="color:green">CPU frequency tables missing, N9 running only at 600MHz currently</span> || Tieto || DONE
 
|-
 
|-
| Touch driver board configuration || free for taking! ||
+
| <span style="color:orange">CMT (cellular modem) drivers</span> || Tieto/filippz || Reintroducing old Harmattan (H/SSI) framework: Part 1 - [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/ef68394d631cbbb158c4c184bbe3b5d14f6689ab 1] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/e206990fb3b27102ed94728bb03d2dbab24d9771 2] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/f84629fd0486c53dbd8d837aaafd77f876726928 3] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/ed24b2cb9eee9d696aef11a48f2c04d12b085aed 4] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/d5a1e5d8b85a419d83ac4add283e467bc90f79b8 5] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/c2e1d175c3adf76b964a6b00f10cc4aa67e82463 6] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/d3ea88597763f9c9beeacc8fd5f459effaac4daf 7] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/83363e7ff0b32f46a12a71de6af141aaff6211a6 8] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/bdfb0f0885006a4956b7e1146dbd96e9e6757276 9] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/5392161ec35736309dd9fb633141b4f0b583a15b 10] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/e5cd19bd8d536db8699b0b7173beb9935c9e5332 11] Part 2 - [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/19ab4ee01fbf0d27622b836ec0783fe6451d9c71 12] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/f32b1f81a3c1ca1ebd16cc936c8067dd1fdd9426 13] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/e3c9a560ec479a6fb104bc40a6fa7ef75e6b8f9e 14] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/5aca0f0f42c5ae524e9dbfc90166ea685a501976 15] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/d4a5c7dae1bd931900d1adb4bb7190fbe8af7bce 16] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/2dc156fe78370d7c9c53af4420107c8cb912d0bf 17] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/7cba48e9b87d3fde001485915a831ab14eb6b842 18] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/5251241019ef3e1ed8dfa389777df1d3feabb23e 19] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/391af61e802ade9cbe4070afff4c4a05e874cd0c 20] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/dc3248ac00cb72a37add286402180373991b5b79 21] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/5c8d3ed3949aaa01dcee69381103b66545b0c999 22] [https://github.com/nemomobile/kernel-adaptation-n950-n9/commit/753a91fce041afe8b2a9f15d5a24bcd977dd36dc 23]
 +
Kernel report: ''ssi_protocol ssi_protocol: WAKELINES TEST FAILED'' ([https://github.com/nemomobile/kernel-adaptation-n950-n9/pull/18 more info]) is fixed since [https://github.com/filippz/kernel-adaptation-n950-n9/commit/1ac56a29fdec14cc1f8cc9fdaf1c54b344ffc9fd 24]
 
|-
 
|-
| Volume buttons board config || free for taking! ||
+
| <span style="color:green">Touch driver board configuration</span> || jnikula || DONE - Driver merged, thanks jnikula :)
 
|-
 
|-
| WLAN driver fixing (driver exists but no wlan0 i/f, could be missing board config) || free for taking! ||
+
| <span style="color:orange">Volume buttons board config</span> || filippz || Commits to upstream repo pending: [https://github.com/filippz/kernel-adaptation-n950-n9/commit/1b8ef0a2db51e00ac007f19d137140cf9a59dbbe 1]
 
|-
 
|-
| Nokia H4P bluetooth driver missing || deztructor || Not high priority
+
| <span style="color:green">WLAN driver fixing (driver exists but no wlan0 i/f, could be missing board config)</span> || Tieto || Driver merged, WLAN firmware package update ongoing.
 +
Firmware package linux-firmware-ti-connectivity needs to be installed for WLAN to work
 +
|-
 +
| <span style="color:orange">Nokia H4P bluetooth driver missing</span> || Tieto || scan works fine. Connection established need to be tested.
 +
|-
 +
| <span style="color:orange">RM-680/RM-696 board configuration</span>  || filippz || Commits to upstream repo pending: [https://github.com/filippz/kernel-adaptation-n950-n9/commit/172414d0d34b784d462ddbcaeea7f68f7c1ff8d5 1]
 +
|-
 +
| <span style="color:orange">GPS driver</span>  || filippz || Commits to upstream repo pending [https://github.com/filippz/kernel-adaptation-n950-n9/commit/f04e83934081406fae3e6ed4a8bc957ed22022d0 1]
 +
'''HELP''' is needed as GPS requires nped binary and it's dependecies (possible [http://redmine.replicant.us/projects/replicant/wiki/BCM4751 workaround])
 +
|-
 +
| <span style="color:orange">NFC driver</span>  || filippz || Commits to upstream repo pending [https://github.com/filippz/kernel-adaptation-n950-n9/commit/8d44050b60fdc7ee22ee42f218bf6b8fcb42e2ae 1]
 +
|-
 +
| <span style="color:orange">Proximity/ALS driver</span>  || filippz || Commits to upstream repo pending [https://github.com/filippz/kernel-adaptation-n950-n9/commit/91b04e43ba6cce347ca8202256204c753cc507d8 1]
 +
|-
 +
| <span style="color:orange">Magnetometer (compass) driver</span>  || filippz || Commits to upstream repo pending [https://github.com/filippz/kernel-adaptation-n950-n9/commit/2debb33f5c8772e24f37035cf470f46dd5b40c68 1]
 +
|-
 +
| <span style="color:orange">Camera drivers</span> || filippz || Fixed in upstream (since [https://github.com/filippz/kernel-adaptation-n950-n9/commit/be54e274f939aebfb8161e5c477a8d40cde2dc93])
 +
Works only with libomap3camd3 1.126. Latest libomap3camd breaks with floating point error (it doesn't work under 2.6 kernel on nemomobile also).
 +
FCam 1.2.2 breaks with segmentation fault (once started, FCam spawns a few threads and then waits for scheduling properties of these threads to be changed - I used "chrt -f -p 1 <PID>" to do that)
 +
|-
 +
| <span style="color:orange">USB charging</span> || filippz || When PC is connected and usb gadget modules are used for the first time (g_zero & co) kernel is configured OK and draws 500mA from USB port, but on subsequent loading of gadget modules USB remains unconfigured and is limited to 100mA.
 +
BME is used for charging, and while it works, '''caution''' is needed, as this could potentially damage the device.
 +
|-
 +
| Port needed Mer specific patches from old [https://build.pub.meego.com/package/show?package=kernel-adaptation-n950&project=CE%3AAdaptation%3AN950-N9 N950 kernel OBS pack] || deztructor || There are not so much patches remained actual, see [[#2.6.32 Kernel Update]]
 
|}
 
|}
  
* Port needed Mer specific patches from old [https://build.pub.meego.com/package/show?package=kernel-adaptation-n950&project=CE%3AAdaptation%3AN950-N9 N950 kernel OBS pack]
+
== 2.6.32 Kernel Update ==
** Yes, all 100+ patches there should be checked
+
 
 +
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
 +
[http://deztructor.blogspot.fi/2012/10/nemo-mobile-kernel-is-rebased.html can be found here].

Latest revision as of 19:09, 15 June 2014

Contents

[edit] 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.

[edit] Contact info

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

[edit] Developement

[edit] Development git:

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.)
    • 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.)

[edit] Build instructions from git

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

[edit] Deploying to device (kind of "flashing")

  • Pre-requisite: have MOSLO set up on your N9 like this
  • We use helper scripts that prepare the modules etc
./prepare_modules.sh
  • 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...)
sudo ./copy_kernel.sh /<path-to>/<mounted>/<N9 filesystem>

[edit] Packaging

Packaging development project:

[edit] updating kernel package

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

[edit] TO DO list for kernel update

Work item Person fixing it Other comments
USB networking phdeswer 2 different patches have been sent to linux-omap, can also be solved by using CONFIG_SOC_OMAP3430 (as it only influences USB and is in no way specific to 3430. This option will be removed though at some point in time.)
Display drivers jnikula DONE
PowerVR 3D drivers missing jnikula DONE
Audio driver parts missing filippz Commits to upstream repo pending: 1 2
CPU frequency tables missing, N9 running only at 600MHz currently Tieto DONE
CMT (cellular modem) drivers Tieto/filippz Reintroducing old Harmattan (H/SSI) framework: Part 1 - 1 2 3 4 5 6 7 8 9 10 11 Part 2 - 12 13 14 15 16 17 18 19 20 21 22 23

Kernel report: ssi_protocol ssi_protocol: WAKELINES TEST FAILED (more info) is fixed since 24

Touch driver board configuration jnikula DONE - Driver merged, thanks jnikula :)
Volume buttons board config filippz Commits to upstream repo pending: 1
WLAN driver fixing (driver exists but no wlan0 i/f, could be missing board config) Tieto Driver merged, WLAN firmware package update ongoing.

Firmware package linux-firmware-ti-connectivity needs to be installed for WLAN to work

Nokia H4P bluetooth driver missing Tieto scan works fine. Connection established need to be tested.
RM-680/RM-696 board configuration filippz Commits to upstream repo pending: 1
GPS driver filippz Commits to upstream repo pending 1

HELP is needed as GPS requires nped binary and it's dependecies (possible workaround)

NFC driver filippz Commits to upstream repo pending 1
Proximity/ALS driver filippz Commits to upstream repo pending 1
Magnetometer (compass) driver filippz Commits to upstream repo pending 1
Camera drivers filippz Fixed in upstream (since [1])

Works only with libomap3camd3 1.126. Latest libomap3camd breaks with floating point error (it doesn't work under 2.6 kernel on nemomobile also). FCam 1.2.2 breaks with segmentation fault (once started, FCam spawns a few threads and then waits for scheduling properties of these threads to be changed - I used "chrt -f -p 1 <PID>" to do that)

USB charging filippz When PC is connected and usb gadget modules are used for the first time (g_zero & co) kernel is configured OK and draws 500mA from USB port, but on subsequent loading of gadget modules USB remains unconfigured and is limited to 100mA.

BME is used for charging, and while it works, caution is needed, as this could potentially damage the device.

Port needed Mer specific patches from old N950 kernel OBS pack deztructor There are not so much patches remained actual, see #2.6.32 Kernel Update

[edit] 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.

Personal tools