(Modify team member hw that I filled in incorrectly yesterday) |
(Filling in some information about porting Meego) |
||
| Line 46: | Line 46: | ||
== Meego == | == Meego == | ||
| + | |||
| + | === 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 === | ||
| + | |||
| + | To add: | ||
| + | * Link to kernel source | ||
| + | * Link to cross-toolchain | ||
| + | |||
| + | Note that we use the same source and toolchain so that the PVR kernel modules will still work (as we're dual booting Android) | ||
| + | |||
| + | * patches to kernel defconfig | ||
| + | |||
| + | 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. | ||
| + | |||
| + | * link to zImage - for those who don't want to do any building | ||
| + | * link to scripts to extract and rebuild initramfs | ||
| + | |||
| + | * link to kickstart file | ||
| + | |||
| + | === Setup notes === | ||
| + | |||
| + | * Getting wifi up and running | ||
| + | |||
| + | |||
| + | === 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 ;)) | ||
== Ubuntu == | == Ubuntu == | ||
Contents |
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.
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!
My kernel is Samsung stock; you will need to modify it to get X11 to run:
The only change was modifying the .config file to turn on CONFIG_VT (needed for X11, unless we recompile X11 without VT support).
Will add this to a newer kickstart, but for the time being, you can bring the brightness to full by doing:
dmesg output is available on Talk:ARM/Hummingbird.
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.
To add:
Note that we use the same source and toolchain so that the PVR kernel modules will still work (as we're dual booting Android)
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.
MeeGo on ARM/Snapdragon (MSM/QSD)