Porting Android to S3C6410

Phases,

ü        Installing tool chain

ü        Downloading Linux kernel

ü        Installing Android Emulator

ü        Extracting root file system

ü        Modifying Linux kernel source

ü        Configuring Linux kernel

ü        Modifying files in root file system

ü        Building Linux kernel

ü        Installing kernel image

1.0   Installing tool chain

  $ wget  http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-

                gnueabi/arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

  $  tar -xjvf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

2.0  Downloading Linux kernel

      Download Linux kernel from the link shown below,

http://code.google.com/p/android/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+Size+DownloadCount

Kernel :  linux-2.6.23-android-m5-rc14.tar.gz

Extract the kernel with the command shown below,

    $ tar -xf  linux-2.6.23-android-m5-rc14.tar.gz ./

3.0 Installing Android Emulator

      Download Android emulator from the link shown below,

http://code.google.com/p/android/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+Size+DownloadCount

       Emulator : android-emulator-m5-rc14.tar.gz

       Install the emulator using following command,

    $ tar -xf android-emulator-m5-rc14.tar.gz

4.0  Extracting root file system

      1> Download busybox binary from the link shown below.

http://benno.id.au/blog/2007/11/14/android-busybox

       2> run the emulator using following steps,

    $ cd /tools

    $ ./emulator&

    Note: Wait for the emulator to come up

    $ ./adb push /busybox  /data

    $ ./adb shell

    Note: This will get a android terminal

           # /data/busybox tar -czf system.tar.gz  /system

           # /data/busybox tar -czf data.tar.gz /data

           # /data/busybox tar -czf etc.tar.gz /etc

           # /data/busybox tar -czf sbin.tar.gz /sbin

           # exit

    $ ./adb pull /system.tar.gz ./

    $./adb pull /data.tar.gz ./

    $./adb pull /etc.tar.gz ./

    $./adb pull /sbin.tar.gz ./

    $./adb pull /init ./

    $ mkdir initial_ram_disk

    $ cd initial_ram_disk

    $ mkdir cache

    $ mkdir d

    $ mkdir dev

    $ mkdir proc

    $ mkdir root

    $ mkdir sdcard

    $ mkdir sys

    $ mkdir tmp

    $ mkdir var

    $ tar -xf  /system.tar.gz ./

    $ tar -xf  /data.tar.gz ./

    $ tar -xf  /etc.tar.gz ./

    $ tar -xf  /sbin.tar.gz ./

    $ cp /init ./

5.0  Modifying Linux kernel source

Downloaded kernel is not supporting smdk6400 board. One should copy all architecture related smdk6400 files to the kernel. Change Kconfig and Makefile accordingly.

1> Change the /arch/arm/mach-s3c2410/Makefile.boot as shown below,   

    zreladdr-$(CONFIG_PLAT_S3C24XX)              := 0x30008000

    params_phys-$(CONFIG_PLAT_S3C24XX)      := 0x30000100

          zreladdr-$(CONFIG_PLAT_S3C64XX)              := 0x50008000

    params_phys-$(CONFIG_PLAT_S3C64XX)      := 0x50000100

2>  Copy the directory/files shown below from any other kernel supporting 6400 board (in the project kernel sent by Nexus chips was used for the purpose).

/arch/arm/mach-s3c6400

/drivers/serial/s3c6400.c

/drivers/input/touchscreen/s3cts.c

/drivers/usb/gadget

3>  Copy /drivers/android/ashmem.c from any other android kernel (The Android source code for 2..6.23 does not have this file)

4> Change Kconfig and Makefile accordingly.

具体配置方法请参考下列地址文章
http://www.androidok.com/bbs/dispbbs.asp?boardid=5&Id=68

6.0  Configuring Linux kernel

       $ cd

       $ make CROSS_COMPILE=/bin/arm-none-linux-gnueabi-gcc ARCH=arm menuconfig

       Note: Configure initial ramdisk support and select the path to initial_ram_disk directory.

7.0  Modifying files in root file system

       Touchscreen has to calibrated before it can be used. Refer below link to do so.

http://home.androidin.com/space.php?uid=17708&do=blog&id=21

       Modify /etc/init.rc in root file system to include below environmental settings,

    TSLIB_CONSOLEDEVICE none

    TSLIB_FBDEVICE /dev/graphics/fb0

    TSLIB_TSDEVICE /dev/input/ts0

    TSLIB_CALIBFILE /etc/pointercal

    TSLIB_CONFFILE /etc/ts.conf

    TSLIB_PLUGINDIR /lib/ts

8.0 Building Linux kernel

$ make CROSS_COMPILE=/bin/arm-none-linux-gnueabi-gcc ARCH=arm zImage

Note: While building, it may deliver errors related to dependency. One has to solve all dependency related issues.

9.0 Installing kernel image

          1. Run hyperterminal in Windows box.

              Config:  COM1 port, 115200, 8N1, no flow control.

          2. Connect serial port of smdk6400 to COM1 and power up.

          3. Stop boot process at bootloader by pressing any key

          4. Connect USB device port of smdk6400 to USB host port of Windows box

          5. Execute below command from bootloader,

              $ run bootup          (For downloading bootloader)

                   OR

              $ run kernelup        (For downloading kernel)

                             OR

              $ run rootup           (For downloading root file system)

         6. From Windows box,

              Run dnw.exe  (Utility meant for downloading image file to smdk6400)

         7. From dnw.exe,

              select `USB port -> tranmit`

        8. Browse to image file to be downloaded

       9. When download completes, reset the board.

Note: Kernel has a root file system inbuilt (Initial ram disk)   which does not require any rootfs  to mount. Downloading the zImage of the kernel is enough to boot the system. Use the appropriate bootloader, supplied with the  release.

             10. You will see the applications on desktop and the Android background image.

   Double click on any application. It will get invoked.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值