Thursday, March 3, 2011

Creating bootable Pandaboard MeeGo image with MIC

Here is a quick guide how to create bootable Pandaboard image with MIC.

First of all you need to install MIC and I personally recommend git master because that has the best support for ARM bootstrap installation on non-official MeeGo .ks files. However any MIC should do that is taken from git master after 10th December 2010 that includes the omap vfat patch. The git master can be installed e.g. with following commands:

git clone git://gitorious.org/meego-developer-tools/image-creator.git
cd image-creator
make
sudo make install
cd ..


NOTE: You might need to install some additional packages for more information see MeeGo wiki.

After you have installed the MIC image creator you can start creating the actual image. For this you first need to get a .ks file, in this guide .ks file is downloaded from my pandaboard-image-configuration clone that I have modified and tested. This branch does only bring up the xterm for now as it is just a proof that MIC can actually create an image with suitable partitions for pandaboard.

mkdir panda-image
cd panda-image
wget http://gitorious.org/~sage/pandaboard/sages-panda-image-configurations/blobs/raw/pandaboard/handset/handset-armv7l-panda.ks
sudo mic-image-creator -a armv7l -c handset-armv7l-panda.ks -f raw --run-mode=1 --pkgmgr=yum


NOTE: it seems that the zypp packagemanager does not support all of the kickstart features yet so the --pkgmgr=yum option is required to be used with my .ks file.

After this the mic-image-creator starts creating the image, which will take a some time depending your computer and network speed. When the process is ready MIC will inform you where the image file can be found, e.g.,

Your new image can be found here:
/home/sage/panda-image/meego-handset-armv7l-panda-1.1.90.20110303.1939-raw/meego-handset-armv7l-panda-1.1.90.20110303.1939-mmcblk0p.raw
/home/sage/panda-image/meego-handset-armv7l-panda-1.1.90.20110303.1939-raw/meego-handset-armv7l-panda-1.1.90.20110303.1939.xml


Next thing is to put the image to the SD card, for this you can use the "Installing rootfs on external MMC card" section of MeeGo N900 installation guide.

Enjoy your new pandaboard image. If you have any problems booting the image let me know.

16 comments:

  1. Nice one Sage,

    meegotouchhome -show-cursor for handset fun

    http://www.youtube.com/watch?v=JiSrsBXpXvk&feature=channel_video_title

    vgrade

    ReplyDelete
  2. Trying and testing your instructions quickly on Debian unstable I get:

    /panda-image$ sudo mic-image-creator -a armv7l -c handset-armv7l-panda.ks -f raw --run-mode=1 --pkgmgr=yum
    Traceback (most recent call last):
    File "/usr/bin/mic-image-creator", line 35, in
    import mic.appcreate as appcreate
    File "/usr/lib/python2.6/dist-packages/mic/__init__.py", line 19, in
    from mic.imgcreate.pkgmanagers import *
    File "/usr/lib/python2.6/dist-packages/mic/imgcreate/__init__.py", line 22, in
    from mic.imgcreate.live import *
    File "/usr/lib/python2.6/dist-packages/mic/imgcreate/live.py", line 30, in
    from mic.imgcreate.creator import *
    File "/usr/lib/python2.6/dist-packages/mic/imgcreate/creator.py", line 35, in
    from mic.imgcreate import kickstart
    File "/usr/lib/python2.6/dist-packages/mic/imgcreate/kickstart.py", line 29, in
    import pykickstart.commands as kscommands
    ImportError: No module named pykickstart.commands

    ReplyDelete
  3. You need to install python-pykickstart that can be found from MeeGo tools repositories: http://repo.meego.com/MeeGo/tools/repos/

    ReplyDelete
  4. Using recent image-creator.git (~0.24.5) I had some issues with the proxy usage. So I switched back to 0.22.11. I had to drop --pkgmgr=yum because this doesn't seem to be supported in 0.22.11. Anyway, this worked for me with

    sudo mic-image-creator -a armv7l -c handset-armv7l-panda.ks -f raw --cache=rpms --run-mode=1 --build-bootstrap --bootstrap=bootstrap

    The only issue I saw with this is

    /var/tmp/imgcreate-b8BVuF/install_root/tmp/ks-script-1rhhL8: line 12: gconftool-2: command not found
    /var/tmp/imgcreate-b8BVuF/install_root/tmp/ks-script-1rhhL8: line 13: gconftool-2: command not found

    while running the last script stage ("Running scripts"). But I ignored this for the moment ;)

    Many thanks for this guide!

    ReplyDelete
  5. Above error message

    /var/tmp/imgcreate-b8BVuF/install_root/tmp/ks-script-1rhhL8: line 12: gconftool-2: command not found
    /var/tmp/imgcreate-b8BVuF/install_root/tmp/ks-script-1rhhL8: line 13: gconftool-2: command not found

    seems to be the result of this part of the handset-armv7l-panda.ks:

    # use autodetect as default conf
    Config_Src=`gconftool-2 --get-default-source`
    gconftool-2 --direct --config-source $Config_Src \
    -s -t string /meegotouch/target/name autodetect

    It seems that the bootstrap environment doesn't contain gconftool-2 support.

    At which host OS was this guide tested? With or without bootstrap mode?

    ReplyDelete
  6. Yes, there are some errors on the end of the image creation. Because similar line works on N900 config I didn't want to remove the line as I suspected it is just an error in a current Trunk packaging. That error is not fatal and does affect only to the Handset target resolution which wasn't targeted in this .ks file.

    ReplyDelete
  7. Ok, thanks for the quick answer :)

    Now, booting the resulting image, at the console I get the login and can log in [1]. At the attached DVI display I get an emtpy framebuffer. No modules are loaded. I can echo to /dev/tty0. I manually can 'startx' and get an xterm. But I couldn't get a MeeGo HMI, yet. Is this the intended behaviour? I.e. has the MeeGo HMI to be started manually (like 'startx')? Or is anything supposed to be wrong in my configuration?

    [1]

    ...
    omap_wb: registered and initialized wb device 2 [v4l2]
    usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
    usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    smsc95xx v1.0.4
    smsc95xx 1-1.1:1.0: usb0: register 'smsc95xx' at usb-ehci-omap-1.1, smsc95xx USB 2.0 Ethernet, c6:04:cc:59:27:fb
    kjournald starting. Commit interval 5 seconds
    VFS: Mounted root (ext3 filesystem) on device 179:2.
    devtmpfs: mounted
    Freeing init memory: 188K
    sreadahead[758]: readahead finished in 0.002868652 seconds
    sreadahead[758]: error count: 0
    sreadahead[758]: files: 0, size: 0kb (real size est. 0kb)
    sreadahead[758]: estimated effective throughput: 0kb/sec
    omapdss HDMI: hot plug event 0
    omapdss HDMI: error sending hot plug event 0 (-2)
    omapdss HDMI: hot plug event 1
    omapdss HDMI: error sending hot plug event 1 (-2)
    Welcome to MeeGo
    [ OK ]
    MeeGo release 1.1.90 (MeeGo)
    Kernel 2.6.35.3-19.24-panda on an armv7l

    INIT: Id "x" respawning too fast: disabled for 5 min
    MeeGo release 1.1.90 (MeeGo)
    Kernel 2.6.35.3-19.24-panda on an armv7l

    localhost.localdomain login: root
    Password:
    Last login: Sat Jan 1 02:00:31 on ttyO2
    [root@localhost ~]# lsmod
    Module Size Used by
    [root@localhost ~]#

    ReplyDelete
  8. From HDMI the image should display plain xterminal (at least on my panda it does it). From the DVI there isn't any output so if you want to attach DVI display you should use the HDMI output. Also this .ks file is just a proof that the pandaboard image can be done with mic without any manual partitioning or stuff like that. Because the 3d drivers are not available in MeeGo yet for Pandaboard I didn't start the handset UX as (mcompositor didn't start at all).

    However if you want to start the homescreen you can do that by calling cmd: "duihome -software" from the xterm for example.

    ReplyDelete
  9. Sorry if this comment appears twice.

    I'm having fun running the image although I've been having a few problems.

    1. Simple file copies that I added in the %post --nochroot section of the .ks file fail with a "no such file or directory" error:

    PANDASOURCE=/home/alison/Pandaboard/panda.source
    cp $PANDASOURCE/sysctl.conf $INSTALL_ROOT/etc

    I guess this kind of operation needs to take place in the %post section instead?

    2. I see that the wireline ethernet connnection works, including DNS: yay! Oddly, the network connection shows up as usb0 rather than eth0. As others have noted, "lsmod" shows nothing, so I guess the right driver must be statically compiled, although not the WLAN one, as noted above.

    3. The LEDs on the board never flash now. I guess I don't miss them.

    4. I'm running twm, as my attempt at zypper-installing gnome-session did not result in anything usable. Maybe I should try mutter instead? mcompositor relies on graphics acceleration and is a non-starter, right?

    5. I wanted to post a gnome-screenshot, but invoking the program from xterm caused a kernel panic.

    6. Fennec doesn't work at all. I can resize it, but it starts with a "bad window" error and doesn't much recover.

    7. I don't have "duihome," only "duicontrolpanel" according to mlocate, which I zypp-installed. duicontrolpanel fails with a socket error (presumably because it's looking for mcompositor's socket.)

    Thanks Sage for all your help!
    -- Alison Chaiken, alchaiken@gmail.com

    ReplyDelete
  10. Here's the result of testing the graphics: OpenGLES2 and OpenGLES fail with an error message saying that the PVR shell can't open the serial port /dev/ttyS1, which I suppose just means that the libraries are installed wrong or that a kernel module is missing. Good old glxgears runs at 70 fps by using 70% of the CPU.

    http://www.flickr.com/photos/99725460@N00/

    ReplyDelete
  11. I see that the reason I can't get accelerated graphics working is because the image doesn't include DRM (http://www.bitwiz.org.uk/s/how-dri-and-drm-work.html). I either need to compile drm.ko for the kernel you provide, or else I need to recompile the kernel with a static DRM. Otherwise without the proper driver, udev doesn't recognize the GPU as a device it manages, so when DRI2 starts under X, it doesn't load the pvr_dvr.so file. Another symptom is that /dev/dri isn't created by udev, as it doesn't believe that it has any DRI-using devices it manages without the drm.ko module.

    ReplyDelete
  12. Are 3D drivers available in MeeGo for Pandaboard now?

    ReplyDelete
  13. >Are 3D drivers available in MeeGo for Pandaboard now?

    See this:

    http://wiki.meego.com/Hardware-accelerated_graphics_on_Pandaboard_using_MeeGo

    I'd like to make an OBS image with MeeGo 1.2 IVI and 3D graphics. Stay tuned!

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Error: failed to create image : URLGrabber error: [Errno 14] HTTP Error 404 : http://repo.meego.com/MeeGo/builds/trunk/latest/repos/oss/armv7l/packages//repodata/repomd.xml : http://repo.meego.com/MeeGo/builds/trunk/latest/repos/oss/armv7l/packages//repodata/repomd.xml

    ??
    Can anyone tell me why I am getting this error

    ReplyDelete
    Replies
    1. @Abhishek
      Where you able to get solution for this? I am also getting same error and not able to solve it.

      If you have the solution please let me know.

      Thanks.

      Delete