2007年1月11日 星期四

Qtopia phone edition 4.1.4

#Qtopia phone

cd qtopia-phone-4.1.4
./configure -edition phone (-prefix 改變安裝位置,例如 -prefix /opt/Qtopia)
make
make install

所有的執行時所需要的檔案會放在image/opt/Qtopia/

export PATH=$PATH:$PWD/image/opt/Qtopia/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/image/opt/Qtopia/lib
export QPEHOME=$PWD/image/opt/Qtopia

bin/startdemo


#QT/Embedded now rename to Qtopia Core

#Cross compile Qtopia Core for ARM
cd $QTOPIA
cd qtopiacore
./configure -embedded arm -no-qt3support
gmake
make install

#It will install to /usr/local/Trolltech/QtopiaCore-4.1.12-arm/

cp -a mkspecs /usr/local/Trolltech/QtopiaCore-4.1.12-arm/

#Ok, now we finish it
#Compile QTE application

export QTDIR=/home/gigijoe/MIP200/qtopia-phone-4.1.4/qtopiacore/qt
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

cd qt4_example

qmake -project

vi qt4_example.pro
#Add CONFIG += release
qmake -makefile -unix -o Makefile -spec qws/linux-arm-g++




2007年1月3日 星期三

Fonera kernel panic

跟在ADM5120上碰到的很像,在login網頁按下submit就發生了
今天又碰到了,但是在login之後一段時間.原因可能是因為接上10MbaseT hub的關係


root@(none):/# ps -ax
PID Uid VmSize Stat Command
1 root 396 S init
2 root SW [keventd]
3 root SWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
8 root SW [mtdblockd]
16 root 396 S syslogd -C 16
17 root 436 S /bin/sh /etc/init.d/rcS
18 root 380 S logger -s -p 6 -t
20 root 488 S /bin/ash --login
22 root 360 S klogd
60 root SWN [jffs2_gcd_mtd2]
126 root 284 S lock /var/run/restart-services
459 root 420 S httpd -p 80 -h /www -r OpenWrt
498 root 424 S crond -c /etc/crontabs
516 root 328 S watchdog -t 5 /dev/misc/watchdog
517 root 328 D watchdog -t 5 /dev/misc/watchdog
518 root 424 S /usr/sbin/httpd -R /cgi-bin/splash.sh -H 192.168.10.1
628 nobody 420 S dnsmasq -C /etc/dnsmasq.conf --dhcp-range=192.168.10.
655 root 480 S hostapd -B /tmp/hostapd.conf
669 root 404 S udhcpc -i eth0 -R
885 root 452 S /bin/sh /etc/init.d/N50chillispot loop
888 root 4900 S /usr/sbin/chilli --dns1=192.168.0.37 --dns2=192.168.0
896 root 276 S lock /var/run/restart-services
1755 root 300 S sleep 1
1756 root 368 R ps -ax
root@(none):/# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wifi0 no wireless extensions.

ath1 IEEE 802.11g ESSID:"MyPlace"
Mode:Master Frequency:2.417 GHz Access Point: 00:18:84:14:54:9E
Bit Rate:0 kb/s Tx-Power:18 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:5445-E469-653E-44D9-8C37-DEB0-2079-DE42 [2] Security mode:open
Power Management:off
Link Quality=50/98 Signal level=-44 dBm Noise level=-94 dBm
Rx invalid nwid:29 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

ath0 IEEE 802.11g ESSID:"FON_AP"
Mode:Master Frequency:2.417 GHz Access Point: 00:18:84:14:54:9D
Bit Rate:0 kb/s Tx-Power:18 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=50/98 Signal level=-44 dBm Noise level=-94 dBm
Rx invalid nwid:21 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

tun0 no wireless extensions.

root@(none):/# skput:over: 800e9d34:2044 put:2044 dev:eth0Break instruction in kernel code in traps.c::do_bp, line 593:
$0 : 00000000 10009d00 0000002b 80710000 00000000 00000000 0000001f 8035d520
$8 : 00000000 00001193 00001193 00001165 801c0000 801c0000 801c0000 ffffffff
$16: 802bed60 80a8ad60 802b0d40 00000018 a02bb980 00000060 00000002 802bec00
$24: 00000002 00000003 80710000 80711e00 100009e0 800f4d40
Hi : 00000000
Lo : 00000000
epc : 800f4d40 Tainted: P
Status: 10009d03
Cause : 10800024
PrId : 00019064
Process chilli (pid: 888, stackpage=80710000)
Stack: 800fa4ec 800e9d34 000007fc 000007fc 802bec00 00000018 800e9d44
800e9d6c 00000000 7fff69d8 801a2270 801a21a8 801a2180 00007ea2 00000000
801a0000 fffffff8 801c0000 10009d01 80711ef8 10000a28 00000001 8005eb70
00000000 0000012b 00000000 00000000 801a2070 00000001 801a2060 8005e6c4
8005e6c4 80a9f980 80a84002 800fa4ec 80090884 80a9f980 80a84002 000005dc
80238a00 ...
Call Trace: [<800fa4ec>] [<800e9d34>] [<800e9d44>] [<800e9d6c>] [<8005eb70>]
[<8005e6c4>] [<8005e6c4>] [<800fa4ec>] [<80090884>] [ ] [ ]
[<8007e470>] [<800f2804>] [<80048a60>]

Code: 2443e128 0c016749 afa30010 <0200000d> 8fbf0018 03e00008 27bd0020 27bdffd8 3c07801f
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
<0>Rebooting in 3 seconds..+PHY ID is 0022:5521
Ethernet eth0: MAC address 00:18:84:14:54:9c
IP: 0.0.0.0/255.255.255.255, Gateway: 0.0.0.0
Default server: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROMRAM]



2007年1月2日 星期二

Building Fonera



chilli.conf

radiusserver1 radius01.fon.com
radiusserver2 radius02.fon.com
radiussecret garrafon
uamsecret garrafon
uamanydns
uamallowed 192.168.10.1,192.168.0.0/24,192.168.182.0/24 <------加入local interface
uamallowed www.martinvarsavsky.net,www.google.com,www.flickr.com,static.flickr.com,video.google.com,216.239.51.0/24,66.249.81.0/24
uamallowed www.fon.com,www.paypal.com,www.paypalobjects.com,www.skype.com,66.249.93.0/24,72.14.207.0/24,72.14.209.0/24,84.96.67.0/24,213.91.9.0/24,80.118.994uamallowed shop.fon.co.kr,secure.nuguya.com,inilite.inicis.com,fon-en.custhelp.com,maps.fon.com,c20.statcounter.com
uamserver https://login.fon.com/cp/index.php

chilli.fonera

DEV="fon0" <------FON AP interface的名稱
NET="192.168.182.0/24" <------FON AP 擁有的網段
MAC="00:60:B3:F3:50:C9" <------FON AP mac address
NAS="00-60-B3-F3-50-C9" <------使用FON AP mac address 做為Radius NAS ID
PID_FILE="/var/run/chilli.pid"
DNS1="168.95.1.1"
DNS2="168.95.192.1"

wlanconfig fon0 create wlandev wifi0 wlanmode ap <------建立新的wireless ap做為FON AP
iwconfig $DEV essid "FON_AP"
ifconfig $DEV hw ether $MAC <------更改mac address
ifconfig $DEV 192.168.10.1 netmask 255.255.255.0

iptables -P FORWARD DROP <------預設forward polacy為drop
iptables -A FORWARD -m state --state INVALID -j DROP
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtuiptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

iptables -A FORWARD -s $NET -j ACCEPT <------允許由tun+ interface forwarding
iptables -A FORWARD -i br0 -j ACCEPT <------允許local lan forwarding

./chilli -c chilli.conf --net=$NET --dhcpif=$DEV --lease=600 --dns1=$DNS1 --dns2=$DNS2 --radiusnasid=$NAS --pidfile=$PID_FILE

修正一個問題.在偶的platform上,當chilli停止後,tunX device並沒有被摧毀,下次執行chilli時又會產生新的tunX.

--- tun.old.c 2007-01-03 17:32:31.000000000 +0800
+++ tun.c 2007-01-03 17:22:39.000000000 +0800
@@ -687,6 +687,8 @@
strncpy((*tun)->devname, ifr.ifr_name, IFNAMSIZ);
(*tun)->devname[IFNAMSIZ] = 0;

+ ioctl((*tun)->fd, TUNSETPERSIST, 0); /*Disable persist to destroy device when closed*/
+
ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */
return 0;