<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.meego.com/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.meego.com/index.php?title=Special:Contributions/Edmondas&amp;feed=atom&amp;limit=50&amp;target=Edmondas&amp;year=&amp;month=</id>
		<title>MeeGo wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.meego.com/index.php?title=Special:Contributions/Edmondas&amp;feed=atom&amp;limit=50&amp;target=Edmondas&amp;year=&amp;month="/>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Special:Contributions/Edmondas"/>
		<updated>2013-06-19T13:40:56Z</updated>
		<subtitle>From MeeGo wiki</subtitle>
		<generator>MediaWiki 1.16.2</generator>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-23T12:27:50Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* About me */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== About me ===&lt;br /&gt;
MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developers support on #meego-sdk and mailinglist.&lt;br /&gt;
You can find me on freenode as eg81.&lt;br /&gt;
&lt;br /&gt;
=== Pages created by me ===&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;br /&gt;
&lt;br /&gt;
[[SDK/Sysroot_extension]]&lt;br /&gt;
&lt;br /&gt;
[[User:Edmondas/Meego_SDK_on_Ubuntu_11.04|Meego SDK on Ubuntu 11.04]]&lt;br /&gt;
&lt;br /&gt;
=== MeeGo SDK ===&lt;br /&gt;
[[SDKBugTriageMinutesArchive|SDK bug triages]]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/buglist.cgi?query_format=advanced&amp;amp;emailtype2=substring&amp;amp;bug_status=NEW&amp;amp;bug_status=NEEDINFO&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=WAITING%20FOR%20UPSTREAM&amp;amp;bug_status=REOPENED&amp;amp;email2=ext-edmondas.girkantas%40nokia.com&amp;amp;emailassigned_to2=1 Bugs assigned to me]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/show_bug.cgi?id=14245 METABUG: Bugs assigned to @nokia.com]&lt;br /&gt;
&lt;br /&gt;
=== OBS ===&lt;br /&gt;
[[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114|OBS setup on OpenSuse 11.4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Stskeeps/10_easy_steps_to_a_local_OBS|10 easy steps to a local OBS]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-13T11:38:34Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* MeeGo SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== About me ===&lt;br /&gt;
MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developers support on #meego-sdk and mailinglist.&lt;br /&gt;
&lt;br /&gt;
=== Pages created by me ===&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;br /&gt;
&lt;br /&gt;
[[SDK/Sysroot_extension]]&lt;br /&gt;
&lt;br /&gt;
[[User:Edmondas/Meego_SDK_on_Ubuntu_11.04|Meego SDK on Ubuntu 11.04]]&lt;br /&gt;
&lt;br /&gt;
=== MeeGo SDK ===&lt;br /&gt;
[[SDKBugTriageMinutesArchive|SDK bug triages]]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/buglist.cgi?query_format=advanced&amp;amp;emailtype2=substring&amp;amp;bug_status=NEW&amp;amp;bug_status=NEEDINFO&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=WAITING%20FOR%20UPSTREAM&amp;amp;bug_status=REOPENED&amp;amp;email2=ext-edmondas.girkantas%40nokia.com&amp;amp;emailassigned_to2=1 Bugs assigned to me]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/show_bug.cgi?id=14245 METABUG: Bugs assigned to @nokia.com]&lt;br /&gt;
&lt;br /&gt;
=== OBS ===&lt;br /&gt;
[[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114|OBS setup on OpenSuse 11.4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Stskeeps/10_easy_steps_to_a_local_OBS|10 easy steps to a local OBS]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-13T11:38:12Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* MeeGo SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== About me ===&lt;br /&gt;
MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developers support on #meego-sdk and mailinglist.&lt;br /&gt;
&lt;br /&gt;
=== Pages created by me ===&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;br /&gt;
&lt;br /&gt;
[[SDK/Sysroot_extension]]&lt;br /&gt;
&lt;br /&gt;
[[User:Edmondas/Meego_SDK_on_Ubuntu_11.04|Meego SDK on Ubuntu 11.04]]&lt;br /&gt;
&lt;br /&gt;
=== MeeGo SDK ===&lt;br /&gt;
[[SDKBugTriageMinutesArchive|SDK bug triages]]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/buglist.cgi?query_format=advanced&amp;amp;emailtype2=substring&amp;amp;bug_status=NEW&amp;amp;bug_status=NEEDINFO&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=WAITING%20FOR%20UPSTREAM&amp;amp;bug_status=REOPENED&amp;amp;email2=ext-edmondas.girkantas%40nokia.com&amp;amp;emailassigned_to2=1 Bugs assigned to me]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/show_bug.cgi?id=14245|METABUG: bugs assigned to @nokia.com]&lt;br /&gt;
&lt;br /&gt;
=== OBS ===&lt;br /&gt;
[[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114|OBS setup on OpenSuse 11.4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Stskeeps/10_easy_steps_to_a_local_OBS|10 easy steps to a local OBS]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-13T11:36:33Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Pages created by me */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== About me ===&lt;br /&gt;
MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developers support on #meego-sdk and mailinglist.&lt;br /&gt;
&lt;br /&gt;
=== Pages created by me ===&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;br /&gt;
&lt;br /&gt;
[[SDK/Sysroot_extension]]&lt;br /&gt;
&lt;br /&gt;
[[User:Edmondas/Meego_SDK_on_Ubuntu_11.04|Meego SDK on Ubuntu 11.04]]&lt;br /&gt;
&lt;br /&gt;
=== MeeGo SDK ===&lt;br /&gt;
[[SDKBugTriageMinutesArchive|SDK bug triages]]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/buglist.cgi?query_format=advanced&amp;amp;emailtype2=substring&amp;amp;bug_status=NEW&amp;amp;bug_status=NEEDINFO&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=WAITING%20FOR%20UPSTREAM&amp;amp;bug_status=REOPENED&amp;amp;email2=ext-edmondas.girkantas%40nokia.com&amp;amp;emailassigned_to2=1 Bugs assigned to me]&lt;br /&gt;
&lt;br /&gt;
=== OBS ===&lt;br /&gt;
[[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114|OBS setup on OpenSuse 11.4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Stskeeps/10_easy_steps_to_a_local_OBS|10 easy steps to a local OBS]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas/Meego_SDK_on_Ubuntu_11.04</id>
		<title>User:Edmondas/Meego SDK on Ubuntu 11.04</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas/Meego_SDK_on_Ubuntu_11.04"/>
				<updated>2011-09-13T11:35:37Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' the latest installer has support for Ubuntu 11.04 (get it from here http://wiki.meego.com/SDK/1.2/Installer_Status)&lt;br /&gt;
&lt;br /&gt;
Some notes how you can install MeeGo SDK 1.2 on Ubuntu 11.04:&lt;br /&gt;
&lt;br /&gt;
1. Download MeeGo SDK installer:&lt;br /&gt;
 wget http://sdk.meego.com/installer/Linux/meego-sdk-installer-online-20110519&lt;br /&gt;
 chmod u+x meego-sdk-installer-online-20110519&lt;br /&gt;
&lt;br /&gt;
2. Start installation process and wait till you will get &amp;quot;Error during installation&amp;quot; message, do not close this window:&lt;br /&gt;
 ./meego-sdk-installer-online-20110519&lt;br /&gt;
&lt;br /&gt;
3. Open terminal and fix MeeGo repository definition, replace &amp;quot;Invalid&amp;quot; with &amp;quot;Ubuntu/10.10&amp;quot; in /etc/apt/sources.list.d/meego-sdk.list file, e.g.:&lt;br /&gt;
 sudo sed -i 's/Invalid/ubuntu\/10.10/' /etc/apt/sources.list.d/meego-sdk.list&lt;br /&gt;
&lt;br /&gt;
4. Add repository key:&lt;br /&gt;
 gpg --recv 0BC7BEC479FC1F8A&lt;br /&gt;
 gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
5. Update the packages database:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
6. Press &amp;quot;retry&amp;quot; button, then installation process will continue.&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-13T11:07:43Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Other useful pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== About me ===&lt;br /&gt;
MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developers support on #meego-sdk and mailinglist.&lt;br /&gt;
&lt;br /&gt;
=== Pages created by me ===&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;br /&gt;
&lt;br /&gt;
[[SDK/Sysroot_extension]]&lt;br /&gt;
&lt;br /&gt;
=== MeeGo SDK ===&lt;br /&gt;
[[SDKBugTriageMinutesArchive|SDK bug triages]]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.meego.com/buglist.cgi?query_format=advanced&amp;amp;emailtype2=substring&amp;amp;bug_status=NEW&amp;amp;bug_status=NEEDINFO&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=WAITING%20FOR%20UPSTREAM&amp;amp;bug_status=REOPENED&amp;amp;email2=ext-edmondas.girkantas%40nokia.com&amp;amp;emailassigned_to2=1 Bugs assigned to me]&lt;br /&gt;
&lt;br /&gt;
=== OBS ===&lt;br /&gt;
[[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114|OBS setup on OpenSuse 11.4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Stskeeps/10_easy_steps_to_a_local_OBS|10 easy steps to a local OBS]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-13T07:18:09Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added new link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== About me ===&lt;br /&gt;
MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developers support on #meego-sdk and mailinglist.&lt;br /&gt;
&lt;br /&gt;
=== Pages created by me ===&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;br /&gt;
&lt;br /&gt;
[[SDK/Sysroot_extension]]&lt;br /&gt;
&lt;br /&gt;
=== Other useful pages ===&lt;br /&gt;
[[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE114|OBS setup on OpenSuse 11.4]]&lt;br /&gt;
&lt;br /&gt;
[[User:Stskeeps/10_easy_steps_to_a_local_OBS|10 easy steps to a local OBS]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-13T07:16:58Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: minor changes, added new links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== About me ===&lt;br /&gt;
MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developers support on #meego-sdk and mailinglist.&lt;br /&gt;
&lt;br /&gt;
=== Pages created by me ===&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;br /&gt;
&lt;br /&gt;
[[SDK/Sysroot_extension]]&lt;br /&gt;
&lt;br /&gt;
=== Other useful pages ===&lt;br /&gt;
[[User:Stskeeps/10_easy_steps_to_a_local_OBS|10 easy steps to a local OBS]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-13T07:02:52Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added link to new howto&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developer support on #meego-sdk and mailinglist&lt;br /&gt;
&lt;br /&gt;
[[User:Edmondas/Building ARM sysroot|Building ARM sysroot]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot</id>
		<title>User:Edmondas/Building ARM sysroot</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot"/>
				<updated>2011-09-13T06:54:42Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added note about system used during testing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Building ARM sysroot'''&lt;br /&gt;
&lt;br /&gt;
These steps were tested on fresh Ubuntu 11.04 system.&lt;br /&gt;
&lt;br /&gt;
1. Add bellow line to /etc/apt/sources.list.d/meego-sdk.list&lt;br /&gt;
 deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /&lt;br /&gt;
&lt;br /&gt;
Note: if needed import MeeGo GPG key:&lt;br /&gt;
 gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A&lt;br /&gt;
 gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
2. Update available packages&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
3. Install required tools&lt;br /&gt;
 sudo apt-get install mic2 btrfs-tools qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
Note: On Ubuntu 11.04 install qemu-kvm-extras-static instead of&lt;br /&gt;
qemu-arm-static package &lt;br /&gt;
&lt;br /&gt;
4. Get latest available kickstart file to create ARM sysroot from http://repo.meego.com/MeeGo/builds/1.2.0.90/latest/builddata/image-configs/, e.g.:&lt;br /&gt;
 wget http://repo.meego.com/MeeGo/builds/1.2.0.90/1.2.0.90.12.20110809.2/builddata/image-configs/handset-armv7hl-madde-sysroot.ks&lt;br /&gt;
&lt;br /&gt;
5. Try to build tarball with ARM sysroot:&lt;br /&gt;
 sudo mic-image-creator --format=fs --compress-disk-image=none --package=tar.bz2 --arch=armv7hl --save-kernel --config=handset-armv7hl-madde-sysroot.ks --release=1.2.0.90.12.20110809.2 &lt;br /&gt;
&lt;br /&gt;
'''Troubleshooting:'''&lt;br /&gt;
 &lt;br /&gt;
Add parameters --verbose --debug if it will fail for any reason &lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy, you can set it to mic by adding&lt;br /&gt;
 proxy=http://proxy.yourcompany.com:8080&lt;br /&gt;
 to /etc/mic2/mic2.conf. &lt;br /&gt;
&lt;br /&gt;
If installation of packages fails for some reason then change package manager to yum:&lt;br /&gt;
--pkgmgr=yum&lt;br /&gt;
&lt;br /&gt;
Disable vdso:&lt;br /&gt;
 echo 0 | sudo tee /proc/sys/vm/vdso_enabled&lt;br /&gt;
&lt;br /&gt;
If something goes wrong try to remove old meego bootstrap:&lt;br /&gt;
 rm -rf /var/cache/meego-bootstrap&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot</id>
		<title>User:Edmondas/Building ARM sysroot</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot"/>
				<updated>2011-09-13T06:53:49Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Building ARM sysroot'''&lt;br /&gt;
&lt;br /&gt;
1. Add bellow line to /etc/apt/sources.list.d/meego-sdk.list&lt;br /&gt;
 deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /&lt;br /&gt;
&lt;br /&gt;
Note: if needed import MeeGo GPG key:&lt;br /&gt;
 gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A&lt;br /&gt;
 gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
2. Update available packages&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
3. Install required tools&lt;br /&gt;
 sudo apt-get install mic2 btrfs-tools qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
Note: On Ubuntu 11.04 install qemu-kvm-extras-static instead of&lt;br /&gt;
qemu-arm-static package &lt;br /&gt;
&lt;br /&gt;
4. Get latest available kickstart file to create ARM sysroot from http://repo.meego.com/MeeGo/builds/1.2.0.90/latest/builddata/image-configs/, e.g.:&lt;br /&gt;
 wget http://repo.meego.com/MeeGo/builds/1.2.0.90/1.2.0.90.12.20110809.2/builddata/image-configs/handset-armv7hl-madde-sysroot.ks&lt;br /&gt;
&lt;br /&gt;
5. Try to build tarball with ARM sysroot:&lt;br /&gt;
 sudo mic-image-creator --format=fs --compress-disk-image=none --package=tar.bz2 --arch=armv7hl --save-kernel --config=handset-armv7hl-madde-sysroot.ks --release=1.2.0.90.12.20110809.2 &lt;br /&gt;
&lt;br /&gt;
'''Troubleshooting:'''&lt;br /&gt;
 &lt;br /&gt;
Add parameters --verbose --debug if it will fail for any reason &lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy, you can set it to mic by adding&lt;br /&gt;
 proxy=http://proxy.yourcompany.com:8080&lt;br /&gt;
 to /etc/mic2/mic2.conf. &lt;br /&gt;
&lt;br /&gt;
If installation of packages fails for some reason then change package manager to yum:&lt;br /&gt;
--pkgmgr=yum&lt;br /&gt;
&lt;br /&gt;
Disable vdso:&lt;br /&gt;
 echo 0 | sudo tee /proc/sys/vm/vdso_enabled&lt;br /&gt;
&lt;br /&gt;
If something goes wrong try to remove old meego bootstrap:&lt;br /&gt;
 rm -rf /var/cache/meego-bootstrap&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot</id>
		<title>User:Edmondas/Building ARM sysroot</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot"/>
				<updated>2011-09-13T06:53:19Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: removed notice about draft version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Building ARM sysroot'''&lt;br /&gt;
&lt;br /&gt;
1. Add bellow line to /etc/apt/sources.list.d/meego-sdk.list&lt;br /&gt;
 deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /&lt;br /&gt;
&lt;br /&gt;
Not: if needed import MeeGo GPG key:&lt;br /&gt;
 gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A&lt;br /&gt;
 gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
2. Update available packages&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
3. Install required tools&lt;br /&gt;
 sudo apt-get install mic2 btrfs-tools qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
Note: On Ubuntu 11.04 install qemu-kvm-extras-static instead of&lt;br /&gt;
qemu-arm-static package &lt;br /&gt;
&lt;br /&gt;
4. Get latest available kickstart file to create ARM sysroot from http://repo.meego.com/MeeGo/builds/1.2.0.90/latest/builddata/image-configs/, e.g.:&lt;br /&gt;
 wget http://repo.meego.com/MeeGo/builds/1.2.0.90/1.2.0.90.12.20110809.2/builddata/image-configs/handset-armv7hl-madde-sysroot.ks&lt;br /&gt;
&lt;br /&gt;
5. Try to build tarball with ARM sysroot:&lt;br /&gt;
 sudo mic-image-creator --format=fs --compress-disk-image=none --package=tar.bz2 --arch=armv7hl --save-kernel --config=handset-armv7hl-madde-sysroot.ks --release=1.2.0.90.12.20110809.2 &lt;br /&gt;
&lt;br /&gt;
'''Troubleshooting:'''&lt;br /&gt;
 &lt;br /&gt;
Add parameters --verbose --debug if it will fail for any reason &lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy, you can set it to mic by adding&lt;br /&gt;
 proxy=http://proxy.yourcompany.com:8080&lt;br /&gt;
 to /etc/mic2/mic2.conf. &lt;br /&gt;
&lt;br /&gt;
If installation of packages fails for some reason then change package manager to yum:&lt;br /&gt;
--pkgmgr=yum&lt;br /&gt;
&lt;br /&gt;
Disable vdso:&lt;br /&gt;
 echo 0 | sudo tee /proc/sys/vm/vdso_enabled&lt;br /&gt;
&lt;br /&gt;
If something goes wrong try to remove old meego bootstrap:&lt;br /&gt;
 rm -rf /var/cache/meego-bootstrap&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot</id>
		<title>User:Edmondas/Building ARM sysroot</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot"/>
				<updated>2011-09-13T06:52:16Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: minor fixes to style&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''this is draft version!'''&lt;br /&gt;
&lt;br /&gt;
1. Add bellow line to /etc/apt/sources.list.d/meego-sdk.list&lt;br /&gt;
 deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /&lt;br /&gt;
&lt;br /&gt;
Not: if needed import MeeGo GPG key:&lt;br /&gt;
 gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A&lt;br /&gt;
 gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
2. Update available packages&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
3. Install required tools&lt;br /&gt;
 sudo apt-get install mic2 btrfs-tools qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
Note: On Ubuntu 11.04 install qemu-kvm-extras-static instead of&lt;br /&gt;
qemu-arm-static package &lt;br /&gt;
&lt;br /&gt;
4. Get latest available kickstart file to create ARM sysroot from http://repo.meego.com/MeeGo/builds/1.2.0.90/latest/builddata/image-configs/, e.g.:&lt;br /&gt;
 wget http://repo.meego.com/MeeGo/builds/1.2.0.90/1.2.0.90.12.20110809.2/builddata/image-configs/handset-armv7hl-madde-sysroot.ks&lt;br /&gt;
&lt;br /&gt;
5. Try to build tarball with ARM sysroot:&lt;br /&gt;
 sudo mic-image-creator --format=fs --compress-disk-image=none --package=tar.bz2 --arch=armv7hl --save-kernel --config=handset-armv7hl-madde-sysroot.ks --release=1.2.0.90.12.20110809.2 &lt;br /&gt;
&lt;br /&gt;
'''Troubleshooting:'''&lt;br /&gt;
 &lt;br /&gt;
Add parameters --verbose --debug if it will fail for any reason &lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy, you can set it to mic by adding&lt;br /&gt;
 proxy=http://proxy.yourcompany.com:8080&lt;br /&gt;
 to /etc/mic2/mic2.conf. &lt;br /&gt;
&lt;br /&gt;
If installation of packages fails for some reason then change package manager to yum:&lt;br /&gt;
--pkgmgr=yum&lt;br /&gt;
&lt;br /&gt;
Disable vdso:&lt;br /&gt;
 echo 0 | sudo tee /proc/sys/vm/vdso_enabled&lt;br /&gt;
&lt;br /&gt;
If something goes wrong try to remove old meego bootstrap:&lt;br /&gt;
 rm -rf /var/cache/meego-bootstrap&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-12T15:20:10Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: updated my info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developer support on #meego-sdk and mailinglist&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas</id>
		<title>User:Edmondas</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas"/>
				<updated>2011-09-12T15:19:20Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added info about myself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MeeGo SDK bug fixer&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot</id>
		<title>User:Edmondas/Building ARM sysroot</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/User:Edmondas/Building_ARM_sysroot"/>
				<updated>2011-09-12T15:17:30Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added initial version of ARM sysroot building howto&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''this is draft version!'''&lt;br /&gt;
&lt;br /&gt;
1. Add bellow line to /etc/apt/sources.list.d/meego-sdk.list&lt;br /&gt;
deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /&lt;br /&gt;
&lt;br /&gt;
Not: if needed import required GPG key:&lt;br /&gt;
gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A&lt;br /&gt;
gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
2. Update available packages&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
3. Install required tools&lt;br /&gt;
sudo apt-get install mic2 btrfs-tools qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
Note: On Ubuntu 11.04 install qemu-kvm-extras-static instead of&lt;br /&gt;
qemu-arm-static package &lt;br /&gt;
&lt;br /&gt;
4. Get latest available kickstart file for arm sysroot creation, e.g.:&lt;br /&gt;
wget http://repo.meego.com/MeeGo/builds/1.2.0.90/latest/builddata/image-configs/handset-armv7hl-madde-sysroot.ks&lt;br /&gt;
&lt;br /&gt;
5. Try to build sysroot tarball:&lt;br /&gt;
sudo mic-image-creator --format=fs --compress-disk-image=none --package=tar.bz2 --arch=armv7hl --save-kernel --config=handset-armv7hl-madde-sysroot.ks --release=1.2.0.90.12.20110809.2 &lt;br /&gt;
&lt;br /&gt;
Troubleshooting: &lt;br /&gt;
Add parameters --verbose --debug if it will fail for any reason &lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy, you can set it to mic by adding&lt;br /&gt;
proxy=http://proxy.yourcompany.com:8080&lt;br /&gt;
to /etc/mic2/mic2.conf. &lt;br /&gt;
&lt;br /&gt;
If installation of packages fails for some reason then change package manager to yum:&lt;br /&gt;
--pkgmgr=yum&lt;br /&gt;
&lt;br /&gt;
Disable vdso:&lt;br /&gt;
echo 0 | sudo tee /proc/sys/vm/vdso_enabled&lt;br /&gt;
&lt;br /&gt;
If something goes wrong try to remove old meego bootstrap:&lt;br /&gt;
rm -rf /var/cache/meego-bootstrap&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDKBugTriageMinutesArchive</id>
		<title>SDKBugTriageMinutesArchive</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDKBugTriageMinutesArchive"/>
				<updated>2011-07-27T07:38:14Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added log from latest meeting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-07-27-05.55.html MeeGo SDK Bug Triage 20110727]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-07-20-05.55.html MeeGo SDK Bug Triage 20110720]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-07-06-05.57.html MeeGo SDK Bug Triage 20110706]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-29-06.00.html MeeGo SDK Bug Triage 20110629]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-22-05.57.html MeeGo SDK Bug Triage 20110622]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-15-05.58.html MeeGo SDK Bug Triage 20110615]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-08-05.57.html MeeGo SDK Bug Triage 20110608]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-25-05.58.html MeeGo SDK Bug Triage 20110525]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-18-05.58.html MeeGo SDK Bug Triage 20110518]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-11-05.58.html MeeGo SDK Bug Triage 20110511]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-04-05.59.html MeeGo SDK Bug Triage 20110504]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-04-27-05.59.html MeeGo SDK Bug Triage 20110427]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Meetings/SDK_Weekly</id>
		<title>SDK/Meetings/SDK Weekly</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Meetings/SDK_Weekly"/>
				<updated>2011-07-18T11:50:51Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Attendees */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MeeGo SDK Weekly Meeting Info =&lt;br /&gt;
&lt;br /&gt;
MeeGo SDK weekly meeting is held every Tuesday at 7:00 am PDT. Duration is 1 hour. Meeting is for syncing up between different parties and agreeing on actions to follow.&lt;br /&gt;
&lt;br /&gt;
Agenda and minutes of individual meetings can be found from [[SDK/Meetings]].&lt;br /&gt;
&lt;br /&gt;
== Attendees ==&lt;br /&gt;
&lt;br /&gt;
* [http://meego.com/users/veli Veli Kaksonen] (veli) - Project Manager&lt;br /&gt;
* Marianne Vaiciulis - Program Manager&lt;br /&gt;
* Ville Lavonius - The Man&lt;br /&gt;
* * Al Nikolov (alnikolov) - Windows &amp;amp; Mac port + Toolchain packaging&lt;br /&gt;
* Jaya Uppalapati (?) - QA / Testing&lt;br /&gt;
* Maurice Kalinowski (mauricek)  - QtCreator&lt;br /&gt;
* Bob Spencer (bspencer) - Architect&lt;br /&gt;
* Jacki Wu - SDK Engineering Manager&lt;br /&gt;
* Kevin Wang (KevinWang) - Packaging and Integration&lt;br /&gt;
* John Chen (?) - Integration with Qt Creator&lt;br /&gt;
* Ionut Gavaz - SDK QA&lt;br /&gt;
* Jan-Simon Möller (dl9pf_) - OBS cross-compilation integration &amp;amp; support&lt;br /&gt;
* Edmondas Girkantas (eg81) - MeeGo SDK bugs analysis &amp;amp; fixes, workarounds, developer support on #meego-sdk and mailinglist&lt;br /&gt;
&lt;br /&gt;
== Default Agenda ==&lt;br /&gt;
&lt;br /&gt;
   1.	Meeting Objective Review (5 min) &lt;br /&gt;
   2.	Team Lead Report Out (30 min)		 &lt;br /&gt;
   3.	Architecture Update (25 min)&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Meetings/SDK_Weekly</id>
		<title>SDK/Meetings/SDK Weekly</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Meetings/SDK_Weekly"/>
				<updated>2011-07-18T11:41:57Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Attendees */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MeeGo SDK Weekly Meeting Info =&lt;br /&gt;
&lt;br /&gt;
MeeGo SDK weekly meeting is held every Tuesday at 7:00 am PDT. Duration is 1 hour. Meeting is for syncing up between different parties and agreeing on actions to follow.&lt;br /&gt;
&lt;br /&gt;
Agenda and minutes of individual meetings can be found from [[SDK/Meetings]].&lt;br /&gt;
&lt;br /&gt;
== Attendees ==&lt;br /&gt;
&lt;br /&gt;
* [http://meego.com/users/veli Veli Kaksonen] (veli) - Project Manager&lt;br /&gt;
* Marianne Vaiciulis - Program Manager&lt;br /&gt;
* Ville Lavonius - The Man&lt;br /&gt;
* * Al Nikolov (alnikolov) - Windows &amp;amp; Mac port + Toolchain packaging&lt;br /&gt;
* Jaya Uppalapati (?) - QA / Testing&lt;br /&gt;
* Maurice Kalinowski (mauricek)  - QtCreator&lt;br /&gt;
* Bob Spencer (bspencer) - Architect&lt;br /&gt;
* Jacki Wu - SDK Engineering Manager&lt;br /&gt;
* Kevin Wang (KevinWang) - Packaging and Integration&lt;br /&gt;
* John Chen (?) - Integration with Qt Creator&lt;br /&gt;
* Ionut Gavaz - SDK QA&lt;br /&gt;
* Jan-Simon Möller (dl9pf_) - OBS cross-compilation integration &amp;amp; support&lt;br /&gt;
* Edmondas Girkantas (eg81) - ?&lt;br /&gt;
&lt;br /&gt;
== Default Agenda ==&lt;br /&gt;
&lt;br /&gt;
   1.	Meeting Objective Review (5 min) &lt;br /&gt;
   2.	Team Lead Report Out (30 min)		 &lt;br /&gt;
   3.	Architecture Update (25 min)&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/ARM/N900/Install/MMC</id>
		<title>ARM/N900/Install/MMC</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/ARM/N900/Install/MMC"/>
				<updated>2011-07-14T08:56:27Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Notes about flashing the kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing MeeGo to N900 on external MMC card =&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Read the whole guide before doing any steps in this guide to make sure you understand everything.'''&lt;br /&gt;
&lt;br /&gt;
If you do not want to erase the NAND partition or the internal 32 G eMMC from the N900 device, this installation is for you. What you need for this installation is a raw image that can be put to the MMC card and kernel (same kernel that is installed to the MMC).&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
&lt;br /&gt;
Raw images and corresponding kernel images can be found at http://repo.meego.com/MeeGo/builds/ (development builds) and http://repo.meego.com/MeeGo/releases/ (stable releases)&lt;br /&gt;
&lt;br /&gt;
Find official release images here ([[ARM/N900#Releases]])&lt;br /&gt;
&lt;br /&gt;
You may want to check for the most recent N900 test reports at [[Quality#MeeGo_Handset_Testing]] to see how much functionality is known to work on the N900.&lt;br /&gt;
&lt;br /&gt;
== Installing Rootfs on external MMC card ==&lt;br /&gt;
&lt;br /&gt;
First, what you need, is a microSD memory card which does not contain any information that you need, as it will be erased during this operation.&lt;br /&gt;
&lt;br /&gt;
The steps in this guide require an MMC card of at least 4gb.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. You can also plug the N900 into your computer's USB slot, using the package-provided cable. Make sure the external microSD card is unmounted, as with most modern linux distributions today it will get auto-mounted if the has a valid filesystem (FAT32 or ExtX). To unmount, you can try this example:&lt;br /&gt;
 sudo umount /dev/sdX&lt;br /&gt;
&lt;br /&gt;
And use the mount command to determine if/ where it is mounted:&lt;br /&gt;
 sudo mount (for an example how the microSD would look go [[MountOutput here]].&lt;br /&gt;
&lt;br /&gt;
Finding out the device node can also be done with, for example, fdisk:&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/sdX is used as an example on your PC. This might be also called /dev/mmcblk0, /dev/sdd or something else''')&lt;br /&gt;
 $ sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Disk /dev/sdX: 3965 MB, 3965714432 bytes&lt;br /&gt;
 194 heads, 30 sectors/track, 1330 cylinders&lt;br /&gt;
 Units = cylinders of 5820 * 512 = 2979840 bytes&lt;br /&gt;
 Disk identifier: 0x0001ab40&lt;br /&gt;
 &lt;br /&gt;
    Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
 /dev/sdX1               1         588     1708984   83  Linux&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/sdX not /dev/sdX1.'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/sdX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly, without having to unpack it on you computer first. And if you have pv(1) installed, you can add it in between to display the progress (the image is ~ 2GB in size as of 2010-10-04):&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | pv | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a USR1 signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -USR1 $pid &lt;br /&gt;
&lt;br /&gt;
dd will output:&lt;br /&gt;
&lt;br /&gt;
 328356+0 records in&lt;br /&gt;
 328356+0 records out&lt;br /&gt;
 1344946176 bytes (1.3 GB) copied, 105.625 s, 12.7 MB/s&lt;br /&gt;
&lt;br /&gt;
After this, you can insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
# Download and install bzip2 to Windows http://gnuwin32.sourceforge.net/packages/bzip2.htm&lt;br /&gt;
# Uncompress raw image in command prompt &amp;quot;bunzip2.exe &amp;lt;compressed raw image&amp;gt;&amp;quot;&lt;br /&gt;
# Change (rename) extracted file extension from .raw to .img&lt;br /&gt;
# Download the Win32DiskImager.exe program: https://launchpad.net/win32-image-writer/+download (zip file)&lt;br /&gt;
# Unzip the file and extract the contents to a known directory&lt;br /&gt;
# Run W32DiskImager.exe &lt;br /&gt;
# Select the MeeGo image file&lt;br /&gt;
# Select the drive letter which corresponds to the microSD memory card.&lt;br /&gt;
# Click the &amp;quot;Write&amp;quot; button to byte-copy the image to the microSD memory card.&lt;br /&gt;
# insert the memory card into the device and attach the back cover&lt;br /&gt;
# load/flash kernel image&lt;br /&gt;
&lt;br /&gt;
==== Notes about flashing the kernel ====&lt;br /&gt;
&lt;br /&gt;
Get the N900's flasher from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com]&lt;br /&gt;
&lt;br /&gt;
To load the kernel:&lt;br /&gt;
 flasher-3.5.exe -l -b -k [kernel image] to load it&lt;br /&gt;
&lt;br /&gt;
To flash it&lt;br /&gt;
 flasher-3.5.exe -f -b -k [kernel image] to flash it&lt;br /&gt;
&lt;br /&gt;
Flashing replace the Maemo5 kernel and you won't be able to boot into maemo5 without flashing the original kernel back&lt;br /&gt;
&lt;br /&gt;
Then connect N900 to the computer via the USB cable and the Meego OS will boot. You may need to keep the 'U' key pressed (on the phone's keyboard) when connecting the cable. &lt;br /&gt;
&lt;br /&gt;
When booting from a memory card make sure that the device's back cover is on. Otherwise the card will not mount and you'll see a kernel panic&lt;br /&gt;
&lt;br /&gt;
''''''NOTE!!''' If you get error 'Not enough space on disk'. Try again with external memorycard reader.'''&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. This can be done with disktool:&lt;br /&gt;
 diskutil list&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/diskX is used as an example on your Mac. This might be also called /dev/disk2, /dev/disk3 or something else''')&lt;br /&gt;
 $ diskutil list&lt;br /&gt;
 ...&lt;br /&gt;
 /dev/diskX&lt;br /&gt;
    #:                       TYPE NAME                    SIZE       IDENTIFIER&lt;br /&gt;
    0:     FDisk_partition_scheme                        *4.1 GB     disk3&lt;br /&gt;
    1:                 DOS_FAT_32 DISKETTE                4.1 GB     disk3s1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/diskX not /dev/diskX1.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you want to improve the speed writing your mmc card, you can use the raw device, avoiding the use of the os buffer, add 'r' add the name of your mmc interface, example: /dev/rdiskX'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/diskX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly without having to unpack it on you computer first. &lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a SIGINFO signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -SIGINFO $pid &lt;br /&gt;
&lt;br /&gt;
After dd is done, dd will output something like this:&lt;br /&gt;
&lt;br /&gt;
 475136+1 records in&lt;br /&gt;
 475136+1 records out&lt;br /&gt;
 1946157057 bytes transferred in 2606.033611 secs (746789 bytes/sec)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After this, you can eject the microSD and insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== On the N900 itself ===&lt;br /&gt;
&lt;br /&gt;
This should be a last resort solution.&lt;br /&gt;
&lt;br /&gt;
# Download and unpack the raw image to a desktop computer (see above).&lt;br /&gt;
# un-mount the microSD memory card&lt;br /&gt;
 sudo gainroot&lt;br /&gt;
 umount /dev/mmcblkXpY&lt;br /&gt;
 dd if=/home/user/MyDocs/'''&amp;lt;raw_image&amp;gt;''' of=/dev/mmcblk1&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
* X, Y in umount command should be the device number and partition number, usually 1, 1. '''Do not take information from /proc/partitions!'''&lt;br /&gt;
N900 swaps devices during boot and /proc/partitions is what the kernel initially sees when it is loaded. N900's SD-Card is /dev/mmcblk1 for Maemo5-Standard-Install and not like shown in /proc/partitions, /dev/mmcblk0! NITdroid's SD-install has SD-Card as /dev/mmcblk0, instead. If you want to see what is mounted at the moment, type &amp;quot;mount|grep mmc&amp;quot; or &amp;quot;df|grep mmc&amp;quot;.&lt;br /&gt;
* There might be more than one partition on the microSD memory card, though it is unlikely and depends on your own setup. You need to unmount all partitions before you proceed to `dd`.&lt;br /&gt;
&lt;br /&gt;
* It is possible to download the compressed image to your N900, but it is not recommended as it takes a long time to unpack.&lt;br /&gt;
* `dd` does not give any output while it is copying, so be patient.&lt;br /&gt;
* If you aren't sure about any of these steps you should not proceed without consulting a professional.&lt;br /&gt;
&lt;br /&gt;
== Load or flash kernel on N900 == &lt;br /&gt;
&lt;br /&gt;
Before MeeGo is able to boot, you also need to &amp;lt;u&amp;gt;load&amp;lt;/u&amp;gt; the kernel (vmlinuz) provided with the raw image to the device. This can be done with the [[ARM/N900/tools/flasher|flasher]].&lt;br /&gt;
&lt;br /&gt;
=== Dual-boot with maemo using u-boot ===&lt;br /&gt;
&lt;br /&gt;
See [[ARM/N900/Install/Dual_Boot]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Load or flash manually ===&lt;br /&gt;
====Prerequisites====&lt;br /&gt;
&lt;br /&gt;
* the flasher application needs to be installed on your computer. You can get it from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php here].&lt;br /&gt;
On 64-bit Ubuntu/Debian this command would do the trick, after downloading the .deb file:&lt;br /&gt;
&lt;br /&gt;
 $ sudo dpkg --force-architecture -i maemo_flasher-*i386.deb&lt;br /&gt;
&lt;br /&gt;
====Running Meego====&lt;br /&gt;
&lt;br /&gt;
'''NOTE: First, open the back cover of N900 and insert the MMC card to the slot. Reinstall the back cover again.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Back cover must be closed to boot from MMC.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you have a flashing jig, you will need to put a magnet at the red location marked [http://www.daimi.au.dk/~cvm/magnet.png here]'''&lt;br /&gt;
&lt;br /&gt;
You need to execute the following command on your host system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The device must be turned off and disconnected from the computer. Connect it to the computer using the USB cable, only after executing the command'''&lt;br /&gt;
&lt;br /&gt;
 $ sudo flasher-3.5 -l -k '''&amp;lt;kernel&amp;gt;''' -b&lt;br /&gt;
&lt;br /&gt;
A message like: &lt;br /&gt;
    flasher v2.5.2 (Oct 21 2009)&lt;br /&gt;
    Suitable USB device not found, waiting.&lt;br /&gt;
is shown on the terminal of the computer.&lt;br /&gt;
&lt;br /&gt;
Then connect N900 to the computer via the USB cable and the Meego OS will boot.&lt;br /&gt;
You may need to keep the 'U' key pressed (on the phone's keyboard) when connecting the cable.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The command above will only load the kernel to the device, so next time you boot the device, the original kernel should be used and your Maemo 5 OS should boot normally.'''&lt;br /&gt;
&lt;br /&gt;
If you want to &amp;lt;u&amp;gt;flash&amp;lt;/u&amp;gt; the kernel to your device so that it is not forgotten when it is powered off, use option -f instead of option -l on command above. &lt;br /&gt;
&lt;br /&gt;
'''NOTE: It's highly recommended NOT to flash the kernel on your device, unless you really know what you're doing (so please use -l instead of -f). Don't blame us if you brick your device, you have been warned!'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|+ Examples of files that can be used with this guide&lt;br /&gt;
! MeeGo Version&lt;br /&gt;
! &amp;lt;kernel&amp;gt;&lt;br /&gt;
! &amp;lt;raw_image&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.99.2.20101019.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900 meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.80.0.20101001.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900 meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:N900]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Linux</id>
		<title>SDK/Docs/1.2/MeeGo SDK 1.2 Preview for Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Linux"/>
				<updated>2011-07-08T10:44:03Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Download the MeeGo SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Download the MeeGo SDK ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Download and install the SDK'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Download information&lt;br /&gt;
|-&lt;br /&gt;
! File !! File Size !! MD5SUM !! Installed Size&lt;br /&gt;
|-&lt;br /&gt;
| [http://sdk.meego.com/installer/Linux/meego-sdk-installer-online-20110519  MeeGo SDK 1.2] || 26MB || 76d0442e060628b6aa696470a254dedc  || 5.2 GB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 $ chmod +x ./meego-sdk-installer-online&lt;br /&gt;
 $ ./meego-sdk-installer-online --verbose&lt;br /&gt;
&lt;br /&gt;
Note that --verbose is  optional. &amp;lt;br&amp;gt;&lt;br /&gt;
SDK content details are described on the [[SDK/Docs/1.2/MeeGo SDK 1.2 Components|SDK Component Summary]] page.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;'''Select the components that will be installed. Mainly select the target for development. During downloading, once one of components failed to download due to the connection issue, just click 'Retry' button in the notification dialog to resume.'''&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Installer-select component.png]]&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install a MeeGo Target ==&lt;br /&gt;
A ''Target'' is used to build programs using the MeeGo toolchain and libraries (sysroot). Except you can install target in the process of SDK, you also can install target by launching Maintain MeeGo SDK.&lt;br /&gt;
'''MeeGo SDK 1.2 Preview &amp;gt; Maintain MeeGo SDk''' . Select targets from SDK targest and click next. It will install targets you selected&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Select target.png]]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Next Step:[[SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Linux/Configure_Qt_Creator_to_Develop_MeeGo_Applications]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK]]&lt;br /&gt;
[[Category:Meego-1.2]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/ARM/N900/Install/MMC</id>
		<title>ARM/N900/Install/MMC</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/ARM/N900/Install/MMC"/>
				<updated>2011-06-29T12:13:33Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Notes about flashing the kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing MeeGo to N900 on external MMC card =&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Read the whole guide before doing any steps in this guide to make sure you understand everything.'''&lt;br /&gt;
&lt;br /&gt;
If you do not want to erase the NAND partition or the internal 32 G eMMC from the N900 device, this installation is for you. What you need for this installation is a raw image that can be put to the MMC card and kernel (same kernel that is installed to the MMC).&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
&lt;br /&gt;
Raw images and corresponding kernel images can be found at http://repo.meego.com/MeeGo/builds/ (development builds) and http://repo.meego.com/MeeGo/releases/ (stable releases)&lt;br /&gt;
&lt;br /&gt;
Find official release images here ([[ARM/N900#Releases]])&lt;br /&gt;
&lt;br /&gt;
You may want to check for the most recent N900 test reports at [[Quality#MeeGo_Handset_Testing]] to see how much functionality is known to work on the N900.&lt;br /&gt;
&lt;br /&gt;
== Installing Rootfs on external MMC card ==&lt;br /&gt;
&lt;br /&gt;
First, what you need, is a microSD memory card which does not contain any information that you need, as it will be erased during this operation.&lt;br /&gt;
&lt;br /&gt;
The steps in this guide require an MMC card of at least 4gb.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. You can also plug the N900 into your computer's USB slot, using the package-provided cable. Make sure the external microSD card is unmounted, as with most modern linux distributions today it will get auto-mounted if the has a valid filesystem (FAT32 or ExtX). To unmount, you can try this example:&lt;br /&gt;
 sudo umount /dev/sdX&lt;br /&gt;
&lt;br /&gt;
And use the mount command to determine if/ where it is mounted:&lt;br /&gt;
 sudo mount (for an example how the microSD would look go [[MountOutput here]].&lt;br /&gt;
&lt;br /&gt;
Finding out the device node can also be done with, for example, fdisk:&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/sdX is used as an example on your PC. This might be also called /dev/mmcblk0, /dev/sdd or something else''')&lt;br /&gt;
 $ sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Disk /dev/sdX: 3965 MB, 3965714432 bytes&lt;br /&gt;
 194 heads, 30 sectors/track, 1330 cylinders&lt;br /&gt;
 Units = cylinders of 5820 * 512 = 2979840 bytes&lt;br /&gt;
 Disk identifier: 0x0001ab40&lt;br /&gt;
 &lt;br /&gt;
    Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
 /dev/sdX1               1         588     1708984   83  Linux&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/sdX not /dev/sdX1.'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/sdX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly, without having to unpack it on you computer first. And if you have pv(1) installed, you can add it in between to display the progress (the image is ~ 2GB in size as of 2010-10-04):&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | pv | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a USR1 signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -USR1 $pid &lt;br /&gt;
&lt;br /&gt;
dd will output:&lt;br /&gt;
&lt;br /&gt;
 328356+0 records in&lt;br /&gt;
 328356+0 records out&lt;br /&gt;
 1344946176 bytes (1.3 GB) copied, 105.625 s, 12.7 MB/s&lt;br /&gt;
&lt;br /&gt;
After this, you can insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
# Download and install bzip2 to Windows http://gnuwin32.sourceforge.net/packages/bzip2.htm&lt;br /&gt;
# Uncompress raw image in command prompt &amp;quot;bunzip2.exe &amp;lt;compressed raw image&amp;gt;&amp;quot;&lt;br /&gt;
# Change (rename) extracted file extension from .raw to .img&lt;br /&gt;
# Download the Win32DiskImager.exe program: https://launchpad.net/win32-image-writer/+download (zip file)&lt;br /&gt;
# Unzip the file and extract the contents to a known directory&lt;br /&gt;
# Run W32DiskImager.exe &lt;br /&gt;
# Select the MeeGo image file&lt;br /&gt;
# Select the drive letter which corresponds to the microSD memory card.&lt;br /&gt;
# Click the &amp;quot;Write&amp;quot; button to byte-copy the image to the microSD memory card.&lt;br /&gt;
# insert the memory card into the device and attach the back cover&lt;br /&gt;
# load/flash kernel image&lt;br /&gt;
&lt;br /&gt;
==== Notes about flashing the kernel ====&lt;br /&gt;
&lt;br /&gt;
Get the N900's flasher from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com]&lt;br /&gt;
&lt;br /&gt;
To load the kernel:&lt;br /&gt;
 flasher-3.5.exe -l -b -k [kernel image] to load it&lt;br /&gt;
&lt;br /&gt;
To flash it&lt;br /&gt;
 flasher-3.5.exe -f -b -k [kernel image] to flash it&lt;br /&gt;
&lt;br /&gt;
Flashing replace the Maemo5 kernel and you won't be able to boot into maemo5 without flashing the original kernel back&lt;br /&gt;
&lt;br /&gt;
When booting from a memory card make sure that the device's back cover is on. Otherwise the card will not mount and you'll see a kernel panic&lt;br /&gt;
&lt;br /&gt;
''''''NOTE!!''' If you get error 'Not enough space on disk'. Try again with external memorycard reader.'''&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. This can be done with disktool:&lt;br /&gt;
 diskutil list&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/diskX is used as an example on your Mac. This might be also called /dev/disk2, /dev/disk3 or something else''')&lt;br /&gt;
 $ diskutil list&lt;br /&gt;
 ...&lt;br /&gt;
 /dev/diskX&lt;br /&gt;
    #:                       TYPE NAME                    SIZE       IDENTIFIER&lt;br /&gt;
    0:     FDisk_partition_scheme                        *4.1 GB     disk3&lt;br /&gt;
    1:                 DOS_FAT_32 DISKETTE                4.1 GB     disk3s1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/diskX not /dev/diskX1.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you want to improve the speed writing your mmc card, you can use the raw device, avoiding the use of the os buffer, add 'r' add the name of your mmc interface, example: /dev/rdiskX'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/diskX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly without having to unpack it on you computer first. &lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a SIGINFO signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -SIGINFO $pid &lt;br /&gt;
&lt;br /&gt;
After dd is done, dd will output something like this:&lt;br /&gt;
&lt;br /&gt;
 475136+1 records in&lt;br /&gt;
 475136+1 records out&lt;br /&gt;
 1946157057 bytes transferred in 2606.033611 secs (746789 bytes/sec)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After this, you can eject the microSD and insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== On the N900 itself ===&lt;br /&gt;
&lt;br /&gt;
This should be a last resort solution.&lt;br /&gt;
&lt;br /&gt;
# Download and unpack the raw image to a desktop computer (see above).&lt;br /&gt;
# un-mount the microSD memory card&lt;br /&gt;
 sudo gainroot&lt;br /&gt;
 umount /dev/mmcblkXpY&lt;br /&gt;
 dd if=/home/user/MyDocs/'''&amp;lt;raw_image&amp;gt;''' of=/dev/mmcblk1&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
* X, Y in umount command should be the device number and partition number, usually 1, 1. '''Do not take information from /proc/partitions!'''&lt;br /&gt;
N900 swaps devices during boot and /proc/partitions is what the kernel initially sees when it is loaded. N900's SD-Card is /dev/mmcblk1 for Maemo5-Standard-Install and not like shown in /proc/partitions, /dev/mmcblk0! NITdroid's SD-install has SD-Card as /dev/mmcblk0, instead. If you want to see what is mounted at the moment, type &amp;quot;mount|grep mmc&amp;quot; or &amp;quot;df|grep mmc&amp;quot;.&lt;br /&gt;
* There might be more than one partition on the microSD memory card, though it is unlikely and depends on your own setup. You need to unmount all partitions before you proceed to `dd`.&lt;br /&gt;
&lt;br /&gt;
* It is possible to download the compressed image to your N900, but it is not recommended as it takes a long time to unpack.&lt;br /&gt;
* `dd` does not give any output while it is copying, so be patient.&lt;br /&gt;
* If you aren't sure about any of these steps you should not proceed without consulting a professional.&lt;br /&gt;
&lt;br /&gt;
== Load or flash kernel on N900 == &lt;br /&gt;
&lt;br /&gt;
Before MeeGo is able to boot, you also need to &amp;lt;u&amp;gt;load&amp;lt;/u&amp;gt; the kernel (vmlinuz) provided with the raw image to the device. This can be done with the [[ARM/N900/tools/flasher|flasher]].&lt;br /&gt;
&lt;br /&gt;
=== Dual-boot with maemo using u-boot ===&lt;br /&gt;
&lt;br /&gt;
See [[ARM/N900/Install/Dual_Boot]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Load or flash manually ===&lt;br /&gt;
====Prerequisites====&lt;br /&gt;
&lt;br /&gt;
* the flasher application needs to be installed on your computer. You can get it from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php here].&lt;br /&gt;
On 64-bit Ubuntu/Debian this command would do the trick, after downloading the .deb file:&lt;br /&gt;
&lt;br /&gt;
 $ sudo dpkg --force-architecture -i maemo_flasher-*i386.deb&lt;br /&gt;
&lt;br /&gt;
====Running Meego====&lt;br /&gt;
&lt;br /&gt;
'''NOTE: First, open the back cover of N900 and insert the MMC card to the slot. Reinstall the back cover again.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Back cover must be closed to boot from MMC.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you have a flashing jig, you will need to put a magnet at the red location marked [http://www.daimi.au.dk/~cvm/magnet.png here]'''&lt;br /&gt;
&lt;br /&gt;
You need to execute the following command on your host system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The device must be turned off and disconnected from the computer. Connect it to the computer using the USB cable, only after executing the command'''&lt;br /&gt;
&lt;br /&gt;
 $ sudo flasher-3.5 -l -k '''&amp;lt;kernel&amp;gt;''' -b&lt;br /&gt;
&lt;br /&gt;
A message like: &lt;br /&gt;
    flasher v2.5.2 (Oct 21 2009)&lt;br /&gt;
    Suitable USB device not found, waiting.&lt;br /&gt;
is shown on the terminal of the computer.&lt;br /&gt;
&lt;br /&gt;
Then connect N900 to the computer via the USB cable and the Meego OS will boot.&lt;br /&gt;
You may need to keep the 'U' key pressed (on the phone's keyboard) when connecting the cable.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The command above will only load the kernel to the device, so next time you boot the device, the original kernel should be used and your Maemo 5 OS should boot normally.'''&lt;br /&gt;
&lt;br /&gt;
If you want to &amp;lt;u&amp;gt;flash&amp;lt;/u&amp;gt; the kernel to your device so that it is not forgotten when it is powered off, use option -f instead of option -l on command above. &lt;br /&gt;
&lt;br /&gt;
'''NOTE: It's highly recommended NOT to flash the kernel on your device, unless you really know what you're doing (so please use -l instead of -f). Don't blame us if you brick your device, you have been warned!'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|+ Examples of files that can be used with this guide&lt;br /&gt;
! MeeGo Version&lt;br /&gt;
! &amp;lt;kernel&amp;gt;&lt;br /&gt;
! &amp;lt;raw_image&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.99.2.20101019.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900 meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.80.0.20101001.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900 meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:N900]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/ARM/N900/Install/MMC</id>
		<title>ARM/N900/Install/MMC</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/ARM/N900/Install/MMC"/>
				<updated>2011-06-29T12:12:36Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Notes about flashing the kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing MeeGo to N900 on external MMC card =&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Read the whole guide before doing any steps in this guide to make sure you understand everything.'''&lt;br /&gt;
&lt;br /&gt;
If you do not want to erase the NAND partition or the internal 32 G eMMC from the N900 device, this installation is for you. What you need for this installation is a raw image that can be put to the MMC card and kernel (same kernel that is installed to the MMC).&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
&lt;br /&gt;
Raw images and corresponding kernel images can be found at http://repo.meego.com/MeeGo/builds/ (development builds) and http://repo.meego.com/MeeGo/releases/ (stable releases)&lt;br /&gt;
&lt;br /&gt;
Find official release images here ([[ARM/N900#Releases]])&lt;br /&gt;
&lt;br /&gt;
You may want to check for the most recent N900 test reports at [[Quality#MeeGo_Handset_Testing]] to see how much functionality is known to work on the N900.&lt;br /&gt;
&lt;br /&gt;
== Installing Rootfs on external MMC card ==&lt;br /&gt;
&lt;br /&gt;
First, what you need, is a microSD memory card which does not contain any information that you need, as it will be erased during this operation.&lt;br /&gt;
&lt;br /&gt;
The steps in this guide require an MMC card of at least 4gb.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. You can also plug the N900 into your computer's USB slot, using the package-provided cable. Make sure the external microSD card is unmounted, as with most modern linux distributions today it will get auto-mounted if the has a valid filesystem (FAT32 or ExtX). To unmount, you can try this example:&lt;br /&gt;
 sudo umount /dev/sdX&lt;br /&gt;
&lt;br /&gt;
And use the mount command to determine if/ where it is mounted:&lt;br /&gt;
 sudo mount (for an example how the microSD would look go [[MountOutput here]].&lt;br /&gt;
&lt;br /&gt;
Finding out the device node can also be done with, for example, fdisk:&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/sdX is used as an example on your PC. This might be also called /dev/mmcblk0, /dev/sdd or something else''')&lt;br /&gt;
 $ sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Disk /dev/sdX: 3965 MB, 3965714432 bytes&lt;br /&gt;
 194 heads, 30 sectors/track, 1330 cylinders&lt;br /&gt;
 Units = cylinders of 5820 * 512 = 2979840 bytes&lt;br /&gt;
 Disk identifier: 0x0001ab40&lt;br /&gt;
 &lt;br /&gt;
    Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
 /dev/sdX1               1         588     1708984   83  Linux&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/sdX not /dev/sdX1.'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/sdX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly, without having to unpack it on you computer first. And if you have pv(1) installed, you can add it in between to display the progress (the image is ~ 2GB in size as of 2010-10-04):&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | pv | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a USR1 signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -USR1 $pid &lt;br /&gt;
&lt;br /&gt;
dd will output:&lt;br /&gt;
&lt;br /&gt;
 328356+0 records in&lt;br /&gt;
 328356+0 records out&lt;br /&gt;
 1344946176 bytes (1.3 GB) copied, 105.625 s, 12.7 MB/s&lt;br /&gt;
&lt;br /&gt;
After this, you can insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
# Download and install bzip2 to Windows http://gnuwin32.sourceforge.net/packages/bzip2.htm&lt;br /&gt;
# Uncompress raw image in command prompt &amp;quot;bunzip2.exe &amp;lt;compressed raw image&amp;gt;&amp;quot;&lt;br /&gt;
# Change (rename) extracted file extension from .raw to .img&lt;br /&gt;
# Download the Win32DiskImager.exe program: https://launchpad.net/win32-image-writer/+download (zip file)&lt;br /&gt;
# Unzip the file and extract the contents to a known directory&lt;br /&gt;
# Run W32DiskImager.exe &lt;br /&gt;
# Select the MeeGo image file&lt;br /&gt;
# Select the drive letter which corresponds to the microSD memory card.&lt;br /&gt;
# Click the &amp;quot;Write&amp;quot; button to byte-copy the image to the microSD memory card.&lt;br /&gt;
# insert the memory card into the device and attach the back cover&lt;br /&gt;
# load/flash kernel image&lt;br /&gt;
&lt;br /&gt;
==== Notes about flashing the kernel ====&lt;br /&gt;
&lt;br /&gt;
Get the N900's flasher from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com]&lt;br /&gt;
&lt;br /&gt;
To load the kernel:&lt;br /&gt;
 flasher-3.5.exe -l -b -k` [kernel image] to load it&lt;br /&gt;
&lt;br /&gt;
To flash it&lt;br /&gt;
 flasher-3.5.exe -f -b -k [kernel image] to flash it&lt;br /&gt;
&lt;br /&gt;
Flashing replace the Maemo5 kernel and you won't be able to boot into maemo5 without flashing the original kernel back&lt;br /&gt;
&lt;br /&gt;
When booting from a memory card make sure that the device's back cover is on. Otherwise the card will not mount and you'll see a kernel panic&lt;br /&gt;
&lt;br /&gt;
''''''NOTE!!''' If you get error 'Not enough space on disk'. Try again with external memorycard reader.'''&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. This can be done with disktool:&lt;br /&gt;
 diskutil list&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/diskX is used as an example on your Mac. This might be also called /dev/disk2, /dev/disk3 or something else''')&lt;br /&gt;
 $ diskutil list&lt;br /&gt;
 ...&lt;br /&gt;
 /dev/diskX&lt;br /&gt;
    #:                       TYPE NAME                    SIZE       IDENTIFIER&lt;br /&gt;
    0:     FDisk_partition_scheme                        *4.1 GB     disk3&lt;br /&gt;
    1:                 DOS_FAT_32 DISKETTE                4.1 GB     disk3s1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/diskX not /dev/diskX1.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you want to improve the speed writing your mmc card, you can use the raw device, avoiding the use of the os buffer, add 'r' add the name of your mmc interface, example: /dev/rdiskX'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/diskX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly without having to unpack it on you computer first. &lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a SIGINFO signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -SIGINFO $pid &lt;br /&gt;
&lt;br /&gt;
After dd is done, dd will output something like this:&lt;br /&gt;
&lt;br /&gt;
 475136+1 records in&lt;br /&gt;
 475136+1 records out&lt;br /&gt;
 1946157057 bytes transferred in 2606.033611 secs (746789 bytes/sec)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After this, you can eject the microSD and insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== On the N900 itself ===&lt;br /&gt;
&lt;br /&gt;
This should be a last resort solution.&lt;br /&gt;
&lt;br /&gt;
# Download and unpack the raw image to a desktop computer (see above).&lt;br /&gt;
# un-mount the microSD memory card&lt;br /&gt;
 sudo gainroot&lt;br /&gt;
 umount /dev/mmcblkXpY&lt;br /&gt;
 dd if=/home/user/MyDocs/'''&amp;lt;raw_image&amp;gt;''' of=/dev/mmcblk1&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
* X, Y in umount command should be the device number and partition number, usually 1, 1. '''Do not take information from /proc/partitions!'''&lt;br /&gt;
N900 swaps devices during boot and /proc/partitions is what the kernel initially sees when it is loaded. N900's SD-Card is /dev/mmcblk1 for Maemo5-Standard-Install and not like shown in /proc/partitions, /dev/mmcblk0! NITdroid's SD-install has SD-Card as /dev/mmcblk0, instead. If you want to see what is mounted at the moment, type &amp;quot;mount|grep mmc&amp;quot; or &amp;quot;df|grep mmc&amp;quot;.&lt;br /&gt;
* There might be more than one partition on the microSD memory card, though it is unlikely and depends on your own setup. You need to unmount all partitions before you proceed to `dd`.&lt;br /&gt;
&lt;br /&gt;
* It is possible to download the compressed image to your N900, but it is not recommended as it takes a long time to unpack.&lt;br /&gt;
* `dd` does not give any output while it is copying, so be patient.&lt;br /&gt;
* If you aren't sure about any of these steps you should not proceed without consulting a professional.&lt;br /&gt;
&lt;br /&gt;
== Load or flash kernel on N900 == &lt;br /&gt;
&lt;br /&gt;
Before MeeGo is able to boot, you also need to &amp;lt;u&amp;gt;load&amp;lt;/u&amp;gt; the kernel (vmlinuz) provided with the raw image to the device. This can be done with the [[ARM/N900/tools/flasher|flasher]].&lt;br /&gt;
&lt;br /&gt;
=== Dual-boot with maemo using u-boot ===&lt;br /&gt;
&lt;br /&gt;
See [[ARM/N900/Install/Dual_Boot]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Load or flash manually ===&lt;br /&gt;
====Prerequisites====&lt;br /&gt;
&lt;br /&gt;
* the flasher application needs to be installed on your computer. You can get it from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php here].&lt;br /&gt;
On 64-bit Ubuntu/Debian this command would do the trick, after downloading the .deb file:&lt;br /&gt;
&lt;br /&gt;
 $ sudo dpkg --force-architecture -i maemo_flasher-*i386.deb&lt;br /&gt;
&lt;br /&gt;
====Running Meego====&lt;br /&gt;
&lt;br /&gt;
'''NOTE: First, open the back cover of N900 and insert the MMC card to the slot. Reinstall the back cover again.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Back cover must be closed to boot from MMC.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you have a flashing jig, you will need to put a magnet at the red location marked [http://www.daimi.au.dk/~cvm/magnet.png here]'''&lt;br /&gt;
&lt;br /&gt;
You need to execute the following command on your host system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The device must be turned off and disconnected from the computer. Connect it to the computer using the USB cable, only after executing the command'''&lt;br /&gt;
&lt;br /&gt;
 $ sudo flasher-3.5 -l -k '''&amp;lt;kernel&amp;gt;''' -b&lt;br /&gt;
&lt;br /&gt;
A message like: &lt;br /&gt;
    flasher v2.5.2 (Oct 21 2009)&lt;br /&gt;
    Suitable USB device not found, waiting.&lt;br /&gt;
is shown on the terminal of the computer.&lt;br /&gt;
&lt;br /&gt;
Then connect N900 to the computer via the USB cable and the Meego OS will boot.&lt;br /&gt;
You may need to keep the 'U' key pressed (on the phone's keyboard) when connecting the cable.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The command above will only load the kernel to the device, so next time you boot the device, the original kernel should be used and your Maemo 5 OS should boot normally.'''&lt;br /&gt;
&lt;br /&gt;
If you want to &amp;lt;u&amp;gt;flash&amp;lt;/u&amp;gt; the kernel to your device so that it is not forgotten when it is powered off, use option -f instead of option -l on command above. &lt;br /&gt;
&lt;br /&gt;
'''NOTE: It's highly recommended NOT to flash the kernel on your device, unless you really know what you're doing (so please use -l instead of -f). Don't blame us if you brick your device, you have been warned!'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|+ Examples of files that can be used with this guide&lt;br /&gt;
! MeeGo Version&lt;br /&gt;
! &amp;lt;kernel&amp;gt;&lt;br /&gt;
! &amp;lt;raw_image&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.99.2.20101019.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900 meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.80.0.20101001.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900 meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:N900]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/ARM/N900/Install/MMC</id>
		<title>ARM/N900/Install/MMC</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/ARM/N900/Install/MMC"/>
				<updated>2011-06-29T12:04:46Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing MeeGo to N900 on external MMC card =&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Read the whole guide before doing any steps in this guide to make sure you understand everything.'''&lt;br /&gt;
&lt;br /&gt;
If you do not want to erase the NAND partition or the internal 32 G eMMC from the N900 device, this installation is for you. What you need for this installation is a raw image that can be put to the MMC card and kernel (same kernel that is installed to the MMC).&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
&lt;br /&gt;
Raw images and corresponding kernel images can be found at http://repo.meego.com/MeeGo/builds/ (development builds) and http://repo.meego.com/MeeGo/releases/ (stable releases)&lt;br /&gt;
&lt;br /&gt;
Find official release images here ([[ARM/N900#Releases]])&lt;br /&gt;
&lt;br /&gt;
You may want to check for the most recent N900 test reports at [[Quality#MeeGo_Handset_Testing]] to see how much functionality is known to work on the N900.&lt;br /&gt;
&lt;br /&gt;
== Installing Rootfs on external MMC card ==&lt;br /&gt;
&lt;br /&gt;
First, what you need, is a microSD memory card which does not contain any information that you need, as it will be erased during this operation.&lt;br /&gt;
&lt;br /&gt;
The steps in this guide require an MMC card of at least 4gb.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. You can also plug the N900 into your computer's USB slot, using the package-provided cable. Make sure the external microSD card is unmounted, as with most modern linux distributions today it will get auto-mounted if the has a valid filesystem (FAT32 or ExtX). To unmount, you can try this example:&lt;br /&gt;
 sudo umount /dev/sdX&lt;br /&gt;
&lt;br /&gt;
And use the mount command to determine if/ where it is mounted:&lt;br /&gt;
 sudo mount (for an example how the microSD would look go [[MountOutput here]].&lt;br /&gt;
&lt;br /&gt;
Finding out the device node can also be done with, for example, fdisk:&lt;br /&gt;
 sudo fdisk -l&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/sdX is used as an example on your PC. This might be also called /dev/mmcblk0, /dev/sdd or something else''')&lt;br /&gt;
 $ sudo fdisk -l&lt;br /&gt;
 ...&lt;br /&gt;
 Disk /dev/sdX: 3965 MB, 3965714432 bytes&lt;br /&gt;
 194 heads, 30 sectors/track, 1330 cylinders&lt;br /&gt;
 Units = cylinders of 5820 * 512 = 2979840 bytes&lt;br /&gt;
 Disk identifier: 0x0001ab40&lt;br /&gt;
 &lt;br /&gt;
    Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
 /dev/sdX1               1         588     1708984   83  Linux&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/sdX not /dev/sdX1.'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/sdX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly, without having to unpack it on you computer first. And if you have pv(1) installed, you can add it in between to display the progress (the image is ~ 2GB in size as of 2010-10-04):&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | pv | sudo dd bs=4096 of=/dev/sdX&lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a USR1 signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -USR1 $pid &lt;br /&gt;
&lt;br /&gt;
dd will output:&lt;br /&gt;
&lt;br /&gt;
 328356+0 records in&lt;br /&gt;
 328356+0 records out&lt;br /&gt;
 1344946176 bytes (1.3 GB) copied, 105.625 s, 12.7 MB/s&lt;br /&gt;
&lt;br /&gt;
After this, you can insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
# Download and install bzip2 to Windows http://gnuwin32.sourceforge.net/packages/bzip2.htm&lt;br /&gt;
# Uncompress raw image in command prompt &amp;quot;bunzip2.exe &amp;lt;compressed raw image&amp;gt;&amp;quot;&lt;br /&gt;
# Change (rename) extracted file extension from .raw to .img&lt;br /&gt;
# Download the Win32DiskImager.exe program: https://launchpad.net/win32-image-writer/+download (zip file)&lt;br /&gt;
# Unzip the file and extract the contents to a known directory&lt;br /&gt;
# Run W32DiskImager.exe &lt;br /&gt;
# Select the MeeGo image file&lt;br /&gt;
# Select the drive letter which corresponds to the microSD memory card.&lt;br /&gt;
# Click the &amp;quot;Write&amp;quot; button to byte-copy the image to the microSD memory card.&lt;br /&gt;
# insert the memory card into the device and attach the back cover&lt;br /&gt;
# load/flash kernel image&lt;br /&gt;
&lt;br /&gt;
==== Notes about flashing the kernel ====&lt;br /&gt;
&lt;br /&gt;
Get the N900's flasher from tablets-dev.nokia.com&lt;br /&gt;
&lt;br /&gt;
To load the kernel:&lt;br /&gt;
 flasher-3.5.exe -l -b -l [kernel image] to load it&lt;br /&gt;
&lt;br /&gt;
To flash it&lt;br /&gt;
 flasher-3.5.exe -f -b -k [kernel image] to flash it&lt;br /&gt;
&lt;br /&gt;
Flashing replace the Maemo5 kernel and you won't be able to boot into maemo5 without flashing the original kernel back&lt;br /&gt;
&lt;br /&gt;
When booting from a memory card make sure that the device's back cover is on. Otherwise the card will not mount and you'll see a kernel panic&lt;br /&gt;
&lt;br /&gt;
''''''NOTE!!''' If you get error 'Not enough space on disk'. Try again with external memorycard reader.'''&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. This can be done with disktool:&lt;br /&gt;
 diskutil list&lt;br /&gt;
&lt;br /&gt;
An example output ('''NOTE: The /dev/diskX is used as an example on your Mac. This might be also called /dev/disk2, /dev/disk3 or something else''')&lt;br /&gt;
 $ diskutil list&lt;br /&gt;
 ...&lt;br /&gt;
 /dev/diskX&lt;br /&gt;
    #:                       TYPE NAME                    SIZE       IDENTIFIER&lt;br /&gt;
    0:     FDisk_partition_scheme                        *4.1 GB     disk3&lt;br /&gt;
    1:                 DOS_FAT_32 DISKETTE                4.1 GB     disk3s1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/diskX not /dev/diskX1.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you want to improve the speed writing your mmc card, you can use the raw device, avoiding the use of the os buffer, add 'r' add the name of your mmc interface, example: /dev/rdiskX'''&lt;br /&gt;
&lt;br /&gt;
After you are &amp;lt;u&amp;gt;100% sure&amp;lt;/u&amp;gt; that the /dev/diskX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:&lt;br /&gt;
 $ sudo dd bs=4096 if='''&amp;lt;raw_image&amp;gt;''' of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
If you are low on disk space, you can use&lt;br /&gt;
&lt;br /&gt;
 $ bzcat &amp;lt;raw_image&amp;gt;.bz2 | sudo dd bs=4096 of=/dev/diskX&lt;br /&gt;
&lt;br /&gt;
to decompress the compressed raw image on the fly without having to unpack it on you computer first. &lt;br /&gt;
&lt;br /&gt;
The dd does not show any progress until the file is written to the device, so be patient.&lt;br /&gt;
&lt;br /&gt;
Although sending a SIGINFO signal to a running dd process makes it print I/O statistics to standard error and then resume copying:&lt;br /&gt;
 $ dd if=/dev/zero of=/dev/null&amp;amp; pid=$!&lt;br /&gt;
from another term:&lt;br /&gt;
 $ kill -SIGINFO $pid &lt;br /&gt;
&lt;br /&gt;
After dd is done, dd will output something like this:&lt;br /&gt;
&lt;br /&gt;
 475136+1 records in&lt;br /&gt;
 475136+1 records out&lt;br /&gt;
 1946157057 bytes transferred in 2606.033611 secs (746789 bytes/sec)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After this, you can eject the microSD and insert the card in the N900.&lt;br /&gt;
&lt;br /&gt;
=== On the N900 itself ===&lt;br /&gt;
&lt;br /&gt;
This should be a last resort solution.&lt;br /&gt;
&lt;br /&gt;
# Download and unpack the raw image to a desktop computer (see above).&lt;br /&gt;
# un-mount the microSD memory card&lt;br /&gt;
 sudo gainroot&lt;br /&gt;
 umount /dev/mmcblkXpY&lt;br /&gt;
 dd if=/home/user/MyDocs/'''&amp;lt;raw_image&amp;gt;''' of=/dev/mmcblk1&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
* X, Y in umount command should be the device number and partition number, usually 1, 1. '''Do not take information from /proc/partitions!'''&lt;br /&gt;
N900 swaps devices during boot and /proc/partitions is what the kernel initially sees when it is loaded. N900's SD-Card is /dev/mmcblk1 for Maemo5-Standard-Install and not like shown in /proc/partitions, /dev/mmcblk0! NITdroid's SD-install has SD-Card as /dev/mmcblk0, instead. If you want to see what is mounted at the moment, type &amp;quot;mount|grep mmc&amp;quot; or &amp;quot;df|grep mmc&amp;quot;.&lt;br /&gt;
* There might be more than one partition on the microSD memory card, though it is unlikely and depends on your own setup. You need to unmount all partitions before you proceed to `dd`.&lt;br /&gt;
&lt;br /&gt;
* It is possible to download the compressed image to your N900, but it is not recommended as it takes a long time to unpack.&lt;br /&gt;
* `dd` does not give any output while it is copying, so be patient.&lt;br /&gt;
* If you aren't sure about any of these steps you should not proceed without consulting a professional.&lt;br /&gt;
&lt;br /&gt;
== Load or flash kernel on N900 == &lt;br /&gt;
&lt;br /&gt;
Before MeeGo is able to boot, you also need to &amp;lt;u&amp;gt;load&amp;lt;/u&amp;gt; the kernel (vmlinuz) provided with the raw image to the device. This can be done with the [[ARM/N900/tools/flasher|flasher]].&lt;br /&gt;
&lt;br /&gt;
=== Dual-boot with maemo using u-boot ===&lt;br /&gt;
&lt;br /&gt;
See [[ARM/N900/Install/Dual_Boot]] instead.&lt;br /&gt;
&lt;br /&gt;
=== Load or flash manually ===&lt;br /&gt;
====Prerequisites====&lt;br /&gt;
&lt;br /&gt;
* the flasher application needs to be installed on your computer. You can get it from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php here].&lt;br /&gt;
On 64-bit Ubuntu/Debian this command would do the trick, after downloading the .deb file:&lt;br /&gt;
&lt;br /&gt;
 $ sudo dpkg --force-architecture -i maemo_flasher-*i386.deb&lt;br /&gt;
&lt;br /&gt;
====Running Meego====&lt;br /&gt;
&lt;br /&gt;
'''NOTE: First, open the back cover of N900 and insert the MMC card to the slot. Reinstall the back cover again.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: Back cover must be closed to boot from MMC.'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE: If you have a flashing jig, you will need to put a magnet at the red location marked [http://www.daimi.au.dk/~cvm/magnet.png here]'''&lt;br /&gt;
&lt;br /&gt;
You need to execute the following command on your host system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The device must be turned off and disconnected from the computer. Connect it to the computer using the USB cable, only after executing the command'''&lt;br /&gt;
&lt;br /&gt;
 $ sudo flasher-3.5 -l -k '''&amp;lt;kernel&amp;gt;''' -b&lt;br /&gt;
&lt;br /&gt;
A message like: &lt;br /&gt;
    flasher v2.5.2 (Oct 21 2009)&lt;br /&gt;
    Suitable USB device not found, waiting.&lt;br /&gt;
is shown on the terminal of the computer.&lt;br /&gt;
&lt;br /&gt;
Then connect N900 to the computer via the USB cable and the Meego OS will boot.&lt;br /&gt;
You may need to keep the 'U' key pressed (on the phone's keyboard) when connecting the cable.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The command above will only load the kernel to the device, so next time you boot the device, the original kernel should be used and your Maemo 5 OS should boot normally.'''&lt;br /&gt;
&lt;br /&gt;
If you want to &amp;lt;u&amp;gt;flash&amp;lt;/u&amp;gt; the kernel to your device so that it is not forgotten when it is powered off, use option -f instead of option -l on command above. &lt;br /&gt;
&lt;br /&gt;
'''NOTE: It's highly recommended NOT to flash the kernel on your device, unless you really know what you're doing (so please use -l instead of -f). Don't blame us if you brick your device, you have been warned!'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|+ Examples of files that can be used with this guide&lt;br /&gt;
! MeeGo Version&lt;br /&gt;
! &amp;lt;kernel&amp;gt;&lt;br /&gt;
! &amp;lt;raw_image&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.99.2.20101019.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900 meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.80.0.20101001.1&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900 meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900]&lt;br /&gt;
| [http://repo.meego.com/MeeGo/builds/trunk/1.1.80.0.20101001.1/handset/images/meego-handset-armv7l-n900/meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2 meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:N900]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDKBugTriageMinutesArchive</id>
		<title>SDKBugTriageMinutesArchive</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDKBugTriageMinutesArchive"/>
				<updated>2011-06-27T12:22:46Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-22-05.57.html MeeGo SDK Bug Triage 20110622]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-15-05.58.html MeeGo SDK Bug Triage 20110615]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-08-05.57.html MeeGo SDK Bug Triage 20110608]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-25-05.58.html MeeGo SDK Bug Triage 20110525]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-18-05.58.html MeeGo SDK Bug Triage 20110518]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-11-05.58.html MeeGo SDK Bug Triage 20110511]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-04-05.59.html MeeGo SDK Bug Triage 20110504]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-04-27-05.59.html MeeGo SDK Bug Triage 20110427]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDKBugTriageMinutesArchive</id>
		<title>SDKBugTriageMinutesArchive</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDKBugTriageMinutesArchive"/>
				<updated>2011-06-16T11:16:50Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: added latest irc logs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-15-05.58.html MeeGo SDK Bug Triage 20110615]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-06-08-05.57.html MeeGo SDK Bug Triage 20110608]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-25-05.58.html MeeGo SDK Bug Triage 20110525]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-18-05.58.html MeeGo SDK Bug Triage 20110518]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-11-05.58.html MeeGo SDK Bug Triage 20110511]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-05-04-05.59.html MeeGo SDK Bug Triage 20110504]&lt;br /&gt;
*[http://irclogs.meego.com/meetbot/meego-meeting2/2011/meego-meeting2.2011-04-27-05.59.html MeeGo SDK Bug Triage 20110427]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Quality/Bugtriage</id>
		<title>Quality/Bugtriage</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Quality/Bugtriage"/>
				<updated>2011-06-14T08:38:41Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* MeeGo Bug Triage Team */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bug Triage Definition ==&lt;br /&gt;
* Bug Triage is a process to:&lt;br /&gt;
** Ensure bug report completeness &lt;br /&gt;
** Analyze and assign bug to proper component &lt;br /&gt;
** Assign bug to proper bug owner &lt;br /&gt;
** Set appropriate bug priority&lt;br /&gt;
** Adjust bug severity properly (initially set by bug reporter)&lt;br /&gt;
** Resolve obvious invalid, duplication, won’t fix bugs etc.&lt;br /&gt;
** Forward bugs in upstream components to [[Quality/UpstreamBugTrackers | upstream bugtrackers]] and adding the upstream URL to the URL field of the report, if applicable&lt;br /&gt;
&lt;br /&gt;
* Bug Triage Team&lt;br /&gt;
** A small team works on bug triage, could be experienced developer, distro engineer or QA&lt;br /&gt;
** Triage team members are expected to contribute significant time to bug triage&lt;br /&gt;
&lt;br /&gt;
Please share your triaging knowledge by adding/editing [[Quality/Bugtriage_Stock_Answers | MeeGo Bug Triage Stock Answers]].&lt;br /&gt;
&lt;br /&gt;
== Bug Triage Process ==&lt;br /&gt;
* Triage new incoming bug reports timely by each triage team (from twice a week to daily triage). &lt;br /&gt;
* Triage team members in each triage team could have different focus, such as IA arch bugs, ARM bugs or specific applications etc.&lt;br /&gt;
* Each triage team meet on IRC weekly to discuss controversial bug reports and any open reports&lt;br /&gt;
* Bug assignees accept bug reports by setting target milestones for triaged bug reports&lt;br /&gt;
* [http://meego.com/about/governance/program-office Program Managers] host bug report scrub meetings to discuss bug reports which do not have a target milestone set&lt;br /&gt;
&lt;br /&gt;
Triage Process Flow as follows:&lt;br /&gt;
[[File:bug_triage_process.jpg]]&lt;br /&gt;
&lt;br /&gt;
== MeeGo Bug Triage Guide ==&lt;br /&gt;
Check the [[Quality/Bugtriage_Guide|Triage Guide]] that explains good practices when triaging bug reports.&lt;br /&gt;
&lt;br /&gt;
== MeeGo Bug Triage Team ==&lt;br /&gt;
{|cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!|MeeGo Bug Triage Team&lt;br /&gt;
!|Member&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Core OS Triage || [http://meego.com/users/shuangeeer Yanshuang Zheng], [http://meego.com/users/ares2012  Jason Zhou], [http://meego.com/users/jarnoteivas Jarno Teivas], [http://meego.com/users/iekku Iekku Huttunen]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Handset UX Triage || Fan Zhao, Cathy Li, [http://meego.com/users/srikanthyarlagadda Srikanth Yarlagadda],[http://meego.com/users/jylha Petri Jylha], [http://meego.com/users/ceferron Chris Ferron], [http://meego.com/users/iekku Iekku Huttunen]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Netbook UX Triage || [http://meego.com/users/lingyu Ling Yu], Daniel Tao, [http://meego.com/users/yanglei Lei Yang], [http://meego.com/users/rossburton Ross Burton]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Tablet UX Triage || [http://meego.com/users/lingyu Ling Yu], Daniel Tao, [http://meego.com/users/yanglei Lei Yang]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo IVI Triage || [http://meego.com/users/shuangeeer Yanshuang Zheng]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Translation Triage || [http://meego.com/users/margie Margie Foster], [http://meego.com/users/pmccarty Patrick McCarty]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo SDK Triage || [http://meego.com/users/ionutgavaz Ionut Gavaz], Jackie Wu, [http://meego.com/users/edmondas Edmondas Girkantas], Azadeh Karimian, Max Yu, Juha Peisanen&lt;br /&gt;
|-&lt;br /&gt;
| MCTS (MeeGo Core System Testing) Triage || [http://meego.com/users/jarnoteivas Jarno Teivas], [http://meego.com/users/iekku Iekku Huttunen], Jeff Zheng&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MeeGo Bug Triage Meetings ===&lt;br /&gt;
&lt;br /&gt;
* MeeGo Core Bug Triage&lt;br /&gt;
** Time: Every Monday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo Handset Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo Netbook Bug Triage&lt;br /&gt;
** Time: Every Tuesday at 13:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo IVI Bug Triage&lt;br /&gt;
** Time: TBD&lt;br /&gt;
* MeeGo Translation Bug Triage&lt;br /&gt;
** Time: TBD&lt;br /&gt;
* MeeGo SDK Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MCTS Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 08:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
&lt;br /&gt;
Those meetings take place in the IRC channel'''#meego-meeting''' on [http://freenode.net irc.freenode.net].&lt;br /&gt;
&lt;br /&gt;
* MeeGo Tablet Bug Triage&lt;br /&gt;
** Time: Every Thursday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
** IRC channel '''#meego-meeting2''' on [http://freenode.net irc.freenode.net]&lt;br /&gt;
&lt;br /&gt;
To discuss MeeGo bug triaging at any time feel free to visit the IRC channel '''#meego-bugs''' on [http://freenode.net irc.freenode.net].&lt;br /&gt;
&lt;br /&gt;
* [[CoreBugTriageMinutesArchive|MeeGo Core Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[HandsetBugTriageMinutesArchive|MeeGo Handset Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[NetbookBugTriageMinutesArchive|MeeGo Netbook Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[SDKBugTriageMinutesArchive|MeeGo SDK Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
&lt;br /&gt;
=== Getting involved ===&lt;br /&gt;
&lt;br /&gt;
Anyone can sign up for the triage team and start helping (see the [[Quality/Bugtriage_Guide|Triage Guide]] for information and steps). Just send an email to the [http://lists.meego.com/listinfo/meego-qa meego-qa mailing list] to get involved in. Thanks for your contribution to MeeGo!&lt;br /&gt;
&lt;br /&gt;
== Other references ==&lt;br /&gt;
[[Quality/How_To_Report_Bugs|How to report MeeGo bugs?]]&lt;br /&gt;
&lt;br /&gt;
[[Category:QA]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Quality/Bugtriage</id>
		<title>Quality/Bugtriage</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Quality/Bugtriage"/>
				<updated>2011-06-14T08:35:48Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* MeeGo Bug Triage Team */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bug Triage Definition ==&lt;br /&gt;
* Bug Triage is a process to:&lt;br /&gt;
** Ensure bug report completeness &lt;br /&gt;
** Analyze and assign bug to proper component &lt;br /&gt;
** Assign bug to proper bug owner &lt;br /&gt;
** Set appropriate bug priority&lt;br /&gt;
** Adjust bug severity properly (initially set by bug reporter)&lt;br /&gt;
** Resolve obvious invalid, duplication, won’t fix bugs etc.&lt;br /&gt;
** Forward bugs in upstream components to [[Quality/UpstreamBugTrackers | upstream bugtrackers]] and adding the upstream URL to the URL field of the report, if applicable&lt;br /&gt;
&lt;br /&gt;
* Bug Triage Team&lt;br /&gt;
** A small team works on bug triage, could be experienced developer, distro engineer or QA&lt;br /&gt;
** Triage team members are expected to contribute significant time to bug triage&lt;br /&gt;
&lt;br /&gt;
Please share your triaging knowledge by adding/editing [[Quality/Bugtriage_Stock_Answers | MeeGo Bug Triage Stock Answers]].&lt;br /&gt;
&lt;br /&gt;
== Bug Triage Process ==&lt;br /&gt;
* Triage new incoming bug reports timely by each triage team (from twice a week to daily triage). &lt;br /&gt;
* Triage team members in each triage team could have different focus, such as IA arch bugs, ARM bugs or specific applications etc.&lt;br /&gt;
* Each triage team meet on IRC weekly to discuss controversial bug reports and any open reports&lt;br /&gt;
* Bug assignees accept bug reports by setting target milestones for triaged bug reports&lt;br /&gt;
* [http://meego.com/about/governance/program-office Program Managers] host bug report scrub meetings to discuss bug reports which do not have a target milestone set&lt;br /&gt;
&lt;br /&gt;
Triage Process Flow as follows:&lt;br /&gt;
[[File:bug_triage_process.jpg]]&lt;br /&gt;
&lt;br /&gt;
== MeeGo Bug Triage Guide ==&lt;br /&gt;
Check the [[Quality/Bugtriage_Guide|Triage Guide]] that explains good practices when triaging bug reports.&lt;br /&gt;
&lt;br /&gt;
== MeeGo Bug Triage Team ==&lt;br /&gt;
{|cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!|MeeGo Bug Triage Team&lt;br /&gt;
!|Member&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Core OS Triage || [http://meego.com/users/shuangeeer Yanshuang Zheng], [http://meego.com/users/ares2012  Jason Zhou], [http://meego.com/users/jarnoteivas Jarno Teivas], [http://meego.com/users/iekku Iekku Huttunen]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Handset UX Triage || Fan Zhao, Cathy Li, [http://meego.com/users/srikanthyarlagadda Srikanth Yarlagadda],[http://meego.com/users/jylha Petri Jylha], [http://meego.com/users/ceferron Chris Ferron], [http://meego.com/users/iekku Iekku Huttunen]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Netbook UX Triage || [http://meego.com/users/lingyu Ling Yu], Daniel Tao, [http://meego.com/users/yanglei Lei Yang], [http://meego.com/users/rossburton Ross Burton]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Tablet UX Triage || [http://meego.com/users/lingyu Ling Yu], Daniel Tao, [http://meego.com/users/yanglei Lei Yang]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo IVI Triage || [http://meego.com/users/shuangeeer Yanshuang Zheng]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Translation Triage || [http://meego.com/users/margie Margie Foster], [http://meego.com/users/pmccarty Patrick McCarty]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo SDK Triage || Juha Peisanen, Ionut Gavaz, [http://meego.com/users/edmondas Edmondas Girkantas], Azadeh Karimian, Jackie Wu, Max Yu&lt;br /&gt;
|-&lt;br /&gt;
| MCTS (MeeGo Core System Testing) Triage || [http://meego.com/users/jarnoteivas Jarno Teivas], [http://meego.com/users/iekku Iekku Huttunen], Jeff Zheng&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MeeGo Bug Triage Meetings ===&lt;br /&gt;
&lt;br /&gt;
* MeeGo Core Bug Triage&lt;br /&gt;
** Time: Every Monday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo Handset Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo Netbook Bug Triage&lt;br /&gt;
** Time: Every Tuesday at 13:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo IVI Bug Triage&lt;br /&gt;
** Time: TBD&lt;br /&gt;
* MeeGo Translation Bug Triage&lt;br /&gt;
** Time: TBD&lt;br /&gt;
* MeeGo SDK Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MCTS Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 08:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
&lt;br /&gt;
Those meetings take place in the IRC channel'''#meego-meeting''' on [http://freenode.net irc.freenode.net].&lt;br /&gt;
&lt;br /&gt;
* MeeGo Tablet Bug Triage&lt;br /&gt;
** Time: Every Thursday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
** IRC channel '''#meego-meeting2''' on [http://freenode.net irc.freenode.net]&lt;br /&gt;
&lt;br /&gt;
To discuss MeeGo bug triaging at any time feel free to visit the IRC channel '''#meego-bugs''' on [http://freenode.net irc.freenode.net].&lt;br /&gt;
&lt;br /&gt;
* [[CoreBugTriageMinutesArchive|MeeGo Core Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[HandsetBugTriageMinutesArchive|MeeGo Handset Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[NetbookBugTriageMinutesArchive|MeeGo Netbook Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[SDKBugTriageMinutesArchive|MeeGo SDK Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
&lt;br /&gt;
=== Getting involved ===&lt;br /&gt;
&lt;br /&gt;
Anyone can sign up for the triage team and start helping (see the [[Quality/Bugtriage_Guide|Triage Guide]] for information and steps). Just send an email to the [http://lists.meego.com/listinfo/meego-qa meego-qa mailing list] to get involved in. Thanks for your contribution to MeeGo!&lt;br /&gt;
&lt;br /&gt;
== Other references ==&lt;br /&gt;
[[Quality/How_To_Report_Bugs|How to report MeeGo bugs?]]&lt;br /&gt;
&lt;br /&gt;
[[Category:QA]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Quality/Bugtriage</id>
		<title>Quality/Bugtriage</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Quality/Bugtriage"/>
				<updated>2011-06-14T08:16:14Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* MeeGo Bug Triage Team */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bug Triage Definition ==&lt;br /&gt;
* Bug Triage is a process to:&lt;br /&gt;
** Ensure bug report completeness &lt;br /&gt;
** Analyze and assign bug to proper component &lt;br /&gt;
** Assign bug to proper bug owner &lt;br /&gt;
** Set appropriate bug priority&lt;br /&gt;
** Adjust bug severity properly (initially set by bug reporter)&lt;br /&gt;
** Resolve obvious invalid, duplication, won’t fix bugs etc.&lt;br /&gt;
** Forward bugs in upstream components to [[Quality/UpstreamBugTrackers | upstream bugtrackers]] and adding the upstream URL to the URL field of the report, if applicable&lt;br /&gt;
&lt;br /&gt;
* Bug Triage Team&lt;br /&gt;
** A small team works on bug triage, could be experienced developer, distro engineer or QA&lt;br /&gt;
** Triage team members are expected to contribute significant time to bug triage&lt;br /&gt;
&lt;br /&gt;
Please share your triaging knowledge by adding/editing [[Quality/Bugtriage_Stock_Answers | MeeGo Bug Triage Stock Answers]].&lt;br /&gt;
&lt;br /&gt;
== Bug Triage Process ==&lt;br /&gt;
* Triage new incoming bug reports timely by each triage team (from twice a week to daily triage). &lt;br /&gt;
* Triage team members in each triage team could have different focus, such as IA arch bugs, ARM bugs or specific applications etc.&lt;br /&gt;
* Each triage team meet on IRC weekly to discuss controversial bug reports and any open reports&lt;br /&gt;
* Bug assignees accept bug reports by setting target milestones for triaged bug reports&lt;br /&gt;
* [http://meego.com/about/governance/program-office Program Managers] host bug report scrub meetings to discuss bug reports which do not have a target milestone set&lt;br /&gt;
&lt;br /&gt;
Triage Process Flow as follows:&lt;br /&gt;
[[File:bug_triage_process.jpg]]&lt;br /&gt;
&lt;br /&gt;
== MeeGo Bug Triage Guide ==&lt;br /&gt;
Check the [[Quality/Bugtriage_Guide|Triage Guide]] that explains good practices when triaging bug reports.&lt;br /&gt;
&lt;br /&gt;
== MeeGo Bug Triage Team ==&lt;br /&gt;
{|cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!|MeeGo Bug Triage Team&lt;br /&gt;
!|Member&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Core OS Triage || [http://meego.com/users/shuangeeer Yanshuang Zheng], [http://meego.com/users/ares2012  Jason Zhou], [http://meego.com/users/jarnoteivas Jarno Teivas], [http://meego.com/users/iekku Iekku Huttunen]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Handset UX Triage || Fan Zhao, Cathy Li, [http://meego.com/users/srikanthyarlagadda Srikanth Yarlagadda],[http://meego.com/users/jylha Petri Jylha], [http://meego.com/users/ceferron Chris Ferron], [http://meego.com/users/iekku Iekku Huttunen]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Netbook UX Triage || [http://meego.com/users/lingyu Ling Yu], Daniel Tao, [http://meego.com/users/yanglei Lei Yang], [http://meego.com/users/rossburton Ross Burton]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Tablet UX Triage || [http://meego.com/users/lingyu Ling Yu], Daniel Tao, [http://meego.com/users/yanglei Lei Yang]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo IVI Triage || [http://meego.com/users/shuangeeer Yanshuang Zheng]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo Translation Triage || [http://meego.com/users/margie Margie Foster], [http://meego.com/users/pmccarty Patrick McCarty]&lt;br /&gt;
|-&lt;br /&gt;
| MeeGo SDK Triage || Juha Peisanen, Ionut Gavaz, [http://meego.com/users/edmondas Edmondas Girkantas], Jackie Wu, Max Yu&lt;br /&gt;
|-&lt;br /&gt;
| MCTS (MeeGo Core System Testing) Triage || [http://meego.com/users/jarnoteivas Jarno Teivas], [http://meego.com/users/iekku Iekku Huttunen], Jeff Zheng&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MeeGo Bug Triage Meetings ===&lt;br /&gt;
&lt;br /&gt;
* MeeGo Core Bug Triage&lt;br /&gt;
** Time: Every Monday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo Handset Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo Netbook Bug Triage&lt;br /&gt;
** Time: Every Tuesday at 13:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MeeGo IVI Bug Triage&lt;br /&gt;
** Time: TBD&lt;br /&gt;
* MeeGo Translation Bug Triage&lt;br /&gt;
** Time: TBD&lt;br /&gt;
* MeeGo SDK Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
* MCTS Bug Triage&lt;br /&gt;
** Time: Every Wednesday at 08:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
&lt;br /&gt;
Those meetings take place in the IRC channel'''#meego-meeting''' on [http://freenode.net irc.freenode.net].&lt;br /&gt;
&lt;br /&gt;
* MeeGo Tablet Bug Triage&lt;br /&gt;
** Time: Every Thursday at 07:00 [http://www.timeanddate.com/worldclock/converter.html UTC]&lt;br /&gt;
** IRC channel '''#meego-meeting2''' on [http://freenode.net irc.freenode.net]&lt;br /&gt;
&lt;br /&gt;
To discuss MeeGo bug triaging at any time feel free to visit the IRC channel '''#meego-bugs''' on [http://freenode.net irc.freenode.net].&lt;br /&gt;
&lt;br /&gt;
* [[CoreBugTriageMinutesArchive|MeeGo Core Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[HandsetBugTriageMinutesArchive|MeeGo Handset Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[NetbookBugTriageMinutesArchive|MeeGo Netbook Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
* [[SDKBugTriageMinutesArchive|MeeGo SDK Bug Triage Meeting Minutes Archive]]&lt;br /&gt;
&lt;br /&gt;
=== Getting involved ===&lt;br /&gt;
&lt;br /&gt;
Anyone can sign up for the triage team and start helping (see the [[Quality/Bugtriage_Guide|Triage Guide]] for information and steps). Just send an email to the [http://lists.meego.com/listinfo/meego-qa meego-qa mailing list] to get involved in. Thanks for your contribution to MeeGo!&lt;br /&gt;
&lt;br /&gt;
== Other references ==&lt;br /&gt;
[[Quality/How_To_Report_Bugs|How to report MeeGo bugs?]]&lt;br /&gt;
&lt;br /&gt;
[[Category:QA]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-06-09T12:29:06Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]] (Updated on 28th April)&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' this feature is already implemented in [https://meego.gitorious.org/meego-developer-tools/madde/blobs/master/src/madlib/xrpm.pl madde].&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
rsync speed ~900KB/s &lt;br /&gt;
&lt;br /&gt;
Issues: rsync can't change ownership (chown) of copied files while using native Windows sharing service on Mac OS X, e.g.:&lt;br /&gt;
 rsync: chown &amp;quot;/mnt/bin&amp;quot; failed: Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
I can't test it fully (using Qt-creator) because MeeGo SDK porting to Mac OS X is still in progress.&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Build_Infrastructure/Packagers_Developers/CLI_Part_1</id>
		<title>Build Infrastructure/Packagers Developers/CLI Part 1</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Build_Infrastructure/Packagers_Developers/CLI_Part_1"/>
				<updated>2011-05-24T13:24:00Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* OSC Tool Install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to use the MeeGo / OBS Command Line Interface =&lt;br /&gt;
&lt;br /&gt;
Once you've successfully used the the MeeGo / OBS Web Interface, we'll show you how you can check out packages from the Meego project for local modification and building.&lt;br /&gt;
&lt;br /&gt;
== OSC Tool Install ==&lt;br /&gt;
&lt;br /&gt;
You will need to install some tools in order to access and build packages. This includes the command line client 'osc', and packages that it relies on.&lt;br /&gt;
&lt;br /&gt;
The easiest method is to use your distribution's package manager to pull the osc package and its requirements. Package repositories for many distributions are available [http://download.opensuse.org/repositories/openSUSE:/Tools/ here].&lt;br /&gt;
&lt;br /&gt;
 For example, with Fedora 12:&lt;br /&gt;
  # cd /etc/yum.repos.d&lt;br /&gt;
  # wget http://download.opensuse.org/repositories/openSUSE:/Tools/Fedora_12/openSUSE:Tools.repo&lt;br /&gt;
  # wget http://download.opensuse.org/repositories/openSUSE:/Tools:/MeeGo/Fedora_12/openSUSE:Tools:MeeGo.repo&lt;br /&gt;
  # yum install osc&lt;br /&gt;
&lt;br /&gt;
The upstream [http://en.opensuse.org/openSUSE:Build_Service_Tutorial OBS Tutorial] describes more generalities about using the tools.&lt;br /&gt;
&lt;br /&gt;
== Running OSC the first time ==&lt;br /&gt;
&lt;br /&gt;
Prepare to run OSC.&lt;br /&gt;
&lt;br /&gt;
 Tip: To use a different source of packages and build server access,&lt;br /&gt;
 you can easily create a wrapper script to do this for you:&lt;br /&gt;
  $ cat &amp;gt; ~/bin/losc&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  exec osc -Ahttps://api.meego.com &amp;quot;$@&amp;quot;&lt;br /&gt;
  $ chmod +x ~/bin/losc &lt;br /&gt;
&lt;br /&gt;
When you're using pub meego osc you should use:&lt;br /&gt;
  exec osc -Ahttps://api'''.pub'''.meego.com &amp;quot;$@&amp;quot;&lt;br /&gt;
instead of&lt;br /&gt;
  exec osc -Ahttps://api.meego.com &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The first time, OSC will ask you some questions:&lt;br /&gt;
&lt;br /&gt;
 $ losc ls&lt;br /&gt;
  &lt;br /&gt;
 Your user account / password are not configured yet.&lt;br /&gt;
 You will be asked for them below, and they will be stored in&lt;br /&gt;
 /home/james/.oscrc for future use.&lt;br /&gt;
 &lt;br /&gt;
 Creating osc configuration file /home/james/.oscrc ...&lt;br /&gt;
 Username: &amp;lt;login&amp;gt;&lt;br /&gt;
 Password: &amp;lt;password&amp;gt;&lt;br /&gt;
 done&lt;br /&gt;
 *** certificate verify failed at depth 0&lt;br /&gt;
 Subject:  /O=build.linux.com/OU=Domain Control Validated/CN=build.linux.com&lt;br /&gt;
 Issuer:   /C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287&lt;br /&gt;
 Valid:  May 14 21:46:46 2010 GMT - Apr 26 21:10:19 2012 GMT&lt;br /&gt;
 Fingerprint(MD5):   C13D91AB12008D2F9FD901A8FADDFC75&lt;br /&gt;
 Fingerprint(SHA1):  144018EC455C20F395F18879DFD75E5B500B84F0&lt;br /&gt;
 Reason: unable to get local issuer certificate&lt;br /&gt;
 Reason: certificate not trusted&lt;br /&gt;
 Reason: unable to verify the first certificate&lt;br /&gt;
 &lt;br /&gt;
 The server certificate failed verification&lt;br /&gt;
 &lt;br /&gt;
 Would you like to&lt;br /&gt;
 0 - quit (default)&lt;br /&gt;
 1 - continue anyways&lt;br /&gt;
 2 - trust the server certificate permanently&lt;br /&gt;
 9 - review the server certificate&lt;br /&gt;
 &lt;br /&gt;
 Enter choice [0129]: 2&lt;br /&gt;
&lt;br /&gt;
At this point the configuration is complete and osc completes the 'ls' command, listing available build targets. You should see your home project listed, ex: home:&amp;lt;login&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tip: Configuring OSC using $HOME/.oscrc ==&lt;br /&gt;
&lt;br /&gt;
OSC may be customized using the file $HOME/.oscrc. Some hints:&lt;br /&gt;
&lt;br /&gt;
To make it easier to run needed things as root, configure for sudo&lt;br /&gt;
&lt;br /&gt;
 In $HOME/.oscrc set:&lt;br /&gt;
  su-wrapper = sudo&lt;br /&gt;
 And then run 'visudo' and add the line:&lt;br /&gt;
  &amp;lt;yourlogin&amp;gt; ALL=NOPASSWD: /usr/bin/build&lt;br /&gt;
&lt;br /&gt;
If you tend to build for several different architectures/projects, it can be helpful to keep each build-root seperate, in $HOME/.oscrc, set:&lt;br /&gt;
&lt;br /&gt;
 build-root = /var/tmp/build-root/%(project)s-%(arch)s-%(package)s&lt;br /&gt;
&lt;br /&gt;
== Summary and next steps ==&lt;br /&gt;
&lt;br /&gt;
This guide gave an introduction on how to set up and initialize the 'osc' tool.&lt;br /&gt;
Next you will check out your project from the server and build it. Click [[Build_Infrastructure/Packagers_Developers/CLI_Part_2|here]] to open the 2nd part.&lt;br /&gt;
&lt;br /&gt;
[[Category:Build Infrastructure]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Linux</id>
		<title>SDK/Docs/1.2/MeeGo SDK 1.2 Preview for Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Linux"/>
				<updated>2011-05-18T12:46:24Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: update installer version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Download the MeeGo SDK ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Download and install the SDK'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Download information&lt;br /&gt;
|-&lt;br /&gt;
! File !! File Size !! MD5SUM !! Installed Size&lt;br /&gt;
|-&lt;br /&gt;
| [http://s3.amazonaws.com/MeeGoSDK/installer/Linux/meego-sdk-installer-online-20110516  MeeGo SDK 1.2] || 26MB || 270feaadeab45da9bffe162bb792a919  || 5.2 GB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 $ chmod +x ./meego-sdk-installer-online&lt;br /&gt;
 $ ./meego-sdk-installer-online --verbose&lt;br /&gt;
&lt;br /&gt;
Note that --verbose is  optional. &amp;lt;br&amp;gt;&lt;br /&gt;
SDK content details are described on the [[SDK/Docs/1.2/MeeGo SDK 1.2 Components|SDK Component Summary]] page.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;'''Select the components that will be installed. Mainly select the target for development. During downloading, once one of components failed to download due to the connection issue, just click 'Retry' button in the notification dialog to resume.'''&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Installer-select component.png]]&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
== Install a MeeGo Target ==&lt;br /&gt;
A ''Target'' is used to build programs using the MeeGo toolchain and libraries (sysroot). Except you can install target in the process of SDK, you also can install target by launching Maintain MeeGo SDK.&lt;br /&gt;
'''MeeGo SDK 1.2 Preview &amp;gt; Maintain MeeGo SDk''' . Select targets from SDK targest and click next. It will install targets you selected&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Select target.png]]  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Next Step:[[SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Linux/Configure_Qt_Creator_to_Develop_MeeGo_Applications]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK]]&lt;br /&gt;
[[Category:Meego-1.2]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Sysroot-extension3.pdf</id>
		<title>File:Sysroot-extension3.pdf</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Sysroot-extension3.pdf"/>
				<updated>2011-05-12T10:46:04Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: uploaded a new version of &amp;amp;quot;File:Sysroot-extension3.pdf&amp;amp;quot;: testing pdf upload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-28T10:55:35Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]] (Updated on 28th April)&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' this feature is already implemented in [https://meego.gitorious.org/meego-developer-tools/madde/blobs/master/src/madlib/xrpm.pl madde].&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
rsync speed ~900KB/s &lt;br /&gt;
&lt;br /&gt;
Issues: rsync can't change ownership (chown) of copied files while using native Windows sharing service on Mac OS X, e.g.:&lt;br /&gt;
 rsync: chown &amp;quot;/mnt/bin&amp;quot; failed: Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
I can't test it fully (using Qt-creator) because MeeGo SDK porting to Mac OS X is still in progress.&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Sysroot-extension3.pdf</id>
		<title>File:Sysroot-extension3.pdf</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Sysroot-extension3.pdf"/>
				<updated>2011-04-28T10:54:43Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: uploaded a new version of &amp;amp;quot;File:Sysroot-extension3.pdf&amp;amp;quot;: Updated presentation, added slide about Mac OS X and sync. idea&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-28T09:42:16Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' this feature is already implemented in [https://meego.gitorious.org/meego-developer-tools/madde/blobs/master/src/madlib/xrpm.pl madde].&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
rsync speed ~900KB/s &lt;br /&gt;
&lt;br /&gt;
Issues: rsync can't change ownership (chown) of copied files while using native Windows sharing service on Mac OS X, e.g.:&lt;br /&gt;
 rsync: chown &amp;quot;/mnt/bin&amp;quot; failed: Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
I can't test it fully (using Qt-creator) because MeeGo SDK porting to Mac OS X is still in progress.&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-28T09:37:12Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' this feature is already implemented.&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
rsync speed ~900KB/s &lt;br /&gt;
&lt;br /&gt;
Issues: rsync can't change ownership (chown) of copied files while using native Windows sharing service on Mac OS X, e.g.:&lt;br /&gt;
 rsync: chown &amp;quot;/mnt/bin&amp;quot; failed: Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
I can't test it fully (using Qt-creator) because MeeGo SDK porting to Mac OS X is still in progress.&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK]]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/File:Sysroot-extension3.pdf</id>
		<title>File:Sysroot-extension3.pdf</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/File:Sysroot-extension3.pdf"/>
				<updated>2011-04-18T11:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-11T10:48:41Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Mac OS X share in QEMU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
rsync speed ~900KB/s &lt;br /&gt;
&lt;br /&gt;
Issues: rsync can't change ownership (chown) of copied files while using native Windows sharing service on Mac OS X, e.g.:&lt;br /&gt;
 rsync: chown &amp;quot;/mnt/bin&amp;quot; failed: Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
I can't test it fully (using Qt-creator) because MeeGo SDK porting to Mac OS X is still in progress.&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-11T10:27:43Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Mac OS X share in QEMU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
rsync speed ~900KB/s &lt;br /&gt;
&lt;br /&gt;
Issues: rsync can't change ownership (chown) of copied files while using native Windows sharing service on Mac OS X, e.g.:&lt;br /&gt;
 rsync: chown &amp;quot;/mnt/bin&amp;quot; failed: Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-11T10:16:45Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Mac OS X share in QEMU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
rsync speed ~900KB/s &lt;br /&gt;
&lt;br /&gt;
Issues: TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-11T10:10:06Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Windows share in QEMU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X share in QEMU ===&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --no-p --no-g --chmod=ugo=rwX --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Issues: TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-11T08:05:23Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Windows share in QEMU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' / /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-07T07:55:34Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Windows share in QEMU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-07T07:55:01Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* QEMU share on Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\127.0.0.1\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-07T07:52:39Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
* some PoF scripts on [https://www.gitorious.org/sysroot-extend Gitorious]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\1.2.3.4\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-07T07:39:51Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Linker options for qmake */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\1.2.3.4\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Other notes ==&lt;br /&gt;
=== Linker options for qmake ===&lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
=== Required directories for compilation ===&lt;br /&gt;
I found that these directories are required in Qt-Creator to compile application: &lt;br /&gt;
&lt;br /&gt;
 /lib&lt;br /&gt;
 /usr/lib&lt;br /&gt;
 /usr/include&lt;br /&gt;
 /usr/share&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-06T12:01:51Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\1.2.3.4\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Linker options for qmake == &lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format (qemu version 0.12.5)&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
Note: qemu-img version (0.14.50) from git repository is much faster - the same conversation takes only ~1m30s&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-06T11:50:21Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Cons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\1.2.3.4\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Linker options for qmake == &lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-06T07:57:32Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentations (4-8 slides max) about my findings:&lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* it's not clear how used prefix could affect libraries later&lt;br /&gt;
* works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\1.2.3.4\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Linker options for qmake == &lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/SDK/Sysroot_extension</id>
		<title>SDK/Sysroot extension</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/SDK/Sysroot_extension"/>
				<updated>2011-04-06T07:56:53Z</updated>
		
		<summary type="html">&lt;p&gt;Edmondas: /* Goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; THIS STUDY IS IN PROGRESS &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Edmondas Girkantas&lt;br /&gt;
&lt;br /&gt;
Interested parties: Veli Kaksonen&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The developer shall be able to extend the sysroot with additional libraries.&lt;br /&gt;
&lt;br /&gt;
See http://bugs.meego.com/show_bug.cgi?id=9427&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
* analyse possible ways to extend the sysroot, write pros &amp;amp; cons for every option&lt;br /&gt;
* check option availability on Linux and Windows platforms; later on Mac OS X (Note: there is no MeeGo SDK installer for Mac OS X yet)&lt;br /&gt;
* create short presentation 4-8 slides about my findings &lt;br /&gt;
** 1st presentation - [[Media:Sysroot-extension.pdf|QEMU+rsync]]&lt;br /&gt;
** 2nd presentation - [[Media:Sysroot-extension2.pdf|Windows and other sync. tools]]&lt;br /&gt;
** 3rd presentation - [[Media:Sysroot-extension3.pdf|Samba and shared folders]]&lt;br /&gt;
&lt;br /&gt;
== Definitions  ==&lt;br /&gt;
&lt;br /&gt;
Main assets are:&lt;br /&gt;
* sysroot - tree structure which contains files/directories from real environment&lt;br /&gt;
* library - 3rd party API required to get some functionality&lt;br /&gt;
* environment - target system which is used to install additional library and create new sysroot (if needed) &lt;br /&gt;
&lt;br /&gt;
Sysroots can be in a form of:&lt;br /&gt;
* core - contains only the most important apps/libs&lt;br /&gt;
* full - full environment&lt;br /&gt;
&lt;br /&gt;
Libraries can be in a form of:&lt;br /&gt;
* RPM package - some existing library in MeeGo repository&lt;br /&gt;
* source tarball - some 3rd party library, not available in MeeGo&lt;br /&gt;
&lt;br /&gt;
Possible environments (that can be used to build sysroot and install library):&lt;br /&gt;
* QEMU machine - virtual machine with running system, which has network and virtual image access &lt;br /&gt;
* Device - real device, which has network access&lt;br /&gt;
* host system - computer with supported os&lt;br /&gt;
* sysroot - existing file tree on host system&lt;br /&gt;
* OBS - remote building service&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
For RPM packages&lt;br /&gt;
# Extract content of RPM to existing sysroot (like mad-admin xdpkg)&lt;br /&gt;
# Install RPM in chrooted environment&lt;br /&gt;
# Install RPM into running QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Install RPM into running QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
&lt;br /&gt;
For source tarballs:&lt;br /&gt;
# Use compilation prefix (--prefix)&lt;br /&gt;
# Chroot to existing sysroot, build and install library&lt;br /&gt;
# Build and install library on QEMU machine or device, copy files to sysroot (create/update)&lt;br /&gt;
# Build and install library on QEMU machine or device, mount QEMU disk as sysroot&lt;br /&gt;
# Generate your own sysroot with installed library (local OBS)&lt;br /&gt;
&lt;br /&gt;
Copying options:&lt;br /&gt;
# Recursive copying (cp -r)&lt;br /&gt;
# Using rsync via ssh protocol&lt;br /&gt;
# Using rsync via rsync protocol&lt;br /&gt;
# Copying from mounted raw image&lt;br /&gt;
# Copying from mounted system via sshfs&lt;br /&gt;
&lt;br /&gt;
== RPM packages ==&lt;br /&gt;
&lt;br /&gt;
=== Extract RPM to sysroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Implement extra rpm package (mad-admin xrpm) installation/removal interface (like existing xdpkg)&lt;br /&gt;
&lt;br /&gt;
It is possible to download single rpm package and extract content to sysroot:&lt;br /&gt;
 rpm2cpio LIBRARY.rpm | cpio -idmv&lt;br /&gt;
&lt;br /&gt;
''Note:'' probably need to create symlinks from /usr/lib to /lib&lt;br /&gt;
&lt;br /&gt;
If package has other dependencies then it is possible to use QEMU/device:&lt;br /&gt;
 zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packages will be placed (on device/vm) in&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# quite easy way to install single rpm package (library with no dependencies)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# requires additional work if package has dependencies&lt;br /&gt;
# some packages have pre/post-install scripts&lt;br /&gt;
# this option is good only for prebuild packages but not to install library from source tarball&lt;br /&gt;
# requires to register package in package system&lt;br /&gt;
&lt;br /&gt;
=== Install RPM inside chroot ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Download existing library (rpm) and put it to sysroot, then use mic-chroot to enter sysroot environment. &lt;br /&gt;
&lt;br /&gt;
'''Note''': this is only for meege-core-* sysroots, because zypper is available on other sysroots&lt;br /&gt;
&lt;br /&gt;
Fetch prebuilt package (on MeeGo emulator/device):&lt;br /&gt;
 # zypper install --download-only &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package and all dependencies will be stored (on Linux) in this directory:&lt;br /&gt;
 /var/cache/zypp/packages/&lt;br /&gt;
&lt;br /&gt;
copy all files to sysroot, e.g.&lt;br /&gt;
 /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs/&lt;br /&gt;
&lt;br /&gt;
enter sysroot environment:&lt;br /&gt;
 $ sudo mic-chroot &amp;lt;path_to_sysroot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
install package manually:&lt;br /&gt;
 $ sudo rpm -i &amp;lt;package&amp;gt;&lt;br /&gt;
&lt;br /&gt;
exit from chrooted environment:&lt;br /&gt;
 $ exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to install existing package (library) or package built using OBS service&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* need to download packages from QEMU/device before chrooting to sysroot&lt;br /&gt;
* sysroot (meego-core-*) could have zypper by default, then it would be possible to extend sysroot without QEMU/device&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Install in QEMU/device, copy files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use ssh protocol and rsync to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
''Idea:'' Maybe we don't need to sync full filesystem, in most cases /usr/lib and /usr/include are enough   &lt;br /&gt;
&lt;br /&gt;
''Note:'' Perhaps it's possible to improve rsync performance by changing buffer size, e.g.:&lt;br /&gt;
 $ rsync -a --sockopts=SO_SNDBUF=2000000,SO_RCVBUF=2000000 ...&lt;br /&gt;
&lt;br /&gt;
'''Note:''' rsync exists by default only on handset qemu image&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# No need for building sysroots with OBS&lt;br /&gt;
# No need for additional error prone tools for updating the sysroots (just use target package management system)&lt;br /&gt;
# It will save developer's time, because library will be compiled only once on QEMU or device&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Additional time for developer initially because the developer needs to boot Qemu or device for that&lt;br /&gt;
# QEMU has some issues with ATI/Nvidia cards (handset only?)&lt;br /&gt;
# there is no native version of rsync for Windows, existing tools use cygwin, performance is bad&lt;br /&gt;
# Some files could change during rsync copying, e.g.&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/fulltext.db-journal&amp;quot;&lt;br /&gt;
 file has vanished: &amp;quot;/home/meego/.cache/tracker/meta.db-journal&amp;quot;&lt;br /&gt;
 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1526) [generator=3.0.7]&lt;br /&gt;
&lt;br /&gt;
== Source tarballs ==&lt;br /&gt;
&lt;br /&gt;
=== Use compilation prefix ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use madde cross compilation target and installation prefix.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ wget http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 $ cd sqlite-autoconf-3070500/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 ./configure --prefix \&lt;br /&gt;
     /usr/lib/madde/linux-i686/sysroots/meego-handset-ia32-madde-sysroot-1.1.20110106.1204-fs/&lt;br /&gt;
 $ mad -t meego-handset-ia32-1.1.2 make&lt;br /&gt;
 $ sudo mad -t meego-handset-ia32-1.1.2 make install&lt;br /&gt;
&lt;br /&gt;
Other interesting way:&lt;br /&gt;
 mad -t &amp;lt;target&amp;gt; bash --noprofile --norc&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* easy way to build and install using madde toolchains&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* it's not clear how used prefix could affect libraries later&lt;br /&gt;
* works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Chroot, build &amp;amp; install ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Fetch library source-code and build it in chrooted environment.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
 $ sudo mic-chroot /usr/lib/madde/linux-i686/sysroots/meego-core-ia32-madde-sysroot-1.1-fs&lt;br /&gt;
 # cd /root&lt;br /&gt;
 # curl -o sqlite-autoconf-3070500.tar.gz http://sqlite.org/sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # tar xvzf sqlite-autoconf-3070500.tar.gz&lt;br /&gt;
 # cd sqlite-autoconf-3070500&lt;br /&gt;
 # ./configure --prefix /usr&lt;br /&gt;
 # make &amp;amp;&amp;amp; make install&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
* no need to have runtime (QEMU/device)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
* library might have dependencies on other libs that are not in sysroot&lt;br /&gt;
* requires manual work or an additional build tool (like OBS) which will extract, configure (if needed), build and install library&lt;br /&gt;
* mic-chroot works only on Linux&lt;br /&gt;
&lt;br /&gt;
=== Build &amp;amp; install on QEMU/device, copy files ===&lt;br /&gt;
&lt;br /&gt;
Same as for [[#Install_in_QEMU.2Fdevice.2C_copy_files|RPM]]&lt;br /&gt;
&lt;br /&gt;
== Benchmarks ==&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync on running QEMU vm ===&lt;br /&gt;
&lt;br /&gt;
Testing plan - install 5 different libraries, measure installation and synchronisation time.&lt;br /&gt;
&lt;br /&gt;
List of libraries used in this test:&lt;br /&gt;
&lt;br /&gt;
* ''JSON Glib interface library'', packages: json-glib json-glib-devel json-glib-doc&lt;br /&gt;
* ''wxWidgets library'', packages: wxBase wxGTK wxGTK-devel wxGTK-gl wxGTK-media&lt;br /&gt;
* ''Boost library'', packages: boost boost-date-time boost-devel boost-doc boost-filesystem boost-graph boost-iostreams boost-math boost-program-options boost-python boost-regex boost-serialization boost-signals boost-static boost-system boost-test boost-thread boost-wave&lt;br /&gt;
* ''Apache Portable Runtime library'', packages: apr apr-devel apr-util apr-util-devel apr-util-ldap apr-util-sqlite&lt;br /&gt;
* ''Universally unique identifier library'', packages: uuid uuid-c++ uuid-c++-devel uuid-dce uuid-dce-devel uuid-devel&lt;br /&gt;
&lt;br /&gt;
''Note:'' packages are listed without dependencies&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (without stopping vm every time before installing new library, install/sync times is better because of os caching):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''RPMs count'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| -&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 164 s&lt;br /&gt;
| -&lt;br /&gt;
| 180 s&lt;br /&gt;
| -&lt;br /&gt;
| 165 s&lt;br /&gt;
| -&lt;br /&gt;
| 169 s (2m49s)&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 11&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 60 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 113 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 77 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 83 s (1m23s)&lt;br /&gt;
| 6 s&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 35&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 152 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 293 s&lt;br /&gt;
| 8 s&lt;br /&gt;
| 177 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 207s (3m27s)&lt;br /&gt;
| 7 s&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 18&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 275 s&lt;br /&gt;
| 22 s&lt;br /&gt;
| 269 s&lt;br /&gt;
| 23 s&lt;br /&gt;
| 262 s&lt;br /&gt;
| 19 s&lt;br /&gt;
| 268 s (4m28s)&lt;br /&gt;
| 21 s&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 13&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 52 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
| 67 s&lt;br /&gt;
| 4 s&lt;br /&gt;
| 59 s&lt;br /&gt;
| 3 s&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 6&lt;br /&gt;
| 1771 mb (&amp;lt;+1)&lt;br /&gt;
| 13 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 1 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 2 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 2 s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' rpm installation time depends on network connectivity&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installation and rsync with vm start/stop ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 170 s&lt;br /&gt;
| -&lt;br /&gt;
| 181 s&lt;br /&gt;
| -&lt;br /&gt;
| 177 s (2m57s)&lt;br /&gt;
| ~8.0&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 80 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 70 s (1m10s)&lt;br /&gt;
| 10 s&lt;br /&gt;
| ~4.1&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 116 s&lt;br /&gt;
| 14 s&lt;br /&gt;
| 181 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 159 s (2m39s)&lt;br /&gt;
| 12 s&lt;br /&gt;
| ~6.8&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 27 s&lt;br /&gt;
| 219 s&lt;br /&gt;
| 31 s&lt;br /&gt;
| 193 s (3m13s)&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 38 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 50 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 46 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| ~2.2&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb  (&amp;lt;+1)&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing rpms and rsync in qemu with -nographics ===&lt;br /&gt;
&lt;br /&gt;
Results table for netbook vm (stopping and starting vm before each installation):&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Library'''&lt;br /&gt;
| '''Used space'''&lt;br /&gt;
| '''1 test: install time'''&lt;br /&gt;
| '''1 test: sync time'''&lt;br /&gt;
| '''2 test: install time'''&lt;br /&gt;
| '''2 test: sync time'''&lt;br /&gt;
| '''3 test: install time'''&lt;br /&gt;
| '''3 test: sync time'''&lt;br /&gt;
| '''Average install time'''&lt;br /&gt;
| '''Average sync time'''&lt;br /&gt;
| '''sync speed mb/s'''&lt;br /&gt;
|-&lt;br /&gt;
| Initial sync&lt;br /&gt;
| 1414 mb&lt;br /&gt;
| -&lt;br /&gt;
| 172 s&lt;br /&gt;
| -&lt;br /&gt;
| 202 s&lt;br /&gt;
| -&lt;br /&gt;
| 193 s&lt;br /&gt;
| -&lt;br /&gt;
| 189 s (3m9s)&lt;br /&gt;
| ~7.5&lt;br /&gt;
|-&lt;br /&gt;
| json-glib&lt;br /&gt;
| 1455 mb (+41)&lt;br /&gt;
| 64 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 54 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 62 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| 60 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~3&lt;br /&gt;
|-&lt;br /&gt;
| wx&lt;br /&gt;
| 1537 mb (+82)&lt;br /&gt;
| 125 s&lt;br /&gt;
| 11 s&lt;br /&gt;
| 139 s&lt;br /&gt;
| 17 s&lt;br /&gt;
| 141 s&lt;br /&gt;
| 10 s&lt;br /&gt;
| 135 s&lt;br /&gt;
| 13 s&lt;br /&gt;
| ~6.3&lt;br /&gt;
|-&lt;br /&gt;
| boost&lt;br /&gt;
| 1758 mb (+221)&lt;br /&gt;
| 127 s&lt;br /&gt;
| 28 s&lt;br /&gt;
| 170 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 160 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| 152 s&lt;br /&gt;
| 29 s&lt;br /&gt;
| ~7.6&lt;br /&gt;
|-&lt;br /&gt;
| apr&lt;br /&gt;
| 1771 mb (+13)&lt;br /&gt;
| 36 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 55 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 41 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| 44 s&lt;br /&gt;
| 7 s&lt;br /&gt;
| ~1.9&lt;br /&gt;
|-&lt;br /&gt;
| uuid&lt;br /&gt;
| 1771 mb&lt;br /&gt;
| 12 s&lt;br /&gt;
| 5 s&lt;br /&gt;
| 21 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 12 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| 15 s&lt;br /&gt;
| 6 s&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''Note:'' vm startup &amp;amp; shutdown time is not counted&lt;br /&gt;
&lt;br /&gt;
=== Installing from source ===&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
&lt;br /&gt;
=== rsync on Windows OS ===&lt;br /&gt;
&lt;br /&gt;
There is rsync version for Windows (uses cygwin libs) - [http://www.itefix.no/i2/node/10650 cwrsync]&lt;br /&gt;
&lt;br /&gt;
Another option is to install full cygwin environment, which has rsync package&lt;br /&gt;
&lt;br /&gt;
Performance of rsync on Windows OS is really bad (from cygwin):&lt;br /&gt;
&lt;br /&gt;
 time rsync --exclude '/proc' --exclude '/dev' --exclude '/sys' \&lt;br /&gt;
    -a -e 'ssh -p 6666' root@127.0.0.1:/ sysroot&lt;br /&gt;
 real   20m43.933s&lt;br /&gt;
 user   1m23.660s&lt;br /&gt;
 sys    4m26.541s&lt;br /&gt;
&lt;br /&gt;
 du -h --max-depth=0 sysroot&lt;br /&gt;
 1.6G   sysroot/&lt;br /&gt;
&lt;br /&gt;
sync speed is only '''~1.4 MB/s'''&lt;br /&gt;
&lt;br /&gt;
''Question'': why it is so slow? Possible answers: Antivirus / SSH protocol / Cygwin / Other?&lt;br /&gt;
&lt;br /&gt;
=== ssh vs rsync protocol ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Use rsync (TCP/873) protocol (rsync --daemon) to copy files from QEMU to host system.&lt;br /&gt;
&lt;br /&gt;
Used commands:&lt;br /&gt;
 rsync -a \&lt;br /&gt;
        --exclude '/proc' \&lt;br /&gt;
        --exclude '/dev' \&lt;br /&gt;
        --exclude '/sys' \&lt;br /&gt;
        rsync://root@127.0.0.1:1873/rsync sysroot&lt;br /&gt;
 du -h --max-depth=0 ./sysroot/&lt;br /&gt;
&lt;br /&gt;
Initial copy time:&lt;br /&gt;
&lt;br /&gt;
 $ time ./rsync-rsyncd.sh &lt;br /&gt;
 real	'''4m56.249s''' &lt;br /&gt;
 user	0m8.997s &lt;br /&gt;
 sys	0m23.113s &lt;br /&gt;
&lt;br /&gt;
 1.7G	./sysroot/ &lt;br /&gt;
&lt;br /&gt;
I found that initial copying of files using rsync protocol is slower than using ssh protocol.&lt;br /&gt;
 rsync + ssh     ~3m 20s&lt;br /&gt;
 rsync + rsyncd  ~4m 56s&lt;br /&gt;
 diff            ~1m 36s&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# need to configure and start an additional service&lt;br /&gt;
# slower than copying via ssh (?!)&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Mount existing QEMU image (with installed library) then copy files (changes) to selected sysroot. &lt;br /&gt;
&lt;br /&gt;
Options to install library - in a running QEMU machine or using chroot.&lt;br /&gt;
&lt;br /&gt;
Tools for mounting QEMU images (ext3 is used):&lt;br /&gt;
# mount -o loop,offset=512 image.raw /mount_point (Linux) - good copying speed ~10MB/s on testing machine (&lt;br /&gt;
# [http://www.acc.umu.se/~bosse/ filedisk] (alternative for windows) - just for mounting raw image, then you need to use additional tool to read ext3 partition&lt;br /&gt;
# hdiutil (Mac OS X) - untested&lt;br /&gt;
# vdfuse - fuse module uses the VirtualBox access library - untested&lt;br /&gt;
# [http://libguestfs.org/ libguestfs] tools for accessing and modifying virtual machine disk images, untested&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# loop device mounting gives good performance&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# loop device mounting is available only on Linux&lt;br /&gt;
&lt;br /&gt;
=== remote system mounting options ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are different tools to mount remote file system (e.g. using ssh protocol)&lt;br /&gt;
&lt;br /&gt;
Tools for mounting remote file systems via ssh:&lt;br /&gt;
# sshfs (e.g sudo sshfs -d -p 6666 root@127.0.0.1:/ /mnt) - copying speed '''~4.8MB/s'''&lt;br /&gt;
# [http://code.google.com/p/dokan/ dokan] user-mode file system library for Windows - really bad speed '''~270KB/s'''&lt;br /&gt;
&lt;br /&gt;
==== Pros ====&lt;br /&gt;
# available on different platforms (operating systems)&lt;br /&gt;
&lt;br /&gt;
==== Cons ====&lt;br /&gt;
# Bad performance comparing to loop mounting and rsyncing&lt;br /&gt;
# Bad performance on Windows using current Dokan implementation&lt;br /&gt;
&lt;br /&gt;
== Questions &amp;amp; Answers == &lt;br /&gt;
=== how symlinks are managed on Windows ===&lt;br /&gt;
* on MinGW &amp;quot;ln -s&amp;quot; simply copies the file (the same for hard  link)&lt;br /&gt;
* About symlinks in Cygwin, from Wikipedia [[:wikipedia:Symbolic link#Cygwin symbolic links|article]]: &amp;lt;blockquote&amp;gt;&amp;lt;cite&amp;gt;Cygwin simulates POSIX-compliant symbolic links in the Microsoft Windows file system. It uses identical programming and user utility interfaces as Unix (see above), but creates Windows shortcuts (.lnk files) with additional information used by Cygwin at the time of symlink resolution. Cygwin symlinks are compliant with both Windows and POSIX standards. Some differences exist, however. Cygwin has no way to specify shortcut-related information - such as working directory or icon - as there is no place for such parameters in ln -s command. To create standard Microsoft .lnk files Cygwin provides the mkshortcut and readshortcut utilities.&amp;lt;/cite&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* An example screenshot how Cygwin symlink looks in Windows Explorer:&lt;br /&gt;
[[File:Cygwin_symlink.png|border]]&lt;br /&gt;
&lt;br /&gt;
Tools to create symlinks on Windows file system:&lt;br /&gt;
* [http://ss64.com/nt/mklink.html mklink] - supported in Windows 7 and Windows Vista&lt;br /&gt;
* [http://ss64.com/nt/mklink.html linkd] - supported from Windows 2000 (Windows Resource Kit Tools)&lt;br /&gt;
&lt;br /&gt;
=== rsync on mingw32 ===&lt;br /&gt;
* Can't be easily ported, because of&lt;br /&gt;
** Differences in Unix and Windows file system (symlinks, devices, paths ad etc)&lt;br /&gt;
** Differences in threads and sockets, missing POSIX functions on Windows&lt;br /&gt;
** Conclusion - rsync is designed for Unix like systems&lt;br /&gt;
* Possible actions:&lt;br /&gt;
** study how applications are ported to mingw using [http://www.mingw.org/node/48 msysDTK], [http://www.mingw.org/wiki/mingwPORT mingwPORT], [http://www.mingw.org/wiki/pthreads_library pthread library], [http://www.mingw.org/wiki/Use_the_thread_library thread library], [http://www.mingw.org/wiki/HOWTO HOWTOs], [http://www.mingw.org/wiki/Community_Supplied_Links other libraries]&lt;br /&gt;
&lt;br /&gt;
==== other native implementations for Windows ====&lt;br /&gt;
* [http://rsyncwin32.sourceforge.net/ RsyncWin32]&lt;br /&gt;
** alpha version, there are bug reports about instability, last release in 2005&lt;br /&gt;
** based on rsync-2.6.3, current version 3.0.7&lt;br /&gt;
** implements POSIX functions, resolves issues with Windows threads and sockets&lt;br /&gt;
* [http://opensource.se/projects/rsync-bc/index.html rsync-bc]&lt;br /&gt;
** only allows to push data to a server&lt;br /&gt;
** based on rsync-2.5.6&lt;br /&gt;
&lt;br /&gt;
=== alternatives to rsync ===&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~bcpierce/unison/ unison] - a file-synchronization tool for Unix and Windows&lt;br /&gt;
* file-synchronization tool for Unix and Windows&lt;br /&gt;
* uses the rsync algorithm&lt;br /&gt;
* communicates over the TCP/IP protocol&lt;br /&gt;
* written in the Objective Caml language ?!&lt;br /&gt;
&lt;br /&gt;
[http://zsync.moria.org.uk/ zsync] - rsync over HTTP&lt;br /&gt;
* designed for file distribution, with one file on a server to be distributed to thousands of downloaders&lt;br /&gt;
* uses the same algorithm as rsync&lt;br /&gt;
&lt;br /&gt;
[http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx robocopy] (standard feature of Windows Vista, 7 and Server 2008)&lt;br /&gt;
command-line directory replication command&lt;br /&gt;
&lt;br /&gt;
TODO: try to use unison, check performance&lt;br /&gt;
&lt;br /&gt;
=== samba on qemu and share mapping ===&lt;br /&gt;
&lt;br /&gt;
idea: install &amp;amp; configure samba on QEMU machine then try to mount this share and use as sysroot&lt;br /&gt;
&lt;br /&gt;
need to disable some services (on Windows 7).&lt;br /&gt;
1st issue - LanmanServer binds to 0.0.0.0:445, there is no way to bind to another interface&lt;br /&gt;
&lt;br /&gt;
manual stopping will not help:&lt;br /&gt;
 sc stop Browser&lt;br /&gt;
 sc stop LanmanServer&lt;br /&gt;
&lt;br /&gt;
need to disable service and restart system:&lt;br /&gt;
 sc config LanmanServer start= disabled&lt;br /&gt;
 shutdown -r -t 01&lt;br /&gt;
&lt;br /&gt;
restore service if needed:&lt;br /&gt;
 sc config LanmanServer start= auto&lt;br /&gt;
&lt;br /&gt;
start qemu with forwarded 139 &amp;amp; 445 ports:&lt;br /&gt;
 hostfwd=tcp:127.0.0.1:139-:139,hostfwd=tcp:127.0.0.1:445-:445&lt;br /&gt;
&lt;br /&gt;
mount share to disk&lt;br /&gt;
 net use m: \\127.0.0.1\disk	&lt;br /&gt;
&lt;br /&gt;
map disk to sysroot? (Use [http://ss64.com/nt/mklink.html mklink]):&lt;br /&gt;
 mklink /D c:\MeeGoSDK_1.1\MADDE\sysroots\SYSROOT_NAME m:&lt;br /&gt;
&lt;br /&gt;
=== qemu disk mapping and mounting on Windows ===&lt;br /&gt;
Idea: Try to mount QEMU image using [http://www.acc.umu.se/~bosse/ filedisk] and then map partition using [http://www.ext2fsd.com/ ext2 driver]&lt;br /&gt;
&lt;br /&gt;
It's pretty simple to mount QEMU image:&lt;br /&gt;
 filedisk /mount 0 &amp;quot;FULL_PATH_TO_DISK_IMAGE&amp;quot; LETTER:&lt;br /&gt;
&lt;br /&gt;
But then it's impossible to map this partition to drive, because Ext2 Volume Manager doesn't see it as a physical disk (volume).&lt;br /&gt;
&lt;br /&gt;
List of tools for accessing Ext2 file systems on Windows:&lt;br /&gt;
* [http://www.ext2fsd.com/ Ext2Fsd] - Open source ext3/4 file system driver for Windows (2K/XP/VISTA/WIN7).&lt;br /&gt;
* [http://www.chrysocome.net/explore2fs Explore2fs] - GUI explorer tool for accessing ext2 and ext3 filesystems.&lt;br /&gt;
** this tool has feature to read image files, but it doesn't work (Couldn't find valid Superblock) &lt;br /&gt;
* [http://ext2read.blogspot.com/ Ext2read] - an explorer like utility to explore ext2/ext3/ext4 files.&lt;br /&gt;
* [http://fs-driver.org/ Ext2 IFS] - provides full access to Linux Ext2 volumes.&lt;br /&gt;
** no support for Windows 7&lt;br /&gt;
&lt;br /&gt;
=== qcow2 image mounting options ===&lt;br /&gt;
Tools to access qcow2 format images:&lt;br /&gt;
* qemu-nbd - QEMU Disk Network Block Device Server (from QEMU project)&lt;br /&gt;
** Question: does it works on Windows, Mac OS X?&lt;br /&gt;
** Documentation: [http://blog.loftninjas.org/2008/10/27/mounting-kvm-qcow2-qemu-disk-images/ Mounting KVM qcow2 qemu disk images], [http://blogs.gnome.org/muelli/2010/03/mounting-qemu-qcow2-image-using-nbd/ Mounting QEmu qcow2 Image using NBD]&lt;br /&gt;
* [http://sourceforge.net/projects/fuseqemu/ fuseqemu] - Tool to access virtual machine images like vmdk, qcow, qcow2 or raw images (alpha version, only 1 release)&lt;br /&gt;
* [http://libguestfs.org/ libguestfs] - set of tools for accessing and modifying virtual machine (VM) disk images (Large, active development team)&lt;br /&gt;
&lt;br /&gt;
TODO: check availability on different OS and test performance&lt;br /&gt;
&lt;br /&gt;
=== Windows share in QEMU ===&lt;br /&gt;
Idea: mount shared folder from Windows onto QEMU then rsync files&lt;br /&gt;
&lt;br /&gt;
Command for testing:&lt;br /&gt;
 smbclient -U DOMAIN\\user \\\\10.0.2.2\\SHARE&lt;br /&gt;
&lt;br /&gt;
Command for mounting:&lt;br /&gt;
 mount -t cifs -o username=DOMAIN\\user,password=PASSWORD //10.0.2.2/SERVICE MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: 10.0.2.2 is special IP address used in QEMU for networking&lt;br /&gt;
&lt;br /&gt;
Command to sync:&lt;br /&gt;
 rsync -a -L --exclude '/proc' --exclude '/dev' --exclude '/mnt' --exclude '/sys' /MOUNT_POINT&lt;br /&gt;
&lt;br /&gt;
Note: symlinks transformed into referent file/dir, block or character special files are not copied (not required for sysroot)&lt;br /&gt;
&lt;br /&gt;
rsync speed ~600KB/s&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== QEMU share on Windows ===&lt;br /&gt;
&lt;br /&gt;
Idea: use samba to create Windows share in QEMU, then use QEMU port forwarding feature and map it on Windows&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
Set proxy server (if needed)&lt;br /&gt;
 export http_proxy=XXX.XXX.XXX.XXX:8080&lt;br /&gt;
&lt;br /&gt;
Install Samba tools:&lt;br /&gt;
 zypper install samba samba-client&lt;br /&gt;
&lt;br /&gt;
Create new user and set password&lt;br /&gt;
 smbpasswd -a root&lt;br /&gt;
&lt;br /&gt;
Configuration file is in:&lt;br /&gt;
 /etc/samba/smb.conf&lt;br /&gt;
&lt;br /&gt;
Create share with access to filesystem:&lt;br /&gt;
 [meego]&lt;br /&gt;
 comment = Meego&lt;br /&gt;
 path = /&lt;br /&gt;
 writable = yes&lt;br /&gt;
 write list = root&lt;br /&gt;
&lt;br /&gt;
Start Samba server:&lt;br /&gt;
 /etc/init.d/smb start&lt;br /&gt;
&lt;br /&gt;
Testing (from cygwin or QEMU):&lt;br /&gt;
 smbclient -U root -L 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Map disk:&lt;br /&gt;
 net use M: \\1.2.3.4\meego /user:root password&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Linker options for qmake == &lt;br /&gt;
&lt;br /&gt;
To build application against some external non-qt library (uses pkg-config) you need to set additional qmake options in project file (project_name.pro):&lt;br /&gt;
&lt;br /&gt;
For example for C uuid library:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += uuid&lt;br /&gt;
&lt;br /&gt;
For C++ uuid lib:&lt;br /&gt;
 CONFIG += link_pkgconfig&lt;br /&gt;
 PKGCONFIG += ossp-uuid&lt;br /&gt;
 LIBS += -lossp-uuid++&lt;br /&gt;
&lt;br /&gt;
== Used tools ==&lt;br /&gt;
&lt;br /&gt;
''time'' utility was used to measure performance, e.g.:&lt;br /&gt;
&lt;br /&gt;
 $ time sudo mad-admin create -e -f meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 Extracting QEMU runtime meego-handset-ia32-qemu-1.1.20101031.2201-sda-runtime &lt;br /&gt;
 .....9....8....7....6....5....4....3....2....1....0 &lt;br /&gt;
 Creating missing links... done. &lt;br /&gt;
 &lt;br /&gt;
 real	2m54.520s &lt;br /&gt;
 user	2m15.132s &lt;br /&gt;
 sys	0m4.608s&lt;br /&gt;
&lt;br /&gt;
rsync has --stats option, which gives information about copying speed and etc.&lt;br /&gt;
&lt;br /&gt;
== Used hardware ==&lt;br /&gt;
&lt;br /&gt;
Description of hardware used in this study&lt;br /&gt;
&lt;br /&gt;
Linux machine:&lt;br /&gt;
* Dell Latitude E6510&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (quad-core, clock: 533MHz)&lt;br /&gt;
* RAM 4 GB @ 1067MHz DDR3 (3455MB seen by 32bit system)&lt;br /&gt;
* HDD WD 250GB 7200RPM (encrypted fs)&lt;br /&gt;
* Ubuntu 10.10 (ia32, 2.6.36-020636-generic)&lt;br /&gt;
* BogoMips 4787.89&lt;br /&gt;
&lt;br /&gt;
Windows machine:&lt;br /&gt;
* HP EliteBook 8440p&lt;br /&gt;
* Intel(R) Core(TM) i5 CPU M 520 @ 2.40GH (dual-core)&lt;br /&gt;
* RAM 4GB, HDD 7200 rpm (encrypted fs)&lt;br /&gt;
* Windows 7 Enterprise (32-bit)&lt;br /&gt;
* System Base Score 4.5&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
QEMU raw image (3GB) conversion time to qcow2 format&lt;br /&gt;
 time qemu-img convert -O qcow2 meego-netbook-ia32-qemu-1.1.20110110.1049-sda.raw meego.qcow2&lt;br /&gt;
&lt;br /&gt;
 real	25m54.360s&lt;br /&gt;
 user	0m2.596s&lt;br /&gt;
 sys	0m17.045s&lt;br /&gt;
&lt;br /&gt;
Size after conversion - 1.8GB&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
IN PROGRESS&lt;br /&gt;
&lt;br /&gt;
Because there are different types of libraries (RPM or source tarball), therefore real implementation of this sysroot extension could differ.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Time Estimate / Schedule ==&lt;br /&gt;
At the moment there is no target milestone for this feature.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://samba.anu.edu.au/rsync/documentation.html rsync documentation]&lt;br /&gt;
* [[SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Linux|MeeGo SDK on Linux]]&lt;br /&gt;
* [[SDK/MeeGo_SDK_for_Windows|MeeGo SDK for Windows]]&lt;br /&gt;
* [[SDK/Docs/1.1/Building a MeeGo chroot on Linux|Building a MeeGo chroot on Linux]]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=48536 Maemo talk - Madde: How to build/manage third-party]&lt;br /&gt;
* [http://forum.meego.com/showthread.php?t=2709 A little &amp;quot;How to work effictient with Meego SDK&amp;quot;]&lt;br /&gt;
* [[:wikipedia:Symbolic link|Symbolic link]]&lt;br /&gt;
* [http://wiki.alfresco.com/wiki/File_Server_Configuration#Native_SMB_collisions Native SMB collisions]&lt;br /&gt;
* [http://support.microsoft.com/kb/314053 TCP/IP and NBT configuration parameters for Windows XP]&lt;br /&gt;
* [http://leenux.org.uk/lpackham/smbclient/ Samba Client for Win32 (for cygwin)]&lt;br /&gt;
* [http://www.blisstonia.com/eolson/notes/smboverssh.php Sharing (tunneling) Samba/CIFS/SMB file systems over SSH]&lt;br /&gt;
* [http://qemu-forum.ipi.fi/viewtopic.php?f=22&amp;amp;t=4494 Building Qemu on Mac OS X on different architectures]&lt;/div&gt;</summary>
		<author><name>Edmondas</name></author>	</entry>

	</feed>