20100925 sola-android

  • Published on
    29-Jun-2015

  • View
    2.220

  • Download
    7

Embed Size (px)

DESCRIPTION

Android 14

Transcript

  • Android

  • sola

    7

    twitter

    http://blog.sola-dolphin-1.net/ twitter

    http://twitter.com/sola_dolphin_1

  • Android Android PF

    http://www.yokohama.android-pf.org/

    Android

  • Android 2008

    ... 2008

    2008 2009 AndroidDevPhone1 Armadillo-500FX BeagleBoard

    2009 twitter Android

    2010

    A3

  • Android

  • Xperia dynabook AZ

  • Android

  • Armadillo-500FX Armadillo-440 Armadillo-9 Armadillo-240 mini2440 SmartQ5

    BeagleBoard BeagleBoard-xM IGEPv2 TOUCHBOOK Dev Phone 1 Dev Phone 2 Nexus One

  • 1.Android Linux Kernel2.3.4.5.

  • Android Linux Kernel

  • 2 Google Android Linux Kernel

    Linux Kernel Android

  • Android Linux Kernel

  • vanilla kernel Linux Kernel http://www.kernel.org/linux-2.6.32 sola-kernel

    Android Linux Kernel

    $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.gz$ tar zxvf linux-2.6.32.tar.gz$ diff -crdN linux-2.6.32/ sola-kernel/ > sola-kernel.patch

    $ git clone git://android.git.kernel.org/kernel/common.git$ cd common/$ git checkout -b android-2.6.32-work origin/android-2.6.32$ patch -p1 -E < ../sola-kernel.patch

  • Linux KernelAndroid

  • Android vanilla kernel Linux Kernel http://www.kernel.org/Android Linux Kernelgit://android.git.kernel.org/kernel/common.git

    Linux Kernel

    $ git clone git://android.git.kernel.org/kernel/common.git$ cd common/$ git checkout -b android-2.6.32-work origin/android-2.6.32$ cd ../$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.gz$ tar zxvf linux-2.6.32.tar.gz$ diff -crdN linux-2.6.32/ common/ > android-2.6.32.patch

    $ cd sola-kernel$ patch -p1 -E < ../android-2.6.32.patch

  • Armadillo-500FX Linux Kernel 2.6.27

    Android Linux Kernel

    Android Linux Kernel

    $ git clone git://android.git.kernel.org/kernel/common.git$ cd common$ patch -p1 -E < ../at6.patch

    master android-2.6.27 Linux Kernel 2.6.27

    $ wget http://armadillo.atmark-techno.com/files/downloads/armadillo-500-fx/source/kernel/linux-2.6.26-at6.tar.gz$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.gz$ tar zxvf linux-2.6.26-at6.tar.gz$ tar zxvf linux-2.6.26.tar.gz$ diff -crdN linux-2.6.26/ linux-2.6.26-at6/ > at6.patch

  • Armadillo-500FX

    Armadillo-500FX Linux Kernel 2.6.26 Android Linux Kernel 2.6.27

    Linux Kernel ...

    kernel panic ...

  • Armadillo-500FX

    ...

    arch/arm/***

    JTAG-ICE ...

    Android-Embedded-Japan

    android-porting

  • Android Emulator Goldfish Emulator Linux Kernel 2.6.29 2.6.31http://blog.sola-dolphin-1.net/archives/1858666.htmlhttp://blog.sola-dolphin-1.net/archives/1862864.html

    Linux Kernel 2.6.31 Goldfish Android

    Goldfish Armadillo-500FX Goldfish Android

  • Emulator Emulator

    Android Linux !!http://monoist.atmarkit.co.jp/fembedded/articles/filesys/06/filesys_06a.html

    Linux Kernel

  • Android Platform Developer's Guidehttp://source.android.com/porting/index.html ...

  • Android

  • Emulator

  • Emulator1.busybox2.Emulator busybox3.busybox4.5.

  • 1 2 busybox

    busybox

    $ wget http://www.codesourcery.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2$ tar jxvf arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C /opt/$ wget http://busybox.net/downloads/busybox-1.17.2.tar.bz2$ tar jxvf busybox-1.17.2.tar.bz2$ cd busybox-1.17.2$ export ARCH=arm$ export CROSS_COMPILE=/opt/arm-2010q1/bin/arm-none-linux-gnueabi-$ make menuconfig$ make CFLAGS=--static LDFLAGS=--static

    $ adb push busybox /data/

  • 3 busybox

    $ adb shell/ # export PATH=$PATH:/data/ # busybox tar zcvf /cache/system.tar.gz system/ # busybox tar zcvf /cache/sbin.tar.gz sbin/ # busybox cp init /cache// # busybox cp init.rc /cache// # busybox cp default.prop /cache// # exit# exit$ mkdir emulator-image$ adb pull /cache/ ./emulator-image/

  • 4

    init.rcmount

    mount rootfs rootfs / ro remount

    mount yaffs2 mtd@system /system mount yaffs2 mtd@system /system ro remount

    mount yaffs2 mtd@userdata /data nosuid nodev

    mount yaffs2 mtd@cache /cache nosuid nodev

  • 5

    data

    dev

    proc

    sys

    default.prop

    init

    init.rc

    sbin

    system

  • Android

    BeagleBoard BeagleBoard-xM IGEPv2 Armadillo-500FX Armadillo-440

  • Android make

    make

    $ repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.2_r1.1$ repo sync$ make -j8

    $ mkdir android-fs$ cp -a out/target/product/generic/root/* android-fs/$ cp -a out/target/product/generic/system/* android-fs/system/

  • BeagleBoard BeagleBoard

    init.rc

  • BeagleBoard-xM BeagleBoard-xM

    init.rc

  • IGEPv2 IGEPv2

    init.rc

  • Armadillo-500FX Armadillo-500FX

    init.rc

  • Armadillo-440 Armadillo-440

    init.rc

  • Android Linux Kernel Linux

    GPS LAN

  • BeagleBoard

  • Froyo TARGET_ARCH_VARIANT WITH_JIT

    SD vold.fstab eclair vold.conf

    BeagleBoard Armadillo

  • TARGET_ARCH_VARIANTbuild/core/combo/arch/arm/

    WITH_JIT JITtrue

    TARGET_ARCH_VARIANT := armv7-a-neonWITH_JIT := true

    make TARGET_ARCH_VARIANT=armv7-a-neon WITH_JIT=true

  • SD vold.fstab Froyo

    vold.conf Eclair

    # Mounts the first usable partition of the specified devicedev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0

    # ls -l /sys/devices/platform/mmci-omap-hs.0/mmc_host/mmc0-rw-r--r-- root root 4096 2000-01-01 00:00 ueventlrwxrwxrwx root root 2000-01-01 00:04 subsystem -> ../../../../../class/mmc_hostlrwxrwxrwx root root 2000-01-01 00:04 device -> ../../../mmci-omap-hs.0drwxr-xr-x root root 2000-01-01 00:00 power-r--r--r-- root root 4096 2000-01-01 00:04 slot_namedrwxr-xr-x root root 2000-01-01 00:00 mmc0:aaaa

    ## This is the direct uevent device path to the SD slot on the devicemedia_path /devices/platform/mmci-omap-hs.0/mmc_host/mmc0

  • device/ devices/sola/beagleboard/*** devices/sola/armadillo500fx/***

    eclair devices vendor

    BeagleBoard AndroidBoard.mk AndroidProducts.mk BoardConfig.mk beagleboard.mk vendorsetup.sh

  • AndroidBoard.mk

    init.rc system/core/rootdir

    LOCAL_PATH := $(call my-dir)

    # board specific init.rc#PRODUCT_COPY_FILES += \

    $(LOCAL_PATH)/init.rc:root/init.rc

    # vold#PRODUCT_COPY_FILES += \

    $(LOCAL_PATH)/vold.fstab:system/etc/vold.fstab

  • AndroidProducts.mk

    PRODUCT_MAKEFILES := \$(LOCAL_DIR)/beagleboard.mk

  • BoardConfig.mk

    # config.mk# # Product-specific compile-time definitions.#TARGET_NO_BOOTLOADER := trueTARGET_NO_KERNEL := trueTARGET_CPU_ABI := armeabiBOARD_USES_GENERIC_AUDIO := trueUSE_CAMERA_STUB := trueTARGET_ARCH_VARIANT := armv7-a-neonWITH_JIT := true

  • beagleboard.mk

    # Superclass$(call inherit-product, build/target/product/generic.mk)

    PRODUCT_PACKAGES += \ LiveWallpapersPicker \ LiveWallpapers \ MagicSmokeWallpapers \ VisualizationWallpapers

    # OverridesPRODUCT_NAME := beagleboardPRODUCT_DEVICE := beagleboardPRODUCT_MODEL := beagleboardPRODUCT_BRAND := beagleboardPRODUCT_MANUFACTURER := beagleboard

    PRODUCT_LOCALES := ldpi hdpi mdpi ja_JP en_US

  • vendorsetup.sh

    add_lunch_combo beagleboard-eng

  • $ source build/envsetup.sh$ lunch beagleboard-eng

    generic beagleboard

    out/target/product/beagleboard

    armadillo440 beagleboard

  • Android

  • Android capcake Android1.5

  • 1 BatteryService

    BatteryService FULLhttp://d.hatena.ne.jp/bs-android/20090603/1244043649

  • 2

    1 2 FULL

    http://pylone.jp/blog/virtual_battery

    Android

  • Android

  • cupcake Android1.5 donut Android1.6

    Android

  • system/lib/hw/sensors.xxx.so Android Dev Phone1 donut

    Android Dev Phone1 cupcake

  • #include /* donut */

    /* static int control_open_data_source( struct sensors_control_device_t *dev ) */static native_handle_t* control_open_data_source( struct sensors_control_device_t *dev ) /* */{ native_handle_t* handle; /* */ handle = native_handle_create( 1, 0 ); /* */ sensor_fd = open_sensors_phy( dev ); handle->data[ 0 ] = sensor_fd; /* *//* return sensor_fd; *//* */ return handle; /* */}

    /* int sensors_open( struct sensors_data_device_t *dev, int fd ) */int sensors_open( struct sensors_data_device_t *dev, native_handle_t* handle ) /* */{ int i; sPendingSensors = 0;/* event_fd = dup( fd ); *//* */ event_fd = dup( handle->data[ 0 ] ); /* */ native_handle_close( handle ); /* */ native_handle_delete( handle ); /* */ for( i = 0 ; i < MAX_NUM_SENSORS ; i++ ) sensors[ i ].vector.status = SENSOR_STATUS_ACCURACY_HIGH; return 0;}

  • Android

  • Android eclair Android2.1

    I/SystemServer(