[yocto] Sysroot bug in bitbake or wrong configuration?

Svein Seldal sveinse at seldal.com
Tue Sep 19 23:43:58 PDT 2017


I have the spu-image.bb recipe below, and running on Pyro, the recipe 
behaves differently if the recipe is run on a fresh system with no 
sstate elements, compared to a system that has a sstate cache present.

The failure is that the spu-image required the host tool "uuidgen", and 
thus has DEPENDS on "util-linux-native". When the -c cleanall spu-image 
is run prior to building spu-image, the recipe sysroot is properly 
initialized with util-linux-native and uuidgen is available in the task 
functions.

If -c clean is run prior to build, or simply by deleting tmp, the 
sysroot will not be properly initialized and uuidgen is not available 
and the recipe fails

Is this a bug in bitbake or am I missing something in my recipe?


Best regards,
Svein Seldal


# spu-image.bb
DESCRIPTION = "Upgrade Image"

LICENSE = "MIT"
LIC_FILES_CHKSUM = 
"file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"

DEPENDS = "util-linux-native"
INHIBIT_DEFAULT_DEPS = "1"

fakeroot do_spu_rootfs() {
	uuidgen
}
addtask do_spu_rootfs before do_build

fakeroot do_spu_image () {
	uuidgen
}
addtask do_spu_image after do_spu_rootfs before do_build

# It does not matter if these are noexec-ed or not
#do_fetch[noexec] = "1"
#do_unpack[noexec] = "1"
#do_patch[noexec] = "1"
#do_configure[noexec] = "1"
#do_compile[noexec] = "1"
#do_install[noexec] = "1"
#do_package[noexec] = "1"
#do_package_qa[noexec] = "1"
#do_packagedata[noexec] = "1"
#do_package_write_ipk[noexec] = "1"
#do_package_write_deb[noexec] = "1"
#do_package_write_rpm[noexec] = "1"


# 1) Running works fine
#   		bitbake -v spu-image |tee log1.txt
#   		cat log1.txt | grep -2 uuidgen
#
# 2) Cleaning
#   		bitbake -c clean spu-image
#
# 3) Rebuilding -- now fails
#   		bitbake -v spu-image |tee log2.txt
#   		cat log2.txt | grep -2 uuidgen
#
# 4) Sstate cleaning
#   		bitbake -c cleanall spu-image
#
# 5) Works again:
#   		bitbake -v spu-image |tee log3.txt
#   		cat log3.txt | grep -2 uuidgen




More information about the yocto mailing list