感谢支持
我们一直在努力

在 Linux 上使用 MeeGo SDK

介绍


Linux 下的 MeeGo SDK 有两个选择:


一是 MeeGo qemu 虚拟环境,这允许你在一个虚拟机里启动 MeeGo 系统并显示 UI 。


另一个则是基于 Xephyr 的 MeeGo chroot (change-root) 环境,该环境还包括一个启动 MeeGo 桌面的脚本,以及可以远程配置 MeeGo 设备的 Qt Creator 。


准备工作


要使用 MeeGo SDK,你需要一个比较新的 Linux 发行版 (比如 Fedora 13, Ubuntu 10.04 LTS, openSUSE 11.3),以及较新的硬件,例如:


CPU: 32位英特尔凌动处理器,或是英特尔酷睿2处理器,以及拥有相近计算能力的其他品牌处理器。


除此以外:


qemu 环境需要你的系统支持虚拟化技术(VT),以进行图形加速。请查看这个页面,以确认你的处理器支持虚拟化技术。


Xephyr 环境需要英特尔的显示芯片。


下载 MeeGo SDK 镜像


镜像类型 文件尺寸 文件 MD5效验和


Netbook 压缩包 507MB


解压后 3.1GB meego-netbook-ia32-1.0.80.12.20100727.1-sdk-pre0729.tar.bz2 压缩包: b74fc7240795c57591b25d5eb635db8c


解压后: 96fa4b33e1d9bacfc0c76bc236b3acd1


Handset 压缩包 352MB


解压后 3.1 GB meego-handset-ia32-1.0.80.9.20100706.1-sdk-pre0729.tar.bz2 压缩包: 12803fd8e64e6426fae82dd3ca518a84


解压后: 2f48eca3eadab67a53049c533cec3bd9


自己编译:如果你需要从自己编译 qemu-gl 和以上镜像,请看这里:QEMU tools page.


解压镜像:


$ tar xvjf <镜像压缩包>


配置 qemu 或 Xephyr 环境


下载并解压了 SDK 镜像后,请参阅以下页面进行配置:


配置 MeeGo QEMU 环境

Build QEMUGL from source
Checkout the QEMU GL source code


git clone git://gitorious.org/meego-developer-tools/meego-emulator-qemugl-x86.git
Switch to qemu-gl branch


cd meego-emulator-qemugl-x86
git branch qemu-gl –track origin/qemu-gl
git checkout qemu-gl
Configure qemu-gl. Make sure that there is KVM enabled and that the following libraries (development package) are installed on the host machine: zlib, libSDL, Xcomposite.


./configure –target-list=i386-softmmu –enable-gl
Check the output of configure has below strings:


SDL support   yes
……
KVM support   yes
build the qemu-gl


make
sudo make install
The /usr/local/bin/qemugl will be generated


Create images for QEMU with GL acceleration
Convert normal MeeGo netbook image for MeeGo SDK
If you have had formal released netbook images in hand, for instance, the image from http://meego.com/downloads/releases/1.0/meego-v1.0-netbooks, below describes how to make them run in QEMU with GL acceleration.


Create raw image file for MeeGo to install on. “qemu-img” is available after install a normal qemu image on host:


qemu-img create -f raw meego1.0-netbook.raw 3.5G
Install MeeGo to raw image from the live image:


qemugl -m 1024 -enable-kvm -boot d -hda meego1.0-netbook.raw -cdrom meego-netbook-chromium-ia32-1.0-20100524.1.img -vga std
Start the MeeGo into single user mode. (Press “Tab” in booting up, and add “s” in kernel arguments), and run below command:


chmod u+s /usr/bin/Xorg
Add a new repo file to “/etc/yum.repos.d/” (if you are using yum) or “/etc/zypp/repos.d/” (if you are using zypper). File name could be “meego-sdk.repo”, and content is as below:


[meego-sdk]
name=meego-sdk
failovermethod=priority
baseurl=http://download.meego.com/live/Tools:/SDK/Trunk/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego
gpgcheck=1
enabled=1
Run “yum” or “zypper” to install qemugl addon package to the image:


sudo yum install meego-sdk-qemugl-addon-netbook
or


sudo zypper install meego-sdk-qemugl-addon-netbook
The packages could be downloaded directly from http://download.meego.com/live/Tools:/SDK/Trunk/i586/ and installed manually with “rpm -i” command.


Build kernel and modules version 2.6.33 from below section “Build kernel with virtio-gl kernel module”. After those steps, install the new kernel into the image.


We are done now. The new image could be started in QEMU with below command:


qemugl -m 1024  -boot c -hda meego1.0-netbook.raw -net user,hostfwd=tcp:127.0.0.1:6666-:22 -net nic,model=e1000 -enable-kvm \
       -vga std -enable-gl -device virtio-gl-pci
Convert DAY1 handset image for MeeGo SDK
If you have had DAY1 handset image downloaded, below describes how to make them run in QEMU with GL acceleration.


download DAY1 tarball from http://meego.com/downloads/releases/1.0.80.8/meego-handset-day1-developer-preview, and untar the file


tar xjvf meego-handset-ia32-aava-mtf-1.0.80.8.20100629.1-mrstnand.tar.bz2
Build kernel and modules version 2.6.35 from below section “Build kernel with virtio-gl kernel module”, to get a kernel file and module directory. Supppose the kernel file is “bzImage”.


qemugl -m 1024  -boot c -hda meego-handset-ia32-aava-mtf-1.0.80.8.20100629.1-sda.bin -vga std -kernel bzImage \
       –append “root=/dev/sda1 init s”
Install some packages as follow:


zypper install xorg-x11-drv-vesa
zypper install mesa-dri-swrast-driver
zypper install openssh-server
zypper install gdb-gdbserver
Copy the kernel modules into the image. Suppose that there have been modules.tgz in host machine built from kernel build step above:


scp host@ipaddress:modules.tgz .
tar xzvf modules.tgz
mv module_directory /lib/modules/
Add a new repo file to “/etc/zypp/repos.d/”. File name could be “meego-sdk.repo”, and content is as below:


[meego-sdk]
name=meego-sdk
failovermethod=priority
baseurl=http://download.meego.com/live/Tools:/SDK/Trunk/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego
gpgcheck=1
enabled=1
Run “zypper” to install qemugl addon package to the image:


zypper install meego-sdk-qemugl-addon-handset
We are done now. The new image could be started in QEMU with below command:


qemugl -m 1024  -boot c -hda meego-handset-ia32-aava-mtf-1.0.80.8.20100629.1-sda.bin -net user,hostfwd=tcp:127.0.0.1:6666-:22 -net \
       nic,model=e1000 -vga std -enable-gl -enable-kvm -device virtio-gl-pci -kernel bzImage –append “root=/dev/sda1”
Build packages for image running with QEMU GL
Build kernel with virtio-gl kernel module
In order to use GL acceleration in QEMU, Kernel needs to be rebuilt with the virtio-gl kernel module. The “virtio-gl” module is responsible for data communication between client OS and QEMU host for GL acceleration. The README in below link could be followed to build a new kernel and modules. The “kernel-netbook.config” should be used in step 8.c in README:


http://meego.gitorious.org/meego-developer-tools/meego-emulator-virtiogl-x86/trees/master


After those steps, the kernel is available in “/boot/vmlinuz-xxx” and modules are in “/lib/modules/”.


Build qemugl addon
The addon package installed in above section could be built from source as well. This step is not needed if you have followed above steps to use the pre-built package already.


Checkout stub libGL source code


git clone git://gitorious.org/meego-developer-tools/meego-emulator-libgl-x86.git
Switch to chroot environment, or copy the source to a netbook running MeeGo, then run make


make

赞(0) 打赏
转载请注明出处:服务器评测 » 在 Linux 上使用 MeeGo SDK
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏