[Linux] Beagleboard xM installation


1: Make a boot MicroSD

Use at least 4Gb. 8Gb highly recommended(!). Run the following on a linux machine: Get prebuilt image:
wget http://rcn-ee.net/deb/rootfs/natty/ubuntu-11.04-r0-minimal-armel.tar.xz
Unpack Image:
tar xJf ubuntu-11.04-r0-minimal-armel.tar.xz
cd ubuntu-11.04-r0-minimal-armel
Install Image: Insert a MicroSD; and check which device it is, (here we say its sdX). Quick Install script
sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle
! Default user: ubuntu pass: temppwd

Insert the MicroSD in the Beagle and boot

Just connect it to a screen, and make sure you have a ethernet connection, since we are going to make the GUI work. Lets assume the ethernetport is eth1.
sudo ifconfig -a
sudo dhclient eth1
sudo apt-get update
sudo apt-get install xfce4 gdm xubuntu-gdm-theme xubuntu-artwork xserver-xorg-video-omap3 network-manager
Now you’re going to have to wait ~30 minutes, and you’re done!

Configure ubuntu

You will now have a very stripped version of ubuntu with the gnome GUI. You should install all kinds of things, like the synaptics package manager, update manager, gedit, svn, gnome-themes, firefox, etc-etc-etc.


I’m in it for the webcams, so i needed OpenCV to work to play around with. This was a hard one to crack, but finally after following a few walkthroughs this came out as the best way to do this. Installing OpenCV on the beagleboard xm with ubuntu.
apt-get install build-essential
apt-get install cmake cmake-gui
apt-get install pkg-config
apt-get install libpng12-0 libpng12-dev libpng++-dev libpng3
apt-get install libpnglite-dev libpngwriter0-dev libpngwriter0c2
apt-get install zlib1g-dbg zlib1g zlib1g-dev
apt-get install libjasper-dev libjasper-runtime libjasper1
apt-get install pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
apt-get install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs
apt-get install ffmpeg libavcodec-dev libavcodec52 libavformat52 libavformat-dev
apt-get install libgstreamer0.10-0-dbg libgstreamer0.10-0  libgstreamer0.10-dev
apt-get install libxine1-ffmpeg  libxine-dev libxine1-bin
apt-get install libunicap2 libunicap2-dev
apt-get install libdc1394-22-dev libdc1394-22 libdc1394-utils
apt-get install swig
apt-get install libv4l-0 libv4l-dev
apt-get install python-numpy
apt-get install libpython2.6 python-dev python2.6-dev
apt-get install libjpeg-progs libjpeg-dev
Now install SVN
apt-get install subversion
Now go to a directory that downloads the OpenCV build you need, and make it install there by stating
svn co https://code.ros.org/svn/opencv/trunk
Now open the CMake GUI from your applications list, and choose the previous folder as source code, and make it compile somewhere else. For this, just click configure – OK – configure, generate [maybe checkbox some other stuff you want like examples]. In my experience you should check more than the examples as extra’s, for instance the 3rd party stuff is partly dependant on old packages and you’ll get errors.. Then close down the cmake gui. Go to the folder you made the build in, and say
make;make install
This takes roughly one hour. And that’s it, it works! ]]>

You may also like...

20 Responses

  1. Ryan says:

    Have you tried grabbing frames from a webcam with OpenCV after using this installation? If so, have you had any trouble with JPEG decompression errors or corrupted images? I’ve recently followed similar procedures and can’t seem to get a stable, error-free video feed. Either a problem with OpenCV or V4L/V4L2.

    • Tim says:

      No works fine. But some webcam grabbing programs have errors with my V4L2 logitech 9000. I don’t know, they get corrupted but are still viewable. Don’t know why. It is advised always skip a few frames because the first frame often is erroneous

  2. Albert says:

    Hello Tim,
    I tried your ubuntu installation process on my BeagleXm(Rev B) with 8gb SDCARD.
    there was a booting problem due to missing uInitrd in first partition of SDCARD.
    manually i copied the uInitrd, and i had to run the following u-boot commands explicitly to boot the ubuntu.
    setenv mpurate 800
    setenv dvimode 1280x720MR-16@60
    setenv vram 12MB
    setenv bootcmd ‘mmc init; fatload mmc 0:1 0x80300000 uimage; fatload mmc 0:1 0x81600000 uinitrd; bootm 0x80300000 0x81600000’
    setenv bootargs console=ttyO2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait ro vram=${vram} omapfb.mode=dvi:${dvimode} fixrtc buddy=${buddy} mpurate=${mpurate}
    Also note that, in above command, uImage and uInitrd had to be change to uimage and uinitrd.
    thanks for sharing all the interesting information on this site.

  3. Pierre says:

    I would like to use a beagleboard for an embedded pattern recognition with opencv.
    Have you ever try to run this kind of programs on this board?
    If yes what are the performances? has it worked well?

    • Tim says:

      Hey. Yes i have done several OpenCV operations with this beagleboard xM. The performance was very good actually, it was just as fast as my Dell 1018 mini laptop (1.6GHz Intel Atom). I can’t give you very hard figures, but i am really impressed by the beagleboard. Also, maybe you should check out the PandaBoard; that board has got some issues currently, but it has an OMAP4 and is a bit faster. Still, the beagleboard community is better.

    • Tim says:

      Also, just buy a beagleboard. If you can get one they’re pretty rare and valuable; on the secondhand market they cost like 90% of their original price. Value for money!

      • Pierre says:

        Hi Tim,
        Thanks for your answers.
        You are right it’s pretty difficult to have a new beagleboard and I will look on secondhand market. And if you know some links or persons I’m interested.
        For the pandaboard in fact she is more powerful thanks to his dual-core ARM® Cortex™-A9 but like you say the beagleboard community is better and more active for the moment so it’s easier to find help.
        What kind of programs have you allready implemented on a beagleboard?
        Are they programs for image processing ?
        In my case for my recognition program I’m using cvHaarDetectObjects and some pretreatments before like background substraction, colors convertion, pictures filters…
        And these functions are used a lot in my program.
        best regards

        • Tim says:

          Image processing programs, yes. Also other programs. and while i’m running that im always using remote desktop at the same time, works very well. All i can help you with really is saying that it would do everything an average laptop does, only 3 times slower: which is still pretty darn fast.

  4. Nek says:

    Thanks for the awesome tutorial.
    Is it that, after installing we need to manually install other softwares including synaptic package manager ? I did it manually…but when i am opening synaptic package manager…it asks me for a password and the “temppwd” doesnt work. Could you suggest something regarding this problem.

  5. Nek says:

    Thanks for the awesome tutorial.
    I could install ubuntu on my beagle board. Nevertheless, I have a small query. Is it that we need to install many softwares manually in this version including the synaptic package manager.
    Apparently, i have to install it manually…but when I am trying to execute synaptic package manager…it asks me for a password and “temppwd” doesnt work. Do u know if this could be rectified in some way.

  6. Humberto says:

    Hi Tim,
    awesome site ! 🙂
    What version of opencv are you using ?
    Did you have trouble with floting point operation on ARM processsor ?.i.e jpeg ?.
    I am having trouble/errors making Opencv2.3.2 after almost 90% compiling.

  7. Amit says:

    Hi Tim,
    I am really new to BBs. Tried the above method.
    Seems to work fine for a while but then I face a problem with BBxM revC.
    In the step sudo apt-get update, it fails to fetch many files.
    Checked the ethernet again (sudo ifconfig -a), it seems to be working on BB as well as my linux (it requires authentication though; do i need to incorporate that for BBxM?).
    Any suggestions?

  8. rohat çim says:

    which program do you use for remote desktop connection?

  9. Erik says:

    Hello Tim:
    I followed your instructions and had no problems getting the system running, thanks. Do you now if it’s possible to incorporate the Aptina drivers for the LI-M503 camera that plugs into the BeagleBoard XM header. I’m not a kernel guy, more of an embedded developer, so I’ve not quite figured out how to build a kernel with this support. Thanks.

  10. Rohan says:

    ForSome reason this command
    sudo apt-get install xfce4 gdm xubuntu-gdm-theme xubuntu-artwork xserver-xorg-video-omap3 network-manager
    gives me cannot find error. Has the package been taken off from the release?
    Is there any other minimal-stripped kinda OS i can work with?

    • Rohan says:

      Sorry i figured out later that my internet was unstable. That was the reason I couldn’t reach out to that link.
      I have encountered another issue.
      Since the r0 edition of Ubuntu 11.04 has been removed off (http://rcn-ee.net/deb/rootfs/natty/ubuntu-11.04-r0-minimal-armel.tar.xz) i used the r6 version of the same Ubuntu 11.04 Natty (from here http://rcn-ee.net/deb/rootfs/natty/ubuntu-11.04-r6-minimal-armel.tar.xz).
      Transferred it successfully to the micro sd card and when i connected it to the TV (1080p) thro the HDMI, I could not get any video output.
      I proceeded further and installed xfce4, gdm, xubuntu-gdm-theme, xubuntu-artwork, xserver-xorg-video-omap3 & network-manager thro the above mentioned command & it installed well.
      But could not still get a display output.
      Over the Serial port terminal when i type something to display like “$ synaptic” it simply says “can’t open display”.
      What could be the reason for this? Please help.

  11. Nash says:

    Hello Tim,
    I am new to BeagleBoard . I wanted to know if C++ can be used to write codes in OpenCV on the BeagleBoard. The reason for this is that in the latest tutorial documentation of OpenCV (OpenCV which I am using on my laptop says “The main downside of the C++ interface is that many embedded development systems at the moment support only C ” . How far is this true in case of the beagleboard?
    With Regards,

  12. Vivek says:

    I am trying to get Ubuntu to work on Beagleboard XM. However, the link wget http://rcn-ee.net/deb/rootfs/natty/ubuntu-11.04-r0-minimal-armel.tar.xz is not working. Which distro I should point to, for Beagleboard XM, for Ubuntu?