AprilTags recipe with Bitbake Yocto


What are AprilTags?

AprilTags are 2D barcodes developed for robotics applications by Ed Olson. The library detects any April tags in a given image, provides the unique ID of the tag as well as its location in the image. If the camera is calibrated and the physical size of the tag known, also provides the relative transform between tag and camera.¹

AprilTags bitbake  


AprilTags has bad dependencies that are according to PC in AprilTags/cmake/pods.cmake such as Eigen3(default), whereas for OE eigen3 package is libeigen. Hard coded the requires, Libs and Cflags and also removed python pod packages which are not required.

pods.cmake: 
$ "Name: ${pc_name}\n"
        "Description: ${pc_description}\n"
        "Requires: ${libeigen}\n"
 #      "Version: ${pc_version}\n"
        "Libs: -L\${bindir} ${pc_libs}\n"
        "Cflags: -I\${bindir} ${pc_cflags}\n")
AprilTags bitbake recipe:
[I am not sure about what the license field should be, so just wrote closed.]  
$ DESCRIPTION = "Apriltags application" 
SECTION = "examples" 
LICENSE = "CLOSED" 
PR = "r5" 

DEPENDS = "opencv"

SRC_URI = "git://github.com/zafrullahsyed/apriltags.git;protocol=https;tag=v0.3"

S = "${WORKDIR}/git"

inherit pkgconfig autotools

do_install() {
    install -d ${D}${bindir}
    install -m 0755 ${WORKDIR}/git/build/bin/apriltags_demo ${D}${bindir}
}
¹http://people.csail.mit.edu/kaess/apriltags/

Yocto Project environment for Gumstix development



To create a custom Linux distribution for Embedded systems independent of architecture, including Gumstix-based systems, follow instructions given here:

1. Install Repo:
Repo is a tool that Google built on top of Git to manage many Git repositories. If you are curious more to know about repo follow this Link

Download the Repo script:

$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo
In order to have correct permissions, we need to make it executable:
$ chmod a+x repo
Move it on to your system path:
$ sudo mv repo /usr/local/bin/
Check whether repo is correctly installed. You can do it by the following command which gives you  a Usage message when invoked with the help flag.
$ repo --help
2. Initialize a Repo client.
Create an empty directory to hold your working files:
$ mkdir yocto
$ cd yocto
Tell Repo where to find the manifest:
$ repo init -u git://github.com/gumstix/Gumstix-YoctoProject-Repo.git 
A successful initialization will end with a message stating that Repo is initialized in your working directory. Your directory should now contain a .repo directory. This .repo is hidden file. You can check it by ctrl+h command in that directory
To get the known stable version:
$ repo init -u git://github.com/gumstix/Gumstix-YoctoProject-Repo.git -b master
$ repo sync
3. Fetch all the repositories:
$ repo sync
Sync command download the whole Yocto to your local disk. This might take some time depending on your Internet connection.
4. Initialize the Yocto Project Build Environment.
$ TEMPLATECONF=meta-gumstix-extras/conf source ./poky/oe-init-build-env
This copies default configuration information into the poky/build/conf directory and sets up some environment variables for the build system. According to Official source, this configuration directory is not under revision control; you may wish to edit these configuration files for your specific setup but I would not recommend to change Environmental variables unless you know what you are doing. In particular, change the MACHINE variable if you are not building for the Overo (default).
5. Build an image:
This process downloads several gigabytes of source code and then proceeds to do an awful lot of compilation so make sure you have plenty of space (25GB minimum), and expect a day or so of build time depending on your network connection. Don't worry---it is just the first build that takes a while.
$ bitbake gumstix-console-image

If everything goes well, you should have a compressed root file system(tar.bz2) tarball as well as kernel and bootloader binaries available in your  ~/yocto/build/tmp/deploy/images directory.
What if something is broke?
There are several degrees of starting fresh: individual packages can be rebuilt or the whole system can be reconstructed.
  1. clean a package: bitbake -c cleansstate
  2. re-download package: bitbake -c cleanall
  3. destroy everything but downloads: rm -rf build (or whereever your sstate and work directories are)
  4. destroy it all (not recommended): rm -rf build && rm -rf sources
 If you want to build a new image, you can check in ~/poky/meta-gumstix-extras/recipes-images/gumstix directory for other Image options.

Source: Gumstix-YoctoProject-Repo

Getting started with Yocto Project


What is Yocto Project?

The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture.

Check this video to get a fast understanding of what Yocto project is all about:


It was founded in 2010 as a collaboration among many hardware manufacturers, open-source operating systems vendors, and electronics companies to bring some order to the chaos of embedded Linux development.

What are the advantages of using Yocto Project?

It's a complete embedded Linux development environment with tools, metadata, and documentation - everything you need. There are many free free tools easy to get started with, powerful to work with (including emulation environments, debuggers, an Application Toolkit Generator, etc.). You are not required to be a geek to get started with Yocto, just a guys who knows how to use a Computer and that's it. You can use HOB .

What is Bitbake:

Bitbake is a tool to compile, configure, install and build packages and distributions. BitBake recipes specify how a particular package is built. It includes all the package dependencies, source code locations, configuration, compilation, build, install and remove instructions.

For more information you can read about:
Yocto Project Manual
Yocto Project Development Manual


Happy building!!

About Me




Aadaab!  I am Zafrullah Syed. I am studying Master in Computer Science at Universit├Ąt Paderborn, Germany. I am from Hyderabad, India and I feel privileged to be a Hyderabadi.

I was born and brought up in Jaggayyapet a beautiful small town located on the banks of Paleru river. My house is on the outskirts of the town and just some meters away from the river. I still remember summer holidays when I, with my cousins used to go to Dhanambod when the river dried up. It was best days of my life. If I ever wish to live any place in the world it would be my hometown Jaggayyapet. I finished my schooling and Matriculation here and moved to Hyderabad for Bachelor studies.

My Dad has been my inspiration throughout my whole life. My wish is to live like him. Other than my Dad, I look up to my brother and my cousin Haani, to be successful and work hard like them.

My passion is Linux, Cooking, Travel and exploring new things. I am technology freak. I do not bother about shopping but want to try out every gadget and new technology in the market.

I am very Impulsive in nature and thought of writing my experiences and journey I come across.

I read lots of books. I read all types of books, from fiction to Philosophy. I love Indian history. Currently I am reading 'The Last Mughal'.

I watch tolly and bollywood movies. Full on Indian masala and romance. I rarely watch any English movies. I watch Tv just for local news which I regularly follow.