(→Convert DAY1 handset image for MeeGo SDK) |
(→Build QEMUGL from source) |
||
| Line 8: | Line 8: | ||
git branch qemu-gl --track origin/qemu-gl | git branch qemu-gl --track origin/qemu-gl | ||
git checkout qemu-gl | git checkout qemu-gl | ||
| - | Configure qemu-gl. Make sure that there is KVM enabled and | + | 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 | ./configure --target-list=i386-softmmu --enable-gl | ||
Check the output of configure has below strings: | Check the output of configure has below strings: | ||
This page describes how to build the MeeGo SDK QEMU tools from source, including QEMU binary, patched kernel module, and stub libGL.
Contents |
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
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
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"
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/".
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