em210 linux user manual - boardcon embedded design manual/em210_lin… · em210 linux user manual...

28
www.armdesigner.com EM210 Linux User Manual EM210 Linux User Manual V1.2 Date:2014-10-10 www.armdesigner.com

Upload: truongtruc

Post on 24-Jul-2018

256 views

Category:

Documents


0 download

TRANSCRIPT

www.armdesigner.com

EM210 Linux User Manual

EM210 Linux User Manual V1.2

Date:2014-10-10

www.armdesigner.com

www.armdesigner.com

EM210 Linux User Manual 2

Index

1. Features ............................................................................................................................................3

2. Hardware Introduction .....................................................................................................................3

2.1 Hardware interface.................................................................................................................4

2.2 Set boot mode.........................................................................................................................4

3. Software Introduction ......................................................................................................................5

3.1 Version ...................................................................................................................................5

3.2 Linux Features........................................................................................................................5

4. Compiler Environment.....................................................................................................................6

4.1 Vmwa re7.0+ubuntu10.04......................................................................................................6

4.2 Install the Cross Compile toolchain .......................................................................................6

5. Compile the Source..........................................................................................................................6

5.1 Compile u–boot......................................................................................................................6

5.2 Compile kernel .......................................................................................................................6

5.3 Generate the root file system(ext2) ........................................................................................7

6. Burn images to iNand ......................................................................................................................8

6.1 Burn uboot.bin to iNand when there have no uboot.bin in iNand..........................................8

6.2 burn kernel and system.........................................................................................................24

www.armdesigner.com

EM210 Linux User Manual 3

1. Features

• Processor: Samsung ARM Cortex-A8 S5PV210AH, up to 1GHz

• Memory: 512MB DDR2

• Flash: 4GB emmc iNand

• Supporting 2D graphics acceleration, up to 160Mpixels/s, maximum resolution 8000*8000

• Supporting 3D graphics acceleration(Power VR SGX540)

• Monolithic integrated power management chip

• Supporting 4.3 inch, 7 inch, 10.1 inch resistive touch screen

• Supporting GPS, WCDMA, Camera, WIFI , RFID

• 3.1Mega pixels Camera

• Supporting Cramfs/ramfs/ext3/fat32/nfs

• System parameters can be saved in REGEDIT, and residual Flash can be read and written

• The system can be updated via USB interface.

• Supporting qtopia-2.2.0

• Dimensions: Carrier board-108mm×141mm; CPU board- 60mm×60mm

2. Hardware Introduction

www.armdesigner.com

EM210 Linux User Manual 4

2.1 Hardware interface

Feature Specifications

CPU

Samsung ARM Cortex-A8 S5PV210AH, 1GHz System Clock

Supporting NEON instruction

Supporting MPEG-4, MPEG2, H.264/H263, VC-1 and DivX video codec

Supporting 2D graphics acceleration, maximum resolution 8000*8000

Supporting 3D graphics acceleration(Power VR SGX540)

Memory Default mounted 512MB DDR2

iNand Samsung KLM4G1FE3B, 4GB iNand

Power 5V power supply for CPU board

CPU Board Dimension 60mm×60mm

Serial Ports

(UARTs)

COM-0, five-wire DB9 RS232 serial port

COM-1, four-wire RJ11 serial port

COM-2, four-wire RJ11 serial port

Resistor Touch Screen: The board supports driver for 4.3", 7", 10.1",

15"(1024*768) TFT LCD LCD

Capacitive Touch Screen: The board supports driver for 4.3" and 7"

Ethernet 10M/100M High performance Ethernet, RJ45 interface

USB 2 × USB Host2.0, 1 × USB2.0 OTG

Camera 1 × 20-pin 310Megapixels CMOS camera interface

JTAG 1 × 10-pin JTAG Port

Mouse Mouse working via USB

Keyboard 6*7 Keypad interface, alternative module

Audio codec Adopt WM9713 Audio chip, Audio I / O interface

RTC Real Time Clock, powered by external lithium battery

SD card 1 × T-Flash card, 1 × SIM card slot

General Purpose I/O 1 × 30-pin SPI Expansion Connector

Buttons 6 Programmable User Buttons

WIFI 802.11 b/g/n, alternative module

WCDMA Supporting GSM card make calls, send messages, alternative module

GPS Built-in non-directional antenna, alternative module

Carrier board

Dimension 108mm×141mm

2.2 Set boot mode

EM210 provide a variety of boot mode, can be set by DIP switch. Currently we only use USB boot

mode and iNAND boot mode. Set as follows:

www.armdesigner.com

EM210 Linux User Manual 5

Boot Mode J1 J2 J3 J4 J5 J6

iNAND ON ON OFF OFF ON ON

USB OFF ON ON ON OFF ON

3. Software Introduction

3.1 Version

1.Bootloader: u-boot 1.3.4

2.Kernel: linux 3.0.8

3. qtopia-2.2.0

4. Cross Compile toolchain: arm-2009q3

3.2 Linux Features

•LCD driver

•LCD backlight driver

•Resistive touch screen driver

•HDMI driver

•HSMMC/SD/MMC/SDIO drvier

•IIC driver

•IIS driver

•KEYBD driver

•Audio driver,supprot AC97 and IIS

•DMA driver

•RTC driver

•USB HOST/DEVICE driver

•JPEG hardware codec driver

•MFC multimedia hardware codec driver(supports MPEG-4/MPEG2, H.264/263,VC-1,DivX and

other formats)

•CMOS/CCD Camera driver

•2D hardware acceleration driver

•3D hardware acceleration driver

•Ethernet driver

•SD card driver(the maximum capacity 32G)

•3G driver

•SDIO WIFI driver

•BT driver

•Capacitive touch screen driver

•Power management driver

www.armdesigner.com

EM210 Linux User Manual 6

4. Compiler Environment

4.1 Vmwa re7.0+ubuntu10.04

Install Vmware7.0 in windows OS , and then install ubuntu10.04 in vmware to compile. You can see

the installing steps in the initial version.

4.2 Install the Cross Compile toolchain

cross compile toolchain version: arm -2009q3

location: Tools\linux

You had better install the cross compile toolchain to /usr/local/arm/ ( The makefile

have designated the directory in the source ).

User also can install other versions of the tool chain according your demand.You can

reference to the following installing steps:

# mkdir /usr/local/arm

# tar xvjf arm-2009q3.tar.bz2 –C /usr/local/arm

# gedit /etc/bash.bashrc

Add the following information in the end of “bash.bahshrc”:

PATH=/usr/local/arm/arm-2009q3/bin:$PATH

Export PATH

Save “bash.bashrc” and execute the following command to set a default cross-compiler:

#source /etc/ bash.bashrc

Execute the following command to check if the cross-compiler has been installed successfully and

check the revised version:

# arm-linux-gcc -v

5. Compile the Source

5.1 Compile u–boot

u-boot.bin is mainly used to guide and start the kernel .The steps of compiling:

# tar xvf uboot_smdkv210-Boardcon_V6_iNand.tar.gz

# cd uboot_smdkv210-Boardcon

# make distclean

# make smdkv210single_config

# make

If it is ok, you can get the u-boot. bin in the current path.

5.2 Compile kernel

There is em210.config file which we had configured in the kernel source folder,and you can use

directly, the default LCD is 7 inch. The steps of compiling:

# tar xvf kernel_V6.0_iNand.tar.gz

# cd kernel

# make distclean

www.armdesigner.com

EM210 Linux User Manual 7

# cp EM210_iNand_config .config

# make

If it is ok,you can get the zImage file in the arch/arm/boot folder.

5.3 Generate the root file system(ext2)

1、generate the genext2fs command

# sudo tar xvf genext2fs-1.4.1 .tar.gz

# cd genext2fs-1.4.1

# ./configure

# make

# make install

Now the genext2fs will be generated in current directory,as follow:

2、Edit script(the script is in \Linux\Tools\linux directory)

#!/bin/bash

num_blocks=`du –sk /home/zgf/Desktop/210/system | tail -n1 | awk '{print $1;}'`

if [ $num_blocks -lt 20480 ]; then

extra_blocks=3072;

else

extra_blocks=20480;

fi

num_blocks=`expr $num_blocks + $extra_blocks`

num_inodes=`find /home/zgf/Desktop/210/system | wc -l`

num_inodes=`expr $num_inodes + 500`

/home/zgf/Desktop/genext2fs -d /home/zgf/Desktop/210/system -b $num_blocks -N $num_inodes

-m 0 /nfsboot/system.img

tune2fs -L system /nfsboot/system.img

tune2fs -C 1 /nfsboot/system.img

tune2fs -O rw /nfsboot/system.img

e2fsck -fy /nfsboot/system.img

www.armdesigner.com

EM210 Linux User Manual 8

Note: the red part needs to be changed to your own the corresponding file system, the file system

name should be change to system.Blue command is your first step to do the command position.

Give permission to execute, execute the following command:

# sudo chmod +x install.sh

3、unzip the file system source code package and generate the file system of ext2 format

# sudo tar xvf system.tar.gz

# sudo ./install.sh

Now system.img is in directory nfsboot,you can burn it to the development board and then start the

system.

6. Burn images to iNand

6.1 Burn uboot.bin to iNand when there have no uboot.bin in iNand.

Step 1:

Set EM210 board to USB boot mode.

The boot mode configuration:

Boot Mode J1 J2 J3 J4 J5 J6

iNAND ON ON OFF OFF ON ON

USB OFF ON ON ON OFF ON

Step 2:

EM210 board connect 5V adapter, serial cable, USB cable (between EM210 USB OTG port and

PC).

Step 3:

Power on EM210 board. The PC will report that found new hardware if your PC have not ever

install this usb drive(Tools\windows\usb_download_driver),install the driver as followings,

www.armdesigner.com

EM210 Linux User Manual 9

Click “next” and select tools/windows/usb_download_driver director.

www.armdesigner.com

EM210 Linux User Manual 10

www.armdesigner.com

EM210 Linux User Manual 11

Click “Browse” and select tools/windows/usb_download_driver/secusb2.sys.

Click “Open” and then clilck “OK”.

www.armdesigner.com

EM210 Linux User Manual 12

Now,the USB download driver is installed successfully.

www.armdesigner.com

EM210 Linux User Manual 13

Step 4:

Open DNW(Tools\windows\dnw\dnw.exe)

Serial Port->connect: to connect EM210 serial console

configuration->options: to set USB Port download address:0xd0020010

This time on the top of DNW window will show:

[COM1:115200bps][USB:OK] [ADDR:0xd0020010]

Then lunch USB Port->transmit:transmit to download images\V210_USB.BL2.bin to EM210 RAM.

notice:

All the images and tool cmd.exe(include V210_USB.BL2.bin ,u-boot.bin,zImage-7inch_R and

system.img) are stored in the directory \Linux\Images

Confiure->Option to set USB Port download address: 0x23e00000

lunch USB Port->transmit->transmit to download Linux\Images\uboot.bin to EM210 RAM.

This time uboot.bin are going to run in EM210 board and will output message through serial port.

Following pictures show the detailed process:

www.armdesigner.com

EM210 Linux User Manual 14

www.armdesigner.com

EM210 Linux User Manual 15

www.armdesigner.com

EM210 Linux User Manual 16

www.armdesigner.com

EM210 Linux User Manual 17

Step 5:

Select option ‘e’ go into command line mode,

www.armdesigner.com

EM210 Linux User Manual 18

in uboot console create 3 partitions for iNand as followings,

SMDKV210#fdisk -c 0

Then lunch fastboot

SMDKV210#fastboot

The pc will report that have found new hardware if you have not ever install this usb

driver(Tools\windows\usb_fastboot_driver)

www.armdesigner.com

EM210 Linux User Manual 19

Now you need to install the USB fastboot driver.

Click “next” and select Tools/windows/usb_fastboot_driver director.

www.armdesigner.com

EM210 Linux User Manual 20

Click “Browse” and select Tools/windows/usb_fastboot_driver/i386/WinUSBCoInstaller.dll.

www.armdesigner.com

EM210 Linux User Manual 21

www.armdesigner.com

EM210 Linux User Manual 22

Now,the USB fastboot driver is installed successfully.

www.armdesigner.com

EM210 Linux User Manual 23

Step 6:

Open cmd.exe(\Linux\Image, double-click directly and open cmd.exe in the directory) and lunch

fastboot flash bootloader u-boot.bin to flash uboot.bin to iNand, following pictures show the

detailed process.

www.armdesigner.com

EM210 Linux User Manual 24

6.2 burn kernel and system

Step 1:

Set the JP106 to iNand boot mode as follow:

Boot Mode J1 J2 J3 J4 J5 J6

iNAND ON ON OFF OFF ON ON

Step 2:

Power on EM210 board and press any key within 3 seconds in serial console,

Select option ‘e’ go into command line mode,(if your PC have not ever install fastboot usb driver,the

PC will report found new hardware),and input fastboot in uboot console create 3 partitions for

iNand as following,

www.armdesigner.com

EM210 Linux User Manual 25

Open cmd.exe(\Linux\Image, double-click directly and open cmd.exe in the directory),and lunch

follow command to burn kernel and system to iNand:

fastboot flash kernel zImage

fastboot flash system system.img

www.armdesigner.com

EM210 Linux User Manual 26

So far, all images have been flashed to iNand. And now we can reboot the system.

Step 3:

uboot setup boot parameters, select [s]:

www.armdesigner.com

EM210 Linux User Manual 27

Power on EM210 board and press any key within 3 seconds in serial console,

Select option ‘e’ go into command line mode

SMDKV210#rm etc/pointercal

SMDKV210#reboot

Now the system go into calibrate the touch screen mode.

Note: if you want to erase the system partition ,please power on EM210 board and press any key

within 3 seconds in serial console, select option ‘f’ and ‘y’, it will be cleaned. As follow:

www.armdesigner.com

EM210 Linux User Manual 28

Note: Sometimes fails to start, you need to set the startup parameters.

Connect power, press and hold the power button for 3 seconds, and the system running, type any

key in 3 seconds to enter uboot command line, enter your Selection: e, as following:

# setenv bootcmd "movi read kernel C0008000; movi read rootfs 30800000 180000; bootm C0008000 30800000"

# setenv bootargs "console=ttySAC2,115200 noinitrd root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=2 rw init=/linuxrc "

# saveenv