(→Unpacking a netbook image: wikify link) |
|||
| (31 intermediate revisions not shown) | |||
| Line 2: | Line 2: | ||
[[Category:meego-1.0]] | [[Category:meego-1.0]] | ||
[[Category:tutorial]] | [[Category:tutorial]] | ||
| - | |||
[[Category:netbook]] | [[Category:netbook]] | ||
[[Category:application-developer]] | [[Category:application-developer]] | ||
[[Category:linux]] | [[Category:linux]] | ||
| - | + | This document describes how to create a MeeGo chroot environment from a stock image. | |
| - | + | ||
| - | This document describes how to | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
Note that the approach covered here uses an x86 CPU to build software for an x86 version of MeeGo (e.g. a netbook image). | Note that the approach covered here uses an x86 CPU to build software for an x86 version of MeeGo (e.g. a netbook image). | ||
| - | If you want a really quick method for developing on MeeGo where you don't need to build the chroot, see [[Hello World - MeeGo x86 development on Linux]]. | + | If you want a really quick method for developing on MeeGo where you don't need to build the chroot, see [[SDK/Docs/1.0/Hello World - MeeGo x86 development on Linux]]. |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | == Pre-requisites == | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | All that's required for this is a reasonably modern Linux distribution (e.g. Fedora 11, Ubuntu 9.10). | |
== Download and unpack a MeeGo image == | == Download and unpack a MeeGo image == | ||
| Line 55: | Line 26: | ||
<ol> | <ol> | ||
<li> | <li> | ||
| - | Install MeeGo Image Creator (MIC): use the instructions at | + | Install MeeGo Image Creator (MIC): use the instructions at [[Image Creation#Installation]] |
</li> | </li> | ||
<li> | <li> | ||
Unpack the image using MIC:<br/> | Unpack the image using MIC:<br/> | ||
| - | <pre>sudo mic-chroot --unpack-only -s | + | <pre>sudo mic-chroot --unpack-only -s /path/to/meego-chroot <image file>.usbimg</pre> |
</li> | </li> | ||
</ol> | </ol> | ||
| + | |||
| + | Replace <code>/path/to/meego-chroot</code> with your desired path. | ||
=== Unpacking a handset image === | === Unpacking a handset image === | ||
| + | |||
| + | These instructions cover creating a chroot from a handset image, by mounting the image temporarily and copying its contents into a local directory. | ||
<ol> | <ol> | ||
| Line 89: | Line 64: | ||
sudo mount /dev/mapper/loop0p1 ~/tmp-mnt -o loop,ro | sudo mount /dev/mapper/loop0p1 ~/tmp-mnt -o loop,ro | ||
mkdir ~/meego-chroot | mkdir ~/meego-chroot | ||
| - | sudo | + | sudo rsync -av ~/tmp-mnt ~/meego-chroot |
sudo umount ~/tmp-mnt | sudo umount ~/tmp-mnt | ||
</pre> | </pre> | ||
| Line 106: | Line 81: | ||
</ol> | </ol> | ||
| - | == | + | == Using the chroot == |
| - | + | Chroot into the image using <code>mic-chroot</code>. | |
| - | + | ||
| - | + | ||
| - | + | To use the script with the unpacked chroot: | |
| - | + | sudo mic-chroot /path/to/meego-chroot | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
This document describes how to create a MeeGo chroot environment from a stock image.
Note that the approach covered here uses an x86 CPU to build software for an x86 version of MeeGo (e.g. a netbook image).
If you want a really quick method for developing on MeeGo where you don't need to build the chroot, see SDK/Docs/1.0/Hello World - MeeGo x86 development on Linux.
Contents |
All that's required for this is a reasonably modern Linux distribution (e.g. Fedora 11, Ubuntu 9.10).
Get an image or tarball (with a UX) from http://repo.meego.com/MeeGo/releases/; either a netbook or handset image.
The process for unpacking is slightly different, depending on the type of image.
sudo mic-chroot --unpack-only -s /path/to/meego-chroot <image file>.usbimg
Replace /path/to/meego-chroot with your desired path.
These instructions cover creating a chroot from a handset image, by mounting the image temporarily and copying its contents into a local directory.
yum install kpartx
or on non-RPM distros:
apt-get install kpartx
tar jxvf meego-0.90-preview-shcdk-20100512-001.tar.bz2
This leaves you with a directory which contains the raw disk image you're interested in.
cd meego-0.90-preview-shcdk-20100512-001 sudo kpartx -a -v ./meego-0.90-preview-shcdk-20100512-001-sda.bin
Note that this maps the first partition (p1) of the disk image onto the loop device /dev/loop0.
mkdir ~/tmp-mnt # temporary mount point sudo mount /dev/mapper/loop0p1 ~/tmp-mnt -o loop,ro mkdir ~/meego-chroot sudo rsync -av ~/tmp-mnt ~/meego-chroot sudo umount ~/tmp-mnt
sudo kpartx -d -v ./meego-0.90-preview-shcdk-20100512-001-sda.bin
rmdir ~/tmp-mnt
Chroot into the image using mic-chroot.
To use the script with the unpacked chroot:
sudo mic-chroot /path/to/meego-chroot