How to porting a android 2.1 to S3C6410 board

Discuss porting Android to any device.

How to porting a android 2.1 to S3C6410 board

Postby armdevs » Tue Dec 28, 2010 7:41 am

More porting info: http://www.real6410.com (a S3C6410 android porting open source project website.)
Device introduce:
ARM11 Samsung S3C6410, ARM1176JZF-S, up to 667MHz
256MByte mDDR RAM and 1GByte NAND Flash
1 USB OTG, 1 USB Host, 1 SD/MMC card slot
10/100M Ethernet
LCD, TV out, VGA interface
1 Camera interface
Audio In/Out interface
extend interface: SPI, IIC, ADC, EINT
GPS, GPRS, WIFI, 3G module and Camera support
WinCE 6.0, Android 2.1 and linux support
All source code provide

Porting methodd:

1 Preface

This page will explain how to compile Linux Kernel for Real6410
2 Build environment

Tested with Ubuntu 8.10/9.04/9.10 (Other Linux package might be fine to build Linux Kernel)
2.1 arm-none-linux-gnueabi-4.3.2 installed

Refer to the Linux build environment.
2.2 Android build environment

2.1.1 Install essential packages

Ubuntu need the follow essential packages for android
flex: This lexical analyzer generator is used to read a given input file for a description of a scanner to generate.
bison: This is a general-purpose parser generator.
gperf: This is a perfect hash function generator.
libesd0-dev: This enlightened sound daemon (dev files) is used to mix digitized audio streams for playback by a single device.
libwxgtk2.6-dev: This package provides GUI components and other facilities for many different platforms.
build-essential: This package contains a list of packages considered fundamental to building Debian packages.
Android source code includes a hard dependency on the Java Developer Kit (JDK) 5.0 Update 12 or greater.

Run the command to install it:
# sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev
# sudo apt-get install build-essential zip curl libncurses5-dev zlib1g-dev
2.1.2 Install JDK 5.0

add this follow items in to Synaptic package source. (sudo vi /etc/apt/sources.list)
deb http://archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

Update Synaptic package source
# sudo apt-get update

Install it
# sudo apt-get install sun-java5-jdk
3 Uboot compile

3.1 Uboot configure

copy the file s3c-u-boot-1.1.6-Real6410.tar.bz2 From CD to ubuntu system in PC.
s3c-u-boot-1.1.6-Real6410.tar.bz2 position: CD\linux\code

# mkdir bootloader
# cd bootloader
# cp -a /media/cdrom/linux/code/s3c-u-boot-1.1.6-Real6410.tar.bz2 .
# tar xvf s3c-u-boot-1.1.6-Real6410.tar.bz2
# cd s3c-u-boot-1.1.6-Real6410
Then we can get the s3c-u-boot-1.1.6-Real6410 folders in bootloader folder, run the command to configure it:
# make distclean
# make smdk6410_config
3.2 Uboot compile

We can get the uboot image for different boot mode image, SD card boot and Nand flash boot image.

Compile the uboot image for Nand flash boot:
# ./make_nand_image
If there is no error, u-boot.bin should have been generated with a file size of about 130~150Kbyte. you can get it in bootloader/s3c-u-boot-1.1.6-Real6410 folder

Compile the uboot image for SD card boot:
#./make_mmc_image
If there is no error, u-boot_mmc.bin should have been generated with a file size of about 130~150Kbyte. you can get it in bootloader/s3c-u-boot-1.1.6-Real6410 folder.
4 Linux kernel compile

4.1 kernel compile

copy the file s3c-linux-2.6.28.6-Real6410.tar from CD to ubuntu system in PC.
s3c-linux-2.6.28.6-Real6410.tar.bz2 position: CD\linux\code

# mkdir kernel
# cd kernel
# cp -a /media/cdrom/linux/code/s3c-u-boot-1.1.6-Real6410.tar.bz2 .
# tar xvf s3c-linux-2.6.28.6-Real6410.tar.bz2
# cd s3c-linux-2.6.28.6-Real6410
Then we can get the s3c-linux-2.6.28.6-Real6410 folders in kernel folder, run the command to configure it:
# make distclean
# cp Real6410-android-43.config .config
Note: Real6410-android-43 was the 4.3"LCD configure file, if you use the other LCD, please use the right file.
Real6410-android-43.config ------ 4.3 "LCD configure file
Real6410-android-50.config ------ 5.0 "LCD configure file
Real6410-android-73.config ------ 7.0"LCD configure file

Compile the kernel image :
# make
If you can build kernel successfully, you will have "arch/arm/boot/zImage" .
5 Android compile

5.1 compile Android

copy the file Android-2.1-Real6410-r1.tar.bz2 From CD to ubuntu system in PC.
Android-2.1-Real6410-r1.tar.bz2 position: CD:\Android\code

# mkdir Android
# cd Android
# cp -a /media/cdrom/android/code/Android-2.1-Real6410-r1.tar.bz2 .
# tar xvf Android-2.1-Real6410-r1.tar.bz2
# cd Android-2.1-Real6410-r1
Then we can get the Android-2.1-Real6410-r1 folders in Android folder, run the command to compile it:
# sudo ./android_build.sh

If there is no error, android.tar.gz should have been generated. you can get it in Android-2.1-Real6410-r1/rootfs folder.
5.2 Android module support

We provide the WIFI、Camera、JPEG、GPS support lib for android 2.1 with *.so file.
Only the GPS module need configure when use this module.
In Android-2.1-Real6410-r1/vendor/realarm/real6410 folder, it have the libgps.so file, it is the GPS file, and it have other file as that:
libgps-4800-debug.so
----GPS module for 4800 baudrate, it will print debug message when use it.
libgps-4800-release.so
----GPS module for 4800 baudrate, it dont't print debug message when use it.
libgps-9600-debug.so
----GPS module for 9600 baudrate, it will print debug message when use it.
libgps-9600-release.so
----GPS module for 9600 baudrate, it don't print debug message when use it.

the default libgps.so was came from the libgps-9600-release.so, so if you can run the GPS module in android, please replace the libgps.so file with the right file for yor GPS module.
Then rebuild the android again.
armdevs
Junior Developer
Junior Developer
 
Posts: 11
Joined: Fri Jul 16, 2010 10:10 am

Top

Return to Porting Android

Who is online

Users browsing this forum: No registered users and 1 guest