Home » Development and Build » Yocto Embedded Linux » Create a recipe for yocto using create-recipe script

Create a recipe for yocto using create-recipe script

Below commands shows a ways to create a bitbake recipe using yocto scripts,

$ git clone git://git.yoctoproject.org/poky
$ cd poky
$ cd scripts
$ ./create-recipe -r http://www.busybox.net/downloads/busybox-1.23.2.tar.bz2

Downloading package: http://www.busybox.net/downloads/busybox-1.23.2.tar.bz2
Unpacking to       : /tmp/7r_bmRisur
Parsing content    ….
Can NOT get license from package source files.
Please update the LICENSE and LIC_FILES_CHKSUM manually.
Create bb file: ~/poky/scripts/busybox/busybox_1.23.2.bb

Now, if you open the file, ~/poky/scripts/busybox/busybox_1.23.2.bb you will see bitbake recipe framework created automatially, which you can use for reference,

SUMMARY = ""
DESCRIPTION = ""
HOMEPAGE = ""
LICENSE = ""
LIC_FILES_CHKSUM = ""

SRC_URI = "http://www.busybox.net/downloads/busybox-1.23.2.tar.bz2 \
"

SRC_URI[md5sum] = "7925683d7dd105aabe9b6b618d48cc73"
SRC_URI[sha256sum] = "05a6f9e21aad8c098e388ae77de7b2361941afa7157ef74216703395b14e319a"

Now, we will try to compile the above recipe as it is ( although it will fail, and will try to fix as we proceed ) ( we added the busybox_1.23.2.bb into our created meta layer)

$ bitbake -b ../meta-lynxbee/recipe-busybox/busybox_1.23.2.bb

WARNING: Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / –buildfile.

Build Configuration:
BB_VERSION        = “1.26.0”
BUILD_SYS         = “x86_64-linux”
NATIVELSBSTRING   = “Ubuntu-14.04”
TARGET_SYS        = “arm-poky-linux-gnueabi”
MACHINE           = “qemuarm”
DISTRO            = “poky”
DISTRO_VERSION    = “1.8”
TUNE_FEATURES     = “arm armv5 thumb dsp”
TARGET_FPU        = “soft”
meta
meta-yocto
meta-yocto-bsp    = “fido:cd2c9acdbd75c83790e8144d2a834f5b5de35df0”
meta-lynxbee      = “<unknown>:<unknown>”

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: busybox: Recipe file does not have license file information (LIC_FILES_CHKSUM)
ERROR: Licensing Error: LIC_FILES_CHKSUM does not match, please fix
ERROR: Function failed: do_qa_configure
ERROR: Logfile of failure stored in: ~/devlab/yocto/metadata/build/tmp/work/armv5e-poky-linux-gnueabi/busybox/1.23.2-r0/temp/log.do_configure.9074
ERROR: Task 5 (~/devlab/yocto/metadata/meta-lynxbee/recipe-busybox/busybox_1.23.2.bb, do_configure) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 5 tasks of which 0 didn’t need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
~/devlab/yocto/metadata/meta-lynxbee/recipe-busybox/busybox_1.23.2.bb, do_configure
Summary: There was 1 WARNING message shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.


Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment