|
ÀÌ ¸Þ´º¾óÀº Qtopia-2.2.0, Qt-Extendded-4.4.3 (Qtopia Phone Edition), Qt 4.7.0¸¦ S3C6410 Start Kit °³¹ßº¸µå¿¡ Æ÷ÆÃÇÏ´Â ÀϹÝÀûÀÎ ¹æ¹ý¿¡ ´ëÇÑ ³»¿ëÀ» ¼³¸íÇÏ´Â ¸Þ´º¾ó ÀÔ´Ï´Ù.
1. Qt/Qtopia ¼Ò°³
1.1 What is Qt
Qt ´Â 1995³â¿¡ TrollTech¿¡¼ °³¹ßÇÏ°í 2008³â¿¡ NOKIA¿¡ ÀÇÇؼ Á»´õ °·ÂÇÏ°Ô °³¼±µÈ cross-platform C + + graphical user interface library ÀÔ´Ï´Ù.
(1) cross-platform features
Qt¶óÀ̺귯¸®´Â ¼Ò½ºÄÚµåÀÇ ¼öÁ¤¾øÀÌ Qt°¡ Áö¿øÇÏ´Â ¿©·¯ Ç÷§Æû¿¡¼ ÄÄÆÄÀϸ¸ ´Ù½Ã ÇÏ¸é »ç¿ë ÇÒ ¼ö ÀÖ°í, ÀÚµ¿À¸·Î ÄÄÆÄÀÏµÈ Ç÷§Æû¿¡ ¸Â´Â GUI Interface¸¦ Áö¿ø ÇÕ´Ï´Ù. ¾Æ·¡ Ç÷§ÆûµéÀº ÇöÀç Qt¿¡¼ Áö¿øÇÏ°í ÀÖ´Â Ç÷§Æû ¸®½ºÆ®µé ÀÔ´Ï´Ù.
- Linux/X11: X Window System (such as Solaris, AIX, HP-UX, Linux, BSD). Support for KDevelop and Eclipse IDE integration.
- Mac: Apple Mac OS X. Cocoa-based framework. Supports Universal Binary. Support to Xcode editing, compiling, and testing.
- Windows: Microsoft Windows. Support the Visual Studio integration.
- Embedded Linux: Embedded Linux. You can remove unused components compile and function.
Through their own window system QWS, without relying on X Window System, directly into the Linux frame buffer.
Can reduce memory consumption. And to provide a virtual frame buffer QVFb, easy embedded on the desktop testing.
- Windows CE/Mobile: Windows CE.
- Symbian: Symbian platform.
- Meego: Meego.
(2) Object-Oriented
Qt Qt good package mechanism makes a very high degree of modularity, reusability, well, for users to develop, it is very convenient. Qt provides a known signals/slots to replace the security type of callback, which makes interoperability between the various components becomes very simple.
(3) Rich API
Qt°¡ óÀ½ °³¹ßµÇ¾úÀ» ¶§´Â ´ÜÁö Àß ±¸Á¶ÈµÈ C++ graphics library ¿´½À´Ï´Ù. ÇÏÁö¸¸ ÀÌÈÄ¿¡ ¸¹Àº °ÍµéÀÌ ¾÷±×·¹ÀÌµå µÇ°í ÅëÇյǾîÁ®¼ ÃÖ±Ù¿¡´Â Database, OpenGL library, multimedia database, network, script library, XML library, WebKit library µîÀ» Áö¿øÇÏ°í ÀÖ°í ÄÚ¾î ¶óÀ̺귯¸® ¶ÇÇÑ ÇÁ·Î¼¼½º°£ Åë½Å, multi-threading module µîÀ» Áö¿øÇÏ°í ÀÖ½À´Ï´Ù. ±×¸®°í Qt´Â "Code Less; Create More; Deploy Anywhere." ÀÇ ¸ñÀûÀ» °¡Áö°í °³¹ßµÇ¾î Áö°í ÀÖ½À´Ï´Ù.
Qt development resources:
1) Qt development tools Download: http://qt.nokia.com/
2) Qt development documents: http://doc.qt.nokia.com/
1.2 What is Qtopia 2.2
Qtopia´Â Qt cross-platform library ¸¦ º£À̽º·ÎÇÑ ¼ÒÇÁÆ®¿þ¾î Ç÷§Æû ÀÔ´Ï´Ù. ÁÖ·Î embedded Linux system, PDA or mobile phone µî¿¡¼ »ç¿ëµÇ¾î Áö°í ÀÖ½À´Ï´Ù. Qtopia´Â games and multimedia, ynchronization framework, PIM applications, Internet applications , development environment, input method, Java integration, localization support, personalization options, and wireless support ±â´ÉµéÀ» °³¹ßÀÚ°¡ ÃÖ´ëÇÑ °³¹ß ½Ã°£À» ´ÜÃà ½Ãų¼ö ÀÖµµ·Ï À©µµ¿Í ºñ½ÁÇÑ ¿î¿µ Ç÷§ÆûÀ» Áö¿øÇÕ´Ï´Ù. ÃÖÃÊÀÇ Qt °³¹ß ȸ»ç´Â TrollTech À̾ú´Âµ¥, TrollTech Àº 2008³âµµ¿¡ Nokia¿¡ ÀÌÇؼ ÀμöµÇ¾î Á³°í, ±× ÀÌÈÄ¿¡ Qtopia´Â Qt Extended·Î À̸§ÀÌ º¯°æ µÇ¾ú½À´Ï´Ù. Nokia´Â ÃÖ±Ù¿¡ Qt Extended ÀÇ °¡Àå ÃֽŠ¹öÁ¯ÀÎ Qt Extended 4.4.3 À» ¸±¸®Áî ÇÏ¿´½À´Ï´Ù.
2 Qt °³¹ßȯ°æ ¼³Ä¡
2.1 Installing Linux operating system
Qt°³¹ß ȯ°æÀ» ²Ù¹Ì±â Àü¿¡ ¾Æ·¡ 2°¡Áö°¡ ±âº»ÀûÀ¸·Î ÇÊ¿äÇÕ´Ï´Ù. ¿©±â¼ Å×½ºÆ®ÇÑ °³¹ß¿ë PCÀÇ È¯°æÀº VMware¿¡ ¼³Ä¡µÈ Fedora9 ȯ°æ ÀÔ´Ï´Ù. ´Ù¸¥ ȯ°æ¿¡¼´Â Å×½ºÆ® µÇÁö ¾Ê¾Æ¼ ¿¡·¯°¡ ¹ß»ý ÇÒ ¼ö ÀÖ½À´Ï´Ù.
1) Install Fedora9 or Ubuntu 10.03 or later
2) install some arm cross-compiler
2.1.1 Installation Fedora9
Fedora9ÀÇ ÀÚ¼¼ÇÑ ¼³Ä¡ ¹æ¹ýÀº Install Fedora 9 ¹®¼¸¦ ÂüÁ¶Çϼ¼¿ä.
2.1.2 Install Cross-compiler
°³¹ßº¸µå¿Í ÇÔ²² Á¦°øµÈ CD¿¡¼ "arm-linux-gcc-v6-vfp-20101103.tgz" ÆÄÀÏÀ» °³¹ß¿ë ¸®´ª½º PCÀÇ "/opt" ¿¡ º¹»ç ÇÕ´Ï´Ù. ±×¸®°í ³ª¼ tar ¾ÐÃàÀ» ÇØÁ¦ ÇÕ´Ï´Ù. ¸®´ª½º °³¹ß ȯ°æ¼³Á¤¿¡¼ ÀÌ¹Ì Å©·Î½º ÄÄÆÄÀÏ·¯¸¦ ¼³Ä¡ ÇÏ¿´´Ù¸é ÀÌ °úÁ¤Àº ´Ù½Ã ÇÏÁö ¾Ê¾Æµµ µË´Ï´Ù.
# cd /
# tar xvzf /opt/arm-linux-gcc-v6-vfp-20101103.tgz
ÄÄÆÄÀÏ·¯°¡ ¾î´À µð·ºÅ丮¿¡¼³ª ½ÇÇà µÉ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. ¾Æ·¡ ó·³ ¸í·ÉÇØ¿¡¼ export¸¦ ÇÏ¸é ¸Å¹ø ·Î±×ÀÎ ÇÒ¶§¸¶´Ù ½ÇÇàÇØ ÁÖ¾î¾ß ÇÏ´Â ºÒÆíÇÔÀÌ ÀÖ½À´Ï´Ù. °¡´É ÇÏ¸é »ç¿ëÀÚÀÇ ÇÁ·ÎÆÄÀÏ¿¡ Ãß°¡Çϵµ·Ï ÇÕ´Ï´Ù. ".bash_profile" µî. ÇÁ·ÎÆÄÀÏ À̸§Àº °³¹ß¿ë PCÀÇ È¯°æ¿¡ µû¶ó¼ ´Þ¶ó Áú ¼ö ÀÖ½À´Ï´Ù.
# export /opt/FriendlyARM/toolschain/4.5.1/bin/:$PATH
ÄÄÆÄÀÏ·¯¿Í Path ¼³Á¤ÀÌ Àß µÇ¾ú´ÂÁö È®ÀÎ ÇÕ´Ï´Ù.
# arm-linux-gcc -v
3 Qtopia2.2.0 Compile
Qtopia2.2.0 ÀÇ X86 °ú ARM version À» ¾î¶»°Ô ÄÄÆÄÀÏ Çؼ ½ÇÇà½ÃÅ°´ÂÁö ¾Ë¾Æ º¾´Ï´Ù. ÄÄÆÄÀÏ Çϴµ¥ ÇÊ¿äÇÑ ÆÄÀÏ ¸®½ºÆ® µå¸³´Ï´Ù.
qtopia-free-src-2.2.0.tar.gz : Qtopia2.2.0 official original package source code
qtopia2.2.0.friendlyarm.patch : Used to repair Qtopia2.2.0 compile error in Fedora9 patch
3.1 Qtopia for X86
3.1.1 qtopia2.2.0 ¼Ò½ºÄÚµå ¼³Ä¡ for X86
# cd /opt
# tar xvzf qtopia-free-src-2.2.0.tar.gz
3.1.2 qtopia2.2.0 ÄÄÆÄÀÏ for X86
configure ¿Í make 2°¡Áö¸¦ ½ÇÇàÇØ¾ß ÇÕ´Ï´Ù. configureÇÏ´Â ¸í·É¾î°¡ ¸¹ÀÌ ±â³×¿ä.
# cd /opt/qtopia-free-2.2.0/
# echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 240x320' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'
# make
Fedora9 ¿¡¼´Â ¿øº» ¼Ò½º¸¦ ±×´ë·Î ÄÄÆÄÀÏ ÇÏ¸é ¾Æ·¡¿Í °°Àº ¿¡·¯°¡ ¹ß»ý ÇÕ´Ï´Ù. ¿¡·¯¸¦ ¾ø¾Ö±â À§Çؼ´Â ¾à°£ÀÇ ÆÐÄ¡°¡ ÇÊ¿ä ÇÕ´Ï´Ù.
/opt/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h: 214: warning: typedef in this statement is ignored
/opt/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h: 230 : Error: 'QWSInputMethod' not declared
/opt/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h: 237: error: 'QWSGestureMethod' undeclared
make [1]: *** [allmoc.o] error 1
À§¿Í °°Àº ÄÄÆÄÀÏ ¿¡·¯°¡ ¹ß»ýÇÏ´Â ÀÌÀ¯´Â Qtopia2.2.0 °¡ ¾à°£Àº ¿À·¡µÈ ¸î³âÀüÀÇ ¹öÁ¯ÀÌ°í Fedora9 ¸®´ª½ºÀÇ ±âº» gcc ÄÄÆÄÀÏ·¯´Â 4.3 ¹öÁ¯À¸·Î ¿¾³¯ ¹öÁ¯ÀÇ C/C++ ¹®¹ýÀ» Áö¿øÇÏÁö ¾Ê±â ¶§¹®¿¡ ¹ß»ýÇÏ´Â °ÍÀÔ´Ï´Ù. ±×·¡¼ ¿À·¡µÈ ¹öÁ¯ÀÇ C/C++ ¹®¹ýÀ» »ç¿ëÇÏ´Â Qtopia2.2.0 ÀÇ ¼Ò½ºÄڵ带 ¼öÁ¤ÇØ ÁÖ¾î¾ß ÇÕ´Ï´Ù.
3.1.3 qtopia2.2.0 ÄÄÆÄÀÏ ¿¡·¯ Patch
Á¦°ø CDÀÇ "qtopia2.2.0.friendlyarm.patch" ÆÄÀÏÀ» °³¹ß¿ë PCÀÇ "/opt" µð·ºÅ丮¿¡ º¹»çÇÏ°í ´ÙÀ½ ¸í·ÉÀ» ½ÇÇà ½Ãŵ´Ï´Ù.
# cd /opt/qtopia-free-2.2.0
# patch -p1 < /opt/qtopia2.2.0.friendlyarm.patch
ÆÐÄ¡°¡ ¿Ï·áµÇ¸é ´Ù½Ã ÄÄÆÄÀÏÀ» À§Çؼ configure ¸¦ ÇÕ´Ï´Ù.
# echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 240x320' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'
# make
# make install
configure ÆĶó¹ÌÅÍ¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ¼³¸íÀº ¸í·ÉÇà¿¡¼ "./configure - help " ¸¦ Çϸé ÀÚ¼¼ÇÑ ¼³¸íÀÌ ³ª¿É´Ï´Ù.
3.1.4 qtopia2.2.0 ½ÇÇà
PCȯ°æ¿¡¼ qtopia2.2.0¸¦ ½ÇÇà ½ÃÅ°±â À§Çؼ´Â Qtopia simulator qvfb°¡ ÇÊ¿äÇÏ°í, QTDIR µîÀÇ ¾à°£ÀÇ È¯°æº¯¼öµµ ¼³Á¤ ÇØ¾ß ÇÕ´Ï´Ù. ±×·¡¼ run ½ºÅ©¸³Æ® ÆÄÀÏÀÏ ¹Ì¸® ÀÛ¼ºÇØ ³õ¾Ò½À´Ï´Ù. ±× ³»¿ëÀ» º¸¸é ¾Æ·¡¿Í °°½À´Ï´Ù.
# cd /opt/qtopia-free-2.2.0
# vi run
run ½ºÅ©¸³Æ® ÆÄÀÏÀÇ ³»¿ë ÀÔ´Ï´Ù.
#!/bin/sh
./qt2/bin/qvfb -width 480 -height 272 -depth 16 &
cd qtopia/image
mkdir root 2>/dev/null || true
export HOME=$PWD/root cd opt/Qtopia
export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBARAY_PATH
export QTDIR=$PWD export QPEDIR=$PWD
export KDEDIR=$PWD/../kde
sleep 3
qpe
|
À§ÀÇ ³»¿ëÀ» ÀÔ·ÂÇÏ°í ÀúÀå ÇÕ´Ï´Ù. ±×¸®°í ³ª¼ run ½ºÅ©¸³Æ® ÆÄÀÏ¿¡ ½ÇÇà ±ÇÇÑÀ» ºÎ¿©ÇÏ°í ½ÇÇà ÇÕ´Ï´Ù.
# chmod +x ./run
# ./run
qtopia2.2.0 ½Ã¹Ä·¹ÀÌÅÍ°¡ ½ÇÇàµÈ ȸé ÀÔ´Ï´Ù.
X86¹öÁ¯ÀÇ Qtopia¿¡ ´ëÇÑ ÄÄÆÄÀÏ °úÁ¤°ú ½ÇÇà°úÁ¤Àº ¼³¸íÇÏ¿´À¸¹Ç·Î ´ÙÀ½Àº ARM¿ë(S4C6410 Start Kit)¿ë ¿¡ ´ëÇÑ ÄÄÆÄÀÏ °úÁ¤°ú ½ÇÇà ¹æ¹ý¿¡ ´ëÇؼ ¼³¸í Çϵµ·Ï ÇÏ°Ú½À´Ï´Ù.
3.2 Qtopia for ARM
3.2.1 qtopia2.2.0 ¼Ò½ºÄÚµå ¼³Ä¡ for ARM
# mkdir /opt/mini6410
# cd /opt/mini6410
# tar xvzf /opt/qtopia-free-src-2.2.0.tar.gz
# cd /opt/mini6410/qtopia-free-2.2.0
# patch -p1 < /opt/qtopia2.2.0.friendlyarm.patch
3.2.2 qtopia2.2.0 ÄÄÆÄÀÏ for ARM
configure ¼öÇà
# echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -qt-zlib -qt-libpng -gif -no-g++-exceptions -no-qvfb -xplatform linux-arm-g++ -tslib' -qpe '-edition pda -displaysize 480x272 -xplatform linux-arm-g++ -luuid' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'
ÄÁÇDZԾî ÆĶó¹ÌÅÍÁß tslib¿¡ ´ëÇÑ ¼³Á¤ÀÌ ¾ø´Â °ÍÀº ÀÌ¹Ì °ü·Ã ¶óÀ̺귯¸®¿Í Çì´õ ÆÄÀÏÀÌ ¼Ò½º¿¡ Æ÷ÇÔ µÇ¾î Àֱ⠶§¹®¿¡ ºüÁø °ÍÀÔ´Ï´Ù. ³ª¸ÓÁö ÀÚ¼¼ÇÑ ÆĶó¹ÌÅÍ¿¡ °üÇÑ ³»¿ëÀº ./configure - help ÀÇ ³»¿ëÀ» ÂüÁ¶ ÇϽñ⠹ٶø´Ï´Ù.
ÄÄÆÄÀÏ ÇÏ°í ¼³Ä¡ ÇÕ´Ï´Ù.
# make
# make install
ÄÄÆÄÀÏÀÌ ¼º°øÀûÀ¸·Î ³¡³ª¸é "/opt/mini6410/qtopia-free-2.2.0/qtopia/image" ¿¡ °á°ú À̹ÌÁö ÆÄÀÏÀÌ »ý¼º µË´Ï´Ù.
3.2.3 Run qtopia2.2.0 on development board
Å©·Î½º ÄÄÆÄÀÏÇÑ qt ¹ÙÀ̳ʸ® À̹ÌÁö¸¦ ¾ÐÃà Çؼ SD¸Þ¸ð¸® Ä«µå·Î º¹»ç ÇÕ´Ï´Ù.
# cd /opt/mini6410/qtopia-free-2.2.0/qtopia/image
# tar cvzf opt.tgz opt
°³¹ßº¸µå¿¡ SD¸Þ¸ð¸® Ä«µå¸¦ »ðÀÔÇÏ°í °³¹ßº¸µåÀÇ Å͹̳ο¡¼ ´ÙÀ½ ¸í·ÉÀ» ÀÔ·Â ÇÕ´Ï´Ù.
# killall qpe qss quicklauncher
# rm /opt -rf
# tar xvzf /sdcard/opt.tgz
"run_my_qtopia" ¶ó´Â À̸§À¸·Î ½ÇÇà ½ºÅ©¸³Æ®¸¦ »ý¼º ÇÕ´Ï´Ù.
# vi /bin/run_my_qtopia
#!/bin/sh
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QTDIR=/opt/Qtopia
export QPEDIR=/opt/Qtopia
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:/usr/local/lib:$LD_LIBRARY_PATH
export QWS_MOUSE_PROTO="TPanel:/dev/input/mice"
export QWS_KEYBOARD=TTY:/dev/tty1
export HOME=/root
exec $QPEDIR/bin/qpe
|
"run_my_qtopia" ½ºÅ©¸³Æ®¸¦ ½ÇÇà ÇÕ´Ï´Ù.
run ½ºÅ©¸³Æ®¿¡¼ ù¹ø°·Î tslib parameters ¿¡ ´ëÇÑ ¼³Á¤ÀÌ ÇÊ¿ä ÇÕ´Ï´Ù.
"TSLIB_TSDEVICE" ȯ°æ º¯¼ö´Â ÅÍÄ¡ ½ºÅ©¸° µð¹ÙÀ̽º µå¶óÀ̹ö ÆÄÀÏ ÀÔ´Ï´Ù. S3C6410 Start Kit °³¹ßº¸µå´Â ÅÍÄ¡ ±¸ÇöÀ» À§Çؼ ´ÙÀ½°ú °°ÀÌ 3°³ÀÇ µð¹ÙÀ̽º µå¶óÀ̹ö¸¦ Á¦°ø ÇÕ´Ï´Ù. ÀϹÝÀûÀ¸·Î´Â "/dev/touchscreen-1wire" ·Î ¼³Á¤ ÇÏ¸é µË´Ï´Ù. ³ª¸ÓÁö 2°³´Â Ưº°ÇÑ Çϵå¿þ¾î°¡ ÇÊ¿ä ÇÕ´Ï´Ù.
First-line touch screen: TSLIB_TSDEVICE = /dev/touchscreen-1wire
ADC touch screen use: TSLIB_TSDEVICE = /dev/touchscreen
touch screen with serial: TSLIB_TSDEVICE = /dev/ttySAC3
Qtopia½ÇÇà À̹ÌÁö°¡ À§Ä¡ÇÑ "QTDIR", "QPEDIR" ȯ°æ º¯¼ö¸¦ ¼³Á¤ ÇÕ´Ï´Ù.
"QWS_MOUSE_PROTO", "QWS_KEYBOARD" ´Â Qtopia ÀÔ·Â µð¹ÙÀ̽º ȯ°æ º¯¼ö ÀÔ´Ï´Ù.
¸¶Áö¸·À¸·Î ½ÇÁ¦·Î Qtopia¸¦ ½ÇÇà ½Ã´Â "qpe" ¸¦ ½ÇÇà ÇÕ´Ï´Ù.
"run_my_qtopia" ÆÄÀÏ¿¡ ½ÇÇà ±ÇÇÑÀ» ÁÖ°í ½Ã½ºÅÛ ºÎÆýà ÀÚµ¿À¸·Î Qtopia°¡ ½ÇÇà µÉ ¼ö ÀÖµµ·Ï "rcS" ÆÄÀÏÀ» ¼öÁ¤ ÇÕ´Ï´Ù.
# chmod +x /bin/run_my_qtopia
# vi /etc/init.d/rcS
¿ø·¡ÀÇ ³»¿ë
"run_my_qtopia" ¸¦ ½ÇÇà Çϵµ·Ï ¼öÁ¤
½Ã½ºÅÛ(°³¹ßº¸µå)¸¦ ÀçºÎÆà Çϸé ÀÚµ¿À¸·Î ³»°¡ ÀÛ¼ºÇÑ Qtopia°¡ ½ÇÇà µÉ °ÍÀÔ´Ï´Ù.
|