今天鐵馬行程是騎去竹田火車站
感覺狀況越來越好
不像之前回程時會撐不住
小戰馬的表現不錯^^
今天騎的路線如下
這是回來後做的圖
與原先計畫的路線有出入= =
結論是我們根本是亂騎!!
多繞了滿多路
果然是順著感覺走阿
但竹田車站真的很不錯
空氣新鮮又是古蹟建築
目前最大的課題是出發前該吃多少份量的東西??
吃多騎會想吐 吃太少會餓 不吃更不可能= =
好難拿捏阿
2009年9月18日
2009年3月31日
QT4 with Mysql Driver on Debian lenny
#sudo apt-get install mysql-server libmysqlclient15-dev
#su -
#cd $QTDIR/src/plugins/sqldrivers/mysql
#qmake "INCLUDEPATH+=/usr/include/mysql"
"LIBS+=-L/usr/lib/mysql -lmysqlclient_r" mysql.pro
#make
#make install
then,"libqsqlmysql.so" at $QTDIR/plugins/sqldrivers/
參考資料:QT4 Doc-SQL Database Driver
2009年3月22日
Debian lenny 建立XEN虛擬機器
Environment : Debian lenny
CPU : Intel Core 2 Duo E6550
Step 1:
#apt-get install xen-hypervisor-i386 xen-tools xen-docs-3.2 xen-shell xen-utils-3.2-1 xen-utils-common libc6-xen
xen-linux-system-2.6.26-1-xen-686 linux-headers-2.6.26-1-xen-686
bridge-utils
Step 2:
檢查/boot/grub/menu.list
default=0 //對應XEN核心版本Kernel Image
重新開機以XEN核心版本Kernel開機。
Step 3:
#nano /etc/xen/xend-config.sxp
修改如下區段
#(network-script network-dummy) //註解本行
(network-script network-bridge) //增加本行
(vif-script vif-bridge)
Step 4:
設定預設GuestOS建立環境
#nano /etc/xen-tools/xen-tools.conf
dir = /home/xen
size = 8Gb
memory = 512Mb
swap = 1024Mb
fs = ext3
dist = lenny
gateway = "gateway.ip"
netmask = "netmask.ip"
broadcast = "broadcast.ip"
passwd = 1
kernel = /boot/vmlinuz-`uname -r`
initrd = /boot/initrd.img-`uname -r`
mirror = http://ftp.de.debian.org/debian/
serial_device = hvc0
disk_device = xvda
Step 5:
建立GuestOS
#xen-create-image --hostname=debian-guest01 --ip=ip --role=udev
過程會要求輸入root的密碼
Step 6:
#xm create /etc/xen/debian-guest01.cfg //啟動GuestOS(debian-guest01)
#xm list //列出虛擬機狀態
#xm console debian-guest01 //登入GuestOS
Step 7:
自動啟動GuestOS
#ln -s /etc/xen/debian-guest01.cfg /etc/xen/auto
參考資料:
Virtualization With Xen On Debian Lenny (AMD64)
Xen on Debian Etch 安裝
CPU : Intel Core 2 Duo E6550
Step 1:
#apt-get install xen-hypervisor-i386 xen-tools xen-docs-3.2 xen-shell xen-utils-3.2-1 xen-utils-common libc6-xen
xen-linux-system-2.6.26-1-xen-686 linux-headers-2.6.26-1-xen-686
bridge-utils
Step 2:
檢查/boot/grub/menu.list
default=0 //對應XEN核心版本Kernel Image
重新開機以XEN核心版本Kernel開機。
Step 3:
#nano /etc/xen/xend-config.sxp
修改如下區段
#(network-script network-dummy) //註解本行
(network-script network-bridge) //增加本行
(vif-script vif-bridge)
Step 4:
設定預設GuestOS建立環境
#nano /etc/xen-tools/xen-tools.conf
dir = /home/xen
size = 8Gb
memory = 512Mb
swap = 1024Mb
fs = ext3
dist = lenny
gateway = "gateway.ip"
netmask = "netmask.ip"
broadcast = "broadcast.ip"
passwd = 1
kernel = /boot/vmlinuz-`uname -r`
initrd = /boot/initrd.img-`uname -r`
mirror = http://ftp.de.debian.org/debian/
serial_device = hvc0
disk_device = xvda
Step 5:
建立GuestOS
#xen-create-image --hostname=debian-guest01 --ip=ip --role=udev
過程會要求輸入root的密碼
Step 6:
#xm create /etc/xen/debian-guest01.cfg //啟動GuestOS(debian-guest01)
#xm list //列出虛擬機狀態
#xm console debian-guest01 //登入GuestOS
Step 7:
自動啟動GuestOS
#ln -s /etc/xen/debian-guest01.cfg /etc/xen/auto
參考資料:
Virtualization With Xen On Debian Lenny (AMD64)
Xen on Debian Etch 安裝
2009年3月21日
PXA270實驗筆記(六)
[ 關閉LCD power off ]
修改Kernel內核char/vt.c,將blankinterval設為0,如下:
static int blankinterval = 0;
//static int blankinterval = 10*60*HZ;
[ tslib編譯 ]
require package:automake libtool
執行autogen.sh後產生 configure 檔案
#./configure --prefix="path" CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc --host=arm-linux --enable-inputapi=no ac_cv_func_malloc_0_nonnull=yes
#make
#make install
將 /usr/local/arm/3.4.1/arm-linux/lib 底下的libdl-2.3.2.so以及libdl.*等檔案放到"tslib_path"/lib
建立plugins資料夾,將"tslib_path"/lib/ts 中的所有檔案複製到plugins 資料夾
export QWS_MOUSE_PROTO=TPanel:/dev/ts
export TS_ROOT="tslib_path"
export LD_LIBRARY_PATH=$TS_ROOT/lib
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/ts
export TSLIB_CALIBFILE=$TS_ROOT/etc/pointercal
export TSLIB_CONFFILE=$TS_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TS_ROOT/plugins
在ARM上執行定點程式,將記錄下來的定點pointercal複製到/tmp/cf_card
[ Qtopia-core移植 ]
將qtopia-core-opensource-src-4.3.0.tar.gz放到/tmp/cf_card
#tar zxvf qtopia-core-opensource-src-4.3.0.tar.gz //解壓
#mv qtopia-core-opensource-src-4.3.0 qtopia-core //改名
#cd /tmp/cf_card/qtopia-core
# export QTDIR=$PWD
# export PATH=$QTDIR/bin:$PATH
# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
在qmouselinuxtp_qws.h里面添加
#define QT_QWS_IPAQ
#define QT_QWS_IPAQ_RAW
修改qmouselinuxtp_qws.cpp,增加
/dev/h3600_tsraw改为/dev/ts
修改qmouse_qws.cpp
把pointercal位置設為/tmp/cf_card/pointercal
#./configure -prefix /tmp/cf_card/qtopia-core -embedded arm -xplatform qws/linux-arm-g++ -qt3support -qt-zlib -qt-libpng -qt-gif -qt-libtiff -qt-libmng -qt-libjpeg -nocups -no-openssl -no-stl -qt-mouse-linuxtp -depths 4,8,16
#make
#make install
把toolchain的lib(除了libc)複製到qtopia-core/lib
打包qtopia-core為qtopia-core.tar
將qtopia-core.tar移植到板子上的/tmp/cf_card之中解開
修改file system bashrc設定
#nano -w /usr/local/fstest/target/.bashrc
將QPEDIR QTDIR PATH LD_LIBRARY_PATH的設定改為
export QPEDIR="/tmp/cf_card/qte"
export QTDIR="/tmp/cf_card/qte"
export PATH=/usr/Qtopia/demo/bin:$QPEDIR/bin:/tmp/cf_card/jamvm/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib:/usr/Qtopia/demo/lib
export QWS_MOUSE_PROTO=linuxtp:/dev/ts
修改/usr/local/fstest/target/usr/qpe.sh
echo "qpe -qws" -> #echo "qpe -qws"
/usr/Qtopia/qtopia-free-1.7.0/bin/qpe -qws -> #/usr/Qtopia/qtopia-free-1.7.0/bin/qpe -qws
#mkcrmfs target root_tmp.cramfs //重新包裝
修改Kernel內核char/vt.c,將blankinterval設為0,如下:
static int blankinterval = 0;
//static int blankinterval = 10*60*HZ;
[ tslib編譯 ]
require package:automake libtool
執行autogen.sh後產生 configure 檔案
#./configure --prefix="
#make
#make install
將 /usr/local/arm/3.4.1/arm-linux/lib 底下的libdl-2.3.2.so以及libdl.*等檔案放到
建立plugins資料夾,將"tslib_path"/lib/ts 中的所有檔案複製到plugins 資料夾
export QWS_MOUSE_PROTO=TPanel:/dev/ts
export TS_ROOT="tslib_path"
export LD_LIBRARY_PATH=$TS_ROOT/lib
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/ts
export TSLIB_CALIBFILE=$TS_ROOT/etc/pointercal
export TSLIB_CONFFILE=$TS_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TS_ROOT/plugins
在ARM上執行定點程式,將記錄下來的定點pointercal複製到/tmp/cf_card
[ Qtopia-core移植 ]
將qtopia-core-opensource-src-4.3.0.tar.gz放到/tmp/cf_card
#tar zxvf qtopia-core-opensource-src-4.3.0.tar.gz //解壓
#mv qtopia-core-opensource-src-4.3.0 qtopia-core //改名
#cd /tmp/cf_card/qtopia-core
# export QTDIR=$PWD
# export PATH=$QTDIR/bin:$PATH
# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
在qmouselinuxtp_qws.h里面添加
#define QT_QWS_IPAQ
#define QT_QWS_IPAQ_RAW
修改qmouselinuxtp_qws.cpp,增加
/dev/h3600_tsraw改为/dev/ts
修改qmouse_qws.cpp
把pointercal位置設為/tmp/cf_card/pointercal
#./configure -prefix /tmp/cf_card/qtopia-core -embedded arm -xplatform qws/linux-arm-g++ -qt3support -qt-zlib -qt-libpng -qt-gif -qt-libtiff -qt-libmng -qt-libjpeg -nocups -no-openssl -no-stl -qt-mouse-linuxtp -depths 4,8,16
#make
#make install
把toolchain的lib(除了libc)複製到qtopia-core/lib
打包qtopia-core為qtopia-core.tar
將qtopia-core.tar移植到板子上的/tmp/cf_card之中解開
修改file system bashrc設定
#nano -w /usr/local/fstest/target/.bashrc
將QPEDIR QTDIR PATH LD_LIBRARY_PATH的設定改為
export QPEDIR="/tmp/cf_card/qte"
export QTDIR="/tmp/cf_card/qte"
export PATH=/usr/Qtopia/demo/bin:$QPEDIR/bin:/tmp/cf_card/jamvm/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib:/usr/Qtopia/demo/lib
export QWS_MOUSE_PROTO=linuxtp:/dev/ts
修改/usr/local/fstest/target/usr/qpe.sh
echo "qpe -qws" -> #echo "qpe -qws"
/usr/Qtopia/qtopia-free-1.7.0/bin/qpe -qws -> #/usr/Qtopia/qtopia-free-1.7.0/bin/qpe -qws
#mkcrmfs target root_tmp.cramfs //重新包裝
PXA270實驗筆記(五)
PXA270與OSGi (JSP Support)
下載equinox OSGi framework : http://download.eclipse.org/equinox/
將equinox解開之後在plugin資料夾中加入
(1)org.eclipse.equinox.http.helper
(2)org.eclipse.equinox.jsp.jstl
(3)org.eclipse.equinox.jsp.example
三個Bundle之後重新打包成tar檔。
!注意! 這三個Bundle必須以CVS方式從Equinox Incubator取得
將包好的tar檔複製到PXA270上/tmp/cf_card中,解開之後執行
#jamvm -jar /tmp/cf_card/eclipse/plugin/org/eclipse/osgi_"bundle version".jar -console
畫面範例如下:
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080605-1900
使用以下指令安裝bundle
osgi>install file:"bundle name".jar
需安裝的bundle與完成畫面如下:
osgi>ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080605-1900
2 ACTIVE org.eclipse.equinox.http.jetty_1.1.0.v20080425
3 ACTIVE org.eclipse.equinox.http.servlet_1.0.100.v20080427-0830
4 ACTIVE org.apache.commons.logging_1.0.4.v20080605-1930
5 ACTIVE org.mortbay.jetty_5.1.14.v200806031611
6 ACTIVE javax.servlet_2.4.0.v200806031604
7 ACTIVE javax.servlet.jsp_2.0.0.v200806031607
8 ACTIVE org.eclipse.equinox.http.registry_1.0.100.v20080427-0830
10 ACTIVE org.eclipse.osgi.services_3.1.200.v20071203
11 ACTIVE org.eclipse.equinox.ds_1.0.0.v20080427-0830
12 ACTIVE org.eclipse.osgi.util_3.1.300.v20080303
13 ACTIVE org.eclipse.equinox.util_1.0.0.v20080414
14 ACTIVE org.eclipse.equinox.log_1.1.0.v20080414
15 ACTIVE org.apache.commons.el_1.0.0.v200806031608
16 ACTIVE org.apache.jasper_5.5.17.v200806031609
17 ACTIVE org.eclipse.equinox.jsp.jasper_1.0.100.v20080427-0830
18 ACTIVE org.eclipse.equinox.common_3.4.0.v20080421-2006
19 ACTIVE org.eclipse.equinox.registry_3.4.0.v20080516-0950
20 ACTIVE org.eclipse.equinox.jsp.jasper.registry_1.0.0.v20080427-0830
22 ACTIVE org.eclipse.equinox.http.helper_1.0.0.qualifier
24 ACTIVE org.eclipse.equinox.jsp.jstl_1.0.0
25 ACTIVE org.eclipse.equinox.jsp.examples_1.0.0
26 ACTIVE org.eclipse.equinox.jsp.jstl.examples_1.0.0
osgi>
將所有bundle啟動為active狀態,並開啟瀏覽器瀏覽http://192.168.1.12/jsp-examples/index.html
下載equinox OSGi framework : http://download.eclipse.org/equinox/
將equinox解開之後在plugin資料夾中加入
(1)org.eclipse.equinox.http.helper
(2)org.eclipse.equinox.jsp.jstl
(3)org.eclipse.equinox.jsp.example
三個Bundle之後重新打包成tar檔。
!注意! 這三個Bundle必須以CVS方式從Equinox Incubator取得
將包好的tar檔複製到PXA270上/tmp/cf_card中,解開之後執行
#jamvm -jar /tmp/cf_card/eclipse/plugin/org/eclipse/osgi_"bundle version".jar -console
畫面範例如下:
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080605-1900
使用以下指令安裝bundle
osgi>install file:"bundle name".jar
需安裝的bundle與完成畫面如下:
osgi>ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080605-1900
2 ACTIVE org.eclipse.equinox.http.jetty_1.1.0.v20080425
3 ACTIVE org.eclipse.equinox.http.servlet_1.0.100.v20080427-0830
4 ACTIVE org.apache.commons.logging_1.0.4.v20080605-1930
5 ACTIVE org.mortbay.jetty_5.1.14.v200806031611
6 ACTIVE javax.servlet_2.4.0.v200806031604
7 ACTIVE javax.servlet.jsp_2.0.0.v200806031607
8 ACTIVE org.eclipse.equinox.http.registry_1.0.100.v20080427-0830
10 ACTIVE org.eclipse.osgi.services_3.1.200.v20071203
11 ACTIVE org.eclipse.equinox.ds_1.0.0.v20080427-0830
12 ACTIVE org.eclipse.osgi.util_3.1.300.v20080303
13 ACTIVE org.eclipse.equinox.util_1.0.0.v20080414
14 ACTIVE org.eclipse.equinox.log_1.1.0.v20080414
15 ACTIVE org.apache.commons.el_1.0.0.v200806031608
16 ACTIVE org.apache.jasper_5.5.17.v200806031609
17 ACTIVE org.eclipse.equinox.jsp.jasper_1.0.100.v20080427-0830
18 ACTIVE org.eclipse.equinox.common_3.4.0.v20080421-2006
19 ACTIVE org.eclipse.equinox.registry_3.4.0.v20080516-0950
20 ACTIVE org.eclipse.equinox.jsp.jasper.registry_1.0.0.v20080427-0830
22 ACTIVE org.eclipse.equinox.http.helper_1.0.0.qualifier
24 ACTIVE org.eclipse.equinox.jsp.jstl_1.0.0
25 ACTIVE org.eclipse.equinox.jsp.examples_1.0.0
26 ACTIVE org.eclipse.equinox.jsp.jstl.examples_1.0.0
osgi>
將所有bundle啟動為active狀態,並開啟瀏覽器瀏覽http://192.168.1.12/jsp-examples/index.html
PXA270實驗筆記(四)
#nano -w /usr/local/fstest/target/usr/etc/rc.local //修改file system中的程序起始檔
加上內容(包在做好的root_tmp.cramfs):
/bin/mount -t ex2 /dev/ide/host0/bus0/target0/lun0/part1 /tmp/cf_card
/sbin/ifconfig eth0 192.168.1.12 up
/sbin/ifconfig eth1 192.168.141.131 up
/bin/route add default gw 192.168.141.254 eth1
重新以mkcramfs包裝為root_tmp.cramfs,並重新燒錄。
!注意! 重新燒錄時請在u-boot命令列先執行protect off all與erase all清除flash
[x86] 編譯GNU classpath,Jikes及Jam VM過程:
-tmp
|-cf_card
|-jamvm
|-jamvm-1.5.1.tar.gz
|-classpath-0.97.2.tar.gz
|-jikes-1.22.tar.bz2
|-classpath
|-jikes
GNU classpath
#apt-get install gconf2 libgconf2-dev zlib-bin zlib1g-dev libgcj8-1-awt
#mkdir /tmp/cf_card/jamvm
#cd /tmp/cf_card/jamvm
#tar zxvf jamvm-1.5.1.tar.gz
#tar zxvf classpath-0.97.2.tar.gz
#tar jxvf jikes-1.22.tar.bz2
#cd classpath-0.97.2
#./configure --prefix=/tmp/cf_card/jamvm/classpath --disable-plugin
#make
#make install
Jikes
#./configure --prefix=/tmp/cf_card/jamvm/jikes
#make; make install
Jam VM
#cd /tmp/cf_card/jamvm/jamvm-1.5.1
#./configure --prefix=/tmp/cf_card/jamvm --with-classpath-install-dir=/tmp/cf_card/jamvm/classpath #make
#make install
#rm -rf /tmp/cf_card/jamvm/jamvm-1.5.1.tar.gz
#rm -rf /tmp/cf_card/jamvm/classpath-0.97.2.tar.gz
#rm -rf /tmp/cf_card/jamvm/jikes-1.22.tar.bz2
[arm] 編譯GNU classpath及Jam VM過程:
-tmp
---|-cf_card
---------|-jamvm
---------------|-jamvm-1.5.1.tar.gz
---------------|-classpath-0.97.2.tar.gz
---------------|-classpath
GNU classpath
#apt-get install gconf2 libgconf2-dev zlib-bin zlib1g-dev libgcj8-1-awt //安裝需要套件
#mkdir /tmp/cf_card/jamvm
#cd /tmp/cf_card/jamvm
#tar zxvf jamvm-1.5.1.tar.gz
#tar zxvf classpath-0.97.2.tar.gz
#tar jxvf jikes-1.22.tar.bz2
#cd classpath-0.97.2
#./configure --host=arm-linux --target=arm-linux --prefix=/tmp/cf_card/jamvm/classpath --disable-plugin --disable-gtk-peer --disable-gconf-peer --enable-Werror --enable-local-sockets
--disable-plugin 關閉Mozilla Plugin Support
--disable-gtk-peer 關閉gtk支援
--disable-gconf-peer 關閉gconf支援
--enable-jni 支援jni ( 重要,要加上 )
--enable-static library庫連結方式為static
#make
#make install
Jam VM
#cd /tmp/cf_card/jamvm/jamvm-1.5.1
#CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc ./configure --host=arm-linux --target=arm-linux --prefix=/tmp/cf_card/jamvm --with-classpath-install-dir=/tmp/cf_card/jamvm/classpath --disable-zip
--with-classpath-install-dir 引用的GNU classpath路徑
--disable-zip 關閉使用zlib壓縮/解壓縮支援
#make
#make install
把jamvm/classpath/share/classpath/glibj.zip解壓縮在所在目錄
#cd /tmp/cf_card/jamvm/classpath/share/classpath/
#unzip glibj.zip //原因為需要抓取lib檔但是無法解析zip格式
#rm -rf /tmp/cf_card/jamvm/jamvm-1.5.1.tar.gz
#rm -rf /tmp/cf_card/jamvm/classpath-0.97.2.tar.gz
將完成的jamvm資料夾利用網路或USB隨身碟複製到PXA270上的/tmp/cf_card之下,或是打包為tar檔再重送到板子上解開
加上內容(包在做好的root_tmp.cramfs):
/bin/mount -t ex2 /dev/ide/host0/bus0/target0/lun0/part1 /tmp/cf_card
/sbin/ifconfig eth0 192.168.1.12 up
/sbin/ifconfig eth1 192.168.141.131 up
/bin/route add default gw 192.168.141.254 eth1
重新以mkcramfs包裝為root_tmp.cramfs,並重新燒錄。
!注意! 重新燒錄時請在u-boot命令列先執行protect off all與erase all清除flash
[x86] 編譯GNU classpath,Jikes及Jam VM過程:
-tmp
|-cf_card
|-jamvm
|-jamvm-1.5.1.tar.gz
|-classpath-0.97.2.tar.gz
|-jikes-1.22.tar.bz2
|-classpath
|-jikes
GNU classpath
#apt-get install gconf2 libgconf2-dev zlib-bin zlib1g-dev libgcj8-1-awt
#mkdir /tmp/cf_card/jamvm
#cd /tmp/cf_card/jamvm
#tar zxvf jamvm-1.5.1.tar.gz
#tar zxvf classpath-0.97.2.tar.gz
#tar jxvf jikes-1.22.tar.bz2
#cd classpath-0.97.2
#./configure --prefix=/tmp/cf_card/jamvm/classpath --disable-plugin
#make
#make install
Jikes
#./configure --prefix=/tmp/cf_card/jamvm/jikes
#make; make install
Jam VM
#cd /tmp/cf_card/jamvm/jamvm-1.5.1
#./configure --prefix=/tmp/cf_card/jamvm --with-classpath-install-dir=/tmp/cf_card/jamvm/classpath #make
#make install
#rm -rf /tmp/cf_card/jamvm/jamvm-1.5.1.tar.gz
#rm -rf /tmp/cf_card/jamvm/classpath-0.97.2.tar.gz
#rm -rf /tmp/cf_card/jamvm/jikes-1.22.tar.bz2
[arm] 編譯GNU classpath及Jam VM過程:
-tmp
---|-cf_card
---------|-jamvm
---------------|-jamvm-1.5.1.tar.gz
---------------|-classpath-0.97.2.tar.gz
---------------|-classpath
GNU classpath
#apt-get install gconf2 libgconf2-dev zlib-bin zlib1g-dev libgcj8-1-awt //安裝需要套件
#mkdir /tmp/cf_card/jamvm
#cd /tmp/cf_card/jamvm
#tar zxvf jamvm-1.5.1.tar.gz
#tar zxvf classpath-0.97.2.tar.gz
#tar jxvf jikes-1.22.tar.bz2
#cd classpath-0.97.2
#./configure --host=arm-linux --target=arm-linux --prefix=/tmp/cf_card/jamvm/classpath --disable-plugin --disable-gtk-peer --disable-gconf-peer --enable-Werror --enable-local-sockets
--disable-plugin 關閉Mozilla Plugin Support
--disable-gtk-peer 關閉gtk支援
--disable-gconf-peer 關閉gconf支援
--enable-jni 支援jni ( 重要,要加上 )
--enable-static library庫連結方式為static
#make
#make install
Jam VM
#cd /tmp/cf_card/jamvm/jamvm-1.5.1
#CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc ./configure --host=arm-linux --target=arm-linux --prefix=/tmp/cf_card/jamvm --with-classpath-install-dir=/tmp/cf_card/jamvm/classpath --disable-zip
--with-classpath-install-dir 引用的GNU classpath路徑
--disable-zip 關閉使用zlib壓縮/解壓縮支援
#make
#make install
把jamvm/classpath/share/classpath/glibj.zip解壓縮在所在目錄
#cd /tmp/cf_card/jamvm/classpath/share/classpath/
#unzip glibj.zip //原因為需要抓取lib檔但是無法解析zip格式
#rm -rf /tmp/cf_card/jamvm/jamvm-1.5.1.tar.gz
#rm -rf /tmp/cf_card/jamvm/classpath-0.97.2.tar.gz
將完成的jamvm資料夾利用網路或USB隨身碟複製到PXA270上的/tmp/cf_card之下,或是打包為tar檔再重送到板子上解開
Linux Kernel編譯+BusyBox+Ramdisk 筆記
wget http://www.busybox.net/downloads/busybox-snapshot.tar.bz2 <-- busybox檔案 Step1:編譯Kernel 抓下新版Kernel到/usr/src #tar -jxvf linux-2.6.23.12.tar.bz2 #ln -s linux-2.6.23.12 linux #cd linux #make menuconfig #make bzImage 將bzImage 複製到/boot/ Step2:建立映像檔以及掛載映象 #cd root #mkdir eb #cd eb #dd if=/dev/zero of=initrd.img bs=1k count=8192 #/sbin/mke2fs -F -v -m0 initrd.img #mkdir ramfs #mount -o loop initrd.img ramfs/ Step3:編譯BusyBox #cd /usr/src/busybox #make menuconfig (以下為參考) Busybox Settings >
Build Options >
[*] Build BusyBox as a static binary (no shared libs)
( 將busybox編譯為靜態連接 )
Init Utilities >
[*] init
[*] Support reading an inittab file
( 支援init讀取/etc/inittab配置 )
Shells >
Choose your default shell (ash) >
[*] ash
Coreutils >
[*] cp
[*] cat
[*] ls
[*] mkdir
[*] echo
[*] env
[*] mv
[*] pwd
[*] rm
[*] touch
Editors >
[*] vi
Linux System Utilities >
[*] mount
[*] umount
[*] Support loopback mounts
[*] Support for the old /etc/mtab file
Networking Utilities >
[*] inetd
( 支援inetd超級伺服器 )
#make PREFIX=/root/eb/ramfs/ all install
PREFIX指明安裝路徑,就是我們根系統路徑
Step4:建立FileSystem
#cd /usr/src/busybox/_install/
#cp -ar * /root/eb/ramfs
#cd /root/eb/ramfs
#mkdir dev etc lib proc tmp var(bin,sbin,usr已有)
#chmod 1777 tmp
#mkdir usr/lib(bin,sbin已有)
#mkdir var/lib var/lock var/log var/run var/tmp
#chmod 1777 var/tmp
#cd /dev
#cp -ar zero loop* tty? tty sda sda? fd random ram* null console /root/eb/ramfs/dev
#cd /lib
#for file in libc libcrypt libdl libm libpthread libresolv libutil; do cp -a /lib/$file-*.so /root/eb/ramfs/lib/; cp -d /lib/$file.so.[*0-9] /root/eb/ramfs/lib; done
#cp -d ld*.so* /root/eb/ramfs/lib
#cd /root/eb/ramfs/etc
#mkdir init.d
#cd init.d
#nano -w rcS
#!/bin/sh
#mount -n -o remount,rw /
#chmod 755 rcS
#cd /root/eb
#umount /root/eb/ramfs
Step5:修改開機檔
#gzip -9 initrd.img
#cp initrd.img.gz /boot
修改/boot/grub/menu.lst加入
title Embedded Linux
root (hd0,3) <-- 看自己的磁區決定
kernel /boot/bzImage root=/dev/ram ramdisk_size=16000
initrd /boot/initrd.img.gz
quiet
Build Options >
[*] Build BusyBox as a static binary (no shared libs)
( 將busybox編譯為靜態連接 )
Init Utilities >
[*] init
[*] Support reading an inittab file
( 支援init讀取/etc/inittab配置 )
Shells >
Choose your default shell (ash) >
[*] ash
Coreutils >
[*] cp
[*] cat
[*] ls
[*] mkdir
[*] echo
[*] env
[*] mv
[*] pwd
[*] rm
[*] touch
Editors >
[*] vi
Linux System Utilities >
[*] mount
[*] umount
[*] Support loopback mounts
[*] Support for the old /etc/mtab file
Networking Utilities >
[*] inetd
( 支援inetd超級伺服器 )
#make PREFIX=/root/eb/ramfs/ all install
PREFIX指明安裝路徑,就是我們根系統路徑
Step4:建立FileSystem
#cd /usr/src/busybox/_install/
#cp -ar * /root/eb/ramfs
#cd /root/eb/ramfs
#mkdir dev etc lib proc tmp var(bin,sbin,usr已有)
#chmod 1777 tmp
#mkdir usr/lib(bin,sbin已有)
#mkdir var/lib var/lock var/log var/run var/tmp
#chmod 1777 var/tmp
#cd /dev
#cp -ar zero loop* tty? tty sda sda? fd random ram* null console /root/eb/ramfs/dev
#cd /lib
#for file in libc libcrypt libdl libm libpthread libresolv libutil; do cp -a /lib/$file-*.so /root/eb/ramfs/lib/; cp -d /lib/$file.so.[*0-9] /root/eb/ramfs/lib; done
#cp -d ld*.so* /root/eb/ramfs/lib
#cd /root/eb/ramfs/etc
#mkdir init.d
#cd init.d
#nano -w rcS
#!/bin/sh
#mount -n -o remount,rw /
#chmod 755 rcS
#cd /root/eb
#umount /root/eb/ramfs
Step5:修改開機檔
#gzip -9 initrd.img
#cp initrd.img.gz /boot
修改/boot/grub/menu.lst加入
title Embedded Linux
root (hd0,3) <-- 看自己的磁區決定
kernel /boot/bzImage root=/dev/ram ramdisk_size=16000
initrd /boot/initrd.img.gz
quiet
uClinux+Skyeye 筆記
Step1: 前言
請前往uClinux官網抓取arm-elf-tools以及uClinux-dist,uClinux-dist 則將不同處理器的 uClinux 整合至一個套件裡。此外,uClinux-dist 也整合了許多的軟體與系統工具,並且提供設定 root filesystem 的介面;arm-elf-tools是uClinux的Cross-Compiler。我用的版本是arm-elf-tools-20030314.sh以及uClinux-dist-20051014.tar.gz
◎注意uClinux-dist我原先使用最新版本但一直Error,換回舊版則OK
◎需要套件如下: libgtk2.0-dev,pkg-config,libatk1.0-dev,libpango1.0-dev,libfreetype6-dev,libglib2.0-dev,libx11-dev,binutils-dev
Step2: 安裝skyeye
#sudo -s
#cd /usr/local
#wget http://nchc.dl.sourceforge.net/sourceforge/skyeye/skyeye-1.2.4_Rel.tar.gz
#tar -zxvf skyeye-1.2.4_Rel.tar.gz
#cd skyeye-1.2.4
#make (視需要在make之後下參數,用法請見skyeye付的README)
Step3: 安裝Cross-Compiler
#cd /usr/local
#wget http://www.uclinux.org/pub/uClinux/arm-elf-tools/arm-elf-tools-20030314.sh
#chmod 755 arm-elf-tools-20030314.sh
#./arm-elf-tools-20030314.sh
在/usr/local/bin下面應該出現arm-elf-XXX等等的檔案,而且應該也寫入PATH了
#arm-elf-gcc -v
若出現訊息則完成
Step4: 編譯uClinux-dist
#cd /usr/local
#wget http://www.uclinux.org/pub/uClinux/dist/uClinux-dist-20051014.tar.gz
#tar -zxvf uClinux-dist-20051014.tar.gz
#cd uClinux-dist
#nano -w vendors/config/armnommu/config.arch
將“CROSS_COMPILE”的值設為"arm-elf-”
#make menuconfig
vendor/product中選擇GDB/ARMulator,kernel版本選擇2.4,compiler選uClibc 然後save and exit
#make dep
#make
在/usr/src/uClinux-dist/linux-2.4.x目錄下會生成可執行文件"linux", 在/usr/src/uClinux-dist/images/會生成"romfs.img"等文件
Step5: Skyey運行編譯出的uClinux-dist
#cd /usr/local/uClinux-dist
#ln -s images/romfs.img boot.rom
#nano -w skyeye.conf (為了讓skyey運作時抓取此設定檔,這檔是設定要模擬的環境,詳細資料見README,以下為最簡單的Example)
cpu: arm7tdmi
mach: at91
mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000
mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000
mem_bank: map=M, type=R, addr=0x01400000, size=0x00400000, file=images/romfs.img
mem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000
mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000
mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000
mem_bank: map=I, type=RW, addr=0xf0000000, size=0x10000000
#/usr/local/skyeye-1.2.4/binary/skyeye -e linux-2.4.x/linux
後記:在每人的環境不同,或許會需要Debug,我也De了很久 @@a
請前往uClinux官網抓取arm-elf-tools以及uClinux-dist,uClinux-dist 則將不同處理器的 uClinux 整合至一個套件裡。此外,uClinux-dist 也整合了許多的軟體與系統工具,並且提供設定 root filesystem 的介面;arm-elf-tools是uClinux的Cross-Compiler。我用的版本是arm-elf-tools-20030314.sh以及uClinux-dist-20051014.tar.gz
◎注意uClinux-dist我原先使用最新版本但一直Error,換回舊版則OK
◎需要套件如下: libgtk2.0-dev,pkg-config,libatk1.0-dev,libpango1.0-dev,libfreetype6-dev,libglib2.0-dev,libx11-dev,binutils-dev
Step2: 安裝skyeye
#sudo -s
#cd /usr/local
#wget http://nchc.dl.sourceforge.net/sourceforge/skyeye/skyeye-1.2.4_Rel.tar.gz
#tar -zxvf skyeye-1.2.4_Rel.tar.gz
#cd skyeye-1.2.4
#make (視需要在make之後下參數,用法請見skyeye付的README)
Step3: 安裝Cross-Compiler
#cd /usr/local
#wget http://www.uclinux.org/pub/uClinux/arm-elf-tools/arm-elf-tools-20030314.sh
#chmod 755 arm-elf-tools-20030314.sh
#./arm-elf-tools-20030314.sh
在/usr/local/bin下面應該出現arm-elf-XXX等等的檔案,而且應該也寫入PATH了
#arm-elf-gcc -v
若出現訊息則完成
Step4: 編譯uClinux-dist
#cd /usr/local
#wget http://www.uclinux.org/pub/uClinux/dist/uClinux-dist-20051014.tar.gz
#tar -zxvf uClinux-dist-20051014.tar.gz
#cd uClinux-dist
#nano -w vendors/config/armnommu/config.arch
將“CROSS_COMPILE”的值設為"arm-elf-”
#make menuconfig
vendor/product中選擇GDB/ARMulator,kernel版本選擇2.4,compiler選uClibc 然後save and exit
#make dep
#make
在/usr/src/uClinux-dist/linux-2.4.x目錄下會生成可執行文件"linux", 在/usr/src/uClinux-dist/images/會生成"romfs.img"等文件
Step5: Skyey運行編譯出的uClinux-dist
#cd /usr/local/uClinux-dist
#ln -s images/romfs.img boot.rom
#nano -w skyeye.conf (為了讓skyey運作時抓取此設定檔,這檔是設定要模擬的環境,詳細資料見README,以下為最簡單的Example)
cpu: arm7tdmi
mach: at91
mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000
mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000
mem_bank: map=M, type=R, addr=0x01400000, size=0x00400000, file=images/romfs.img
mem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000
mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000
mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000
mem_bank: map=I, type=RW, addr=0xf0000000, size=0x10000000
#/usr/local/skyeye-1.2.4/binary/skyeye -e linux-2.4.x/linux
後記:在每人的環境不同,或許會需要Debug,我也De了很久 @@a
PXA270實驗筆記(三)
重新燒錄bootloader,kernel and filesystem
Step1:
光碟中點選giveio_inst.exe,
在裡面選擇InStall Parallel Port Driver 下的Install,和Install OCX 下的Install
Step2:
將JFlash_27x 目錄複製到C 槽,利用CMD進入該目錄
執行 JFlashmm.exe bulbcx u-boot.bin
Step3:安裝tftp
#apt-get install tftpd
#apt-get install tftp
#apt-get install xinetd
#cd /etc/xinetd.d/
#vi tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
flags=IPv4
}
#mkdir /tftpboot
#chmod -R 777 /tftpboot
#chown -R nobody /tftpboot
#/etc/init.d/xinetd restart
將root_tmp.cramfs ,u-boot.bin ,zImage複製到/tftpboot
Step4:
#ifconfig eth0 192.168.1.13
#minicom -s (改ttyS0 => ttyUSB0以及Hareware Flow => no)
使用minicom,autoboot時按下any key
設置板子IP
setenv ipaddr 192.168.1.12
設置主機IP
setenv serverip 192.168.1.13
設置啟動延時:
setenv bootdelay 2
設置啟動命令:
setenv bootcmd "cp.b 0x80000 0xa0008000 0x200000;bootme"
保存環境變量:
saveenv
查看環境變量:
print
U-boot>erase all
U-boot>run u-boot
U-boot>run kernel
U-boot>run rootfs
U-boot>boot
Step1:
光碟中點選giveio_inst.exe,
在裡面選擇InStall Parallel Port Driver 下的Install,和Install OCX 下的Install
Step2:
將JFlash_27x 目錄複製到C 槽,利用CMD進入該目錄
執行 JFlashmm.exe bulbcx u-boot.bin
Step3:安裝tftp
#apt-get install tftpd
#apt-get install tftp
#apt-get install xinetd
#cd /etc/xinetd.d/
#vi tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
flags=IPv4
}
#mkdir /tftpboot
#chmod -R 777 /tftpboot
#chown -R nobody /tftpboot
#/etc/init.d/xinetd restart
將root_tmp.cramfs ,u-boot.bin ,zImage複製到/tftpboot
Step4:
#ifconfig eth0 192.168.1.13
#minicom -s (改ttyS0 => ttyUSB0以及Hareware Flow => no)
使用minicom,autoboot時按下any key
設置板子IP
setenv ipaddr 192.168.1.12
設置主機IP
setenv serverip 192.168.1.13
設置啟動延時:
setenv bootdelay 2
設置啟動命令:
setenv bootcmd "cp.b 0x80000 0xa0008000 0x200000;bootme"
保存環境變量:
saveenv
查看環境變量:
U-boot>erase all
U-boot>run u-boot
U-boot>run kernel
U-boot>run rootfs
U-boot>boot
PXA270實驗筆記(二)
#cd /usr/local
#mkdir fstest
#cd fstest
#mkdir source
#mkdir target
複製Object目錄中廠商提供的的root_tmp.cramfs到/usr/local/fstest
#mount root_tmp.cramfs source -o loop //掛載file system到source資料夾
#cd source //目前source資料夾為唯讀狀態
#tar -cvf /usr/local/fstest/fs_temp.tar ./ //打包source資料夾中全部東西
#cd ..
#umount source //取消掛載source資料夾
#mv fs_temp.tar target //移動fs_temp.tar到target資料夾
#cd target
#tar -xvf fs_temp.tar //解開檔案
#rm -rf fs_temp.tar
#apt-get install cramfsprogs //安裝製作cramfs套件
#cd /usr/local/fstest
#mkcramfs target root_tmp.cramfs //將target資料夾製作為file system
#mkdir fstest
#cd fstest
#mkdir source
#mkdir target
複製Object目錄中廠商提供的的root_tmp.cramfs到/usr/local/fstest
#mount root_tmp.cramfs source -o loop //掛載file system到source資料夾
#cd source //目前source資料夾為唯讀狀態
#tar -cvf /usr/local/fstest/fs_temp.tar ./ //打包source資料夾中全部東西
#cd ..
#umount source //取消掛載source資料夾
#mv fs_temp.tar target //移動fs_temp.tar到target資料夾
#cd target
#tar -xvf fs_temp.tar //解開檔案
#rm -rf fs_temp.tar
#apt-get install cramfsprogs //安裝製作cramfs套件
#cd /usr/local/fstest
#mkcramfs target root_tmp.cramfs //將target資料夾製作為file system
PXA270實驗筆記(一)
Environment : Ubuntu 8.04
Step1:安裝Tool-chain
將cross-3.4.1.tar.bz2解壓縮在/usr/local
#tar -jxvf cross-3.4.1.tar.bz2
#mv usr/local/arm ./
#nano -w /root/.bashrc (or /etc/profile)
加入export PATH=$PATH:/usr/local/arm/3.4.1/bin
#source /root/.bashrc (or /etc/profile)
Step2:Kernel MakeStep1:安裝Tool-chain
將cross-3.4.1.tar.bz2解壓縮在/usr/local
#tar -jxvf cross-3.4.1.tar.bz2
#mv usr/local/arm ./
#nano -w /root/.bashrc (or /etc/profile)
加入export PATH=$PATH:/usr/local/arm/3.4.1/bin
#source /root/.bashrc (or /etc/profile)
#cd /usr/local
#tar -zxvf linux-2.6.9-dma2701g104.tar.gz
#cd linux-2.6.9
#apt-get install kernel-package libncurses5-dev fakeroot
#make zImage
zImage 所在位置為 /usr/local/linux-2.6.9/arch/arm/boot/
訂閱:
文章 (Atom)