Sie sind auf Seite 1von 39

Real6410 Linux Development manual

S3C6410 Linux Development manual


Ver 2.0 Date: 2011-01-05

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

Change History
Rev V1.0 V1.1 V2.0 Date 2010-5-20 2010-10-7 2011-1-5 Description The initial released Version change the cross compile tools install bug for the Real6410 v4.0 version board

For the new version user manual and source code, you can download from the follow website:
ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

Catalogue
Real6410 Linux Development manual............................................. 1 Catalogue ........................................................................................ 3 Chapter 1 Overview........................................................................ 5 1.1 OverView ............................................................................... 5 1.2 Resource Allocation............................................................... 5 Chapter 2 Linux burning .................................................................. 7 2.1 Burning bootloader ................................................................ 7 2.1.1 Create SD boot card ....................................................... 7 2.1.2 Burning the image into flash by SD card ......................... 8 2.2 Burning Linux kernel ............................................................ 11 2.3 Burning cramfs..................................................................... 11 2.4 Burning QT system(ubifs) .................................................... 11 Chapter 3 Uboot compile............................................................... 14 3.1 Uboot configure ................................................................... 14 3.2 Uboot compile...................................................................... 14 Chapter 4 Linux kernel compile..................................................... 15 4.1 kernel compile...................................................................... 15 4.2 Kernel comfigure.................................................................. 15 4.2.1 Touchscreen configure.................................................. 16 4.2.1 Keyboard configure ....................................................... 16 4.2.3 Audio configure ............................................................. 17 4.2.4 MMC/SD........................................................................ 17 4.2.5 Nandflash configure ...................................................... 19 4.2.6 LCD/VGA configure....................................................... 19 4.2.7 Etherne configure.......................................................... 20 4.2.8 WIFI configure............................................................... 20 4.2.9 usb OTG configure........................................................ 21 4.2.10 Camera ....................................................................... 22 4.2.11 GPRS configure .......................................................... 24 4.2.13 USB HOST configure...................................................... 25 4.2.14 CAN configure ................................................................ 25 4.2.15 3G driver configure ......................................................... 25 Chapter V File System Development ............................................ 26 Chapter VI Media encode and decode test ................................... 27 6.1 Run the TEST program........................................................ 27 6.2 H264 Test ............................................................................ 27 6.3 H263 TEST .......................................................................... 28 6.4 MPEG4 TEST ...................................................................... 29 6.5 VC-I decode TEST............................................................... 30 6.6 four window TEST ............................................................... 30 6.7 camera and MFC encode TEST .......................................... 31 6.8 MFC Decode TEST ............................................................. 31 6.9 camera in and JPEG encode TEST..................................... 32

Real6410 Linux Development manual

6.10 JPEG decode TEST .......................................................... 32 6.11 H264 encode and TV OUT TEST ...................................... 33 6.12 MFC encode and TV-OUT TEST....................................... 33 Appendix A DNW software configuration ...................................... 34 Appendix B USB driver install ....................................................... 35 Appendix C Cross compile tools install ......................................... 38 C-1 Uncompress the tools ......................................................... 38 C-2 Add Path in your environment file ....................................... 38 C-3 Check the tool-chain path to see if it is set up correctly or not.............................................................................................. 38

Real6410 Linux Development manual

Chapter 1 Overview 1.1 OverView Boot loader verison: s3c-u-boot-1.1.6 Function: support boot and update system by SD card and USB Linux kernel verison: s3c-Linux-2.6.28.4 Compile: arm-none-linux-gnueabi-4.3.2 Function: support MFC, Jpeg encode, 2D/3D Device Driver TFT LCD/Touchscreen, Audio I/O, MMC/SD card, NET, USB host, USB
OTG, Serial port

watchdog, RTC, Power Manage, matix keybad, button, i2c, spi, ADC WIFI, GPS, GPRS, Camera File System support ubifs/yaffs2/cramfs/fat32 Gui support qtopia-2.2.0 QtE-4.5.2 1.2 Resource Allocation Physical Address Allocation
Address begin 0x0000_0000 0x0800_0000 0x0C00_0000 0x1000_0000 0x1800_0000 0x2000_0000 0x2800_0000 0x3000_0000 0x3800_0000 0x4000_0000 0x4800_0000 0x5000_0000 0x6000_0000 Address end 0x07FF_FFFF 0x0BFF_FFFF 0x0FFF_FFFF 0x17FF_FFFF 0x1FFF_FFFF 0x27F_FFFF 0x2FFF_FFFF 0x37FF_FFFF 0x3FFF_FFFF 0x47FF_FFFF 0x4FFF_FFFF 0x5FFF_FFFF 0x6FFF_FFFF SizeMB 128 64 64 128 128 128 128 128 128 128 128 256 256 DDR(128M/256M) DM9000AEP NAND(256M/1024M) Description boot image Internal ROM Stepping Stone(8KB)

Real6410 Linux Development manual

1.3 boot mode


Set the boot mode switch code. boot mode / Pin 1 2 SD card boot 3 4 5 6 7 8

OFF OFF OFF OFF OFF OFF OFF OFF

Nand flash boot mode OFF OFF OFF OFF OFF ON ON OFF

Real6410 Linux Development manual

Chapter 2 Linux burning 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 kernel cramfs Ubifs Address Range size details

bootloader 0x00000000~0x0003FFFF 256KB for uboot image 0x00040000~0x003FFFFF 3.75MB for linux kernel image 0x00400000~0x007FFFFF 4MB for cramfs format filesystem(download ubifs)

0x00800000~0x3FFFFFFF 248MB for ubifs format filesystem

Preparations for burning: link the serial line from PC to the board UART0, link the Power to the board link the usb cable from PC to the board (About the board interface, please refer to the Appendix B Board interface of the <hardware user manual>) Open the DNW software, and configure it(refer to the Appendix A DNW software configuration) 2.1 Burning bootloader
2.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:\tools\SDboot\IROM_Fusing_Tool.exe

Real6410 Linux Development manual

3) burn bootloader Click Browse, add the file uboot_mmc.bin, The file position: \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.
2.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

Real6410 Linux Development manual

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 message, Press space button to enter the download mode.

4) Input your LCD type, such as we input "1" for 4.3"LCD, then it will print the download option and let you input the selection, it is the uboot download mode. # Enter Your Selection:

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

5) Format nand flash, run the follow command in the download mode, "f y"command line. # Enter Your Selection: f 6) Input "u" in the Download mode # Enter Your Selection: u 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 You can refer the chapter (Appendix B USB driver install) to install it 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

Real6410 Linux Development manual

8) Then the uboot will be burned in the Nand flash. 2.2 Burning Linux kernel 1) In the uboot download mode, input "k" to download the kernel to flash: # Enter Your Selection: k 2) In the DNW menu, Click "USB Port->Transmit-> Transmit", then choose zImage file. zImage file position: CD\linux\Image\zImage 3) Then the Linux kernel will be burned in the Nand flash. 2.3 Burning cramfs The cramfs burning is only for burnning the QT system. 1) Enter the uboot download mode, input "c" to download the kernel to flash: # Enter Your Selection: c 2) In the DNW menu, Click "USB Port->Transmit-> Transmit", then choose root_mkfs.cramfs file. root_mkfs.cramfs file position: CD\linux\Image\root_mkfs.cramfs 3) Then the cramfs will be burned in the Nand flash. 2.4 Burning QT system(ubifs) 1) copy the qtopia.tar.gz file to the SD card or usb disk, and link the Sd card or usb disk to the board. qtopia.tar.gz file position: CD\linux\Image\qtopia.tar.gz 2) Enter the uboot download mode, input "q" to download the kernel to flash, then it will download the filesystem to flash. # Enter Your Selection: q

Real6410 Linux Development manual

2) If it shows as follow picture, it means success for burning.

3) then you can calibrate your touchscreen in the lcd. 4) then you can set the digital switch to boot from Nand boot mode as follow:

Real6410 Linux Development manual

boot mode / Pin SD card boot

OFF OFF OFF OFF OFF OFF OFF OFF

Nand flash boot OFF OFF OFF OFF OFF ON ON OFF You can boot the system to enter the qt system from nand flash. Note: If you want to calibrate the touchscreen for qt, you can input "T" in uboot download mode to calibrate the touchscreen,

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

Chapter 3 Uboot compile


You should install the cross compile tools(arm-none-linux-gnueabi-4.3.2 with EABI) before you compile the uboot, if you don't install it, please install it refer to the Appendix C Cross compile tools install 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.

Real6410 Linux Development manual

Chapter 4 Linux kernel compile


You should install the cross compile tools(arm-none-linux-gnueabi-4.3.2 with EABI) before you compile the uboot, if you don't install it, please install it refer to the Appendix C Cross compile tools install 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_3d.config .config

Note: RReal6410_3d.config was the configure file that can support 3D test.
Real6410_3d.config Real6410_osd.config test ------ configure file can support 3D test ------ configure file can support multiple lcd

Compile the kernel image :


# make If you can build kernel successfully, you will have "arch/arm/boot/zImage" . 4.2 Kernel comfigure If we want to configure the kernel driver by ourself, please refer the folow step: we will use the make xconfig to configure the kernel, run the follow command to enter the configure menu. # cd kernel/s3c-linux-2.6.28.6-Real6410 # make xconfig

Real6410 Linux Development manual

4.2.1 Touchscreen configure

4.2.1 Keyboard configure

a) enter inout device support then configure it.

b) enter the keyboards, configure

Keyboard driver positon: drivers/input/keyboard/ s3c-gpio_keys.c

Real6410 Linux Development manual

Test metod: Can test it with the application: linux\Applications\keyboard in the CD.
4.2.3 Audio configure

enter "Sound card support ", choose

enter "ALSA for SoC audio support"

we use the WM9713 chips. audio driver postion: sound/soc/s3c Test metod: Run the command in the linux command line by serial: #madplay /root/Documents/Innocent.mp3
4.2.4 MMC/SD

choose the channel using in System Type->SMDK6410->SMDK6410 MMC/SD slot Setup

Real6410 Linux Development manual

Choose the channel 0 and channel 1, the channel 0 was used by wifi module, and the channel 1 was used by SD card. configure it as follow:

Mmc driver position: drivers/mmc/host/sdhci-s3c.c Test method: run the command: # ls /dev/mmcblk0 If it can be found, it means the sd card have been found, run the follow command: # mount t vfat /dev/mmcblk0 /mnt/sdcard # ls /mnt/sdcard

Real6410 Linux Development manual

4.2.5 Nandflash configure

nand driver position: drivers/mtd/nand/s3c_nand.c


4.2.6 LCD/VGA configure

We provide different LCD for the board, you can choose it as :

The LCD will be set in uboot, in uboot configure is as follow;


7"LCD: 5"LCD: 4.3"LCD: video=fb:AT070TN83 video=fb:HSD050 video=fb:WX4300F video=fb:VGA800x600

VGA: such as the 4.3"LCD uboot param is as follow:


setenv bootargs noinitrd root=/dev/mtdblock0 console=ttySAC0 init=/linuxrc video=fb:WX4300F

Real6410 Linux Development manual

4.2.7 Etherne configure

We use the DM9000 chips in our board.

Ethernet positon: drivers/net/dm9000.c


4.2.8 WIFI configure

a) 802.11 support;

b)WIFI driver support

Real6410 Linux Development manual

We compile "Marvel Libertas 8385 and 8686 SDIO 802.11 b/g cards" in kernel. TEST method: 1) boot the board, Run the follow command, then you will find the WiFi AP. # ifconfig eth1 up # iwlist eth1 scanning then you will get the follow message:

Then it means the WiFi is ok. if you want to link the website, you should use the wpa_supplicant, we don't provide the method about the wpa_supplicant using.
4.2.9 usb OTG configure

The board OTG can be set as USB Host,

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

4.2.10 Camera

It support two camera module, OV9650(130W) and OV3640(300W), you can configure it by your module. a) Configure the I2C

Real6410 Linux Development manual

b) configure the Camera If you use the OV9650(130W camera), configure as that:

Note the camera insert method;

Test method: Run the command to test the board: # cam2fb /dev/video0 or run the follow command to capture the picture. # v4l2grab -d /dev/video0 -o figo.jpg -q 70 -m -W 640 -H 480

Real6410 Linux Development manual

4.2.11 GPRS configure

GPRS use the uart1 to link the board, only the serial support is ok, so default the serial is ok, we don't need to configure it.

4.2.12 GPS configure

GPS use the uart2 to link the board, only the serial support is ok, so default the serial is ok, we don't need to configure it.

run the command : # gps_test2 Then it will show that:

Real6410 Linux Development manual

If You GPS baudrate is 9600, run the follow command: # gps_test2 4800 4.2.13 USB HOST configure

4.2.14 CAN configure It use the MCP2515 to change the SPI to CAN bus. configure as that:

Then in the board, it will show the inode: /dev/mcp2515 4.2.15 3G driver configure We use the 3G module, MC2716. configure as that: In USB-> USB serial Convert support

Real6410 Linux Development manual

Chapter V File System Development


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

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

Chapter VI Media encode and decode test


When run the media test, you't better kill the qt program, or it will have some conflict. 6.1 Run the TEST program run the command in the board linux command line in serial
cd /usr/local/multimedia_test_real6410 ./ multimedia_test_43 (if you test it with 4.3 "LCD) ./ multimedia_test_70 (if you test it with 4.3 "LCD)

Then it will show:

6.2 H264 Test Input "1"

Real6410 Linux Development manual

Then it will show:

6.3 H263 TEST Input "2" Then it will show:

Real6410 Linux Development manual

6.4 MPEG4 TEST Input "3" Then it will show:

Real6410 Linux Development manual

6.5 VC-I decode TEST Input "4" Then it will show:

6.6 four window TEST Input "5" Then it will show:

Real6410 Linux Development manual

6.7 camera and MFC encode TEST Input "6" Then it will show:

6.8 MFC Decode TEST Input "7" Then it will show:

Real6410 Linux Development manual

6.9 camera in and JPEG encode TEST Input "8" Then it will show:

6.10 JPEG decode TEST Input "9"

Real6410 Linux Development manual

Then it will show:

6.11 H264 encode and TV OUT TEST Input "10" 6.12 MFC encode and TV-OUT TEST Input "11"

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

Appendix A DNW software configuration


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 ) click 'OK' to finish the DNW configuration:

3.Then Click 'Serial Port->connect' to enable the DNW serial link.

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

Appendix B USB driver install


The following steps introduce how to install USB download-driver. The driver is located under the directory CD:/tools/usb driver/usb DNW driver/: 1. Windows XP can recognize the new device automatically, it will show the follow message, choose "No, not this time", then click 'Next'. (figure B.1)

2. figure B.1 3. Then choose "Install from a list or specific location[Advanced]", then click "Next". (figure B.2)

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

figure B.2 4. Then in the option Search for the best driver in these locations, input the usb driver path CD:/tools/usb driver/usb DNW driver/, then click "Next". (figure B.3)

figure B.3 5. Then it will install the usb driver, maybe it have the different message in your PC, but you should make sure that the usb driver is this path: CD:/tools/ usb driver/usb download driver/ 6. If the DNW staus show the USB:OK, it means that the driver will be installed successfully.(figure B.4)

Real6410 Linux Development manual

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Real6410 Linux Development manual

Appendix C Cross compile tools install


C-1 Uncompress the tools Copy the arm-2008q3.tar.bz2 to /root/ folder arm-2008q3.tar.bz2 position: CD:/linux/code
# cd /root # sudo cp /media/cdrom/linux/code/arm-2008q3.tar.bz2 . # sudo tar xvf arm-2008q3.tar.bz2

Then we can get the folder :arm-2008q3 in the /root/ C-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-2008q3/bin To apply this change, login again or restart the .bashrc # source .bashrc C-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-nonelinuxgnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --withbuildtime-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin --with-buildtimetools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin Thread model: posix gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)

Real6410 Linux Development manual

ElecKits Technologies Studio E-Mail: sales@eleckits.com SkyPe: eleckits2011 Website: http://www.eleckits.com

Das könnte Ihnen auch gefallen