#第一部分
#首先确保scratchbox工具工作正常,具体方法可以参考:scratchbox.sh 脚本进行安装
#第二部分
#利用scratchbox 添加目标系统
1)对刚添加的目标系统进行修改,s3c2410开发板使用的工具链是:arm-linux-gcc-3.4.4-glibc-2.3.5,有几个错误必须
手动进行修改(在scratchbox中进行):
rm -rf /usr/lib/libstdc++.*
rm -rf /usr/lib/libgcc_s.so
cp /scratchbox/compilers/arm-linux-gcc-3.4.4-glibc-2.3.5/arm-unknown-linux-gnu/lib/libstdc++.* /usr/lib -rf
cp /scratchbox/compilers/arm-linux-gcc-3.4.4-glibc-2.3.5/arm-unknown-linux-gnu/lib/libgcc_s.* /usr/lib -rf
rm /usr/lib/libgcc_s.dir/ -rf
rm /usr/lib/libstdc++.dir/ -rf
如果 碰到glib-2.4 not found 用下面的方法解决
cd /scratchbox/host_shared/lib/
cp /scratchbox/compilers/oe-x86-new2/i486-linux/lib/libc-2.5.so ./
sudo ln libc-2.5.so libc.so.6 -sf
cp /scratchbox
cp /scratchbox/compilers/oe-x86-new2/i486-linux/lib/ld-2.5.so ./
ln -sf ld-2.5.so ld.so
ln -sf ld-2.5.so ld-linux.so.2
cp /scratchbox/compilers/oe-x86-new2/i486-linux/lib/libdl-2.5.so ./
ln -sf libdl-2.5.so libdl.so.2
ln -sf libdl.so.2 libdl.so
cp /scratchbox/compilers/oe-x86-new2/i486-linux/lib/libpthread-2.5.so ./
2)目标系统还没有设备文件,这些我们可以通过从a780里面考过来(在pc机上操作):
rm /nfsroot/rootfs
ln -sv /nfsroot/targets/s3c2410-usr /nfsroot/rootfs
sudo cp /nfsroot/a780/dev/ /nfsroot/rootfs/ -raf
在目标机器上创建一下设备节点:
mknod /dev/ts c 13 128
mknod /dev/dsp c 14 3
mknod /ttyUSB0 c 188 0
ln -s ttyUSB0 ttyS1
ts节点给触摸屏使用
注意:如果设备节点的次设备号不是128,那么将会无法打开设备,暂时还不知道原因
说明:/nfsroot/targets -> /scratchbox/users/mhf/targets
3)触摸屏部分
首先确保目标机器上创建了触摸屏设备节点;
sysconfdir=/etc
WORKDIR=/scratchbox/source/usr/scripts
install -m 0644 ${WORKDIR}/ts.conf ${S}/etc/ts.conf
install -d ${sysconfdir}/profile.d/
install -m 0755 ${WORKDIR}/tslib.sh ${sysconfdir}/profile.d/
vim /etc/ts.conf
取消以下屏蔽项:
#module_raw corg
如果你触摸屏驱动程序支持ioctl操作,上面的configure操作中的--enable-inputapi=no]你可以删除
################################################################
下面分别是嵌入式busybox 和 Systeminit 使用的 /etc/inittab文件内容,他们的格式有所不同;
#!/bin/sh
::sysinit:/etc/init.d/rcS
#l0:0:wait:/etc/init.d/rc 0
#l1:1:wait:/etc/init.d/rc 1
#l2:2:wait:/etc/init.d/rc 2
#l3:3:wait:/etc/init.d/rc 3
#l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
#l6:6:wait:/etc/init.d/rc 6
console::respawn:-/bin/sh
::ctrlaltdel:/bin/umount -a -r
#!~/bin/sh
id:5:initdefault:
si::sysinit:/etc/init.d/rcS
~~:S:wait:/sbin/sulogin
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
z6:6:respawn:/sbin/sulogin
S:2345:respawn:/sbin/getty 115200 ttyS0
1:2345:respawn:/sbin/getty 38400 tty1
############################################################
4)xserver启动相关
首先是必须设置默认的字体和光标字体
我们在编译xorg的时候已经通过,
安装记录:
1>在安装build extra popt的时候,在/usr/share/locale/目录下生成了很多包
而a780是在/usr/share/i18n/locates/目录
2>
PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
make
sysconfdir=/etc
install -d ${D}/mnt/.psplash/
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash
-》首先执行/etc/rcS.d/下面的脚本,在执行S05devices脚本的时候会停止,主要是脚本中的
/sbin/makedevs -r / -D /etc/device_table出错,我们不能使用busybox的makedevs,必须
自己添加,同时要在etc目录下添加device_table文件。
-》然后根据inittab文件来执行rcx.d下面的脚本
/etc/matchbox/session
/etc/X11/phonesession
/etc/X11/Xserver 脚本来启动X
. /etc/profile 确保这个文件存在
在你的`Makefile.in'文件中添加、和,以便它们可以在configure运行的时候利用环境中的这些变量的值。这样做不是必须的,但对用户来说比较方便。
################################################################
GPE-ERROR: Couldn't recognize the image file format for file
> '/usr/share/gpe/pixmaps/default/preferences.png'
################################################################
*xserver-common-1.16
安装的主要脚本有:
for i in X11/Xsession.d X11/Xinit.d; do install -d /etc/$i; FILES=`echo $i/* | sed "s:$i/CVS::"`; install -m 755 $FILES /etc/$i/; done
install -d /usr/bin
install -m 755 run-calibrate.sh /usr/bin/run-calibrate.sh
install -m 644 X11/Xdefaults /etc/X11/Xdefaults
install -m 755 X11/Xinit /etc/X11/Xinit
install -m 755 X11/Xserver /etc/X11/Xserver
install -m 755 X11/Xsession /etc/X11/Xsession
install -m 644 X11/*.xmodmap /etc/X11/
install -m 644 X11/xmodmap-* /etc/X11/
#################################################################
gpe-session-scripts-0.67.tar.gz
gpe-session-scripts-phone_0.67.bb
--------------------------------
sysconfdir=/etc
SCRIPTSDIR=/scratchbox/source/scripts
SRCDIR=/scratchbox/source/usr/gpe-session-scripts-0.67
install -d /usr/bin
install -d /etc/gpe
install -m 644 X11/xsettings.default /etc/gpe/
install -m 644 standard.mbdock /etc/gpe/gpe.mbdock
mkdir -p /usr/share/pixmaps
install -m 644 gpe-logout.png /usr/share/pixmaps
install -m 644 gpe-logout-menu.png /usr/share/pixmaps
mkdir -p /usr/share/applications
install -m 644 gpe-logout.desktop /usr/share/applications
mkdir -p /usr/bin
install gpe-logout.sh /usr/bin/gpe-logout
install gpe-auto-bluetooth.sh /usr/bin/gpe-auto-bluetooth
install -d ${sysconfdir}/gpe/xsettings-default.d
install -d ${sysconfdir}/matchbox
install ${SCRIPTSDIR}/matchbox-session ${sysconfdir}/matchbox/session
install -d ${D}${sysconfdir}/X11
install -m 755 ${WORKDIR}/phonesession ${sysconfdir}/X11/phonesession
mv ${D}/usr/bin/gpe-logout ${D}/usr/bin/gpe-logout.matchbox
#################################################################
gpe-login-0.88.tar.gz
sysconfdir=/etc
SCRIPTSDIR=/scratchbox/source/scripts
SRCDIR=/scratchbox/source/usr/gpe-login-0.88
install -d /usr/bin
install -s gpe-login /usr/bin/gpe-login
install -s gpe-lock-display /usr/bin/gpe-lock-display
install -d /etc/X11
install -m 755 gpe-login.setup /etc/X11/gpe-login.setup
install -m 644 gpe-login.keylaunchrc /etc/X11/gpe-login.keylaunchrc
install -m 644 X11/gpe-login.gtkrc /etc/X11/gpe-login.gtkrc
install -m 755 X11/gpe-login.pre-session /etc/X11/gpe-login.pre-session
install -d /etc/apm/resume.d
install -m 644 gpe-login.suspend /etc/apm/resume.d/S98lock-display
install -d /etc/X11/Xsession.d
install -m 755 gpe-login.session /etc/X11/Xsession.d/50autolock
install -d /etc/X11/Xinit.d
install -m 755 gpe-login.xinit /etc/X11/Xinit.d/99gpe-login
install -d /etc/gpe
install -m 644 gpe-login.conf /etc/gpe/
install -m 644 locale.alias /etc/gpe/
install -d /etc/sysconfig
install -m 644 gpe-login.sysconfig /etc/sysconfig/gpelogin
if [ "xzh_CN wa nl sv ja tr de sr pt_BR sk sl ko ro vi rw hu pt es ru cs zh_TW fr " != "x" ]; then \
for i in zh_CN wa nl sv ja tr de sr pt_BR sk sl ko ro vi rw hu pt es ru cs zh_TW fr ; do mkdir -p /home/oe/build_a780/work/armv5te-angstrom-linux-gnueabi/gpe-login-0.88-r1/image/usr/share/locale/$i/LC_MESSAGES; install -m 644 po/$i.mo /home/oe/build_a780/work/armv5te-angstrom-linux-gnueabi/gpe-login-0.88-r1/image/usr/share/locale/$i/LC_MESSAGES/gpe-login.mo; done \
#################################################################
*gpe-dm
在安装gpe-dm之前首先确保安装了:xserver-common-1.16这个包,它包含了一些基本脚本如:Xserver,Xinit等
1)在main()函数中调用/etc/X11/Xserver 这个脚本启动X
2)在main()函数中调用/etc/X11/Xinit这个脚本启动X相关
3)在/etc/X11/Xinit脚本中有:
SYSSESSIONDIR=/etc/X11/Xinit.d
exec run-parts $SYSSESSIONDIR
run-parts 在busybox编译选项中
Debian Utilities
->[*] run-parts
选中即可;所以会执行:/etc/X11/Xinit.d下的脚本
/etc/X11/Xinit.d/01xrandr 确保有:/usr/xrandr
/etc/X11/Xinit.d/55xScreenSaver 确保有:/usr/bin/xset
/etc/X11/Xinit.d/60xXDefaults: 确保有:/usr/bin/xrdb 文件:etc/X11/Xdefaults
/scratchbox/tools/bin/install -c 'editres' '/usr/bin/editres'
test -z "/usr/share/X11/app-defaults" || mkdir -p -- "/usr/share/X11/app-defaults"
/scratchbox/tools/bin/install -c -m 644 'Editres-color' '/usr/share/X11/app-defaults/Editres-color'
/scratchbox/tools/bin/install -c -m 644 'Editres' '/usr/share/X11/app-defaults/Editres'
test -z "/usr/man/man1" || mkdir -p -- "/usr/man/man1"
/scratchbox/tools/bin/install -c -m 644 'editres.1' '/usr/man/man1/editres.1'
make[1]: Leaving directory `/scratchbox/source/usr/editres-X11R7.2-1.0.2'
离开目录:/scratchbox/source/usr/editres-X11R7.2-1.0.2
离开目录:/scratchbox/source/usr
make[1]: Leaving directory `/scratchbox/source/usr/fslsfonts-X11R7.0-1.0.1'
./gpephone.sh: line 121: install:: command not found
make[1]: Entering directory `/scratchbox/source/usr/fslsfonts-X11R7.0-1.0.1'
/bin/sh ./mkinstalldirs /usr/bin
/scratchbox/tools/bin/install -c fslsfonts /usr/bin/fslsfonts
/bin/sh ./mkinstalldirs /usr/man/man1
/scratchbox/tools/bin/install -c -m 644 fslsfonts.1x /usr/man/man1/fslsfonts.1x
make[1]: Leaving directory `/scratchbox/source/usr/fslsfonts-X11R7.0-1.0.1'
离开目录:/scratchbox/source/usr/fslsfonts-X11R7.0-1.0.1
离开目录:/scratchbox/source/usr
<< fslsfonts-X11R7.0-1.0.1.tar.bz2 包编译结束!已经退到顶层目录: /scratchbox/source >>
make[1]: Leaving directory `/scratchbox/source/usr/fstobdf-X11R7.1-1.0.2'
./gpephone.sh: line 121: install:: command not found
make[1]: Entering directory `/scratchbox/source/usr/fstobdf-X11R7.1-1.0.2'
test -z "/usr/bin" || mkdir -p -- "/usr/bin"
/scratchbox/tools/bin/install -c 'fstobdf' '/usr/bin/fstobdf'
test -z "/usr/man/man1" || mkdir -p -- "/usr/man/man1"
/scratchbox/tools/bin/install -c -m 644 'fstobdf.1x' '/usr/man/man1/fstobdf.1x'
make[1]: Leaving directory `/scratchbox/source/usr/fstobdf-X11R7.1-1.0.2'
离开目录:/scratchbox/source/usr/fstobdf-X11R7.1-1.0.2
离开目录:/scratchbox/source/usr
<< fstobdf-X11R7.1-1.0.2.tar.bz2 包编译结束!已经退到顶层目录: /scratchbox/source >>
make[1]: Leaving directory `/scratchbox/source/usr/iceauth-X11R7.0-1.0.1'
./gpephone.sh: line 121: install:: command not found
make[1]: Entering directory `/scratchbox/source/usr/iceauth-X11R7.0-1.0.1'
/bin/sh ./mkinstalldirs /usr/bin
/scratchbox/tools/bin/install -c iceauth /usr/bin/iceauth
/bin/sh ./mkinstalldirs /usr/man/man1
/scratchbox/tools/bin/install -c -m 644 iceauth.1x /usr/man/man1/iceauth.1x
make[1]: Leaving directory `/scratchbox/source/usr/iceauth-X11R7.0-1.0.1'
离开目录:/scratchbox/source/usr/iceauth-X11R7.0-1.0.1
离开目录:/scratchbox/source/usr
<< iceauth-X11R7.0-1.0.1.tar.bz2 包编译结束!已经退到顶层目录: /scratchbox/source >>
make[1]: Entering directory `/scratchbox/source/usr/ico-X11R7.0-1.0.1'
/bin/sh ./mkinstalldirs /usr/bin
/scratchbox/tools/bin/install -c ico /usr/bin/ico
/bin/sh ./mkinstalldirs /usr/man/man1
/scratchbox/tools/bin/install -c -m 644 ico.1x /usr/man/man1/ico.1x
make[1]: Leaving directory `/scratchbox/source/usr/ico-X11R7.0-1.0.1'
离开目录:/scratchbox/source/usr/ico-X11R7.0-1.0.1
离开目录:/scratchbox/source/usr
<< ico-X11R7.0-1.0.1.tar.bz2 包编译结束!已经退到顶层目录: /scratchbox/source >>
make[1]: Entering directory `/scratchbox/source/usr/luit-X11R7.2-1.0.2'
test -z "/usr/bin" || mkdir -p -- "/usr/bin"
/scratchbox/tools/bin/install -c 'luit' '/usr/bin/luit'
test -z "/usr/man/man1" || mkdir -p -- "/usr/man/man1"
/scratchbox/tools/bin/install -c -m 644 'luit.1' '/usr/man/man1/luit.1'
make[1]: Leaving directory `/scratchbox/source/usr/luit-X11R7.2-1.0.2'
离开目录:/scratchbox/source/usr/luit-X11R7.2-1.0.2
离开目录:/scratchbox/source/usr
<< luit-X11R7.2-1.0.2.tar.bz2 包编译结束!已经退到顶层目录: /scratchbox/source >>
make[1]: Entering directory `/scratchbox/source/usr/mkfontdir-X11R7.1-1.0.2'
test -z "/usr/bin" || mkdir -p -- "/usr/bin"
/scratchbox/tools/bin/install -c 'mkfontdir' '/usr/bin/mkfontdir'
test -z "/usr/man/man1" || mkdir -p -- "/usr/man/man1"
/scratchbox/tools/bin/install -c -m 644 'mkfontdir.1x' '/usr/man/man1/mkfontdir.1x'
make[1]: Leaving directory `/scratchbox/source/usr/mkfontdir-X11R7.1-1.0.2'
离开目录:/scratchbox/source/usr/mkfontdir-X11R7.1-1.0.2
离开目录:/scratchbox/source/usr
<< mkfontdir-X11R7.1-1.0.2.tar.bz2 包编译结束!已经退到顶层目录: /scratchbox/source >>
make[1]: Entering directory `/scratchbox/source/usr/mkfontscale-X11R7.2-1.0.3'
test -z "/usr/bin" || mkdir -p -- "/usr/bin"
/scratchbox/tools/bin/install -c 'mkfontscale' '/usr/bin/mkfontscale'
test -z "/usr/man/man1" || mkdir -p -- "/usr/man/man1"
/scratchbox/tools/bin/install -c -m 644 'mkfontscale.1' '/usr/man/man1/mkfontscale.1'
make[1]: Leaving directory `/scratchbox/source/usr/mkfontscale-X11R7.2-1.0.3'
离开目录:/scratchbox/source/usr/mkfontscale-X11R7.2-1.0.3
离开目录:/scratchbox/source/usr
<< mkfontscale-X11R7.2-1.0.3.tar.bz2 包编译结束!已经退到顶层目录: /scratchbox/source >>
ORBit2-2.12.2.tar.bz2
libbonobo
gnome-vfs
libgemwidget
------------------------------------------------
phoneserver启动过程
phoneserver的
main()
->tapi_initialize()
->phoneserver_pbk_initialize()
->pim_init()
注释:
phoneserver_pbk_initialize()
sms_app_init()
abook_enabler_init()
init_ui()
以上四个函数都会调用pim_init()
pim_init()
->ab_module_initialize()
->ab_plugin_init_nab()
->im_init()
->im_client_dbus_init()
通过dbus_bus_name_has_owner()判断是否有:org.lips.enabler.im
如果没有则通过:im_client_dbus_start_service()来启动
im_client_dbus_start_service()
->dbus_bus_start_service_by_name()
如果失败:
g_warning ("Failed to start up service '%s': %s",IM_DBUS_SERVICE,error.message);
如果成功:
g_warning ("service '%s' successfully started up", IM_DBUS_SERVICE);
从文件/usr/share/dbus-1/services/improxy.service
------------------------
[D-BUS Service]
Name=org.lips.enabler.im
Exec=/usr/bin/im_proxy
-------------------------
我们可以知道启动的服务进程是:/usr/bin/im_proxy
那么在dbus启动的时候它是怎样知道去/usr/share/dbus-1/services 目录路找配置文件?
这个路径是由两部分组成:
#define DBUS_DATADIR "/usr/share"
#define DBUS_UNIX_STANDARD_SESSION_SERVICEDIR "/dbus-1/services"
"/dbus-1/services"部分在dbus-1.0.2/dbus/dubs/dbus-sysdeps-unix.c 文件中定义,"/usr/share"是在编译dbus-1.0.2包的时候由./configure --prefix=/usr 参数来指定,如果--prefix=/usr/gpephone 那么相应的目录为:/usr/gpephone/share/dbus-1/services
bus_config_load()
xml_text_start_element()
bus_config_parser_start_element()
->start_busconfig_child()
->_dbus_get_standard_session_servicedirs()
->split_paths_and_append()
注意:
lips_im-0.1 编译以后会缺少improxy.service文件,所有phoneserver启动的时候对/usr/bin/im_proxy 服务的启动会失败。我们应该选择lips_im-0.2版本。
-------------------------------------------
网络文件系统
2440上uboot的引导参数
setenv bootargs console=ttySAC0 root=/dev/nfs nfsroot=192.168.2.56:/nfsroot/rootfs ip=192.168.2.188:192.168.2.56:192.168.2.56:255.255.255.0: