In the 21st century people are surrounded by computers. Mobiles, set top boxes, netbooks, nettops, laptops, even in the car. Back in February 2010 Intel and Nokia decided to merge their Linux efforts, Moblin and Maemo, into a new distribution called Meego. When you go to the Meego site you will see that straight away that they going to design this distribution for all of these devices, making it a very interesting development. On 31st March an announcement was made that some Meego images were available, so I was keen to have a look at it. Unfortunately I managed to build an image but have not got it to run, but I thought I would document what was involved anyway. The documentation and code are actively being worked on so I hope to have a working image soon.
At the moment the Meego images on offer are fairly basic, they just boot to a command line. In May a full release is due, so this is very early days. What I would really like to do eventually is get an image that will work under VirtualBox but an image for this was not available. The pre built image for netbooks running Intel Atom processors would not run under VirtualBox so I consulted the Meego Wiki and tried to build an image. Between the weekend and today I noticed that documentation appeared that made this a bit easier on Ubuntu. The main documentation page that I followed was at:
http://wiki.meego.com/Image_Creation
The main program you need to build an image is a command line utility called “MIC”. There are two ways to get MIC: pre-packaged or build from source.
Pre-packaged MIC
This was available pre-packaged for Ubuntu, but at the time of writing the repository containing the files is missing in action. The line to add to your software sources was (note the extra / at the end):
deb http://repo.meego.com/tools/repo/xUbuntu_9.10/ /
If this is found again I will update this post with the new location. If you can get to the pre-packaged files for Ubuntu you can just install the “mic2” package and everything you need will be installed.
Build MIC from source
This method is not really recommended, particularly as I am not sure how to uninstall everything cleanly this way. Install the dependencies to build MIC. I worked these out from the requirements stated in the Wiki page and a comment on http://moblin.org/documentation/moblin-image-creator-2/requirements.
sudo apt-get install git-core yum rpm kpartx parted syslinux isomd5sum kvm zlib1g-dev python-dev dmsetup build-essential
One requirement is PyKickstart. This is not available for Ubuntu pre-packaged unless you can get to the repository. It is possible to install it manually though. First make a directory where you can work with the source code. I this example I will place it under a “src” in my home directory (~):
mkdir ~/src/pykickstart
Change to this directory:
cd ~/src/pykickstart
Now get the source code:
git clone git://git.fedorahosted.org/git/pykickstart.git
It's Python code so we do not need to compile it, instead get Python to install it:
cd pykickstart
python ./setup.py install
So now we can build the MIC image creator itself. I went for the stable version. Make a directory to work with the source code and move into it:
mkdir ~/src/mic
cd mic
Get the source code:
git clone git://gitorious.org/meego-developer-tools/image-creator.git
Now you need to determine the tag for the lastest version number, go to: http://meego.gitorious.org/meego-developer-tools/image-creator/trees/master and have a look on the right hand side. At the time of writing the latest tag was 0.17, remember this as it goes in the next command:
git checkout 0.17
Build it and install it:
make
sudo make install
Building the Meego image
Now we have MIC we can build the image. The innards of your Meego image are determined by a “kickstart” file. These describe what packages should be included, the language used, keymaps etc and also post installation scripts to be run. Full details on this format are available at: http://fedoraproject.org/wiki/Anaconda/Kickstart. Make yourself a working directory to build the image in. Note that this will also eventually contain a cache of all the packages used too.
mkdir ~/src/meego-image
cd ~/src/meego-image
I wanted the netbook image so I found the right file (at the time of writing) from http://repo.meego.com/MeeGo/devel/trunk/images/ and downloaded it:
wget http://repo.meego.com/MeeGo/devel/trunk/images/meego-preview-netbook-core.ks
As I am in the UK I made a couple of modifications to the file, setting the language to British English by replacing the “lang” entry with “lang en_GB.UTF-8”, setting the right keyboard in my case “uk” (see http://fedoraproject.org/wiki/Anaconda/Kickstart#Chapter_2._Kickstart_Options for options) and lastly setting the time zone to “Europe/London”.
Let's build! Set off the image creator with the following command, note that this process can take some time as all of the packages have to be downloaded. Various options are described on the wiki page, I chose the Qemu format as this can easily be converted to VirtualBox later. Note you need “sudo” at the start as it creates a loop device where the files will be sent.
sudo mic-image-creator --config=meego-preview-netbook-core.ks --format=raw –cache=mycache
So it built but I got a few errors, notably this output at the end which does not look good:
rpmdb: close: Bad file descriptor
rpmdb: /var/tmp/imgcreate-KJr2me/install_root/var/lib/rpm/Name: Bad file descriptor
error: db4 error(9) from db->close: Bad file descriptor
rpmdb: close: Bad file descriptor
rpmdb: /var/tmp/imgcreate-KJr2me/install_root/var/lib/rpm/Packages: Bad file descriptor
error: db4 error(9) from db->close: Bad file descriptor
After building you will have a cache directory and another directory that contains the actual image file and an XML description file.
To try the image out I started it with Qemu (substitute your own values):
qemu -m 512 -boot c -hda [DIRECTORY NAME]/[IMAGE NAME].raw
However this was not successful, I got a “boot:” prompt but it got stuck here, endlessly cycling at this point. I notice in the source code repository for MIC there is a commit today that says “Fix bootstrap errors on meego repo” with some changes that might help, so maybe the development version could be worth a try, alas I won't have the chance for a few days to try this out. If anyone knows a fix for how to get past this issue though please add it to the comments!
Re: Trying to create a Meego Image
Hey Liam, any news about this?
Re: Trying to create a Meego Image
Sorry, haven't had a chance to try this out again, am going to wait for a new release of the MIC tools I think.
Re: Trying to create a Meego Image
Here is a tutorial which lets you run meego on virtualbox
http://www.99bits.com/2010/09/how-to-install-meego-on-virtualbox/
Re: Trying to create a Meego Image
Thanks for your sharing, I'm aiming to create a meego rom for my n900.
I'm come from http://www.meegozu.com
Trying to create a Meego Image
Hi.. it is a very good article.. keep it up.. :) Can u please help me how can i create meego images out of the source rpms. i have downloaded source rpms and trying to build the source.. but i end up with errors. i posted in Meego forum also for help.. but i didn't get any reply.. :( can you please share your knowledge with us to build the meego sources.. Thanks in advance..