Android S3C6410 °³¹ßº¸µå

    Á¦Ç° ±¸¸Å : http://www.toolparts.co.kr



ÀÌ ¸Å´º¾óÀº ÅøÆÄÃ÷¿¡ ÀÇÇؼ­ ¹ø¿ª, ¼öÁ¤, ÀÛ¼º µÇ¾ú°í ¼ÒÀ¯±Ç ¶ÇÇÑ ÅøÆÄÃ÷ÀÇ °ÍÀÔ´Ï´Ù.
¼ÒÀ¯±ÇÀÚÀÇ Çã°¡¸¦ ¹ÞÁö ¾Ê°í ¹«´ÜÀ¸·Î ¼öÁ¤, »èÁ¦Çϰųª ¹èÆ÷ ÇÒ ¼ö ¾ø½À´Ï´Ù.

¸®´ª½º Æ÷Æà ¸Þ´º¾ó ¹× °³¹ßÀÚ °¡À̵å
pdfLinux User Manual Àüü PDF¹öÁ¯


  1. 1 Preface
  2. 2 Build environment
    1. 2.1 Uncompress the tools
    2. 2.2 Add Path in your environment file
    3. 2.3 Check the tool-chain path to see if it is set up correctly or not
  3. 3 Uboot compile
    1. 3.1 Uboot configure
    2. 3.2 Uboot compile
  4. 4 Linux kernel compile
    1. 4.1 kernel compile
  5. 5 File System Build
  6. 6 Burn and update the Image
    1. 6.1 Burning bootloader
      1. 6.1.1 Create SD boot card
      2. 6.1.2 Burning the image into flash by SD card
    2. 6.2 Burning Linux kernel
    3. 6.3 Burning cramfs
    4. 6.4 Burning QT system
  7. 7 System Picture

?

1 Preface


This page will explain how to compile Linux Kernel for Android S3C6410

2 Build environment


Tested with Ubuntu 8.10/9.04/9.10 (Other Linux package might be fine to build Linux Kernel)

2.1 Uncompress the tools

Copy the arm-none-linux-gnueabi-4.3.2.tar.bz2 to /root/ folder
arm-none-linux-gnueabi-4.3.2.tar.bz2 position: CD:/linux/

# cd /root
# sudo cp /media/cdrom/linux/arm-none-linux-gnueabi-4.3.2.tar.bz2 .
# sudo tar xvf arm-none-linux-gnueabi-4.3.2.tar.bz2
Then we can get the folder :arm-none-linux-gnueabi-4.3.2 in the /root/

2.2 Add Path in your environment file

Modify your ~/.bashrc file to add a new path with editor (gedit or vi)
PATH=$PATH:/root/arm-none-linux-gnueabi-4.3.2/bin

To apply this change, login again or restart the .bashrc
# source .bashrc

2.3 Check the tool-chain path to see if it is set up correctly or not

~$ arm-none-linux-gnueabi-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure --build=i686-pc-linuxgnu
--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disablelibmudflap
--disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enablelanguages=
c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --withpkgversion='
Sourcery G++ Lite 2008q3-72' --withbugurl=
https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery
--with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-buildsysroot=/
scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/libc --withgmp=/
scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pcReal6410
linux-gnu/usr --with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-nonelinux-
gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --withbuild-
time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin --with-buildtime-
tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)

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-qtopia-43.config .config

Note: Real6410-qtopia-43 was the 4.3"LCD configure file, if you use the other LCD, please use the right file.
Real6410-qtopia-43.config ------ 4.3 "LCD configure file
Real6410-qtopia-50.config ------ 5.0 "LCD configure file
Real6410-qtopia-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 File System Build


The file ¡°qtopia.tar.gz¡± was the filesystem, and we can edit it and then compress it.
qtopia.tar.gz position: CD\linux\Image

Run the follow command to uncompress it and make it.

Step 1. Uncompress the file
# mkdir root_qtopia
# cd root_qtopia
# cp -a /media/cdrom/linux/image/qtopia.tar.gz .
# tar xvf qtopia.tar.gz

Step 2. According to your needs£¬ add or remove some file from the root filesystem in the root_qtopia folders£¬ then run the follow command to make the root filesystem.
# tar ?zcvf qtopia.tar.gz *
Then you can find the Linux root filesystem in the folder: qtopia.tar.gz

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 size details
bootloader 0x00000000~0x0003FFFF
256KB
for uboot image
kernel
0x00040000~0x003FFFFF
3.75MB
for linux kernel image
cramfs
0x00400000~0x007FFFFF
4MB
for cramfs format filesystem(download ubifs)
Ubifs
0x00800000~0x3FFFFFFF
248MB
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¡±
Irom Fusing

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_qtopia_43?file.
zImage?file position: CD\linux\Image\zImage_qtopia_43?
Notice: the different name have the different LCD
zImage_qtopia_43 --> 4.3"LCD
zImage_qtopia_50 --> 5.0 " LCD
zImage_qtopia_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

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_qtopia.cramfs file position: CD\linux\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 QT system

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

1) copy the qtopia.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 "b" 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=/linuxrc ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
SMDK6410 # saveenv

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

7 System Picture

System Picture1
System Picture2