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.

更多相关文章

  1. Android下如何获取Mac地址
  2. 取WiFi MAC地址
  3. 为usb网卡设置ip地址之一
  4. Android 获取控件宽高的3种方法
  5. Android中创建与几种解析xml的方法!
  6. Android当方法总数超过64K时(Android Studio)
  7. android ViewPager 使用方法
  8. android_m2repository_rxx.zip下载地址以及MD5
  9. Android 方法数超过64k限制的解决办法

随机推荐

  1. NDK Android* 应用移植方法 APP_ABI := a
  2. Android源码 更改系统音量
  3. 微信浏览器中直接下载ios、android的APP
  4. ConditionVariable的简介和用法
  5. 让Android模拟器上网
  6. android之DecorView
  7. android AndroidManifest.xml中android:c
  8. android中WebView和javascript实现数据交
  9. android eclipse中经常遇到的the connect
  10. Android(安卓)注