Thomas Breining

Email: thomas.breining@gmail.com

IRC: ThomasBreining, Debian Servers

Debian Activities

Debian on Samsung Galaxy S

I have been trying to understand what is needed to get a pure Debian (without having to chroot and/or use a disk image) working on my Samsung Galaxy S to help with development, testing, packaging or anything else needed.

After a few days of research on the internet, it seems to me that most of the hardware is already supported (except perhaps the modem and other uncommon peripherals).

The Samsung GT-I9000 SoC is called Exynos3 a.k.a. S5PV210, unless I am mistaking, and includes the following hardware:

I'm not sure if the kernel used by Android is the main line one. At least my Cyanogen 10.1 uses a 3.0.76 version in PREEMPT mode which configuration, found in '/proc/config.gz', included the 'CONFIG_PREEMPT' and 'CONFIG_ARCH_S5PV210' parameters set to 'y'. These were the only parameters which seemed relevant to me after quickly browsing the config, I didn't take time to analyze it better and must have missed other important ones though.

This made me think that there shouldn't be much support missing in the kernel for the device and since I am not an expert in these low-level matters, I decided to take a look into what I figured was the next step; the Debian distribution.

/!\ Android never uses mainline kernels (there are a number of Android-specific internal and userland APIs). Added the link to the Replicant version of Linux on the mobile devices -- PaulWise

Thanks for the informations Paul.

The exact version of the kernel I have is 3.0.76-gc0a8d45. The CyanogenMod wiki page for Samsung Galaxy S contains a link to these kernel sources which I think are meant to complete the original Android kernel sources ... Doesn't seem mainline indeed, even though I'm not sure these are the sources corresponding to my kernel.

Anyway, I don't think it will be a big problem to reuse the existing kernel, at least for starters.

I am now trying to understand how to make this kernel initialize a Debian rootfs created with debootstrap on the internal SD card instead of the Android system, like described by PaulWise on this page.

Here is how far I got so far

/!\ The commands describe below should be executed with super user rights (either as root or using sudo).

  1. Install the debootstrap package if necessary and create a base debian system as follows.

    # debootstrap --foreign --arch=armhf wheezy debian http://ftp.debian.org/debian

    This command creates a minimal rootfs of the wheezy suite for the armhf architecture in the debian directory using the http://ftp.debian.org/debian mirror.

  2. The previous step only downloaded packages and prepared the root directory structure, it is now necessary to install the packages. There are two options to do this.
    1. Either emulate target architecture and perform bootstrap second stage.
      1. Install the qemu package if necessary and copy the emulator static binary to the target rootfs using the following command.

        # cp /usr/bin/qemu-arm-static debian/usr/bin
      2. Launch a new shell session from the target rootfs using the chroot command as follows.

        # chroot debian
      3. Perform bootstrap second stage using the following command.

        # /debootstrap/debootstrap --second-stage
    2. Or deploy to target architecture and perform second stage bootstrap.


CategoryHomepage