2011年9月21日 星期三

hello_module.ko with linux2.6.38 gcc and arm-linux-gcc





環境 ubuntu 11.04kernel : 2.6.38-8-generic
專案開發工具: kscope
hello_c_code:

製作 Makefile

#CC= $(CROSS_COMPILE)gcc
#CROSS_COMPILE ?=~/toolschain/4.5.1/bin/arm-linux-

#EXTRA_CFLAGS += -I$(KERNELDIR)/include
ifneq ($(KERNELRELEASE),)
# call from kernel build system
#~/ARM/toolschain/4.5.1/bin

obj-m := hello.o
#/lib/modules/$(shell uname -r)/build
#~/linux-2.6.38
else
#KERNELDIR := ~/linux-2.6.38
KERNELDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

modules:
#$(MAKE) -C $(KERNELDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
# $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
rm -rf *.o *.ko *~ core .depend *.mod.c .*.cmd .tmp_versions .*.o.d

endif

make 即可後產生 .ko .mod.o .mod.c ... etc

arm 版本
下載 kernel 2.6.38
arm-tool chain : arm-linux-gcc-4.5.1-v6-vfp-20101103 (code_sourcery)
step1:
cd ~/linux 2.6.38
step2:
make oldconfig or make 00xx.config
step3:
make prepare
make scripts
step4:
export PATH=~/ARM/toolschain/4.5.1/bin
step5:
make ARCH=arm CROSS_COMPILE=~/ARM/toolschain/4.51/bin/arm-linux-

成功顯示

2011年8月26日 星期五

unfinish goto fish

如何取得Android SDK並使用adb指令
http://gfans.bryan.tw/2010/11/30/1361

windows 7 android-sdk eclipse
http://ig-max.blogspot.com/2010/10/windows-7-android.html

Ubuntu/Debian Linux 安裝 華為 E220 3.5G USB Card Driver
http://www.hksilicon.com/kb/articles/2181/UbuntuDebian-Linux-E220-35G-USB-Card-Driver

ubunto下安裝busybox
http://flykof.pixnet.net/blog/post/22995832-ubunto%E4%B8%8B%E5%AE%89%E8%A3%9Dbusybox

華為 3.5g 網卡安裝
testing 3.5g huawei on ubuntu 10.10
on ubuntu 9 or 8

android Build Environment windows 7
http://changyy.pixnet.net/blog/post/29474494-android-%E9%96%8B%E7%99%BC%E6%95%99%E5%AD%B8%E7%AD%86%E8%A8%98---%E8%A8%AD%E5%AE%9A-windows-%E4%B9%8B-android-ndk-

Build android kernel image ubuntu
http://cianer.com/androidg1/28-building-android-kernel-images

android 開發筆記
http://changyy.pixnet.net/blog/post/29474494-android-%E9%96%8B%E7%99%BC%E6%95%99%E5%AD%B8%E7%AD%86%E8%A8%98---%E8%A8%AD%E5%AE%9A-windows-%E4%B9%8B-android-ndk-

2011年6月16日 星期四

mjpeg-setreamer 參數

http://www.lt-net.cn/forum.php?mod=viewthread&tid=15

##http://111.184.129.75:8080/?action=stream
##http://192.168.1.202:8080/?action=snapshot
## This example shows how to invoke mjpg-streamer from the command line
#./mjpg_streamer -o "output_http.so -p 8080 -w ./www" -i "input_uvc.so -f 30 -d /dev/video0" -o "output_file.so -f /home/iii/mjpeg/mjpg-streamer-r63/images -d 1000"
##官方網頁
#http://111.184.129.75:8080/stream.html

2011年6月7日 星期二

qt 4.7 opensource-ererywhere with phonon問題如下

step1:http://linux-arm-porting.blogspot.com/2010/03/qt-media-player-on-mini2440.html
step2:http://felipec.wordpress.com/2010/10/08/my-arm-development-notes/


照step2裝了
gst-plugins-base gstreamer liboil zlib-1.2.5
glib gst-plugins-good libid3tag-0.15.1b libxml2-2.7.8
gst-openmax gst-plugins-ugly libmad-0.15.1b

export PKG_CONFIG_PATH=/opt/arm/gst/lib/pkgconfig
export C_INCLUDE_PATH='/opt/arm/gst/include' LDFLAGS='-L/opt/arm/gst/lib'
./configure --prefix=/opt/qt-4.7arm/ -opensource -embedded arm -xplatform qws/linux-arm-g++ -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -no-openssl -no-opengl -no-cups -no-qvfb -qt-mouse-tslib -qt-libtiff -qt-libmng -qt-mouse-pc -no-mouse-linuxtp -webkit -phonon -phonon-backend -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -L/opt/arm/gst/lib -L/opt/arm/gst/lib/gstreamer-0.10 -force-pkg-config -v

問題如下:
iii@ubuntu:~/qt-everywhere-opensource-src-4.7.0-arm$ sudo ./configure --prefix=/opt/qt-4.7arm/ -opensource -embedded arm -xplatform qws/linux-arm-g++ -phonon -phonon-backend -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -L/opt/arm/gst/lib -L/opt/arm/gst/lib/gstreamer-0.10 -force-pkg-config -v
Determining system architecture... (Linux:2.6.35-28-generic:i686)
32-bit Intel 80x86 (i386)
'arm' is supported
'i386' is supported
System architecture: 'arm'
Host architecture: 'i386'

You have asked to use pkg-config and are cross-compiling.
Please make sure you have a correctly set-up pkg-config
environment!


Warning: PKG_CONFIG_PATH has not been set. This could mean
the host compiler's .pc files will be used. This is probably
not what you want.

Precompiled-headers support disabled.
/home/iii/qt-everywhere-opensource-src-4.7.0-arm/config.tests/unix/fvisibility.test: 64: arm-linux-g++: not found
Symbol visibility control disabled.

This is the Qt for Embedded Linux Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3.

Type '3' to view the GNU General Public License version 3.
Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license? yes

Creating qmake. Please wait...
make: Nothing to be done for `first'.
floatmath auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o floatmath.o floatmath.cpp
make: arm-linux-g++: Command not found
make: *** [floatmath.o] Error 127
floatmath disabled.
mmx auto-detection... ()
arm-linux-g++ -c -pipe -mmmx -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o mmx.o mmx.cpp
make: arm-linux-g++: Command not found
make: *** [mmx.o] Error 127
mmx disabled.
3dnow auto-detection... ()
arm-linux-g++ -c -pipe -m3dnow -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o 3dnow.o 3dnow.cpp
make: arm-linux-g++: Command not found
make: *** [3dnow.o] Error 127
3dnow disabled.
sse auto-detection... ()
arm-linux-g++ -c -pipe -msse -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o sse.o sse.cpp
make: arm-linux-g++: Command not found
make: *** [sse.o] Error 127
sse disabled.
sse2 auto-detection... ()
arm-linux-g++ -c -pipe -msse2 -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o sse2.o sse2.cpp
make: arm-linux-g++: Command not found
make: *** [sse2.o] Error 127
sse2 disabled.
neon auto-detection... ()
arm-linux-g++ -c -pipe -mfpu=neon -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o neon.o neon.cpp
make: arm-linux-g++: Command not found
make: *** [neon.o] Error 127
neon disabled.
zlib auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o zlib.o zlib.cpp
make: arm-linux-g++: Command not found
make: *** [zlib.o] Error 127
zlib disabled.
libjpeg auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o libjpeg.o libjpeg.cpp
make: arm-linux-g++: Command not found
make: *** [libjpeg.o] Error 127
libjpeg disabled.
libtiff auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o libtiff.o libtiff.cpp
make: arm-linux-g++: Command not found
make: *** [libtiff.o] Error 127
libtiff disabled.
libmng auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o libmng.o libmng.cpp
make: arm-linux-g++: Command not found
make: *** [libmng.o] Error 127
libmng disabled.
libpng auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o libpng.o libpng.cpp
make: arm-linux-g++: Command not found
make: *** [libpng.o] Error 127
libpng disabled.
DB2 auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o db2.o db2.cpp
make: arm-linux-g++: Command not found
make: *** [db2.o] Error 127
DB2 disabled.
InterBase auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o ibase.o ibase.cpp
make: arm-linux-g++: Command not found
make: *** [ibase.o] Error 127
InterBase disabled.
MySQL (thread-safe) auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o mysql.o ../mysql/mysql.cpp
make: arm-linux-g++: Command not found
make: *** [mysql.o] Error 127
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o mysql.o mysql.cpp
make: arm-linux-g++: Command not found
make: *** [mysql.o] Error 127
MySQL (thread-unsafe) disabled.
OCI auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o oci.o oci.cpp
make: arm-linux-g++: Command not found
make: *** [oci.o] Error 127
OCI disabled.
ODBC auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o odbc.o odbc.cpp
make: arm-linux-g++: Command not found
make: *** [odbc.o] Error 127
ODBC disabled.
iODBC auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o iodbc.o iodbc.cpp
make: arm-linux-g++: Command not found
make: *** [iodbc.o] Error 127
iODBC disabled.
PostgreSQL auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o psql.o psql.cpp
make: arm-linux-g++: Command not found
make: *** [psql.o] Error 127
PostgreSQL disabled.
SQLite2 auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o sqlite2.o sqlite2.cpp
make: arm-linux-g++: Command not found
make: *** [sqlite2.o] Error 127
SQLite2 disabled.
unknown SQL driver: sqlite_symbian
TDS auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o tds.o tds.cpp
make: arm-linux-g++: Command not found
make: *** [tds.o] Error 127
TDS disabled.
NIS auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o nis.o nis.cpp
make: arm-linux-g++: Command not found
make: *** [nis.o] Error 127
NIS disabled.
Cups auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -o cups.o cups.cpp
make: arm-linux-g++: Command not found
make: *** [cups.o] Error 127
Cups disabled.
D-Bus auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -o dbus.o dbus.cpp
make: arm-linux-g++: Command not found
make: *** [dbus.o] Error 127
D-Bus disabled.
Glib auto-detection... ()
arm-linux-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/opt/arm/gst/lib/glib-2.0/include -I/opt/arm/gst/include/glib-2.0 -I/opt/arm/gst/include/gstreamer-0.10/gst -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o glib.o glib.cpp
make: arm-linux-g++: Command not found
make: *** [glib.o] Error 127
Glib disabled.
Phonon support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.

2011年6月6日 星期一

ubuntu qt 編譯環境 -lfreetype -lXrender -lgthread-2.0 訊息

出現 -lfreetype -lXrender -lgthread-2.0 缺少此訊息安裝上去方便使用
//*************
sudo apt-get install libx11-dev libfreetype6-dev libavahi-gobject-dev libSM-dev libXrender-dev libfontconfig-dev libXext-dev
****//


題外話要安裝 MAD: MPEG Audio Decoder 解碼器如下參考

ftp://ftp.mars.org/pub/mpeg/

install libid3tag

1. download libid3tag-0.15.1b

2. ./configure

3. make && sudo make install

install libmad

1. download libmad-0.15.0b

2. ./configure

3. make && sudo make install


ref:

编译gstreamer app: http://bh-wang.iteye.com/blog/1005000

編譯arm qt 4.6 phonon: http://linux-arm-porting.blogspot.com/2010/03/qt-media-player-on-mini2440.html
http://felipec.wordpress.com/2009/12/21/gstreamer-development-in-embedded-with-sbox2/#comments

mpg 套件:http://www.underbit.com/products/mad/
gstream:http://blog.csdn.net/fei1700/archive/2008/12/21/3571270.aspx

2011年5月26日 星期四

ubuntu gcc 4.4.3 降級 gcc 4.3

1、安装gcc-4.3
$ sudo apt-get install gcc-4.3 g++-4.3
2、修gcc相关链接
$ cd /usr/bin
$sudo ln -snf gcc-4.3 gcc
$sudo ln -snf g++-4.3 g++
$sudo ln -snf cpp-4.3 cpp
3、如是64bit系统,则还需装如下包。
$ sudo apt-get install g++-multilib g++-4.3-multilib

ref: http://www.ways2u.com/?post=163

gcc 4.3 gcc 3.4 快速切換
使用 update-alternatives 工具
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-3.4 30
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-4.4 40

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-3.4 30
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-3.4 30
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 40

設定後 sudo update-alternatives --config gcc

Selection Path 優先級 Status
------------------------------------------------------------
0 /usr/bin/gcc-3.4 40 auto mode
* 1 /usr/bin/gcc-3.4 40 manual mode
2 /usr/bin/gcc-4.4 30 manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/gcc-4.4 to provide /usr/bin/gcc (gcc) in manual mode.
可看到版本切換摟

look: gcc -v
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)


2011年5月23日 星期一

Fedora 9設置nfs

以 root 身份登录Fedora9,在命令行运行:
#gedit /etc/exports
编辑nfs 服务的配置文件(注意:第一次打开时该文件是空的),添加以下内容:
/opt/abc/123 *(rw,sync,no_root_squash)
其中:
/opt/abc/123 表示将要共享的的目录,它可以作
为开发板的根文件系统通过nfs 挂接;
* 表示所有的客户机都可以挂接此目录
rw 表示挂接此目录的客户机对该目录有读写的权力
no_root_squash 表示允许挂接此目录的客户机享有该主机的root 身份

,但默认安装的Fedora 系统开启了防火墙,这会导致NFS 服务
无法正常使用。因此先关闭防火墙,在命令行输入“lokkit”命令
选择其中(*)Disabled,然后选择“OK”退出,这样就永久的关闭了防火墙。
下面是启动 NFS 服务的方法和步骤:

(1)通过命令启动和停止nfs 服务
在命令行下运行:
#/etc/init.d/nfs start

这将启动nfs 服务,可以输入以下命令检验nfs 该服务是否启动。
# mount -t nfs localhost:/opt/abc/123 /mnt/
如果没有出现错误信息, 您将可以浏览到/mnt 目录中的内容和
/opt/FriendlyARM/mini6410/root_qtopia_qt4 是一致的。
使用这个命令可以停止 nfs 服务:
#/etc/init.d/nfs stop
(2)通过图形界面启动NFS 服务
为了在每次开机时系统都自动启动该服务,可以输入
# serviceconf
打开系统服务

2. 修改/etc/hosts.allow

sshd:ALL

portmap:192.168.10.0/255.255.255.0:allow

portmap:ALL:deny

nfsd:192.168.10.0/255.255.255.0

3. 启动Fedora 9 nfs server

[root@localhost v2.0]# service nfs start.如果在启动之后需要修改exports,可以exportfs -rv重新输出.

4. 可以在本机测试[root@localhost v2.0]# mount -t nfs 192.168.10.6:/pub /var/nfs

5. 在目标板上运行.下面是我第一次在目标板上运行的结果,查询了之后发现是防火墙的问题.

[root@falinux ~]$ mount -t nfs -o nolock 192.168.10.6:/home/leffy/edfa/v2.0 /mnt/win

mount: RPC: Unable to receive; errno = No route to host

mount: nfsmount failed: Bad file descriptor

mount: Mounting 192.168.10.6:/home/leffy/edfa/v2.0 on /mnt/win failed: Bad file descriptor

6. 关闭防火墙[root@localhost v2.0]# service iptables stop[root@localhost v2.0]# service iptables statusiptables: Firewall is not running.

可以看到防火墙已经半闭以上Fedora 9 nfs系统介绍.


ref:http://www.router.net.cn/Article/41302.html

2011年5月11日 星期三

Qt 樹狀結構圖

Qt 發展樹狀結構圖
http://mapyourinfo.com/wiki/zh.wikipedia.org/Qt/

Mjpeg Webcam

裝置:uvc webcam
軟體:v4l2
Download : mjpeg.tar.bz2
make

xxx@xxx-desktop:~/mjpeg/mjpg-streamer-r63$ ./mjpg_streamer
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Unable to set format: Invalid argument
Init v4L2 failed !! exit fatal
i: init_VideoIn failed
xxx@xxx-desktop:~/mjpeg/mjpg-streamer-r63$ ./mjpg_streamer -i "input_uvc.so -d /dev/video0 -y" -o "output_http.so"
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: YUV
i: JPEG Quality......: 80
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled


*******************************web browser
The command for mplayer i am using is mplayer -nocache -demuxer lavf "http://localhost:8080/?action=stream&ignored.mjpg"

2011年5月9日 星期一

eclipse for qt java install


A Download
i、 下載JRE(Java Runtime Environment) 。(http://java.sun.com/javase/downloads/index.jsp)
安裝JRE


... /usr/local ]#chmod +x jxx-linux-i586-rpm.bin

... /usr/local ]#./jxxx-linux-i586-rpm.bin
產生/usr/local/jdk1.6.0_25
修改路徑
$gedit /etc/profile
...
export JAVA_HOME=/usr/local/jdk1.6.0_25
export JRE_HOME=/usr/local/jdk1.6.0_25/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME;lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
...
umask 022
測試是否成功
source /ect/profile
沒任何提示表示成功

ii. (測試Java是否安装成功)
[root@localhost ~]#java –version
http://www.cnblogs.com/images/cnblogs_com/oomusou/JRE3.jpg

iii. download g++
sudo apt-get install build-essential
輸入 gcc,出現“gcc: no input files”,安裝成功!

iv. 下載qt framework
步驟如下連結

v. 下載 qt and eclipse
tar vxfz qt-eclipse-integration-linux.x86-1.6.1.tar.gz 後先保留後面步驟使用

linux下eclipse的安装
for c/c++
(下載eclipse-linuxtools-helios-SR2-incubation-linux-gtk)
(解壓後eclipse-SDK-3.2.1-linux-gtk.tar.gz)執行



我是安裝c/c++ eclipse 為了整合qt 之用
安裝步驟如上連結且測試了Hello World 發覺eclipse 真是酷也 接下來qt 整在一起吧
install CDT
或者打開eclipse install new software :
選擇或鍵入 http://download.eclipse.org/tools/cdt/releases/helios 此相關pending 後勾選全部下載

接下來qt framework 我解壓縮放在如 上 A 第iv 點make 路徑:/usr/local/Trolltech

A v步驟後: 裡面會和 eclipse的資料夾裡features和plugins兩個資料夾,分別將這兩資料夾內的內容放置你Eclipse(以我為 例我的Eclipse放置/opt/Eclipse)相對應的資料夾內(Eclipse中也有features和plugins兩個資料夾),然後啟動 Eclipse,即可。這樣QT就整合完成了。

重起eclipse 後請設好路徑
version name: 4.7.3
Bin path: /usr/local/Trolltech/Qt-4.7.3/bin
Include: /usr/local/Trolltech/Qt-4.7.3/include

**********************************
最後注意 開發專案
c\c++ 要include Trollech lib compiler:Gnu\g++
qmake -project
qmake
make
Run
QT console compiler: Gun\ g++
qmake -project
qmake
make
Run
參考資料:

2011年4月12日 星期二