Your cart is empty

Android_for_Eleckits6410

 

 

1 Preface
2 Build environment
2.1 arm-none-linux-gnueabi-4.3.2 installed
2.2 Android build environment
2.1.1 Install essential packages
2.1.2 Install JDK 5.0
3 Uboot compile
3.1 Uboot configure
3.2 Uboot compile
4 Linux kernel compile
4.1 kernel compile
5 Android compile
5.1 compile Android
5.2 Android module support
6 Burn and update the Image
6.1 Burning bootloader
6.1.1 Create SD boot card
6.1.2 Burning the image into flash by SD card
6.2 Burning Linux kernel
6.3 Burning cramfs system
6.4 Burning Android filesystem system
7 System Picture


 

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.

6 Burn and update the Image


The Linux image contains 3 parts, namely bootloader, kernel, rootfs, this chapter will introduce the method to burning the image to the board
The Address for the parts was as follow:
Name Address Range details
bootloader 0x00000000~0x0003FFFF for uboot image
kernel 0x00040000~0x003FFFFF for linux kernel image
cramfs 0x00400000~0x007FFFFF for cramfs format filesystem(download ubifs)
Ubifs 0x00800000~0x3FFFFFFF for ubifs format filesystem

Preparations for burning:
  • link the serial vable from PC to the board UART0
  • link the Power to the board 
  • link the usb cable from PC to the board usb otg interface
    (About the board interface, please refer to the  <hardware Dev Guide>)
  • Open the DNW software, and configure it
1) Find DNW software under directory CD:\Tools\DNW.exe. Double-click to open it:
2) Click “Configuration -> Options”, it will open the “UART/USB Options” dialog.
  • choose '115200' in 'Baud Rate'
  • choose 'COM1' in 'COM Port '(the COM1 means the serial number in PC  )
3) click 'OK' to finish the DNW configuration:
4) Click 'Serial Port->connect' to enable the DNW serial link.

6.1 Burning bootloader

6.1.1 Create SD boot card
(1) Insert the SD card to USB reader under WinXP, and format the SD card to FAT32 format.


 

(2)  Run the IROM_Fusing_Tool.exe tools,  
the tools position:CD:\tools\SDboot\IROM_Fusing_Tool.exe
(3) burn bootloader into the SD card
  • In the IROM_Fusing_Tool dialog Click “Browse”, add the file uboot_mmc.bin
    The file position: CD:\tools\SDboot\uboot_mmc.bin
  • select SD card  in  SD/MMC Drive under tools. 
  • Click “START”

After burning the image successfully, there will be a pop-up windows “Fusing image done”, Click “Ok” to finish creating the SD card.

6.1.2 Burning the image into flash by SD card
1) Insert the SD card to the Real6410.
2) Set the board for SD boot mode
  • set the digital switch to boot from SD mode as follow:
boot mode / Pin 1 2 3 4 5 6 7 8
SD card boot OFF OFF OFF OFF OFF OFF OFF OFF
Nand flash boot mode OFF OFF OFF OFF OFF ON ON OFF

3) Power on the board, then the DNW will print the uboot message,  

4) Then within 3 second, press “Space” Key on PC keyboard, enter BOOT command line
     SMDK6410 #

5) Format nand flash, run the follow command in the BOOT command line.
     SMDK6410 # nand erase 0
Notice: If it have also the ecc error, run the follow command, or don't run it.
     SMDK6410 # nand scub

 
6) Run dnw in te BOOT command line
     SMDK6410 # dnw
Notice: It need the usb download driver,  if you don't install it, you should install it.
The USB download driver position: CD\tools\usb driver\usb DNW driver

7) In the DNW menu,  Click "USB Port->Transmit-> Transmit", then choose uboot.bin file.
u-boot.bin file position:  CD:\tools\SDboot\u-boot.bin

8) run the command in BOOT command line to burn it.
     SMDK6410 # nand erase 0 40000
     SMDK6410 # nand write c0008000 0 40000
Then the uboot will be burned in the Nand flash.

6.2 Burning Linux kernel

  • set the digital switch to boot from Nand boot mode as follow:
boot mode / Pin 1 2 3 4 5 6 7 8
SD card boot OFF OFF OFF OFF OFF OFF OFF OFF
Nand flash boot  OFF OFF OFF OFF OFF ON ON OFF

1) Power on the board, enter the BOOT command line in DNW, run the follow command:
     SMDK6410 # dnw

2) In the DNW menu,  Click "USB Port->Transmit-> Transmit", then choose zImage_android_43 file.
zImage file position:  CD\android\Image\zImage_android_43 
Notice: the different name have the different LCD
zImage_android_43   --> 4.3"LCD
zImage_android_50   --> 5.0 " LCD
zImage_android_70   --> 7.0"LCD

3) run the command in BOOT command line
     SMDK6410 # nand erase 40000 300000
     SMDK6410 # nand write c0008000 40000 300000
Then the Linux kernel will be burned in the Nand flash.

6.3 Burning cramfs system

The cramfs burning is only for burnning the Ubi filesystem.
1) enter the BOOT command line in DNW, run the follow command:
     SMDK6410 # dnw

2) In the DNW menu,  Click "USB Port->Transmit-> Transmit", then choose rootfs_qtopia.cramfs file.
rootfs_android.cramfs file position:  CD\android\Image\

3) run the command in BOOT command line
     SMDK6410 # nand erase 400000 400000
     SMDK6410 # nand write c0008000 400000 400000
Then the Linux cramfs will be burned in the Nand flash.

4) Test the cramfs
   run the command in BOOT command line:
    SMDK6410 # setenv bootargs noinitrd root=/dev/mtdblock0 console=ttySAC0 init=/linuxrc
    SMDK6410 # saveenv
Then reboot the board, if it print the follow message, it means the download is success. 
Now please Select  the system you want to creat
a. Android
b. QToptia
c. exit

6.4 Burning Android filesystem system

Make sure the Cramfs is boot ok, If it is not ok, Please burn it again.

1) copy the android.tar.gz file to the SD card or usb disk, and insert the Sd card or usb disk to the board.

2) Power on the board, boot the linux and enter the cramfs system,

3) input "a" and press "Enter" in the PC.

 
4)  input "a" and press "Enter" in the PC to burning the Android auto.

5) If it print "Do you want to reboot now(y/n)", it means download success.

 
6) reboot the board, press “Space” Key on PC keyboard, enter BOOT command line 
    SMDK6410 #

7) run the command in BOOT command line:
SMDK6410 # 
setenv bootargs noinitrd console=ttySAC0 init=/init ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs fbcon=rotate:1 mem=224M
SMDK6410 # saveenv

8) Then reboot the board, it will boot into the Android system automatic.

7 System Picture

Back