From patchwork Sat Dec 23 17:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Simone_Wei=C3=9F?= X-Patchwork-Id: 36886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E924C3DA6E for ; Sat, 23 Dec 2023 17:16:42 +0000 (UTC) Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web11.10731.1703351797823435534 for ; Sat, 23 Dec 2023 09:16:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.com header.s=2017 header.b=W4BoGS3B; spf=pass (domain: posteo.com, ip: 185.67.36.66, mailfrom: simone.p.weiss@posteo.com) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 81CA9240101 for ; Sat, 23 Dec 2023 18:16:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.com; s=2017; t=1703351795; bh=L4ctoa+05AvBiNUkZg1rwWTUFTerycyEzux3HLZYJUs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=W4BoGS3BTvF+ea6Qj84pIfCo/EhDFDMQHtfz8fj1S2pBC/OZh45Vw/P8MvLiOOCFV TfSNnNXyUwuTjUUT5V8CwlpmZ5ck5+qapLYxDN3/Z9AGLo+lXzqeitfJqJCwGzeuhC dcR4JH9quVcFDh4Ils6bs7yV+6GxWHAFMlci06H3Dn/IJAO0x+fhFFjJ5Vzm12tzHL F6WuNBI9UtcJvkwORJfkq7npwCZgzr5VwZnFhPb1Tps+oqn88AaM76lDvc+6d/5osD IMTv2SM5GtJ6j6sIlMHR6KMx8xd2C+1mEfrgL04ZPUqpoiFf/2XKy7q7fLAzlim/gZ mhhLdJ3Yw0yqA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sy9nG2HjWz6txj; Sat, 23 Dec 2023 18:16:33 +0100 (CET) From: simone.p.weiss@posteo.com To: docs@lists.yoctoproject.org Cc: =?utf-8?q?Simone_Wei=C3=9F?= Subject: [PATCH] overview-manual: Fix bitbake taskmap example Date: Sat, 23 Dec 2023 17:08:08 +0000 Message-Id: <20231223170808.873741-1-simone.p.weiss@posteo.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 23 Dec 2023 17:16:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4738 From: Simone Weiß Fix the shared library example, as it currently will throw errors during `bitbake sayhello`. 1) Add `SRCREV = ${AUTOREV}` to both recipes to fix the FetchError complaining about missing valid `SRCREV`. 2) Ensure the libhello is build as libhello.so.0.1 instead of libhello.so.1.0. This causes otherwhise issues in do_install of libhello_0.1.bb Signed-off-by: Simone Weiß Reviewed-by: Michael Opdenacker --- documentation/overview-manual/concepts.rst | 4 +++- documentation/overview-manual/svg/bitbake_tasks_map.svg | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst index d335c2fcd..fec699c85 100644 --- a/documentation/overview-manual/concepts.rst +++ b/documentation/overview-manual/concepts.rst @@ -2245,7 +2245,7 @@ The following are the contents of ``libhello/Makefile``:: all: $(LIB) $(LIB): hellolib.o - $(CC) $< -Wl,-soname,$(LIB).1 -fPIC $(LDFLAGS) -shared -o $(LIB).1.0 + $(CC) $< -Wl,-soname,$(LIB).1 -fPIC $(LDFLAGS) -shared -o $(LIB).0.1 %.o: %.c $(CC) -c $< @@ -2317,6 +2317,7 @@ The following are the contents of ``libhello_0.1.bb``:: # Assuming the branch is main # Change accordingly SRC_URI = "git://github.com//libhello;branch=main;protocol=https" + SRCREV = ${AUTOREV} S = "${WORKDIR}/git" @@ -2340,6 +2341,7 @@ The following are the contents of ``sayhello_0.1.bb``:: # Assuming the branch is main # Change accordingly SRC_URI = "git://github.com//sayhello;branch=main;protocol=https" + SRCREV = ${AUTOREV} DEPENDS += "libhello" RDEPENDS:${PN} += "libhello" diff --git a/documentation/overview-manual/svg/bitbake_tasks_map.svg b/documentation/overview-manual/svg/bitbake_tasks_map.svg index 09ef36faa..fbffb8913 100644 --- a/documentation/overview-manual/svg/bitbake_tasks_map.svg +++ b/documentation/overview-manual/svg/bitbake_tasks_map.svg @@ -1,4 +1,4 @@ -
tmp
tmp
work
work
${MULTIMACH_TARGET_OS}
${MULTIMACH_TARGET_OS}
libhello
libhello
sayhello
sayhello
0.1-r0
0.1-r0
0.1-r0
0.1-r0
downloads
downloads
git2
git2
github.com.<username>.sayhello
github.com.<username>.sayhello
github.com.<username>.libhello
github.com.<username>.libhello
git
git
Makefile
Makefile
LICENSE
LICENSE
fix.patch
fix.patch
hellolib.c
hellolib.c
temp
temp
sysroot-destdir
sysroot-destdir
recipe-sysroot
recipe-sysroot
image
image
usr
usr
include
include
lib
lib
hellolib.h
hellolib.h
libhello.so.1
libhello.so.1
libhello.so.1.0
libhello.so.1.0
Everything in image folder that is present in SYSROOT_DIRS will be copied here.
Everything in image...
do_install
do_install
libhello.so.1.0
libhello.so.1.0
do_configure
do_configure
hellolib.h
hellolib.h
do_patch
do_patch
do_unpack
do_unpack
6
6
7
7
8
8
do_compile
do_compile
9
9
10
10
do_populate_sysroot
do_populate_sysroot
11
11
git
git
Makefile
Makefile
LICENSE
LICENSE
sayhello.c
sayhello.c
sayhello
sayhello
image
image
usr
usr
bin
bin
libhello-0.1
libhello-0.1
S = "${WORKDIR}/git"
S = "${WORKDIR}/git"
WORKDIR
WORKDIR
D
D
S
S
B
B
S
S
T
T
libdir
libdir
includedir
includedir
RECIPE_SYSROOT
RECIPE_SYSROOT
S
S
B
B
D
D
WORKDIR
WORKDIR
do_prepare_recipe_sysroot
do_prepare_recipe_sysroot
sayhello
sayhello
usr
usr
include
include
lib
lib
hellolib.h
hellolib.h
libhello.so.1
libhello.so.1
libhello.so.1.0
libhello.so.1.0
This also contains other files from other 
dependencies. Default dependencies are:
basically gcc, compilerlibs and libc
This also contains other files from other...
SYSROOT_DESTDIR
SYSROOT_DESTDIR
Github
Github
do_fetch
do_fetch
1
1
do_fetch
do_fetch
5
5
do_configure
do_configure
12
12
do_compile
do_compile
13
13
do_unpack
do_unpack
2
2
conf
conf
local.conf
local.conf
bblayers.conf
bblayers.conf
S defaults generally to ${WORKDIR}/${BPN}-${PV}
In git recipes change it to ${WORKDIR}/git
S defaults generally to ${WORKDIR}/${B...
do_patch
(No patches)
do_patch...
3
3
4
4
do_install
do_install
14
14
package
package
PKGD
PKGD
A copy of ${D}
excluding
/sysroot-only
A copy of ${D}...
do_package
do_package
15
15
packages-split
packages-split
PKGDEST
PKGDEST
sayhello
sayhello
usr
usr
bin
bin
Folders created here are present in PACKAGES variable, BitBake knows what and where to put things using the FILES variable, example: FILES:${PN} files will go to ${PN} folder which is in PACKAGES
Folders created here are present in PACKAGES variable...
do_package
do_package
16
16
deploy-pkg
deploy-pkg
${PACKAGE_ARCH}
${PACKAGE_ARCH}
This can be rpms, debs or ipks.
These are provided by
package_rpm, package_deb and package_ipk classes respectively, use PACKAGE_CLASSES for that as
content of PACKAGE_CLASSES will be appended
to INHERIT
This can be rpms, debs or ipks....
sayhello-0.1-r0.${PACKAGE_ARCH}.pkg
sayhello-0.1-r0.${PACKAGE_ARCH}.pkg
This task also depends on PACKAGE_CLASSES,
pkg can be rpm, deb or ipk for package_rpm,
package_deb or package_ipk respectively.
The generated package generally named using:
${PN}, ${PR}, ${PACKAGE_ARCH} and pkg
This task also depends on PACKAGE_CLASSES,...
deploy
deploy
${DEPLOY_DIR_pkg}
${DEPLOY_DIR_pkg}
do_package_write_pkg
do_package_write_pkg
17
17
${PACKAGE_ARCH}
${PACKAGE_ARCH}
For packages, this can be IPK, RPM or DEB (check step 17)
For packages, this can be IPK, RPM or DEB (check step 17)
DEPLOY_DIR
DEPLOY_DIR
TMPDIR
TMPDIR
DL_DIR
DL_DIR
do_package_write_pkg
do_package_write_pkg
18
18
This can be PKGWRITEDIRRPM, PKGWRITEDIRDEB or PKGWRITEDIRIPK for package_rpm, package_deb
or package_ipk respectively
This can be PKGWRITEDIRRPM, PKGWRITEDIRDEB or PKGWRITEDIRIPK for pack...
License checking happens in do_populate_lic after do_patch
and before that a checksum check
happends on LIC_FILES_CHKSUM if the
license is not CLOSED
License checking happens in do_populate_lic after do_pa...
This variable is used to separate recipes
based on their target. This has value of
${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
This variable is used to separate recipes...
conf-notes.txt
conf-notes.txt
sstate-cache
sstate-cache
SSTATE_DIR
SSTATE_DIR
sayhello
sayhello
This folder contains cache for recipes build output, this is used by BitBake, if the recipe checksum did not change it knows that the output to use is the same.
This folder contains cache for recipes build output, this is used by...
These directories can be shared accross builds to save disk space and build time
These directories can be shared accross builds to save disk space an...
This directory contains other output directories such as images, sdk and licenses
This directory contains other output directories such as images, sdk...
This file contains all layers that BitBake should consider when looking for metadata.
This file contains all layer...
This is base configuration file containing essential user config such as MACHINE and DISTRO
This is base configuration file containing essential user config such as...
The message to show after source oe-init-build-env
The message to show after source oe-init...
Text is not SVG - cannot display
\ No newline at end of file +
tmp
tmp
work
work
${MULTIMACH_TARGET_OS}
${MULTIMACH_TARGET_OS}
libhello
libhello
sayhello
sayhello
0.1-r0
0.1-r0
0.1-r0
0.1-r0
downloads
downloads
git2
git2
github.com.<username>.sayhello
github.com.<username>.sayhello
github.com.<username>.libhello
github.com.<username>.libhello
git
git
Makefile
Makefile
LICENSE
LICENSE
fix.patch
fix.patch
hellolib.c
hellolib.c
temp
temp
sysroot-destdir
sysroot-destdir
recipe-sysroot
recipe-sysroot
image
image
usr
usr
include
include
lib
lib
hellolib.h
hellolib.h
libhello.so.1
libhello.so.1
libhello.so.0.1
libhello.so.0.1
Everything in image folder that is present in SYSROOT_DIRS will be copied here.
Everything in image...
do_install
do_install
libhello.so.0.1
libhello.so.0.1
do_configure
do_configure
hellolib.h
hellolib.h
do_patch
do_patch
do_unpack
do_unpack
6
6
7
7
8
8
do_compile
do_compile
9
9
10
10
do_populate_sysroot
do_populate_sysroot
11
11
git
git
Makefile
Makefile
LICENSE
LICENSE
sayhello.c
sayhello.c
sayhello
sayhello
image
image
usr
usr
bin
bin
libhello-0.1
libhello-0.1
S = "${WORKDIR}/git"
S = "${WORKDIR}/git"
WORKDIR
WORKDIR
D
D
S
S
B
B
S
S
T
T
libdir
libdir
includedir
includedir
RECIPE_SYSROOT
RECIPE_SYSROOT
S
S
B
B
D
D
WORKDIR
WORKDIR
do_prepare_recipe_sysroot
do_prepare_recipe_sysroot
sayhello
sayhello
usr
usr
include
include
lib
lib
hellolib.h
hellolib.h
libhello.so.1
libhello.so.1
libhello.so.0.1
libhello.so.0.1
This also contains other files from other 
dependencies. Default dependencies are:
basically gcc, compilerlibs and libc
This also contains other files from other...
SYSROOT_DESTDIR
SYSROOT_DESTDIR
Github
Github
do_fetch
do_fetch
1
1
do_fetch
do_fetch
5
5
do_configure
do_configure
12
12
do_compile
do_compile
13
13
do_unpack
do_unpack
2
2
conf
conf
local.conf
local.conf
bblayers.conf
bblayers.conf
S defaults generally to ${WORKDIR}/${BPN}-${PV}
In git recipes change it to ${WORKDIR}/git
S defaults generally to ${WORKDIR}/${B...
do_patch
(No patches)
do_patch...
3
3
4
4
do_install
do_install
14
14
package
package
PKGD
PKGD
A copy of ${D}
excluding
/sysroot-only
A copy of ${D}...
do_package
do_package
15
15
packages-split
packages-split
PKGDEST
PKGDEST
sayhello
sayhello
usr
usr
bin
bin
Folders created here are present in PACKAGES variable, BitBake knows what and where to put things using the FILES variable, example: FILES:${PN} files will go to ${PN} folder which is in PACKAGES
Folders created here are present in PACKAGES variable...
do_package
do_package
16
16
deploy-pkg
deploy-pkg
${PACKAGE_ARCH}
${PACKAGE_ARCH}
This can be rpms, debs or ipks.
These are provided by
package_rpm, package_deb and package_ipk classes respectively, use PACKAGE_CLASSES for that as
content of PACKAGE_CLASSES will be appended
to INHERIT
This can be rpms, debs or ipks....
sayhello-0.1-r0.${PACKAGE_ARCH}.pkg
sayhello-0.1-r0.${PACKAGE_ARCH}.pkg
This task also depends on PACKAGE_CLASSES,
pkg can be rpm, deb or ipk for package_rpm,
package_deb or package_ipk respectively.
The generated package generally named using:
${PN}, ${PR}, ${PACKAGE_ARCH} and pkg
This task also depends on PACKAGE_CLASSES,...
deploy
deploy
${DEPLOY_DIR_pkg}
${DEPLOY_DIR_pkg}
do_package_write_pkg
do_package_write_pkg
17
17
${PACKAGE_ARCH}
${PACKAGE_ARCH}
For packages, this can be IPK, RPM or DEB (check step 17)
For packages, this can be IPK, RPM or DEB (check step 17)
DEPLOY_DIR
DEPLOY_DIR
TMPDIR
TMPDIR
DL_DIR
DL_DIR
do_package_write_pkg
do_package_write_pkg
18
18
This can be PKGWRITEDIRRPM, PKGWRITEDIRDEB or PKGWRITEDIRIPK for package_rpm, package_deb
or package_ipk respectively
This can be PKGWRITEDIRRPM, PKGWRITEDIRDEB or PKGWRITEDIRIPK for pack...
License checking happens in do_populate_lic after do_patch
and before that a checksum check
happends on LIC_FILES_CHKSUM if the
license is not CLOSED
License checking happens in do_populate_lic after do_pa...
This variable is used to separate recipes
based on their target. This has value of
${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
This variable is used to separate recipes...
conf-notes.txt
conf-notes.txt
sstate-cache
sstate-cache
SSTATE_DIR
SSTATE_DIR
sayhello
sayhello
This folder contains cache for recipes build output, this is used by BitBake, if the recipe checksum did not change it knows that the output to use is the same.
This folder contains cache for recipes build output, this is used by...
These directories can be shared accross builds to save disk space and build time
These directories can be shared accross builds to save disk space an...
This directory contains other output directories such as images, sdk and licenses
This directory contains other output directories such as images, sdk...
This file contains all layers that BitBake should consider when looking for metadata.
This file contains all layer...
This is base configuration file containing essential user config such as MACHINE and DISTRO
This is base configuration file containing essential user config such as...
The message to show after source oe-init-build-env
The message to show after source oe-init...
Text is not SVG - cannot display