Meego Wiki
Views
From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Add info about sysfs entry to switch power on rather than kernel patch)
Line 56: Line 56:
* Wifi working (so you can login)
* Wifi working (so you can login)
* Tab kb dock working (so you can login)
* Tab kb dock working (so you can login)
-
* Basic unaccelerated X on the framebuffer. (Requires small kernel patch)
+
* Basic unaccelerated X on the framebuffer. (Requires small kernel patch) - kernel patch not necessary now, just "echo 1 > /sys/class/lcd/s5p_lcd/lcd_power" after you start Xorg to switch display on.
* Basic audio playback (The soundcard acts funny unless you feed it 32kHz audio, and on playback you need to run (amixer sset "Playback Path" "SPK") to actually enable sound)
* Basic audio playback (The soundcard acts funny unless you feed it 32kHz audio, and on playback you need to run (amixer sset "Playback Path" "SPK") to actually enable sound)

Revision as of 10:17, 21 February 2011

Contents

Nexus S

DSC00579.jpg Nexuss.jpg

So, I have a barebones version of MeeGo (barely) running on the Nexus S. I can't really do much with it on my own, but I'm posting the info here so you can build it and try it for yourself.

What works

  • ADB root shell
  • X11 & UI apps
  • Screen brightness

What doesn't work

  • Touchscreen
  • WiFi
  • Anything else :-P

Build

I have my boot.img (kernel + ramdisk) and a MeeGo kickstart file at http://blog.steventroughtonsmith.com/2011/01/nexus-s-meego.html; you can use fastboot to boot the image, or flash it to the recovery partition to dual boot. The actual MeeGo rootfs is run from a rootfs.ext2 file you can drop onto the Nexus S using Mass Storage mode - no need for messy flashing or the like, you can thank me later).

There's not much else I can do on my own right now, so if you want to see anything become of this do get involved!

Kernel

My kernel is Samsung stock; you will need to modify it to get X11 to run:

  • git://android.git.kernel.org/kernel/samsung.git
  • make herring_defconfig

The only change was modifying the .config file to turn on CONFIG_VT (needed for X11, unless we recompile X11 without VT support).

Screen brightness

Will add this to a newer kickstart, but for the time being, you can bring the brightness to full by doing:

  • echo 255 > /sys/devices/platform/s3cfb/spi_gpio.3/spi3.0/backlight/s5p_bl/brightness

Notes

dmesg output is available on Talk:ARM/Hummingbird.


Samsung Galaxy Tab

WORK IN PROGRESS, I'M STILL ADDING INFO! - 16/2/2011 If you're in a desperate hurry then feel free to catch me (lardman) on #meego-arm and pick my brain/add info/make changes here/etc. :)

Meego

Current Status

Working:

  • Boots Meego (external SD btrfs partition or ext2 loop file)
  • Wifi working (so you can login)
  • Tab kb dock working (so you can login)
  • Basic unaccelerated X on the framebuffer. (Requires small kernel patch) - kernel patch not necessary now, just "echo 1 > /sys/class/lcd/s5p_lcd/lcd_power" after you start Xorg to switch display on.
  • Basic audio playback (The soundcard acts funny unless you feed it 32kHz audio, and on playback you need to run (amixer sset "Playback Path" "SPK") to actually enable sound)

In progress:

  • Touch screen

Not tried yet:

  • PowerVR accelerated UI
  • Bluetooth
  • Modem
  • GPS
  • Camera
  • DSP acceleration
  • Sensors (compass, accelerometers)


If you would like to help, have questions, ideas, etc., please catch me (lardman) in #meego-arm

Introduction

The idea here is to boot Meego from the external SD card (similar to the N900 Meego boot process.)

Currently this requires that you flash a new, slightly modified, kernel to your Tab.

The Tab kernel contains an initramfs which contains an Android version of init which brings the system up.

With Android devices, there is normally a hardware key you can press at boot time to specify whether you want to enter flashing mode or recovery mode (and no keypress indicates a normal startup.) On the Tab the flashing key is the volume down button and the recovery button is the volume up button.

With most Android devices the normal and recovery boots load different kernels (located on different partitions.) This is nice as it means one does not need to modify the normal Android kernel at all, but can still mess about with other kernels in the recovery kernel partition (e.g. to try booting Meego, at the expense of no recovery mode, which is not a big problem.) But, in their infinite wisdom, Samsung decided that both normal and recovery modes would use the same kernel on the Tab. Rather than booting a completely separate kernel, the Tab boots the same kernel and the Android-specific init somehow recognises which mode was selected at boot time. It then proceeds to process either init.rc or recovery.rc.

Now this would give us an option of modifying the boot process, but the major problem is that while the Android init should support an exec command, this is not implemented in the version we have, and therefore even if we modify the recovery.rc file to try to start our own script to switch_root, etc., it won't work. The Android init used in the Tab is not stock Google code and there is no source available for the modifications.

Therefore I've renamed the Android init and replaced with it an init script which searches for Meego installations (btrfs partitions on the external SD card, or loop images) and if these are not found exec's the renamed Android init, which goes on its merry way and starts Android just like normal.

Getting Going

Work in progress!

Backing up the existing Android installation with dd

We only actually alter the kernel, so this is the only one you need to backup, but you may as well do the whole lot just in case. Note that you need to "root" your Tab to be able to use these commands. Also note that this assumes you know how to use adb.

From here: http://forum.xda-developers.com/showthread.php?t=850359

Chose a location to create the backups, e.g. /sdcard

 mkdir backup
 cd backup
 adb shell  su -c "dd if=/dev/block/bml1 of=/sdcard/boot.bin bs=4096"
 adb shell  su -c "dd if=/dev/block/bml2 of=/sdcard/pit.pit bs=4096"
 adb shell  su -c "dd if=/dev/block/stl3 of=/sdcard/efs.rfs bs=4096"
 adb shell  su -c "dd if=/dev/block/bml4 of=/sdcard/Sbl.bin bs=4096"
 adb shell  su -c "dd if=/dev/block/stl6 of=/sdcard/param.lfs bs=4096"
 adb shell  su -c "dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096"
 adb shell  su -c "dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096"
 adb shell  su -c "dd if=/dev/block/stl10 of=/sdcard/dbdata.rfs bs=4096"
 adb shell  su -c "dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096"
 adb shell  su -c "dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096"
 adb shell  su -c "tar -czvf /sdcard/data.tar.gz /data"
 
 adb pull /sdcard/param.lfs .
 adb pull /sdcard/zImage .
 adb pull /sdcard/factoryfs.rfs .
 adb pull /sdcard/dbdata.rfs .
 adb pull /sdcard/cache.rfs .
 adb pull /sdcard/modem.bin .
 adb pull /sdcard/efs.rfs .
 adb pull /sdcard/boot.bin .
 adb pull /sdcard/Sbl.bin .
 adb pull /sdcard/pit.pit .
 adb pull /sdcard/data.tar.gz .

Kernel Compilation

Grab the kernel source code from http://opensource.samsung.com/ Follow: Mobile > Mobile Phone > GT-P1000 > GT-P1000_OpenSource.zip. There is a new GT-P1000_OpenSource_Update1.zip but I've not tried that, please do tell if it works or works better ;)

Extract the source, follow the instructions in the readme.txt to grab the cross-compiler and edit the relevant settings in the build_kernel.sh script.

Note that we use the same source and toolchain so that the PVR kernel modules will still work (as we're dual booting Android)

Try compiling to see if it all works. It should do. If you get the following warning "WARNING: modpost: Found 13 section mismatch(es).", don't worry, that appears to be normal (!)

Note that we could try enabling kexec if we find that keeping compatibility with the Android kernel is too limiting and then kexec away to our less constrained kernel. Need to test this.

Pre-built kernel

Flashing the kernel

Building the Meego rootfs image

Add note about "extras" - modules are in initramfs, so just extract these and add to the image; wifi firmware and other files are in the Android install. We could extract these at runtime, but currently are setup for them to be pre-extracted and added to the Meego partition. Make some notes about location of these files and alternative methods of extracting at runtime.

  • instructions for creating image and sticking that on a uSD card (same as N900 instructions)

(sudo mic-image-creator --run-mode=0 --cache=/home/simon/development/meego/build/mycachedir/ --format=raw --arch=armv7l --config=./meego-handset-armv7l-galaxy-tab-1.1.80.15.20110118.5.ks)

Setup notes

  • Getting wifi up and running
  • Using adb with Android to extract files from the live Android system (if required)


Useful things to look into

  • How to decide whether to boot Android or Meego - work out how the Android init determines the boot mode (not a kernel command line param nor an argument passed to init, so presumably some /dev or /proc entry information?)
  • Galaxy Tab keyboard scan codes - while the kb dock works, ctrl-c is non-functional, it does not have an escape key and there is no cursor displayed (makes vi editing fun ;))

Nb

  • Android will not start up unless you pass the standard bootloader cmdline arguments to the kernel, so if you want to add more arguments you need to either combine them or reproduce them at compile time. Either way you need a kernel patch as otherwise the bootloader cmdline overrides and replaces whatever you specified at compile-time.
  • While adding console=tty0 to the kernel command line means you see the boot-time output, it prevents the Tab kb dock from functioning!

Ubuntu

Current Status

Working:

  • Boot Ubuntu (ext4 partition off the internal SD Card)
  • WIFI ( SSH in for interactivity)
  • GPIO hardware power button (So you can do a proper shutdown)
  • FrameBuffer (Display an XServer)

Partial Working:

  • TouchScreen - Device detects as /dev/input/event2 , but has a Handler set as keyboard, small patch to evtouch config profile should hopefully fix
  • USB - Does not show up as a device attached to your computer, but does charge.

Not Working:

  • Bluetooth (no idea here, just doesn't detect a bluetooth device even with the module loaded)
  • Audio (Audio Driver crashes during boot)

Not Yet Tested:

  • Everything else.

Setup Instructions

Coming Soon.

Related Wiki Pages

MeeGo on ARM/Snapdragon (MSM/QSD)

Team members

  • Steven Troughton-Smith / steventroughtonsmith - Nexus S & ??
  • Simon Pickering / lardman - Galaxy Tab (Meego)
  • lilstevie - Galaxy Tab (Ubuntu) & ??
  • cb22 - Galaxy Tab
Personal tools