在fedora10上构建moblin2.1环境,需要安装chroot
20100502
因为intel嵌入式全国邀请赛的需要,在moblin2.1上开发软件,所以需要在fedora10撒谎那个构建chroot,方法参照了培训教程,如下:
(1)Installing Linux development tools
You should have the following development tools installed:
Gcc,g++,make,autoconf,libtoolize,gtkdocize,gettext,man,devhelp,
在fedora10上执行
$sudo yum install gcc-c++ make automake man intltool libtool gtk-doc devhelp glib2-devel
(2)develop chroot
Develop using chroot setup
Install Moblin Image Creator2 which contains moblin-chroot
Install from source code:
http://moblin.org/documentation/moblin-image-creator-
2/installation
或者:
$git clone git://git.moblin.org/moblin-image-creator-2
$cd moblin-image-creator-2
$sudo ./tools/moblin-check-alldeps
$make clean
$make
$sudo make install
(3)Create chroot from the Moblin 2.1 image
Extracts Moblin 2.1 file system to a subdirectory on your
development machine
After chroot to this file system, you are working as the same as
working inside the Moblin 2.1 environment, allows you to build and
run your application as on a Moblin 2.1 device.
$ sudo moblin-chroot -s /opt/mobln2.1 /home/user/Downloads/moblin-
2.1-Menlow_SDK_20100222.iso
到这里也许会出现一个错误,这是因为unsquashfs本版太低,下载一个更高级的本版
Filesystem on /var/tmp/mic-tmp-zJFcyE/LiveOS/squashfs.img is (4:0),which is a later filesystem version than I support!
Error:ImageMount:Failed to uncompress /var/tmp/mic-tmp-zJFcyE/LiveOS/squashfs.img
安装到usr/sbin目录
安装完更新系统软件:
$updatedb
$locate unsquashfs
再继续执行
$ sudo moblin-chroot -s /opt/mobln2.1 /home/user/Downloads/moblin-
2.1-Menlow_SDK_20100222.iso
安装完毕。
(4)Develop using Chroot – map directory
(From desktop) Map desktop dbus to the chroot dbus
$ sudo mount --bind /var/lib/dbus/ /opt/moblin2.1/var/lib/dbus/
$ sudo mount --bind /home/bob/src/ /opt/moblin2.1/root/src
以后要启动moblin2.1的chroot就可以执行:
$moblin-chroot /opt/moblin2.1
完毕