[[Android]]
~
[[Android userland for bc9 (1/2)]]~
#contents

*Setting up Android userland 2 [#p8a92f25]

**Preparing Android userland [#ncaa1df7]
When build is finished, a set of Android userland will be built in
 ~/mydroid/out/target/product/generic/
For following reasons, we put a Android userland on a USB flash memory, not directory on gumstix's onboard FlashROM.
-gumstix's jffs2 can't be accept mmap.~
-gumstix's onboard FlashROM is too small to put a Android userland (It requires almost 70M bytes space.)~

Actual procedures are as follows.~
-Formating a USB flash memory with ext2 file system~
Connect a USB flash memory to the build machine. USB flash memory will be automatically mounted on /media/disk.
 # umount /media/disk
 # fdisk /dev/sdb1 (You may do this with gparted etc.)
 # mkfs.ext2 /dev/sdb1 (You may do this with gparted etc.)

-Copying a built Android userland into a USB flash memory~
After formating and making file system, once disconnect a USB flash memory from build machine and re-connect it. Then:
 # cd /media/disk
 # mkdir android-root
 # cp -a /home/beat/mydroid/out/target/product/generic/root/* .
 # cp -a /home/beat/mydroid/out/target/product/generic/data/* data/  data 
 # cp -a /home/beat/mydroid/out/target/product/generic/system/* system/
 # chown -R root.root *
 # chmod -R 777 data/ system/
 # ls
 data          dev   init.goldfish.rc  proc  sys
 default.prop  init  init.rc           sbin  system

-Fixing the init setting file and key layout file contents~
--Disable yaffs2 mount by commenting out yaffs2 mount strings in the init.rc.~
yaffs2 mount is only relevant to Android dev phone/G1 phone. ~
 diff -u init.rc.orig init.rc
 --- init.rc.orig	2009-03-31 12:50:16.000000000 +0900
 +++ init.rc	2009-03-31 12:57:19.000000000 +0900
 @@ -36,16 +36,16 @@
 
 # mount mtd partitions
      # Mount /system rw first to give the filesystem a chance to save a checkpoint
 -    mount yaffs2 mtd@system /system 
 -    mount yaffs2 mtd@system /system ro remount
 +//    mount yaffs2 mtd@system /system 
 +//    mount yaffs2 mtd@system /system ro remount
 
      # We chown/chmod /data again so because mount is run as root + defaults
 -    mount yaffs2 mtd@userdata /data nosuid nodev
 +//    mount yaffs2 mtd@userdata /data nosuid nodev
      chown system system /data
      chmod 0771 /data
 
     # Same reason as /data above
 -    mount yaffs2 mtd@cache /cache nosuid nodev
 +//    mount yaffs2 mtd@cache /cache nosuid nodev
      chown system cache /cache
      chmod 0770 /cache

--Modifying the hardware key behavior assignment file
 system/usr/keylayout/qwerty.kl
Modify this file as follows:
 diff -u qwerty.kl.orig qwerty.kl.new 
 --- qwerty.kl.orig	2009-03-31 13:20:22.000000000 +0900
 +++ qwerty.kl.new	2009-03-31 13:36:09.000000000 +0900
 @@ -12,8 +12,8 @@
  key 158   BACK              WAKE_DROPPED
  key 230   SOFT_RIGHT        WAKE
  key 60    SOFT_RIGHT        WAKE
 -key 107   ENDCALL           WAKE_DROPPED
 -key 62    ENDCALL           WAKE_DROPPED
 +key 107   ENDCALL           WAKE
 +key 88    ENDCALL           WAKE
  key 229   MENU              WAKE_DROPPED
  key 139   MENU              WAKE_DROPPED
  key 59    MENU              WAKE_DROPPED
 @@ -26,12 +26,14 @@
  key 232   DPAD_CENTER       WAKE_DROPPED
  key 108   DPAD_DOWN         WAKE_DROPPED
  key 103   DPAD_UP           WAKE_DROPPED
 -key 102   HOME              WAKE 
  key 105   DPAD_LEFT         WAKE_DROPPED
  key 106   DPAD_RIGHT        WAKE_DROPPED
  key 115   VOLUME_UP
  key 114   VOLUME_DOWN
  key 116   POWER             WAKE
 +key 63	  MENU	            WAKE
 +key 66    HOME              WAKE
 +key 67	  BACK	            WAKE
  key 212   CAMERA
  
  key 16    Q
This modifiction enabled "Go to home" key behavior.~
When you want to check what key on keyboard are refered by numbers, please see following include file.
When you want to check what key on keyboard is refered by a number, please see this include file.~
 ~/gumstix/gumstix-oe/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.24-r1/linux-2.6.24/include/linux/input.h

---------------------------------------
RIGHT:by Satoshi OTSUKA

Front page   Edit Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes