This document will explain you, how to built a rootfs having gstreamer in it for the
altera cyclone V mcanica helio board using yocto build system.

Start with following this link at first>>


for this we are going to use ycoto source package 'danny', i.e. poky version 8.0
As this is recommende by and provided by rocketboard.org and they have added a 'meta-altera' layer
in the build tool for the cyclone board.

we can download the self installer as this>>

wget http://download.altera.com/akdlm/software/acdsinst/13.0/156/ib_installers/linux-socfpga-13.02-RC10-src.bsx

chmod +x linux-socfpga-13.02-RC10-src.bsx

then use chmod to make it executable and run it with sudo>>

sudo ./linux-socfpga-13.02-RC10-src.bsx

default it'll be installed at the loaction /opt/altera-linux/
now do this>>
/opt/altera-linux/bin/install_altera_socfpga_src.sh ~/yocto

this will install local set of yocto recipes.

and this will create a build directory>>
source ~/yocto/altera-init ~/yocto/build
If you start a new shell you will need to run the above command to set the shell variables again.

now for building rootfs we need to use this command>>
bitbake altera-image

but before this we need add some recipes and append the required packages to include them in the building rootfs.

so, the first thing to do is have a look at the recipes of gstreamer version 0.10.36, we can find these at this location.


here we can find .bb (bitbake) files. there we have .bb files for gstreamer, and for it's plugins.
and all the dependuncies for the pakages are managed by ycoto internally, we can see it by looking into
these .bb files.

here we have following gstreamer plugins .bb files at this location:

so, for our reuirement I have added libav recipes at


this is requird for the gst-ffmpeg, which is not there in the recipes provided by the rocketboard.org

and our requirment demands x264enc plugins for using with gstreamer, which is included in the gst-plugins-ugly
but it requires x264 package. and recipes for this also not provided by the rocketboard.org so, I have added
recipes for the x264 package at this location>>


note: Recipes that I have added are as per provided by the yocto project latest 'poky version 9.0' here is the link for that>>


and then edit the .bb files for gst-ffmpeg and gst-plugins-ugly to add dependuncies on libav and x264 resp.

and for the gst-plugins-bad there is a configuration error while building it, just replace the .bb file for it as per
latest 'poky' source tree provided at above link.

these packages have dependuncies over x11 and some more packges and those are having dependuncies over some other packges,
which we don't need in the rootfs as per our requirements, so we are going to remove the dependunies over these packges in
the .bb files of the gst-plugins-ugly, libav and gst-plugins-bad.

and for the package tremor recipes present at ~/yocto/meta/recipes-multimedia/tremor
we need to add few patches as per the master latest 'poky' provided at above link to avoid some arm-thumb instruction
conflict errors.

Now, we need to make some changes in the .bb file for altera-image in the meta-altera layer
present at this location>>


we are going to remove one package 'valgrind' as we don't need it, so to prevent it for getting added
in the building process to avoid an error which will be caused by this 'valgrind'.

now, we will add (append) the required gstreamer packages and plugins into the building rootfs.
edit local.conf present at the location>>


in this file I added this to avoid some license flag errors>>

gst-plugins-ugly-mad \
gst-plugins-ugly-mpegaudioparse \
gst-plugins-ugly-mpeg2dec \
gst-plugins-ugly-mpegstream \
gst-plugins-bad-mpegvideoparse \
gst-plugins-base-videotestsrc \
gst-plugins-bad-fbdevsink \
gst-ffmpeg alsa-utils \
gst-plugins-good-isomp4 \

and I have appneded these packages to get included in the rootfs as per our requirements.
like this>>

IMAGE_INSTALL_append = " gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly /
gst-openmax gst-fluendo-mp3 gst-fluendo-mpegdemux gst-plugins-base-ogg /
gst-plugins-base-theora gst-plugins-base-vorbis gst-plugins-good-rtp /
gst-plugins-good-rtpmanager gst-plugins-good-rtsp gst-plugins-good-udp /
gst-plugins-good-matroska gst-plugins-base-videotestsrc gst-ffmpeg /

so this will include all these packages in the rootfs while buliding it.

now run the command>>

bitbake altera-image

this will generate the rootfs at the location>>


in the the .ext3 format file name>>


(actually it is a soft link pointing to the newly generated rootfs).

NOW, we need to update the rootfs on the micro SD card with the newly generated .ext3 rootfs, which has
gstreamer and required plugins in it.

this will be done as>>
put the sd card in the card reader, connect it to the host system.
unmount the /dev/sdx2 (here replace x with the letter you get).

then us this command for updating the rootfs on SD card.>>

sudo dd if=altera-image-socfpga_cyclone5.ext3 of=/dev/sdx2

Now, use this SD card to boot the cyclone board and when booted login and check the gstreamer and it's
plugins with the command 'gst-inspect' at command line.

Now, you can use the available gstreamer plugins to build a pipeline which will decode, encode and stream videos
over udp. thanks for the reading the document. I hope it will help you along the way.


Give us your feedback

© 1999-2018 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.