Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2087936
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: LINUX

2008-10-20 09:59:25

HomePage: maemo.org
Repository:
Borwser based on Mizilla:

Document:
http://maemo.org/development/documentation/


Full Toturial:
http://maemo.org/development/documentation/tutorials/

D-Bus


Setup development environment



maemo tools download



Work as super user
fakeroot
eg:
fakeroot apt-get install libcairo2-dev


Switch between modes armel and 386
    sb-conf select CHINOOK_ARME
    sb-conf select CHINOOK_X86
or
    sb-menu
then select in virsual mode. The development mode must be identical to the run-time mode.

Browser based on Mozilla
HomePage:
Docs: docs

1 Browser extensions
Development: docs/extension_development_howto.html

2 XPCOM Components develop
a) Build MicroB engine to get Browser SDK
b) Create XPCOM components source code and make file as that described on
and
http://guohuan.blogspot.com/2008/04/using-gecko-19-to-build-xpcom.html
c) Copy .xpt and .so to /usr/lib/microb-engine/components
d) rm /home/usr/.mozilla/microb/xpti.dat
e) rm /home/usr/.mozilla/microb/compreg.dat
f) touch /home/user/.mozilla/microb/.auto.reg
g) restart browser twice


3 How to Build MicroB-engin
Reference:
http://www.mail-archive.com/maemo-developers@maemo.org/msg12314.html
docs/build_howto.html

1) install libidl (libidl0 & libidl-dev)
a) svn co libidl
b) cd libidl
c) dpkg-buildpackage -rfakeroot -uc -us -tc | tee libidl-build.log
d) cd ..
e) fakeroot dpkg -i libidl0*.deb
f) fakeroot dpkg -i libidl-dev*.deb
If you get problems with building libidl, because you lack flex then read this bug report:


2) install libcairo2-dev
fakeroot apt-get install libcairo2-dev

3) install bc
fakeroot dpkg -i bc-package-name.deb

Comments: I don't kown where to find bc-package-name.deb, maybe it is from ftp://ftp.gnu.org/gnu/bc/, what I did just as following:
a) download from ftp://ftp.gnu.org/gnu/bc/
b) tar xvfz
c) cd bc-1.06
d) ./configure
e) make
f) make install

4) install sharutils
fakeroot apt-get install sharutils

5) Build and install microb-engine
There are two ways to build microb-engine

The first way:
a) svn co microb-engine
This will take several minutes, please wait in patient.
b) cd microb-engine/microb-engine
c) ADD_OPTIONS="--enable-oji" DEB_BUILD_OPTIONS="parallel svgport syscairo"
d) dpkg-buildpackage -d -rfakeroot -uc -us -tc | tee ../microb-engine-build.log
After building, all midiate files will be removed, and several debain packages are located in up-level directory
e) cd ..
f) fakeroot dpkg -i *.deb

The second way:
a) svn co microb-engine
This will take several minutes, please wait in patient.
b) cd microb-engine/microb-engine
c) fakeroot apt-get build-dep microb-engine
d) fakeroot dpkg-buildpackage -d -us -uc -nc
After building, the mozilla source files are located in mozilla/built-tree, and generated results files (tools, libs, and headers) are located in diectory debian;
but no any debian package is generated.

4 XPCOM Component Trouble Shoot
1) Copy component files (XXX.so and XXX.xpt) from PC to device via command 'scp', after installed, the compontent can't work.
Solution: Don't copy component files via 'scp'; you need mount n810 to PC as USB memory card, then copy component files to mounted memory card.


5 Export Environment to browser
1) Export environment variable in /etc/init.d/tablet-browser-daemon, or /etc/osso-af-init/af-defines.sh (the later is loaded in the former)
2) Reboot device or execute '/etc/init.d/tablet-browser-daemon stop', wait for several seconds, then execute '/etc/init.d/tablet-browser-daemon sart'


Trouble Shooting
1)
Error message:
$ /scratchbox/login

Welcome to Scratchbox, the cross-compilation toolkit!

Use 'sb-menu' to change your compilation target.
See /scratchbox/doc/ for documentation.

Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!

Solution:
# echo 0 > /proc/sys/vm/vdso_enabled

2),
Error Message:
mmap:permission denied

Solution:
# echo 4096 > /proc/sys/vm/mmap_min_addr

Startup application automatically on boot time:
insert following lines
if [ -x xxx ]; then
  exec xxx &
fi
into /etc/osso-af-init/real-af-base-application (before ";; stop)");


2),
Error:
N810 can't be mounted to host automatically once it is connected via USB cable.

Solution:
1) mknod /dev/sdb b 8 16
   mknod /dev/sdb1 b 8 17
2) udevadm trigger
3) mount /dev/sdb1 /mnt



desktop icon
gtk-update-icon-cache -f /usr/share/icons/hicolor
maemo-select-menu-location xxx.desktop


Run gtk+ application
run-standalone.sh

Introduction Document
CS632 INTRODUCTION NOKIA N810
~jinsoo/course/cs632/slides/N810intro_project1.pdf


n810 notification:

一般来说,LibOSSO通过3个步骤可以接受和操作事件:

1.        通过LibOSSO文件原因实现必须的事件操作回调函数。
2.        注册/签署事件设置回调函数参数。
3.       
依据事件类型,可以从LibOSSO注销回调函数。

硬件事件 D-Bus从硬件或系统底层传送事件或信号

  • 设备模式改变:该设备模式被改变(例如从电源模式进入电池模式)。
  • 关机事件:设备或系统将被关闭。
  • 低内存事件:设备或系统的内存不足。
  • 停止事件:通报应用程序减少活动,通常在显示器关闭时不公开传送。
  • 保存用户数据事件:提示应用程序保存数据。(详见)。  

osso_hw_set_event_cb/osso_hw_unset_event_cb

系统时间和现场事件
osso_locale_change_set_notification_cb/osso_time_set_notification_cb    osso_time_set/osso_locale_set



Grap screen shots tools
osso-screenshot-tool
o/



Download becomeroot_0.1-2_armel.deb


阅读(2209) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~