- 저장소 추가
- 소스 리스트 업데이트
Step1. BlueZ Download
-> 현재 최신 버젼은 bluez-4.66 이다.
OS : Fedora12
VMware : VMware workstation 7.0
Qt : Qt 3.3.3
① Qt-x11 3.3.3 Install
-> 환경 변수 등록.
#!/bin/bash
export QTDIR=/Project/qt3/qtx-3.3.3
export PATH=$QTDIR/bin:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
-> Configure options
: ./configure --prefix=/Project/qt3/qtx-3.3.3 -no-xft
( freetype library 버젼 때문에 설치가 안되는 경우, no-xft 로 anti-aliased font 만 해제시켜주면 된다. )
-> gmake
-> gmake install
② Qt-embedded 3.3.3 Install
-> 환경 변수 등록
#!/bin/bash
export QTDIR=/Project/qt3/qtx-3.3.3
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR:/lib:$LD_LIBRARY_PATH
#export QMAKESPEC=qws/linux-arm-g++
-> QTextedit Problem
- $ QTDIR/src/kernel/qfont.cpp,
1620 줄의 QString::number( pointSizeFloat() ) + comma + 에서,
1620 줄의 QString::number( (int) pointSizeFloat() ) + comma + 로 변경.
-> Qt 3.3.3 Touch device Problem
- QTDIR/src/embedded의 qmouse_qws.cpp
qmouse_qws.h
qmouselinuxtp_qws.cpp
qmouselinuxtp_qws.h 교체.
-> Qt-x11의 bin/의 uic, moc를 Qt-embedded bin/으로 카피.
- Configure options
: ./configure -prefix /Project/qt3/qte-3.3.3 -embedded arm -shared -thread -debug -no-cups -continue -qt-mouse-linuxtp -qt-zlib -qt-gif -qt-libpng -no-libmng -qt-libjpeg
- gmake
- gmake install
---===== 작업 환경 =====---
작업 OS : Fedora 8
EZ-X5 : Kernel 2.6
C/C : arm-linux-3.3.4
Source : kernel 2.6 MK712 source(platform device 기반)
Applications : QT 4.5.2, Tslib 1.0
① linux-2.6.21\arch\arm\mach-pxa\falinux_ez-x5.c에 아래와 같이 mk712 리소스 부분을 등록.
// mk712 touch [AlProgS] -----------------------------------------------
static struct resource mk712_resources[] = {
[0] = {
.name = "mk712_int",
.start = IRQ_GPIO(22),
.end = IRQ_GPIO(22),
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device mk712_device = {
.name = "mk712_touchscreen",
.id = -1,
.num_resources = ARRAY_SIZE(mk712_resources),
.resource = mk712_resources,
};
//-----------------------------------------------------------------------
② platform_device 구조체 안에 &mk712_device; 추가.
③ map_desc 구조체 안에 아래와 같이 추가.
{ // nCS1 MK712 -- fast RD/WR
.virtual = 0xf1300000,
.pfn = __phys_to_pfn(PXA_CS1_PHYS+0x400000),
.length = 0x00100000,
.type = MT_DEVICE
},
④ 커널 2.4의 mk712.c를 커널 2.6의 커널에 올리기 위해 모듈 컴파일 도중, 컴파일 에러 잡기위해 아래와 같이 수정.
#include <asm/irq.h> -> #include <linux/irq.h>
#include <asm/io.h> -> #include <linux/io.h>
⑤ io = 0xf1300000, irq = IRQ_GPIO(22), gpio_irp = 22 로 수정.
⑥ mk712_init 펑션에 다음과 같이 수정.
-> set_irq_type (MK712_DEFAULT_IRQ, IRQT_RISING);
-> linux.2.6.21.kernel/arch/arm/mach-pxa/falinux_ez-x5.c
-> linux.2.6.21.kernel/drivers/video/pxafb.c
| 호스트 | 호스트 IP 주소 |
| 공유기 | 192.168.10.1 |
| PC | 192.168.10.2 |
| EZ-X5 | 192.168.10.3 |
| Vmware에 설치된 Linux | 192.168.10.10 |
-= EZBOOT V2.3.15 =-
1) mac address : 00:FA:01:A2:33:15
2) local ip : 192.168.10.3
3) local netmask : 255.255.255.0
4) local gateway : 192.168.10.1
5) server ip : 192.168.10.2
6) zImage file name : zImage
7) ram disk file name : ramdisk-1.10-16M-arm.gz
8) boot loader file name : ezboot.ez-x5
9) logo image file name :
10) auto execute full name :
11) autoboot wait time : 3
12) copy ramdisk [Y/N] : Y
13) arm kernel arch number : 2007
14) nand part (B,C,L,K,R,A): 0,1,0,3,5,119
15) watchdog (sec, off=0) : 0
16) KCMD 1 : mem=128M
17) KCMD 2 : rd_start=0x80800000 rd_size=5M root=/dev/ram0 ramdisk=16384
18) KCMD 3 : console=ttyS0,115200
19) KCMD 4 : video=ezfb:panel:2
20) KCMD 5 :
21) KCMD 6 :
L) Load default
LF) load KCMD2 root=flash
LR) load KCMD2 root=ramdisk
S) Save to flash
P) aPply & exit
Q) Quit
UDRn - USARTn I/O Data Register
UCSRnA - USART Control and Status Register A
RXCn - USART Recive Complete 수신 버퍼에 읽지 않은 데이터가 있을때 1로 설정
수신 버퍼가 비어 있다면 클리어
UDREn - USART Data Register Empty 송신버퍼가 새로운 데이터를 받을 준비가
되어 있는지 알려준다.
UCSRnB - USART control and status Register B
RXCIEn - RX Complete Interrupt Enable , RXC 플래그를 참조하여 인터펍트를 발생
RXENn - Receiver Enable , USART 수신을 활성화 시킨다. 수신 버퍼와 관련 동작 가능하도록 한다.
TXENn - Transmitter Enable , USART 송신을 활성화 시킨다.
UCSZn2 - Character Size ...............
UCSRnC - USART control and status Register C
UMSELn - USART Mode Select , 동기 or 비동기...설정
UPMn1:0 - Parity Mode , 패리티 모드의 종류와 설정할 값..
00 disabled 01 Reserved
10 endabled, Even Parity
11 enabled, Odd Parity
USBSn - USART Stop bit Select , Stop 비트 설정
UCSZn1:0 - UCSRB의 UCSZ2와 관련하여 Character Size 와 관련된 비트..
UCSZ2 UCSZ1 UCSZ0.............
000 5bit 001 , 010, 011 6,7,8bit
100, 101, 110 reserved 111 9bit
UBRRnL - USART Baud Rate Registers
UBRRnH - USART Baud Rate Registers
● ATMega128 통신 포트
- UART0 (RXD0, TXD0)
- UART1 (RXD1, TXD1)
-> UART0,1은 5v 레벨 신호.
-> MAX232로 10v 레벨 신호로 변환.
-> ATMega128 <-> PC 간 rs232 통신 확인 완료.
● ATMega128의 UART0 Pin map
1 | 2 | 3 | 4 |
Vcc(12V) | TxD | RxD | GND |
▶ Tslib 1.0
| ./configure --prefix=/qt3/tslib --enable-inputapi --enable-shared --disable-h3600 --disable-corgi --disable-collie --enable-input --enable-mk712 --disable-arctic2 --disable-ucb1x00 --build=i386-linux --host=arm-linux CC=arm-linux-gcc |
|
- config.h 수정
[ #define malloc rpl_malloc ] 라인 주석 처리 |
|
# make # make install |
|
export TSDIR=/qt4/tslib-arm export LD_LIBRARY_PATH=$TSDIR/lib:$LD_LIBRARY_PATH export TSLIB_TSDEVICE=/dev/mk712 export TSLIB_CONFFILE=/qt4/tslib-arm/etc/ts.conf export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_FBDEVICE/dev/fb0 export QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE export QWS_SIZE=1024x768
|
./configure -embedded arm -shared -thread -debug -no-cups -continue -qt-mouse-linuxtp -qt-zlib -qt-gif -qt-libpng -no-libmng -qt-libjpeg