understanding recipes
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PR = "r0"
SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"
inherit autotools gettextSo where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
And what does the following line do or require me to do:
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
Is this all that is needed to get helloworld put into /usr/bin so it can be executed at the command line when the image is booted?
Jim A
Quoted 20 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM=
"file://COPYING;md5=751419260aa954499f7abaabaa882bbe"PR = "r0" SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz" inherit autotools gettext
Quoted 5 lines
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
Quoted 10 lines
Is this all that is needed to get helloworld put into
/usr/binso it can be executed at the command line when the image is booted?Jim A
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bb
where your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES
BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"BBFILE_COLLECTIONS += "jfa"BBFILE_PATTERN_jfa := "^${LAYERDIR}/"BBFILE_PRIORITY_jfa = "5"
Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 9 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"
Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 3 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
This was answered in another post.
Quoted 2 lines
Is this all that is needed to get helloworld put into
/usr/binso it can be executed at the command line when the image is booted?
You'd also need to add the helloworld package to your image file. The simplest way to do this is to add EXTRA_IMAGE_FEATURES += "helloworld" in your build's local.conf file.
I think the above should be accurate enough w/o testing it myself.
Scott
Signature · 3 lines
Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center
Quoted 59 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES
BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 9 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 3 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
Quoted 9 lines
This was answered in another post.
Quoted 2 lines
Is this all that is needed to get helloworld put into
/usr/binso it can be executed at the command line when the image is booted?You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.
OE Build Configuration:
BB_VERSION = "1.13.3" TARGET_ARCH = "i586" TARGET_OS = "linux" MACHINE = "mycdv" DISTRO = "poky" DISTRO_VERSION = "1.1" TUNE_FEATURES = "m32 core2" TARGET_FPU = "" meta meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4, /home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb, do_fetch)
NOTE: package helloworld-1.0-r0: task do_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig"; export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts"; /usr/bin/env wget -t 5 -q --passive-ftp --no-check-certificate -P /home/jim/yocto-downloads 'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:
This is what is shown on the ftp site as available, I don't see 1.0.tar there. How do I control this?
Jim A
Quoted 2 lines
Scott
Quoted 59 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES
BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 9 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 3 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
Quoted 9 lines
This was answered in another post.
Quoted 2 lines
Is this all that is needed to get helloworld put into
/usr/binso it can be executed at the command line when the image is booted?You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.
OE Build Configuration:
BB_VERSION = "1.13.3" TARGET_ARCH = "i586" TARGET_OS = "linux" MACHINE = "mycdv" DISTRO = "poky" DISTRO_VERSION = "1.1" TUNE_FEATURES = "m32 core2" TARGET_FPU = "" meta meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4, /home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb, do_fetch)
NOTE: package helloworld-1.0-r0: task do_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig"; export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts"; /usr/bin/env wget -t 5 -q --passive-ftp --no-check-certificate -P /home/jim/yocto-downloads 'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:
I don't see 1.0.tar on the ftp site. How do I control this?
Quoted 2 lines
Scott
Quoted 115 lines · jfabernathy
Quoted 66 lines · Scott Garman
Quoted 11 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 9 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 3 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 9 lines
Quoted 2 lines
Is this all that is needed to get helloworld put into
/usr/binso it can be executed at the command line when the image is booted?You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export
HOME="/home/jim"; export SSH_AGENT_PID="1413"; export
SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export
GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";
export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz'
failed with signal 8, output:
Quoted 1 line
I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Scott
Signature · 3 lines
Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center
Quoted 118 lines · Scott Garman
Quoted 117 lines · jfabernathy
Quoted 66 lines · Scott Garman
Quoted 11 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 9 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 3 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 9 lines
Quoted 2 lines
Is this all that is needed to get helloworld put into
/usr/binso it can be executed at the command line when the image is booted?You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:
Quoted 8 lines
Quoted 1 line
I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
Duh! Now that makes sense. Sorry for being so dense. That's what happens when your been programing since Fortran was at the 1.0 level. Brain goes soft.
Jim A
Quoted 4 lines
The part of the filename after the underscore is what will get interpolated into ${PV}.
Scott
Quoted 122 lines · Scott Garman
Quoted 110 lines · jfabernathy
Quoted 66 lines · Scott Garman
Quoted 11 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it included in the build I do.
For example, suppose I want to create the meta-intel/meta-cedartrail BSP with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 9 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 3 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 9 lines
Quoted 2 lines
Is this all that is needed to get helloworld put into
/usr/binso it can be executed at the command line when the image is booted?You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";Quoted 8 lines
export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
Quoted 8 lines
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
JIm A
Quoted 137 lines · jfabernathy
Quoted 136 lines · Scott Garman
Quoted 116 lines · jfabernathy
Quoted 74 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it
included in the build I do.For example, suppose I want to create the meta-intel/meta-cedartrail BSP
with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.Quoted 3 lines
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 10 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 4 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 3 lines
Is this all that is needed to get helloworld put into
/usr/binso it can
be executed at the command line when the image is booted?Quoted 6 lines
You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";Quoted 8 lines
export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Quoted 6 lines
Quoted 2 lines
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
In this case, the LIC_FILES_CHKSUM is storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.
So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the LIC_FILES_CHKSUM field with that new md5 checksum.
This is a common process we have to go through when upgrading recipes, so you're getting a taste of what working with the distro/metadata team is like. :)
One more thing - when LIC_FILES_CHKSUM changes, you should always verify that the license for the sources haven't changed (in this case GPL v2 or later). If it did change, you'd also need to change the LICENSE field in the recipe to reflect the new license. LIC_FILES_CHKSUM is a step we added so we don't miss license changes.
Scott
Signature · 3 lines
Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center
Quoted 147 lines · Scott Garman
Quoted 139 lines · jfabernathy
Quoted 138 lines · Scott Garman
Quoted 121 lines · jfabernathy
Quoted 74 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it
included in the build I do.For example, suppose I want to create the meta-intel/meta-cedartrail BSP
with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.Quoted 3 lines
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 10 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 4 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 3 lines
Is this all that is needed to get helloworld put into
/usr/binso it can
be executed at the command line when the image is booted?Quoted 6 lines
You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
Quoted 5 lines
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Quoted 6 lines
Quoted 2 lines
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
Quoted 8 lines
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.This is a common process we have to go through when upgrading recipes, so you're getting a taste of what working with the distro/metadata team is like. :)
One more thing - when
LIC_FILES_CHKSUMchanges, you should always verify that the license for the sources haven't changed (in this case GPL v2 or later). If it did change, you'd also need to change the LICENSE field in the recipe to reflect the new license.LIC_FILES_CHKSUMis a step we added so we don't miss license changes.
Thanks for a clear explanation. This is an area I'm sure my customers will struggle with. I think another problem I was having was the recipe was called helloworld, but the application seems to be just "hello". By making those changes, it helped the License file be found more directly and it passed.
I'm going to do a complete build now and see what happens.
Thanks again,
Jim A
Quoted 2 lines
Scott
Quoted 148 lines · Scott Garman
Quoted 138 lines · jfabernathy
Quoted 137 lines · Scott Garman
Quoted 120 lines · jfabernathy
Quoted 74 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it
included in the build I do.For example, suppose I want to create the meta-intel/meta-cedartrail BSP
with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.Quoted 3 lines
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 10 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 4 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 3 lines
Is this all that is needed to get helloworld put into
/usr/binso it can
be executed at the command line when the image is booted?Quoted 6 lines
You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
Quoted 5 lines
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Quoted 6 lines
Quoted 2 lines
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.
Quoted 7 lines
So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.This is a common process we have to go through when upgrading recipes, so you're getting a taste of what working with the distro/metadata team is like. :)
One more thing - when
LIC_FILES_CHKSUMchanges, you should always verify that the license for the sources haven't changed (in this case GPL v2 or later). If it did change, you'd also need to change the LICENSE field in the recipe to reflect the new license.LIC_FILES_CHKSUMis a step we added so we don't miss license changes.
I use the attached script to automate this - it puts the files in the correct format (modulo a little path massaging if necessary).
What I do when I run across these problems is this:
% bitbake <recipe>
... fails with LIC_FILES_CHKSUM errors
% make_LIC_FILES_CHECKSUM tmp/work/<path-to-recipe-tree>/<LICENSE_FILES>
e.g.
(cd tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/helloworld-2.7-r0/helloworld-2.7/;make_LIC_FILES_CHECKSUM COPYING)
Cut & paste the output into your recipe and rebuild.
The script makes it much simpler to do this when multiple files are involved.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
#! /bin/bash
echo 'LIC_FILES_CHKSUM = " \'
for f in $*; do
md5=`md5sum $f | awk '{print $1}'`
echo "file://$f;md5=$md5 \\"done
echo '"'
Quoted 177 lines · Gary Thomas
Quoted 150 lines · Scott Garman
Quoted 140 lines · jfabernathy
Quoted 139 lines · Scott Garman
Quoted 122 lines · jfabernathy
Quoted 74 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it
included in the build I do.For example, suppose I want to create the meta-intel/meta-cedartrail BSP
with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.Quoted 3 lines
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 10 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 4 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 3 lines
Is this all that is needed to get helloworld put into
/usr/binso it can
be executed at the command line when the image is booted?Quoted 6 lines
You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
Quoted 5 lines
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Quoted 6 lines
Quoted 2 lines
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.Quoted 7 lines
So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.This is a common process we have to go through when upgrading recipes, so you're getting a taste of what working with the distro/metadata team is like. :)
One more thing - when
LIC_FILES_CHKSUMchanges, you should always verify that the license for the sources haven't changed (in this case GPL v2 or later). If it did change, you'd also need to change the LICENSE field in the recipe to reflect the new license.LIC_FILES_CHKSUMis a step we added so we don't miss license changes.I use the attached script to automate this - it puts the files in the correct format (modulo a little path massaging if necessary).
What I do when I run across these problems is this:
% bitbake <recipe>
... fails withLIC_FILES_CHKSUMerrors
%make_LIC_FILES_CHECKSUM
tmp/work/<path-to-recipe-tree>/<LICENSE_FILES>
e.g.(cdtmp/work/armv7a-vfp-neon-poky-linux-gnueabi/helloworld-2.7-r0/helloworld-2.7/;make_LIC_FILES_CHECKSUM COPYING) Cut & paste the output into your recipe and rebuild.
The script makes it much simpler to do this when multiple files are involved.
Quoted 4 lines
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
okay, I got a clean build, but hello was not in the final image even though I had:
EXTRA_IMAGE_FEATURES += "hello"
in the local.conf. I ran hob against this and could see that hello was an option, but it was not selected. Trying to bake with hob from there didn't work, but that's not as important.
Any ideas as to why EXTRA_IMAGE_FEATURES += "hello" didn't add the hello code to the final image?
JIm A
Quoted 179 lines · jfabernathy
Quoted 174 lines · Gary Thomas
Quoted 149 lines · Scott Garman
Quoted 139 lines · jfabernathy
Quoted 138 lines · Scott Garman
Quoted 121 lines · jfabernathy
Quoted 74 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it
included in the build I do.For example, suppose I want to create the meta-intel/meta-cedartrail BSP
with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.Quoted 3 lines
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 10 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 4 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 3 lines
Is this all that is needed to get helloworld put into
/usr/binso it can
be executed at the command line when the image is booted?Quoted 6 lines
You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
Quoted 5 lines
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Quoted 6 lines
Quoted 2 lines
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.Quoted 7 lines
So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.This is a common process we have to go through when upgrading recipes, so you're getting a taste of what working with the distro/metadata team is like. :)
One more thing - when
LIC_FILES_CHKSUMchanges, you should always verify that the license for the sources haven't changed (in this case GPL v2 or later). If it did change, you'd also need to change the LICENSE field in the recipe to reflect the new license.LIC_FILES_CHKSUMis a step we added so we don't miss license changes.I use the attached script to automate this - it puts the files in the correct format (modulo a little path massaging if necessary).
What I do when I run across these problems is this:
% bitbake <recipe>
... fails withLIC_FILES_CHKSUMerrors
%make_LIC_FILES_CHECKSUMtmp/work/<path-to-recipe-tree>/<LICENSE_FILES>
e.g.
(cd tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/helloworld-2.7-r0/helloworld-2.7/;make_LIC_FILES_CHECKSUM COPYING) Cut & paste the output into your recipe and rebuild.The script makes it much simpler to do this when multiple files are involved.
Quoted 4 lines
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Quoted 7 lines
okay, I got a clean build, but hello was not in the final image even though I had:
EXTRA_IMAGE_FEATURES+= "hello"in the local.conf. I ran hob against this and could see that hello was an option, but it was not selected. Trying to bake with hob from there didn't work, but that's not as important.
Any ideas as to why
EXTRA_IMAGE_FEATURES+= "hello" didn't add the hello code to the final image?
EXTRA_IMAGE_FEATURES enables target *features*, not packages.
To get your package added, use this in local.conf
IMAGE_INSTALL += " hello "
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 186 lines · Gary Thomas
Quoted 185 lines · jfabernathy
Quoted 176 lines · Gary Thomas
Quoted 151 lines · Scott Garman
Quoted 141 lines · jfabernathy
Quoted 140 lines · Scott Garman
Quoted 123 lines · jfabernathy
Quoted 74 lines · Scott Garman
Quoted 10 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it
included in the build I do.For example, suppose I want to create the meta-intel/meta-cedartrail BSP
with the core-image-minimal image, but I wanted to include hello world as shown in 3.1.2 Autotooled Package section of the Poky reference Manual.Quoted 3 lines
Where do I put the recipe file? I'm guessing a recipe-jfa directory at the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?
Hi Jim,
The best way to do this is to create your own layer, and keep all of your customizations there.
You'd put this in a directory, say meta-jfa with something like the following:
meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your meta-jfa/ directory.
Quoted 10 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 6 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 4 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 3 lines
Is this all that is needed to get helloworld put into
/usr/binso it can
be executed at the command line when the image is booted?Quoted 6 lines
You'd also need to add the helloworld package to your image file. The simplest way to do this is to add
EXTRA_IMAGE_FEATURES+= "helloworld" in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem and it just locked up there. Had to control-C out of it. Console below:
jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
Quoted 5 lines
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz' failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Quoted 6 lines
Quoted 2 lines
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.Quoted 7 lines
So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.This is a common process we have to go through when upgrading recipes, so you're getting a taste of what working with the distro/metadata team is like. :)
One more thing - when
LIC_FILES_CHKSUMchanges, you should always verify that the license for the sources haven't changed (in this case GPL v2 or later). If it did change, you'd also need to change the LICENSE field in the recipe to reflect the new license.LIC_FILES_CHKSUMis a step we added so we don't miss license changes.I use the attached script to automate this - it puts the files in the correct format (modulo a little path massaging if necessary).
What I do when I run across these problems is this:
% bitbake <recipe>
... fails withLIC_FILES_CHKSUMerrors
%make_LIC_FILES_CHECKSUMtmp/work/<path-to-recipe-tree>/<LICENSE_FILES>
e.g.
(cd tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/helloworld-2.7-r0/helloworld-2.7/;make_LIC_FILES_CHECKSUM COPYING) Cut & paste the output into your recipe and rebuild.The script makes it much simpler to do this when multiple files are involved.
Quoted 4 lines
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yoctookay, I got a clean build, but hello was not in the final image even though I had:
EXTRA_IMAGE_FEATURES+= "hello"
Quoted 9 lines
Quoted 3 lines
in the local.conf. I ran hob against this and could see that hello was an option, but it was not selected. Trying to bake with hob from there didn't work, but that's not as important.
Any ideas as to why
EXTRA_IMAGE_FEATURES+= "hello" didn't add the hello code to the final image?
EXTRA_IMAGE_FEATURESenables target *features*, not packages.To get your package added, use this in local.conf
IMAGE_INSTALL+= " hello "
Based on what I've discovered about the use of IMAGE_INSTALL in local.conf, I'll opt for POKY_EXTRA_INSTALL += "hello"
That option worked. So now I can better understand this. Thanks all.
Would the make a good example for the How Do I section on the wiki? I can write it up if someone will review and post.
Jim A.
Jim A
Quoted 227 lines · jfabernathy
Quoted 218 lines · Gary Thomas
Quoted 217 lines · jfabernathy
Quoted 203 lines · Gary Thomas
Quoted 176 lines · Scott Garman
Quoted 155 lines · jfabernathy
Quoted 154 lines · Scott Garman
Quoted 135 lines · jfabernathy
Quoted 81 lines · Scott Garman
Quoted 12 lines · jfabernathy
I'm trying to understand the concept of creating a recipe and having it
included in the build I do.For example, suppose I want to create the meta-intel/meta-cedartrail BSP
with the core-image-minimal image, but I wanted to include hello world
as shown in 3.1.2 Autotooled Package section of the Poky reference
Manual.Quoted 4 lines
Where do I put the recipe file? I'm guessing a recipe-jfa directory at
the same level as the meta-cedartrail recipe-core, recipe-kernel, recipe-graphic, recipe-bsp?Hi Jim,
The best way to do this is to create your own layer, and keep all of
your customizations there.You'd put this in a directory, say meta-jfa with something like the
following:meta-jfa/
meta-jfa/conf/layer.conf
meta-jfa/recipes-jfa/helloworld/helloworld.bbwhere your layer.conf file would look like:
# We have a conf and classes directory, add to BBPATH BBPATH := "${BBPATH}:${LAYERDIR}"
# We have a packages directory, add to BBFILES BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS+= "jfa"BBFILE_PATTERN_jfa:= "^${LAYERDIR}/"BBFILE_PRIORITY_jfa= "5"Then point your build's bblayers.conf file to include the path to your
meta-jfa/ directory.Quoted 10 lines
I'm also assuming that helloworld.bb file would contain:
DESCRIPTION = "GNU Helloworld application" SECTION = "examples"
LICENSE = "GPLv2+"LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0"Quoted 7 lines
SRC_URI= "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"inherit autotools gettext
So where do the values of ${GNU_MIRROR|, and ${PV} get set correctly?
Those examples are defined in the bitbake classes you have in your base layers.
Quoted 4 lines
And what does the following line do or require me to do:
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"This was answered in another post.
Quoted 3 lines
Is this all that is needed to get helloworld put into
/usr/binso it can
be executed at the command line when the image is booted?Quoted 8 lines
You'd also need to add the helloworld package to your image file. The
simplest way to do this is to addEXTRA_IMAGE_FEATURES+= "helloworld"
in your build's local.conf file.I think the above should be accurate enough w/o testing it myself.
I got the layer created like you said, but the test had a fetch problem
and it just locked up there. Had to control-C out of it. Console below:jim@ubuntu-x64:/build/mycdv-minimal$ bitbake helloworld Loading cache: 100% |###########################################################| ETA: 00:00:00 Loaded 1037 entries from dependency cache.OE Build Configuration:
BB_VERSION= "1.13.3"TARGET_ARCH= "i586"TARGET_OS= "linux"
MACHINE = "mycdv"
DISTRO = "poky"DISTRO_VERSION= "1.1"TUNE_FEATURES= "m32 core2"TARGET_FPU= ""
meta
meta-yocto = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80" meta-mycdv = "edison:34478f24de65dd8de8a4c8b913a1458d82dac1fa" meta-jfa = "edison:adcf8bf7b52460b94998438e8c2bf854cdec0a80"NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 514 of 693 (ID: 4,/home/jim/poky/meta-jfa/recipes-jfa/helloworld/helloworld.bb,do_fetch)
NOTE: package helloworld-1.0-r0: taskdo_fetch: Started
WARNING: Fetcher failure for URL: 'None'. Fetch command export HOME="/home/jim"; export SSH_AGENT_PID="1413"; export SSH_AUTH_SOCK="/tmp/keyring-2QW6yC/ssh"; export GIT_CONFIG="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/etc/gitconfig";export PATH="/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin/core2-poky-linux:/build/mycdv-minimal/tmp/sysroots/mycdv/usr/bin/crossscripts:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/usr/bin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux/sbin:/build/mycdv-minimal/tmp/sysroots/x86_64-linux//bin:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/home/jim/poky/scripts:/home/jim/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jim/poky/scripts";
Quoted 6 lines
/usr/bin/envwget -t 5 -q --passive-ftp --no-check-certificate -P/home/jim/yocto-downloads'ftp://ftp.gnu.org/gnu/hello/hello-1.0.tar.gz'
failed with signal 8, output:I don't see 1.0.tar on the ftp site. How do I control this?
If you look in:
ftp://ftp.gnu.org/gnu/hello/
you'll see which versions are available. Rename your recipe filename to reflect the version you wish to use, for example helloworld_2.7.bb
The part of the filename after the underscore is what will get interpolated into ${PV}.
Quoted 6 lines
Quoted 2 lines
Scott
Now I have gotten by the fetching but the license file information in the .bb file from the example is incorrect. I can't see from the Reference manual License section enough information for me to create that line in the .bb file. What is the process to figure this out?
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.This is a common process we have to go through when upgrading recipes, so you're getting a taste of what working with the distro/metadata team is like. :)
Quoted 6 lines
One more thing - when
LIC_FILES_CHKSUMchanges, you should always verify that the license for the sources haven't changed (in this case GPL v2 or later). If it did change, you'd
also need to change the LICENSE field in the recipe to reflect the new license.LIC_FILES_CHKSUMis a step we added so we don't miss license changes.I use the attached script to automate this - it puts the files in the correct format (modulo a little path massaging if necessary).
What I do when I run across these problems is this:
% bitbake <recipe>
... fails withLIC_FILES_CHKSUMerrors
%make_LIC_FILES_CHECKSUM
tmp/work/<path-to-recipe-tree>/<LICENSE_FILES>
e.g.
(cd tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/helloworld-2.7-r0/helloworld-2.7/;make_LIC_FILES_CHECKSUM COPYING)
Cut & paste the output into your recipe and rebuild.The script makes it much simpler to do this when multiple files are involved.
Quoted 4 lines
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yoctookay, I got a clean build, but hello was not in the final image even though I had:
EXTRA_IMAGE_FEATURES+= "hello"in the local.conf. I ran hob against this and could see that hello was an option, but it was not selected. Trying to bake with hob from there didn't work, but that's not as important.
Quoted 8 lines
Quoted 2 lines
Any ideas as to why
EXTRA_IMAGE_FEATURES+= "hello" didn't add the hello code to the final image?
EXTRA_IMAGE_FEATURESenables target *features*, not packages.To get your package added, use this in local.conf
IMAGE_INSTALL+= " hello "
Quoted 8 lines
Based on what I've discovered about the use of
IMAGE_INSTALLin local.conf, I'll opt forPOKY_EXTRA_INSTALL+= "hello"That option worked. So now I can better understand this. Thanks all.
Would the make a good example for the How Do I section on the wiki? I can write it up if someone will review and post.
Please write it up, you should have access to the wiki , by creating a login.
Sau!
Quoted 8 lines
Jim A.
Jim A
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Quoted 7 lines · Gary Thomas
Quoted 2 lines
Any ideas as to why
EXTRA_IMAGE_FEATURES+= "hello" didn't add the hello code to the final image?
EXTRA_IMAGE_FEATURESenables target *features*, not packages.To get your package added, use this in local.conf
IMAGE_INSTALL+= " hello "
Good catch. Thanks, Gary.
Scott
Signature · 3 lines
Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center
Quoted 6 lines · Scott Garman
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.
Or if you're lazy, like me, you can just run the build and let it fail then run md5sum on the extracted source in the work directory.
i.e. for qemux86 hello world I could bitbake helloworld then:
md5sum tmp/work/i586-poky-linux/hello-world-2.7-r0/hello-world-2.7/COPYING
Cheers,
Joshua
Signature · 3 lines
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology CentreQuoted 10 lines · Joshua Lock
Quoted 7 lines · Scott Garman
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.
Quoted 6 lines
Or if you're lazy, like me, you can just run the build and let it fail then run md5sum on the extracted source in the work directory.
i.e. for qemux86 hello world I could bitbake helloworld then:
md5sum tmp/work/i586-poky-linux/hello-world-2.7-r0/hello-world-2.7/COPYING
I think it even tells you what it should be, so you don't even need to do this step. Just set the right file and the correct lines within the file and run until failure.
-M
Quoted 14 lines · On 2012-01-27 18:42, McClintock Matthew-B29882 wrote:
Quoted 13 lines · Joshua Lock
Quoted 7 lines · Scott Garman
In this case, the
LIC_FILES_CHKSUMis storing the md5sum of the COPYING file, which is stored in the top-level directory of the extracted sources.So manually download the hello version you are trying to use, extract the tarball locally, and run md5sum against the COPYING file. Then update the
LIC_FILES_CHKSUMfield with that new md5 checksum.Or if you're lazy, like me, you can just run the build and let it fail then run md5sum on the extracted source in the work directory.
Quoted 7 lines
Quoted 3 lines
i.e. for qemux86 hello world I could bitbake helloworld then:
md5sum tmp/work/i586-poky-linux/hello-world-2.7-r0/hello-world-2.7/COPYING
I think it even tells you what it should be, so you don't even need to do this step. Just set the right file and the correct lines within the file and run until failure.
Not quite; bitbake will tell you what the correct MD5 and SHA checksums are for the source package, but it has ho idea what file(s) contain license information so there's little it can do to guide you on that front.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------