Maemo on Debian

m (typos)
(roadmap)
Line 88: Line 88:
Then we should integrate rest of Nokia apps, as well as Maemo and/or Meego apps, and also do numerous enhancements that definitly will be needed and possible.
Then we should integrate rest of Nokia apps, as well as Maemo and/or Meego apps, and also do numerous enhancements that definitly will be needed and possible.
 +
 +
== Roadmap ==
 +
 +
All tasks within one phase can be done independently.
 +
Later phases require all tasks in previous phases to be done.
 +
You can assign ourselves by adding your nickname or email.
 +
 +
=== Phase 0 ===
 +
decide on the name for the project, register a domain, setup a homepage, and make it public.
 +
Some ideas for the name: Moebian, Debian Mobile, Debian/MeeGo, Maebian
 +
 +
=== Phase 1 ===
 +
# set up mailing lists with public archive (on debian.org or independent?)
 +
# set up bug/issue/task tracker and wiki, VCS
 +
# set up or get access to a build system
 +
# write scripts to setup Maemo5 chroots or partitions which can be booted (bootmenu) or chrooted to. titan has written a script to symlink all necessary system in the rootfs from a chroot. The advantage over copying the rootfs are the higher speed of NAND,the automatic update by firmware upgrades and less disc usage.
 +
# identify non-free packages names in the firmware and repack the binaries with dpkg-repack
 +
 +
=== Phase 2 ===
 +
# create a Maemo package in extras-devel which automatically setups a chroot or partition (incl. repartitioning)
 +
# build a dependency graph for the non-free packages so that we know which packages could be broken by what library upgrade.
 +
# modify dpkg-repack so that dependencies can be modified
 +
# try to replace essential libraries (libc, libgcc, Gtk) and software step by step and check which packages would break
 +
# for packages which break, keep the original dependency at another place and fix the rpaths with chrpath. Alternatively, create a sub-chroot which contains the minimal dependencies to run the application. Also ask Nokia to open-source the code, or rebuild the binary in a more compatible way.
 +
# install essential Debian packages and disable all services that would run in the background or unnecessarily slow down the system (PAM) in order to save battery.
 +
 +
=== Phase 3 ===
 +
# adapt more Debian packages to mobile usage
 +
# make sure Maemo5 applications can be installed or port more essential Maemo5 packages to the new base (e.g., pymaemo).
 +
 +
=== Phase ? ===
 +
 +
# integrate MeeGo components, send fixes to MeeGo
== Infrastructure ==  
== Infrastructure ==  

Revision as of 13:43, 22 February 2010

Contents

Maemo on Debian

Motivation

The purpose of this project is to port the proprietary Nokia components of Maemo 5 to a Debian base system running on the Nokia N900 and future devices. It should be possible run both Maemo5 and standard Debian software on this platform natively and in the same environment. In the future, the project will package and integrate the MeeGo components and know-how to enable installation of MeeGo applications.

Why not MeeGo?

MeeGo is supposed to be a merger of Maemo 5 and Moblin and therefore the future of Maemo. While Maemo 5 is similar to Debian and reuses most of its tools and policies, it still significantly different from Debian so that porting Debian packages is not always trivial. Installation of native Debian packages is in most cases impossible.

For many users, the similarity to Debian and the relative openness of Maemo 5 has been precisely the reason why they have bought the Nokia N900. So far Nokia has not committed to porting Harmattan, the successor of Maemo 5, which is supposed to be MeeGo compatible, or the official MeeGo to the N900. Now, a few months after its public release, owners of the sophisticated, but expensive N900 have the impression that they are left with an abandoned OS and have little hope to be able to upgrade to its successors.

This projects aims to give N900 users immediate access to the Debian software pool and the prospect to be able to install MeeGo applications in the future. It also tries to convince Nokia to open-source as many applications and drivers for the N900 as possible in order to integrate them better in this project.

The commercial initiative of Intel and Nokia, called MeeGo, is supposed to be open-source and open for the community. However, important decisions have been made behind closed doors and are unlikely to change. One of those decisions is to switch from base system that is similar to Debian, to an independent base that uses the RPM package manager and that is not required to be compatible with any of the major Linux distribution. MeeGo users and developers could therefore only use and rely on designated MeeGo applications and libraries, if they do not port third-party software to it themselves. MeeGo apparently only targets mainstream mobile applications, while this project aims to satisfy the needs of both mainstream and experts. This project is therefore not a fork or competitor to MeeGo but rather a project with a broader scope than MeeGo. The MeeGo software stack is just one part of this project.

Advantages for users and developers

The integration of Debian, Maemo 5 and MeeGo in this project has the following advantages:

Users will have the freedom to install

  1. all Maemo 5 applications (incl. the non-free Nokia binaries),
  2. future mobile-optimized MeeGo applications (RPM packages), and
  3. all packages from the huge Debian software pool, which is constantly maintained and updated (incl. security fixes) by the Debian community.
  4. novel mobile applications written for this project and compatible with Debian

Only few packages will require modification to run on this platform (excluding complete GUI adapations). The main contribution of this project is to perform and maintain such modifications, and if possible, to send them upstream.

Developers of third-party apps could simply integrate all software packages (for example, libraries) that are available in the huge Debian pool, without the need to port and to maintain them themselves. If they are familiar with the mature Debian development tools and policies, there is no need to learn something new. They could also build and test the apps natively on their Debian desktop.

The .deb vs. .rpm debate

There are only subtle differences between the two package formats .deb and .rpm and their respective package managers. Many MeeGo supporters make a category error by confusing the underlying package format with the higher goal. The purpose of this project is not necessarily to have .deb packages and dpkg as a front end, but to able to integrate existing Debian and Maemo work and know-how. Since both of them are based on dpkg, choosing the same format is required for retaining compatibility. To emphasize this point: if Maemo and Debian were using .rpm, this project would use it, too.

Implementation plan

Currently, project is in it's very early stage. Nothing is available to install and try yet.

Here are several steps that we are going to do:

Free up a partition to work with

By default, N900 has 32G /dev/mmcblk0 device, that is split into a 768k swap partition, a 2 Gb /home partition, and the rest is a vfat /home/MyDocs partition.

We need to have additional partition to install out target Debian into. Most natural way is to split out some space out of /home/MyDocs.

So we need to design and document a clean procedure, how to make /home/MyDocs partition smaller, and get a new free partition for Debian. This should be done such that all current content of /home/MyDocs is preserved, and device keeps booting and working normally.

Once such a procedure is designed and debugged, it will be documented here.

Determine minimal subset of Nokia's firmware to work with

It will be easier to work with smaller system. I think that complete Nokia's firmware is a bit large to start with. Better to find a smallest subset that is enough for communication functions (UI/phone/messaging) and work with that.

This subset is likely a set of Nokia's original .deb packages (from some particular firmware release), plus maybe some files that are not in any package [don't know if there are such].

It should be possible to unpack the debs in the subset into our free partition (perhaps in the way similar to debootstrap: first unpack, then run postinst scripts and hooks), add not-in-deb files if any (hook can do that), and then boot device into that.

Having device that dual-boots into original system and this minimal subset is a big milestone.

Integrate minimal nokia system with Debian infrastructure

Next step is to understand the relation between out minimal system and the rest of the debian. There will likely be different sort of incompatibilities between minimal Nokia system and normal Debian: files provided by both Nokia and Debian packages, namespace collisions, incompatible packaging practices, and all other sort of problems. These should be determined and faced somehow, step-by-step.

At some point we should get system that is still functional as a phone, and that can install packages from Debian repositories.

To be continued ...

Then we should integrate rest of Nokia apps, as well as Maemo and/or Meego apps, and also do numerous enhancements that definitly will be needed and possible.

Roadmap

All tasks within one phase can be done independently. Later phases require all tasks in previous phases to be done. You can assign ourselves by adding your nickname or email.

Phase 0

decide on the name for the project, register a domain, setup a homepage, and make it public. Some ideas for the name: Moebian, Debian Mobile, Debian/MeeGo, Maebian

Phase 1

  1. set up mailing lists with public archive (on debian.org or independent?)
  2. set up bug/issue/task tracker and wiki, VCS
  3. set up or get access to a build system
  4. write scripts to setup Maemo5 chroots or partitions which can be booted (bootmenu) or chrooted to. titan has written a script to symlink all necessary system in the rootfs from a chroot. The advantage over copying the rootfs are the higher speed of NAND,the automatic update by firmware upgrades and less disc usage.
  5. identify non-free packages names in the firmware and repack the binaries with dpkg-repack

Phase 2

  1. create a Maemo package in extras-devel which automatically setups a chroot or partition (incl. repartitioning)
  2. build a dependency graph for the non-free packages so that we know which packages could be broken by what library upgrade.
  3. modify dpkg-repack so that dependencies can be modified
  4. try to replace essential libraries (libc, libgcc, Gtk) and software step by step and check which packages would break
  5. for packages which break, keep the original dependency at another place and fix the rpaths with chrpath. Alternatively, create a sub-chroot which contains the minimal dependencies to run the application. Also ask Nokia to open-source the code, or rebuild the binary in a more compatible way.
  6. install essential Debian packages and disable all services that would run in the background or unnecessarily slow down the system (PAM) in order to save battery.

Phase 3

  1. adapt more Debian packages to mobile usage
  2. make sure Maemo5 applications can be installed or port more essential Maemo5 packages to the new base (e.g., pymaemo).

Phase ?

  1. integrate MeeGo components, send fixes to MeeGo

Infrastructure

discussion about the project

Resources

Discussions

  1. Thread on Debian-devel
  2. old Deblet thread
  3. poll and discussion about the switch to RPM

Related projects

  1. Easy debian thread
  2. Debian rebuild for Maemo5
  3. MeeGo
  4. Mer
  5. Moblin
  6. Debian for Eee PC
  7. Ubuntu ARM port and with new UI
  8. Ubuntu Netbook Remix
  9. Embeddian
  10. Debian on FreeRunner
  11. Hackable:1
  12. Sugar
  13. Ubuntu Mobile

Proprietary Maemo components

  1. Why close packages?
  2. Openness report
  3. Free Maemo
  4. Licensing change requests and thread for license change requests

Build systems and toolchains

  1. Maemo SDK
  2. Maemo SDK+ based on scratchbox2 and lenny tools
  3. sbdmock for Maemo
  4. OBS

Repartitiong and chroots, the /opt problem

  1. easy-chroot
  2. brainstorm and discussion
  3. Repartitioning the flash
  4. thread about building a chroot for installing the SDK

Packaging, tools

  1. Packaging for Maemo5
  2. dpkg-repack
  3. debtree - package dependency graphs