Creating yocto bitbake recipe using ” devtool add ” command

The devtool add command automatically creates a recipe based on the source tree with which you provide it. Currently, the command has support for the following:

  • Autotools (autoconf and automake)
  • CMake
  • Scons
  • qmake
  • Plain Makefile
  • Out-of-tree kernel module
  • Binary package (i.e. “-b” option)
  • Node.js module
  • Python modules that use setuptools or distutils

Apart from binary packages, the determination of how a source tree should be treated is automatic based on the files present within that source tree. For example, if a CMakeLists.txt file is found, then the source tree is assumed to be using CMake and is treated accordingly.
Note : In most cases, you need to edit the automatically generated recipe in order to make it build properly. Typically, you would go through several edit and build cycles until you can build the recipe. Once the recipe can be built, you could use possible further iterations to test the recipe on the target device.

Now, lets try to create recipe for strace using devtool add command automatically as,

 $ devtool add https://github.com/strace/strace.git 

Parsing recipes: 100% |#############################################################################| Time: 0:03:40
Parsing of 1577 .bb files complete (0 cached, 1577 parsed). 2177 targets, 183 skipped, 0 masked, 0 errors.
NOTE: Fetching git://github.com/strace/strace.git;protocol=https…

–2017-09-18 09:52:41– http://downloads.yoctoproject.org/mirror/sources/git2_github.com.strace.strace.git.tar.gz
Resolving downloads.yoctoproject.org (downloads.yoctoproject.org)… 198.145.29.63
Connecting to downloads.yoctoproject.org (downloads.yoctoproject.org)|198.145.29.63|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2017-09-18 09:52:42 ERROR 404: Not Found.

Cloning into bare repository ‘/home/myuser//rpi/poky/build/../sources/git2/github.com.strace.strace.git’…
remote: Counting objects: 36327, done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 36327 (delta 75), reused 104 (delta 56), pack-reused 36177
Receiving objects: 100% (36327/36327), 10.49 MiB | 201.00 KiB/s, done.
Resolving deltas: 100% (27273/27273), done.
Checking connectivity… done.
NOTE: Using default source tree path /home/myuser//rpi/poky/build/workspace/sources/strace
NOTE: Recipe /home/myuser//rpi/poky/build/workspace/recipes/strace/strace_git.bb has been automatically created; further editing may be required to make it fully functional

SHUFFLED :   Blocking access to external network while building yocto using BB_NO_NETWORK in local.conf

Reference : http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#sdk-a-closer-look-at-devtool-add

Android Android Commands Android Java Applications Application Libraries Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home JAVA Programs Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags:

Leave a Reply