Introduction to the Moblin Image Creator
Recently, there has been a lot of buzz surrounding the Moblin Project, designed to bring open source applications to mobile devices. Though the news generally focuses on big name distributions getting involved, Moblin still features the "community feel and involvement" that draws many to open source projects.
One tool that Moblin offers the community to (hopefully) encourage participation is the Moblin Image Creator. The MIC allows developers to easily define projects, build them for mobile platforms, add applications and function sets to the target system images, and easily create images for live distributions (with the option of enabling rewrites/persistence), installation, or testing in virtual terminals.
I make no pretense that I am in any way a developer. I have used Linux for some time, and I have a grasp of the inner workings. The Moblin Image Creator piqued my interest when I heard about it earlier this year. I wanted to try it out, but didn't get the chance until recently. Again, I am not a developer, and I did not expect everything to work perfectly either while building the image, or running it on my netbook. I was not suprised, then, when some things simply didn't work, as my skills are admittedly lacking in areas, and the software is still maturing. I was surprised by how much went smoothly during the entire process, and how the resulting disk image, while quirky, worked basically as I'd intended.
If you have some programming skills, time, and curiosity, the Moblin Project is a great way to learn a few new tricks and produce some impressive results quickly.
Installing MIC on my host desktop was perhaps the most harrowing part of the project. The MIC is available in DEB or RPM formats, or a source tarball. It is also available via git. The MIC install instructions indicate it must be installed (even when compiled from source) on a DEB or RPM system. This, alas, is true. Though everything seemingly installed without issue on Zenwalk, the application would not run, returning an "unsupported distribution" message.
The Ubuntu Intrepid beta installed MIC with few issues. The noted Python/YUM incompatibility was easily fixed, and MIC required pysqlite2 be installed, though it is not a listed dependency on the Moblin site. It's also important to note before running MIC that it is building a system. This means that MIC must be run as root, due to the mounting/unmounting of filesystems and the need to chroot into the new environment.
MIC first asks that you name and describe your project. An empty directory must be created and chosen for the application to build the target system. It seemed that, at least with Intrepid, it was necessary to type in the name of the build directory. Browsing and selecting a newly created directory resulted in the subdirectories being omitted (/opt was always shown, not the /opt/mobex/ as was selected). This dialog asks you to choose the architecture and build type for the mobile device (there are a number of options). All fields in the project dialog (larger screenshots are available by clicking the images in this post) had to be completed, with the exception of the "Add Target" button. It seemed, strangely, less problematic to leave that button untouched, and to click "OK" to create the project.
The project creation stage was lengthier than I would have expected, but thanks to MIC lending itself to being started in a terminal, it was also possible to see what exactly was going on behind the scenes. The build environment was created, any necessary build packages were downloaded, and MIC entered the "work area" for creating the target system.
When the project build environment is ready, MIC asks for a name for the target system.
This is where things got tricky for me, being a non-developer. MIC tries to make choosing the function sets for the target system as simple as possible. The application adequately explains what's in each function set, and it tries (and seems successful) at pulling in any necessary underpinnings to a given function set. It excludes conflicting functions as well. This is very much where the "core" of the target system is planned and configured, and it was where I expected things to go very badly astray, even with the simple presentation that MIC delivered.
Of course, there are more options to set on the target system than just the function and core tasks. The MIC allows various boot options and settings (including the configuration of swap space and the use of squashfs). Package groups (consisting of more functional "core" packages, and less crucial but entertaining extras like Compiz) can also be added to the target system at this point.
There are a number of options for putting your target system on a particular piece of media. Being that so many netbooks and mobile devices don't have optical drives, most of these options centered on USB media. It is also possible to create images for NAND and liveCDs. Once the image is created in its final format, MIC can write it to a USB drive or run a virtual environment for testing.
Virtual environments are not quite the real thing. They're great for testing when the appropriate hardware is lacking, but it's far more entertaining (or perhaps terror-inducing) to try a new image on real hardware. With this in mind, I booted the newly created liveUSB image on my EeePC 701. There were a number of messages and failed attempts to launch services (such as Bluetooth) that I knew my Eee didn't have hardware for (yet I failed to remove from the system build -- again, I am not a developer).
It opened a simplistic, yet recognizable XFCE desktop session. My touchpad didn't work, so a USB mouse had to stand in. Compiz was not working, and no amount of tweaking could seem to get my window manager and window decorations to return to the desktop. Even so, I could browse my file system, and open applications.
The beauty, of course, is not so much what MIC does right at this moment. Without a doubt it is impressive, and likely would be even moreso if I had development skills. The beauty is that this sort of application streamlines some of the drudgery of the process, automates the dull bits and makes the parts with some intricacies a little faster to carry out, with a little less room for error. It frees developers from the mundane, and allows them to easily take their creations and code across platforms.
Moblin has kindly made available a prebuilt image for developers interested in contributing to the project (which consists of a variety of applications quite different from the Moblin Image Creator).