[OE-core] [PATCH] nghttp2: fix for multilib support
From: Changqing Li correct the package name Signed-off-by: Changqing Li --- meta/recipes-support/nghttp2/nghttp2_1.46.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-support/nghttp2/nghttp2_1.46.0.bb b/meta/recipes-support/nghttp2/nghttp2_1.46.0.bb index 972ff2d60a..a5f0be856f 100644 --- a/meta/recipes-support/nghttp2/nghttp2_1.46.0.bb +++ b/meta/recipes-support/nghttp2/nghttp2_1.46.0.bb @@ -19,7 +19,7 @@ PACKAGECONFIG[manpages] = "" # first place EXTRA_OECMAKE = "-DENABLE_EXAMPLES=OFF -DENABLE_APP=OFF -DENABLE_HPACK_TOOLS=OFF" -PACKAGES =+ "lib${PN} ${PN}-client ${PN}-proxy ${PN}-server" +PACKAGES =+ "lib${BPN} ${PN}-client ${PN}-proxy ${PN}-server" RDEPENDS:${PN} = "${PN}-client (>= ${PV}) ${PN}-proxy (>= ${PV}) ${PN}-server (>= ${PV})" RDEPENDS:${PN}:class-native = "" @@ -27,7 +27,7 @@ RDEPENDS:${PN}-proxy = "openssl python3-core python3-io python3-shell" ALLOW_EMPTY:${PN} = "1" FILES:${PN} = "" -FILES:lib${PN} = "${libdir}/*${SOLIBS}" +FILES:${MLPREFIX}lib${BPN} = "${libdir}/*${SOLIBS}" FILES:${PN}-client = "${bindir}/h2load ${bindir}/nghttp" FILES:${PN}-proxy = "${bindir}/nghttpx ${datadir}/${BPN}/fetch-ocsp-response" FILES:${PN}-server = "${bindir}/nghttpd" -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160506): https://lists.openembedded.org/g/openembedded-core/message/160506 Mute This Topic: https://lists.openembedded.org/mt/88390547/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH] systemd: Avoid a Python deprecation warning
This avoids the following warning: WARNING: .../meta/recipes-core/systemd/systemd_250.1.bb: Var :1: DeprecationWarning: invalid escape sequence \$ seen when doing `devtool finish --force-patch-refresh systemd meta`. Signed-off-by: Peter Kjellerstedt --- I have no idea why the warning is only seen when doing `devtool finish`... meta/recipes-core/systemd/systemd_250.1.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/systemd/systemd_250.1.bb b/meta/recipes-core/systemd/systemd_250.1.bb index b05905b764..4dd668833a 100644 --- a/meta/recipes-core/systemd/systemd_250.1.bb +++ b/meta/recipes-core/systemd/systemd_250.1.bb @@ -297,8 +297,9 @@ do_install() { # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it # for existence else it fails - if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then - ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)} + if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ] && + ! ${@bb.utils.contains('PACKAGECONFIG', 'networkd', 'true', 'false', d)}; then + echo 'd /run/systemd/netif/links 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf fi if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160505): https://lists.openembedded.org/g/openembedded-core/message/160505 Mute This Topic: https://lists.openembedded.org/mt/88390229/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH][honister] epiphany: Update 40.3 -> 40.6
From: Khairul Rohaizzat Jamaluddin 40.4 Changelogs: Fix crash when clearing all passwords (#1570) Fix security indicator disappearing after entering reader mode (#1580) Fix crash opening PDFs not loaded via HTTP (#1611) Fix CVE-2021-45085, CVE-2021-45086, CVE-2021-45087, CVE-2021-45088 (#1612) Fix web applications with non-Latin characters (#1626, #1627) Disable captive portal helper in Pantheon desktop (!1006, Cassidy James Blaede) Somewhat improve password manager robustness (!1014) 40.5 Changelogs: Fix reader mode (!1047) 40.6 Changelogs: Fix Reload buttons on error pages (!1050) Fix delete button in about:applications (!1050) CVE: CVE-2021-45085 CVE-2021-45086 CVE-2021-45087 CVE-2021-45088 Signed-off-by: Khairul Rohaizzat Jamaluddin --- .../epiphany/{epiphany_40.3.bb => epiphany_40.6.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-gnome/epiphany/{epiphany_40.3.bb => epiphany_40.6.bb} (93%) diff --git a/meta/recipes-gnome/epiphany/epiphany_40.3.bb b/meta/recipes-gnome/epiphany/epiphany_40.6.bb similarity index 93% rename from meta/recipes-gnome/epiphany/epiphany_40.3.bb rename to meta/recipes-gnome/epiphany/epiphany_40.6.bb index c5dc0baefa..1f3fab3c4a 100644 --- a/meta/recipes-gnome/epiphany/epiphany_40.3.bb +++ b/meta/recipes-gnome/epiphany/epiphany_40.6.bb @@ -20,7 +20,7 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@oe.utils.trim_version("${PV}", 1)}/${GN file://migrator.patch \ file://distributor.patch \ " -SRC_URI[archive.sha256sum] = "dad138b9f2d55de271128fca38b61f53fd980c587d29e1ba6b508fff3b19f564" +SRC_URI[archive.sha256sum] = "a2abf71b165b4302643147d637808847d64df6a97ce460703542dec75e81b5f7" # Developer mode enables debugging PACKAGECONFIG[developer-mode] = "-Ddeveloper_mode=true,-Ddeveloper_mode=false" -- 2.33.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160504): https://lists.openembedded.org/g/openembedded-core/message/160504 Mute This Topic: https://lists.openembedded.org/mt/88389976/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH][master] epiphany: update 41.0 -> 41.3
From: Khairul Rohaizzat Jamaluddin Includes fix patches for epiphany CVE. CVE: CVE-2021-45085 CVE-2021-45086 CVE-2021-45087 CVE-2021-45088 Signed-off-by: Khairul Rohaizzat Jamaluddin --- .../epiphany/{epiphany_41.0.bb => epiphany_41.3.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-gnome/epiphany/{epiphany_41.0.bb => epiphany_41.3.bb} (94%) diff --git a/meta/recipes-gnome/epiphany/epiphany_41.0.bb b/meta/recipes-gnome/epiphany/epiphany_41.3.bb similarity index 94% rename from meta/recipes-gnome/epiphany/epiphany_41.0.bb rename to meta/recipes-gnome/epiphany/epiphany_41.3.bb index 8f3bd87340..c5bc3f446d 100644 --- a/meta/recipes-gnome/epiphany/epiphany_41.0.bb +++ b/meta/recipes-gnome/epiphany/epiphany_41.3.bb @@ -28,7 +28,7 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@oe.utils.trim_version("${PV}", 1)}/${GN file://migrator.patch \ file://distributor.patch \ " -SRC_URI[archive.sha256sum] = "b39d1825492595b0b74c5d6a6686a857f9419dfa4c02f8013c297bc870e26dd0" +SRC_URI[archive.sha256sum] = "ba01268ee54f318dfdac2e01eba38a3fc96940c1cbf640ed2613ae29f8bcb9ad" PACKAGECONFIG_SOUP ?= "soup2" PACKAGECONFIG ??= "${PACKAGECONFIG_SOUP}" -- 2.33.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160503): https://lists.openembedded.org/g/openembedded-core/message/160503 Mute This Topic: https://lists.openembedded.org/mt/88388710/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] tune-cortexa72: Enable the crc extension by default for cortexa72
On Wed, Jan 12, 2022 at 1:58 PM Richard Purdie < richard.pur...@linuxfoundation.org> wrote: > On Wed, 2022-01-12 at 14:23 -0500, Jon Mason wrote: > > On Wed, Jan 12, 2022 at 4:11 AM Kevin Hao > wrote: > > > > > > The crc extension is optional for the ARMv8.0 but is mandatory for the > > > cortexa72, so there is no reason not to enable it for the cortexa72 > > > tune. With this change, the cortexa72-crc seems redundant. But we > > > had better to keep it to be compatible with the BSP which already used > > > that tune. > > > > > > Signed-off-by: Kevin Hao > > > > Acked-by: Jon Mason > > > > From the GCC sources, it's hard coded for A34, A35, A53, A57, A72, > > A73, and almost all of the others listed. I can patch the rest. > > I did wonder if we should just drop the duplicate tune too. It will cause > an > error but it is an error that should be quickly/easily fixed... I am good with that problem is only for bsp layers which support multiple releases with a single branch but I guess that’s something less of a concern for me > > > Cheers, > > Richard > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160502): https://lists.openembedded.org/g/openembedded-core/message/160502 Mute This Topic: https://lists.openembedded.org/mt/88369540/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] tune-cortexa72: Enable the crc extension by default for cortexa72
On Wed, 2022-01-12 at 14:23 -0500, Jon Mason wrote: > On Wed, Jan 12, 2022 at 4:11 AM Kevin Hao wrote: > > > > The crc extension is optional for the ARMv8.0 but is mandatory for the > > cortexa72, so there is no reason not to enable it for the cortexa72 > > tune. With this change, the cortexa72-crc seems redundant. But we > > had better to keep it to be compatible with the BSP which already used > > that tune. > > > > Signed-off-by: Kevin Hao > > Acked-by: Jon Mason > > From the GCC sources, it's hard coded for A34, A35, A53, A57, A72, > A73, and almost all of the others listed. I can patch the rest. I did wonder if we should just drop the duplicate tune too. It will cause an error but it is an error that should be quickly/easily fixed... Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160501): https://lists.openembedded.org/g/openembedded-core/message/160501 Mute This Topic: https://lists.openembedded.org/mt/88369540/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH] create-spdx: add support for SDKs
Currently, SPDX SBOMs are only created for images. Add support for SDKs. Fix json indent when outputting SBOMs for better readability. Signed-off-by: Andres Beltran --- meta/classes/create-spdx.bbclass | 95 +--- meta/lib/oe/sbom.py | 6 +- 2 files changed, 68 insertions(+), 33 deletions(-) diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass index e44a204a8fc..d0f987315ee 100644 --- a/meta/classes/create-spdx.bbclass +++ b/meta/classes/create-spdx.bbclass @@ -556,7 +556,7 @@ python do_create_spdx() { oe.sbom.write_doc(d, package_doc, "packages") } # NOTE: depending on do_unpack is a hack that is necessary to get it's dependencies for archive the source -addtask do_create_spdx after do_package do_packagedata do_unpack before do_build do_rm_work +addtask do_create_spdx after do_package do_packagedata do_unpack before do_populate_sdk do_build do_rm_work SSTATETASKS += "do_create_spdx" do_create_spdx[sstate-inputdirs] = "${SPDXDEPLOY}" @@ -788,28 +788,77 @@ def spdx_get_src(d): do_rootfs[recrdeptask] += "do_create_spdx do_create_runtime_spdx" ROOTFS_POSTUNINSTALL_COMMAND =+ "image_combine_spdx ; " + +do_populate_sdk[recrdeptask] += "do_create_spdx do_create_runtime_spdx" +POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " sdk_host_combine_spdx; " +POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " sdk_target_combine_spdx; " + python image_combine_spdx() { +import os +import oe.sbom +from pathlib import Path +from oe.rootfs import image_list_installed_packages + +image_name = d.getVar("IMAGE_NAME") +image_link_name = d.getVar("IMAGE_LINK_NAME") +imgdeploydir = Path(d.getVar("IMGDEPLOYDIR")) +img_spdxid = oe.sbom.get_image_spdxid(image_name) +packages = image_list_installed_packages(d) + +combine_spdx(d, image_name, imgdeploydir, img_spdxid, packages) + +if image_link_name: +image_spdx_path = imgdeploydir / (image_name + ".spdx.json") +image_spdx_link = imgdeploydir / (image_link_name + ".spdx.json") +image_spdx_link.symlink_to(os.path.relpath(image_spdx_path, image_spdx_link.parent)) + +def make_image_link(target_path, suffix): +if image_link_name: +link = imgdeploydir / (image_link_name + suffix) +link.symlink_to(os.path.relpath(target_path, link.parent)) + +spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst") +make_image_link(spdx_tar_path, ".spdx.tar.zst") +spdx_index_path = imgdeploydir / (image_name + ".spdx.index.json") +make_image_link(spdx_index_path, ".spdx.index.json") +} + +python sdk_host_combine_spdx() { +sdk_combine_spdx(d, "host") +} + +python sdk_target_combine_spdx() { +sdk_combine_spdx(d, "target") +} + +def sdk_combine_spdx(d, sdk_type): +import oe.sbom +from pathlib import Path +from oe.sdk import sdk_list_installed_packages + +sdk_name = d.getVar("SDK_NAME") + "-" + sdk_type +sdk_deploydir = Path(d.getVar("SDKDEPLOYDIR")) +sdk_spdxid = oe.sbom.get_sdk_spdxid(sdk_name) +sdk_packages = sdk_list_installed_packages(d, sdk_type == "target") +combine_spdx(d, sdk_name, sdk_deploydir, sdk_spdxid, sdk_packages) + +def combine_spdx(d, rootfs_name, rootfs_deploydir, rootfs_spdxid, packages): import os import oe.spdx import oe.sbom import io import json -from oe.rootfs import image_list_installed_packages from datetime import timezone, datetime from pathlib import Path import tarfile import bb.compress.zstd creation_time = datetime.now(tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") -image_name = d.getVar("IMAGE_NAME") -image_link_name = d.getVar("IMAGE_LINK_NAME") - deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX")) -imgdeploydir = Path(d.getVar("IMGDEPLOYDIR")) source_date_epoch = d.getVar("SOURCE_DATE_EPOCH") doc = oe.spdx.SPDXDocument() -doc.name = image_name +doc.name = rootfs_name doc.documentNamespace = get_doc_namespace(d, doc) doc.creationInfo.created = creation_time doc.creationInfo.comment = "This document was created by analyzing the source of the Yocto recipe during the build." @@ -821,14 +870,12 @@ python image_combine_spdx() { image = oe.spdx.SPDXPackage() image.name = d.getVar("PN") image.versionInfo = d.getVar("PV") -image.SPDXID = oe.sbom.get_image_spdxid(image_name) +image.SPDXID = rootfs_spdxid doc.packages.append(image) spdx_package = oe.spdx.SPDXPackage() -packages = image_list_installed_packages(d) - for name in sorted(packages.keys()): pkg_spdx_path = deploy_dir_spdx / "packages" / (name + ".spdx.json") pkg_doc, pkg_doc_sha1 = oe.sbom.read_doc(pkg_spdx_path) @@ -856,7 +903,6 @@ python image_combine_spdx() { runtime_ref.checksum.algorithm = "SHA1" runtime_ref.checksum.checksumValue = runtime_doc_sha1
Re: [OE-core] [PATCH] tune-cortexa72: Enable the crc extension by default for cortexa72
On Wed, Jan 12, 2022 at 12:30 PM Khem Raj wrote: > > > > On 1/12/22 1:07 AM, Kevin Hao wrote: > > The crc extension is optional for the ARMv8.0 but is mandatory for the > > cortexa72, so there is no reason not to enable it for the cortexa72 > > tune. With this change, the cortexa72-crc seems redundant. But we > > had better to keep it to be compatible with the BSP which already used > > that tune. > > this looks good. Is there a way to warn such users to migrate to better > option ? We could just remove the crc and when it breaks they'll look > > > > > Signed-off-by: Kevin Hao > > --- > > .../machine/include/arm/armv8a/tune-cortexa72.inc| 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > > b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > > index 3651cf6e802b..4c9add32f5f5 100644 > > --- a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > > +++ b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > > @@ -10,12 +10,12 @@ AVAILTUNES += "cortexa72 cortexa72-crc > > cortexa72-crc-crypto" > > ARMPKGARCH:tune-cortexa72 = "cortexa72" > > ARMPKGARCH:tune-cortexa72-crc = "cortexa72" > > ARMPKGARCH:tune-cortexa72-crc-crypto = "cortexa72" > > -TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a} > > cortexa72" > > -TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72} > > crc" > > -TUNE_FEATURES:tune-cortexa72-crc-crypto = > > "${TUNE_FEATURES:tune-cortexa72} crc crypto" > > -PACKAGE_EXTRA_ARCHS:tune-cortexa72= > > "${PACKAGE_EXTRA_ARCHS:tune-armv8} cortexa72" > > -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= > > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72 cortexa72-crc" > > -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= > > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 cortexa72-crc > > cortexa72-crc-crypto" > > +TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a-crc} > > cortexa72" > > +TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72}" > > +TUNE_FEATURES:tune-cortexa72-crc-crypto = > > "${TUNE_FEATURES:tune-cortexa72} crypto" > > +PACKAGE_EXTRA_ARCHS:tune-cortexa72= > > "${PACKAGE_EXTRA_ARCHS:tune-armv8-crc} cortexa72" > > +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= > > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72" > > +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= > > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 > > cortexa72-crc-crypto" > > BASE_LIB:tune-cortexa72= "lib64" > > BASE_LIB:tune-cortexa72-crc= "lib64" > > BASE_LIB:tune-cortexa72-crc-crypto = "lib64" > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160499): https://lists.openembedded.org/g/openembedded-core/message/160499 Mute This Topic: https://lists.openembedded.org/mt/88369540/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] tune-cortexa72: Enable the crc extension by default for cortexa72
On Wed, Jan 12, 2022 at 4:11 AM Kevin Hao wrote: > > The crc extension is optional for the ARMv8.0 but is mandatory for the > cortexa72, so there is no reason not to enable it for the cortexa72 > tune. With this change, the cortexa72-crc seems redundant. But we > had better to keep it to be compatible with the BSP which already used > that tune. > > Signed-off-by: Kevin Hao Acked-by: Jon Mason >From the GCC sources, it's hard coded for A34, A35, A53, A57, A72, A73, and almost all of the others listed. I can patch the rest. Thanks, Jon > --- > .../machine/include/arm/armv8a/tune-cortexa72.inc| 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > index 3651cf6e802b..4c9add32f5f5 100644 > --- a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > +++ b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc > @@ -10,12 +10,12 @@ AVAILTUNES += "cortexa72 cortexa72-crc > cortexa72-crc-crypto" > ARMPKGARCH:tune-cortexa72 = "cortexa72" > ARMPKGARCH:tune-cortexa72-crc = "cortexa72" > ARMPKGARCH:tune-cortexa72-crc-crypto = "cortexa72" > -TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a} > cortexa72" > -TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72} crc" > -TUNE_FEATURES:tune-cortexa72-crc-crypto = "${TUNE_FEATURES:tune-cortexa72} > crc crypto" > -PACKAGE_EXTRA_ARCHS:tune-cortexa72= > "${PACKAGE_EXTRA_ARCHS:tune-armv8} cortexa72" > -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72 cortexa72-crc" > -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 cortexa72-crc > cortexa72-crc-crypto" > +TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a-crc} > cortexa72" > +TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72}" > +TUNE_FEATURES:tune-cortexa72-crc-crypto = "${TUNE_FEATURES:tune-cortexa72} > crypto" > +PACKAGE_EXTRA_ARCHS:tune-cortexa72= > "${PACKAGE_EXTRA_ARCHS:tune-armv8-crc} cortexa72" > +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72" > +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= > "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 cortexa72-crc-crypto" > BASE_LIB:tune-cortexa72= "lib64" > BASE_LIB:tune-cortexa72-crc= "lib64" > BASE_LIB:tune-cortexa72-crc-crypto = "lib64" > -- > 2.31.1 > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160498): https://lists.openembedded.org/g/openembedded-core/message/160498 Mute This Topic: https://lists.openembedded.org/mt/88369540/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 0/3] Add support for creating spdx data for kernel
Looks fine to me! Bruce On Wed, Jan 12, 2022 at 12:21 PM Saul Wold wrote: > > This change set is ready for merging, I have tested with edgerouter, > qemuppc and x86, in order to check different kernel types and strip > options. > > This version creates a copy to be stripped and deployed in > kernel.bbclass, if needed. The unstripped version is installed so > the package.bbclass debuginfo / extended packagedata can be generated > correctly. This is the data that's used by create-spdx. > > > Sau! > > > Saul Wold (3): > create-spdx: Add kernel work-shared source > package: Add support for kernel stripping > kernel.bbclass: use common strip() > > meta/classes/create-spdx.bbclass | 6 - > meta/classes/kernel.bbclass | 44 ++-- > meta/classes/package.bbclass | 17 > meta/lib/oe/package.py | 9 ++- > 4 files changed, 37 insertions(+), 39 deletions(-) > > -- > 2.31.1 > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160497): https://lists.openembedded.org/g/openembedded-core/message/160497 Mute This Topic: https://lists.openembedded.org/mt/88377977/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] tune-cortexa72: Enable the crc extension by default for cortexa72
On 1/12/22 1:07 AM, Kevin Hao wrote: The crc extension is optional for the ARMv8.0 but is mandatory for the cortexa72, so there is no reason not to enable it for the cortexa72 tune. With this change, the cortexa72-crc seems redundant. But we had better to keep it to be compatible with the BSP which already used that tune. this looks good. Is there a way to warn such users to migrate to better option ? Signed-off-by: Kevin Hao --- .../machine/include/arm/armv8a/tune-cortexa72.inc| 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc index 3651cf6e802b..4c9add32f5f5 100644 --- a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc +++ b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc @@ -10,12 +10,12 @@ AVAILTUNES += "cortexa72 cortexa72-crc cortexa72-crc-crypto" ARMPKGARCH:tune-cortexa72 = "cortexa72" ARMPKGARCH:tune-cortexa72-crc = "cortexa72" ARMPKGARCH:tune-cortexa72-crc-crypto = "cortexa72" -TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a} cortexa72" -TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72} crc" -TUNE_FEATURES:tune-cortexa72-crc-crypto = "${TUNE_FEATURES:tune-cortexa72} crc crypto" -PACKAGE_EXTRA_ARCHS:tune-cortexa72= "${PACKAGE_EXTRA_ARCHS:tune-armv8} cortexa72" -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72 cortexa72-crc" -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 cortexa72-crc cortexa72-crc-crypto" +TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a-crc} cortexa72" +TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72}" +TUNE_FEATURES:tune-cortexa72-crc-crypto = "${TUNE_FEATURES:tune-cortexa72} crypto" +PACKAGE_EXTRA_ARCHS:tune-cortexa72= "${PACKAGE_EXTRA_ARCHS:tune-armv8-crc} cortexa72" +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72" +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 cortexa72-crc-crypto" BASE_LIB:tune-cortexa72= "lib64" BASE_LIB:tune-cortexa72-crc= "lib64" BASE_LIB:tune-cortexa72-crc-crypto = "lib64" -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160496): https://lists.openembedded.org/g/openembedded-core/message/160496 Mute This Topic: https://lists.openembedded.org/mt/88369540/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH 2/3] package: Add support for kernel stripping
Extend runstrip() to accept additional argument to enable sharing it with the kernel do_strip() so that KERNEL_IMAGE_STRIP_EXTRA_SECTIONS can be passed. Since is_elf() understands kernel modules there is no need to keep a seperate list for kernmodules or hardcode the values to runstrip. Signed-off-by: Saul Wold --- meta/classes/package.bbclass | 17 + meta/lib/oe/package.py | 9 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 09cd376f4af..4927fb99ff1 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -390,10 +390,6 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, dvar = d.getVar('PKGD') objcopy = d.getVar("OBJCOPY") -# We ignore kernel modules, we don't generate debug info files. -if file.find("/lib/modules/") != -1 and file.endswith(".ko"): -return (file, sources) - newmode = None if not os.access(file, os.W_OK) or os.access(file, os.R_OK): origmode = os.stat(file)[stat.ST_MODE] @@ -1122,7 +1118,6 @@ python split_and_strip_files () { # elffiles = {} symlinks = {} -kernmods = [] staticlibs = [] inodes = {} libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir")) @@ -1145,9 +1140,6 @@ python split_and_strip_files () { if file in skipfiles: continue -if file.endswith(".ko") and file.find("/lib/modules/") != -1: -kernmods.append(file) -continue if oe.package.is_static_lib(file): staticlibs.append(file) continue @@ -1164,8 +1156,11 @@ python split_and_strip_files () { if not s: continue # Check its an executable -if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \ -or ((file.startswith(libdir) or file.startswith(baselibdir)) and (".so" in f or ".node" in f)): +if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) \ +or (s[stat.ST_MODE] & stat.S_IXOTH) \ +or ((file.startswith(libdir) or file.startswith(baselibdir)) \ +and (".so" in f or ".node" in f)) \ +or (f.startswith('vmlinux') or ".ko" in f): if cpath.islink(file): checkelflinks[file] = ltarget @@ -1312,8 +1307,6 @@ python split_and_strip_files () { elf_file = int(elffiles[file]) #bb.note("Strip %s" % file) sfiles.append((file, elf_file, strip)) -for f in kernmods: -sfiles.append((f, 16, strip)) if (d.getVar('PACKAGE_STRIP_STATIC') == '1' or d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): for f in staticlibs: sfiles.append((f, 16, strip)) diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index dd700cbb0c9..7d387ee81d5 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py @@ -16,7 +16,11 @@ def runstrip(arg): # 8 - shared library # 16 - kernel module -(file, elftype, strip) = arg +if len(arg) == 3: +(file, elftype, strip) = arg +extra_strip_sections = '' +else: +(file, elftype, strip, extra_strip_sections) = arg newmode = None if not os.access(file, os.W_OK) or os.access(file, os.R_OK): @@ -40,6 +44,9 @@ def runstrip(arg): # shared or executable: elif elftype & 8 or elftype & 4: stripcmd.extend(["--remove-section=.comment", "--remove-section=.note"]) +if extra_strip_sections != '': +for section in extra_strip_sections.split(): +stripcmd.extend(["--remove-section=" + section]) stripcmd.append(file) bb.debug(1, "runstrip: %s" % stripcmd) -- 2.31.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160494): https://lists.openembedded.org/g/openembedded-core/message/160494 Mute This Topic: https://lists.openembedded.org/mt/88377979/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH 3/3] kernel.bbclass: use common strip()
Re-use the runstrip() code from oe.packaging, for the kernel stripping process. Since runstrip() is python the kernel do_strip() need to be converted to Python also. The stripped kernel image will be used for deployment in do_deploy(). This will allow the package.bbclass to split an unstripped kernel binary for the debug information and extended packagedata. The extended package data is used by create-spdx. Signed-off-by: Saul Wold --- meta/classes/kernel.bbclass | 44 - 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 7685c6921fa..473e28be477 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -700,30 +700,19 @@ do_kernel_link_images() { } addtask kernel_link_images after do_compile before do_strip -do_strip() { - if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then - if ! (echo "${KERNEL_IMAGETYPES}" | grep -wq "vmlinux"); then - bbwarn "image type(s) will not be stripped (not supported): ${KERNEL_IMAGETYPES}" - return - fi - - cd ${B} - headers=`"$CROSS_COMPILE"readelf -S ${KERNEL_OUTPUT_DIR}/vmlinux | \ - grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ - sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ - gawk '{print $1}'` - - for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { - if ! (echo "$headers" | grep -q "^$str$"); then - bbwarn "Section not found: $str"; - fi - - "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT_DIR}/vmlinux - }; done - - bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections:" \ - "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" - fi; +python do_strip() { +import shutil + +strip = d.getVar('STRIP') +extra_sections = d.getVar('KERNEL_IMAGE_STRIP_EXTRA_SECTIONS') +kernel_image = d.getVar('B') + "/" + d.getVar('KERNEL_OUTPUT_DIR') + "/vmlinux" + +if (extra_sections and kernel_image.find('boot/vmlinux') != -1): +kernel_image_stripped = kernel_image + ".stripped" +shutil.copy2(kernel_image, kernel_image_stripped) +oe.package.runstrip((kernel_image_stripped, 8, strip, extra_sections)) +bb.debug(1, "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections: " + \ +extra_sections) } do_strip[dirs] = "${B}" @@ -768,7 +757,12 @@ kernel_do_deploy() { for imageType in ${KERNEL_IMAGETYPES} ; do baseName=$imageType-${KERNEL_IMAGE_NAME} - install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} + + if [ -s ${KERNEL_OUTPUT_DIR}/$imageType.stripped ] ; then + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.stripped $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} + else + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} + fi if [ -n "${KERNEL_IMAGE_LINK_NAME}" ] ; then ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} fi -- 2.31.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160493): https://lists.openembedded.org/g/openembedded-core/message/160493 Mute This Topic: https://lists.openembedded.org/mt/88377978/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH 1/3] create-spdx: Add kernel work-shared source
Since the kernel source is stored in work-shared, we need to add it to the search path so the kernel and kernel-modules source code can be found correctly. Signed-off-by: Saul Wold --- meta/classes/create-spdx.bbclass | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass index 0a4db80aba5..e1ff2bbb787 100644 --- a/meta/classes/create-spdx.bbclass +++ b/meta/classes/create-spdx.bbclass @@ -254,6 +254,7 @@ def add_package_sources_from_debug(d, package_doc, spdx_package, package, packag Path(d.getVar('PKGD')), Path(d.getVar('STAGING_DIR_TARGET')), Path(d.getVar('STAGING_DIR_NATIVE')), +Path(d.getVar('STAGING_KERNEL_DIR')), ] pkg_data = oe.packagedata.read_subpkgdata_extended(package, d) @@ -275,7 +276,10 @@ def add_package_sources_from_debug(d, package_doc, spdx_package, package, packag for debugsrc in file_data["debugsrc"]: ref_id = "NOASSERTION" for search in debug_search_paths: -debugsrc_path = search / debugsrc.lstrip("/") +if debugsrc.startswith("/usr/src/kernel"): +debugsrc_path = search / debugsrc.replace('/usr/src/kernel/', '') +else: +debugsrc_path = search / debugsrc.lstrip("/") if not debugsrc_path.exists(): continue -- 2.31.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160495): https://lists.openembedded.org/g/openembedded-core/message/160495 Mute This Topic: https://lists.openembedded.org/mt/88377980/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH 0/3] Add support for creating spdx data for kernel
This change set is ready for merging, I have tested with edgerouter, qemuppc and x86, in order to check different kernel types and strip options. This version creates a copy to be stripped and deployed in kernel.bbclass, if needed. The unstripped version is installed so the package.bbclass debuginfo / extended packagedata can be generated correctly. This is the data that's used by create-spdx. Sau! Saul Wold (3): create-spdx: Add kernel work-shared source package: Add support for kernel stripping kernel.bbclass: use common strip() meta/classes/create-spdx.bbclass | 6 - meta/classes/kernel.bbclass | 44 ++-- meta/classes/package.bbclass | 17 meta/lib/oe/package.py | 9 ++- 4 files changed, 37 insertions(+), 39 deletions(-) -- 2.31.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160492): https://lists.openembedded.org/g/openembedded-core/message/160492 Mute This Topic: https://lists.openembedded.org/mt/88377977/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] go-runtime: fix building without SECURITY_LDFLAGS
Thanks, this needs to be done in go-target.inc too. Alex On Wed, 12 Jan 2022 at 16:28, Dmitry Baryshkov wrote: > Commit 9985b17a30bb ("go: correctly set debug-prefix-map and build > directory") has changed CGO_LDFLAGS to the manually crafted version of > LDFLAGS to strip out DEBUG_PREFIX_MAP contents. > > However this manually crafted version includes ${SECURITY_LDFLAGS}. > > If security_flags.inc is not included, the variable is not defined, thus > CGO_LDFLAGS will include the '${SECURITY_LDFLAGS}' literally. When > building the recipe, the build would break with the follwing message: > > aarch64-linaro-linux-gcc: error: ${SECURITY_LDFLAGS}: No such file or > directory > > So, instead of manually specifying variable contents, perform the > expected action: filter offending arguments out of LDFLAGS. > > Cc: Alexander Kanavin > Signed-off-by: Dmitry Baryshkov > --- > meta/recipes-devtools/go/go-runtime.inc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-devtools/go/go-runtime.inc > b/meta/recipes-devtools/go/go-runtime.inc > index a08d44dd3a8c..ccb86d4fe9a6 100644 > --- a/meta/recipes-devtools/go/go-runtime.inc > +++ b/meta/recipes-devtools/go/go-runtime.inc > @@ -10,7 +10,8 @@ DEBUG_PREFIX_MAP = "\ > export CGO_CFLAGS = "${CFLAGS}" > export CGO_CPPFLAGS = "${CPPFLAGS}" > export CGO_CXXFLAGS = "${CXXFLAGS}" > -export CGO_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} > ${SECURITY_LDFLAGS}" > +# Filter out -fdebug-prefix-map options as they clash with the GO's build > system > +export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not > f.startswith('-fdebug-prefix-map'), d.getVar('LDFLAGS').split())) }" > export GOCACHE = "${B}/.cache" > > GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" > -- > 2.30.2 > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160491): https://lists.openembedded.org/g/openembedded-core/message/160491 Mute This Topic: https://lists.openembedded.org/mt/88374848/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [RFC PATCH v2 3/3] kernel.bbclass: use common strip()
On 1/12/22 06:30, Bruce Ashfield wrote: On Tue, Jan 11, 2022 at 6:59 PM Saul Wold wrote: Re-use the runstrip() code from oe.packaging, for the kernel stripping process. Since runstrip() is python the kernel do_strip() need to be converted to Python also. The stripped kernel image will be used for deployment in do_deploy(). This will allow the package.bbclass to split an unstripped kernel binary for the debug information and extended packagedata. The extended package data is used by create-spdx. Signed-off-by: Saul Wold --- meta/classes/kernel.bbclass | 44 - 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 7685c6921fa..b2f9e3c8071 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -700,30 +700,19 @@ do_kernel_link_images() { } addtask kernel_link_images after do_compile before do_strip -do_strip() { - if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then - if ! (echo "${KERNEL_IMAGETYPES}" | grep -wq "vmlinux"); then - bbwarn "image type(s) will not be stripped (not supported): ${KERNEL_IMAGETYPES}" - return - fi - - cd ${B} - headers=`"$CROSS_COMPILE"readelf -S ${KERNEL_OUTPUT_DIR}/vmlinux | \ - grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ - sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ - gawk '{print $1}'` - - for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { - if ! (echo "$headers" | grep -q "^$str$"); then - bbwarn "Section not found: $str"; - fi We are losing this warning in the relocated / common routine. It looks like something we could continue to detect and warn on, no ? I guess do we care in this case? We still do the strip regardless, the strip command does not complain about a missing section. - - "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT_DIR}/vmlinux - }; done - - bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections:" \ - "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" - fi; +python do_strip() { +import shutil + +strip = d.getVar('STRIP') +extra_sections = d.getVar('KERNEL_IMAGE_STRIP_EXTRA_SECTIONS') +kernel_image = d.getVar('B') + "/" + d.getVar('KERNEL_OUTPUT_DIR') + "/vmlinux" + +if (extra_sections is not None and kernel_image.find('boot/vmlinux') != -1): Minor 'nit .. I'd probably just write that as: if extra_sections (versus the is not None) .. but maybe you have it that way due to that check not working. +kernel_image_stripped = kernel_image + ".stripped" +shutil.copy2(kernel_image, kernel_image_stripped) +oe.package.runstrip((kernel_image_stripped, 8, strip, extra_sections)) +bb.note ("KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections: " + \ +extra_sections) In theory, we could move the debug log to the common routine when it detects the extra section argument Sure this can move to bb.debug(), will do that. } do_strip[dirs] = "${B}" @@ -768,7 +757,12 @@ kernel_do_deploy() { for imageType in ${KERNEL_IMAGETYPES} ; do baseName=$imageType-${KERNEL_IMAGE_NAME} - install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} + + if [ -s ${KERNEL_OUTPUT_DIR}/$imageType.stripped ] ; then + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.stripped $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} + else + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} + fi Is there a scenario when the ".stripped" image isn't available ? Wouldn't that already be an error, and so the deploy should just be an error, versus copying the non-stripped one ? We only copy to .stripped when KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, so in the non-set case we will have the un-stripped image that needs to get installed correctly. Sau! Bruce if [ -n "${KERNEL_IMAGE_LINK_NAME}" ] ; then ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} fi -- 2.31.1 -- Sau! -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160490): https://lists.openembedded.org/g/openembedded-core/message/160490 Mute This Topic: https://lists.openembedded.org/mt/88362607/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH] go-runtime: fix building without SECURITY_LDFLAGS
Commit 9985b17a30bb ("go: correctly set debug-prefix-map and build directory") has changed CGO_LDFLAGS to the manually crafted version of LDFLAGS to strip out DEBUG_PREFIX_MAP contents. However this manually crafted version includes ${SECURITY_LDFLAGS}. If security_flags.inc is not included, the variable is not defined, thus CGO_LDFLAGS will include the '${SECURITY_LDFLAGS}' literally. When building the recipe, the build would break with the follwing message: aarch64-linaro-linux-gcc: error: ${SECURITY_LDFLAGS}: No such file or directory So, instead of manually specifying variable contents, perform the expected action: filter offending arguments out of LDFLAGS. Cc: Alexander Kanavin Signed-off-by: Dmitry Baryshkov --- meta/recipes-devtools/go/go-runtime.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc index a08d44dd3a8c..ccb86d4fe9a6 100644 --- a/meta/recipes-devtools/go/go-runtime.inc +++ b/meta/recipes-devtools/go/go-runtime.inc @@ -10,7 +10,8 @@ DEBUG_PREFIX_MAP = "\ export CGO_CFLAGS = "${CFLAGS}" export CGO_CPPFLAGS = "${CPPFLAGS}" export CGO_CXXFLAGS = "${CXXFLAGS}" -export CGO_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" +# Filter out -fdebug-prefix-map options as they clash with the GO's build system +export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-prefix-map'), d.getVar('LDFLAGS').split())) }" export GOCACHE = "${B}/.cache" GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" -- 2.30.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160489): https://lists.openembedded.org/g/openembedded-core/message/160489 Mute This Topic: https://lists.openembedded.org/mt/88374848/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 3/6] go: correctly set debug-prefix-map and build directory
Em qua., 12 de jan. de 2022 às 12:01, Alexander Kanavin escreveu: > I'm not immediately sure how to solve this though. We do want to keep those > flags when they're defined. > > Ideas? Perhaps they could be defined empty in some place which is present in > all distributions? I believe it does make sense; it ought to have a default. https://github.com/openembedded/openembedded-core/blob/master/meta/conf/distro/include/default-distrovars.inc sounds like the right place. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160488): https://lists.openembedded.org/g/openembedded-core/message/160488 Mute This Topic: https://lists.openembedded.org/mt/88071320/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 3/6] go: correctly set debug-prefix-map and build directory
One experiment that can be tried is unsetting DEBUG_PREFIX_MAP in the go recipe though, but it may make things non-reproducible again. On Wed, 12 Jan 2022 at 16:01, Alexander Kanavin via lists.openembedded.org wrote: > I'm not immediately sure how to solve this though. We do want to keep > those flags when they're defined. > > Ideas? Perhaps they could be defined empty in some place which is present > in all distributions? > > Alex > > On Wed, 12 Jan 2022 at 15:56, Dmitry Baryshkov > wrote: > >> пн, 10 янв. 2022 г. в 11:08, Alexander Kanavin : >> > >> > aarch64-linaro-linux-gcc: error: ${SECURITY_LDFLAGS}: No such file or >> directory >> > >> > You need to find out why the variable isn't expanded. 'bitbake -e >> go-runtime' may help. >> >> For the reference: >> >> # $CGO_LDFLAGS [2 operations] >> # exported >> /home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/go/go-runtime.inc:13 >> # [export] "1" >> # set >> /home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/go/go-runtime.inc:13 >> # "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" >> # pre-expansion value: >> # "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" >> export CGO_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed >> \${SECURITY_LDFLAGS}" >> >> Quoting bitbake manual: >> >> If the variable expansion syntax is used on a variable that does not >> exist, the string is kept as is. For example, given the following >> assignment, BAR expands to the literal string "${FOO}" as long as FOO >> does not exist. >> >> BAR = "${FOO}" >> >> >> >> > >> > Alex >> > >> > On Mon, 10 Jan 2022 at 05:34, Dmitry Baryshkov >> wrote: >> >> >> >> сб, 1 янв. 2022 г. в 14:30, Alexander Kanavin > >: >> >> > >> >> > Go has its own system for creating temporary build >> >> > sub-directories with randomized names, and setting >> >> > up debug-prefix-map on the fly to prevent those >> >> > directories leaking into target binaries. OE's own >> >> > settings were clashing with it, so this change >> >> > carefully avoids the two stepping on each other. >> >> > >> >> > Additionally, the top level build directory cannot >> >> > be named 'go-something'. >> >> > >> >> > Signed-off-by: Alexander Kanavin >> >> >> >> This patch breaks the build here, with the following error messages >> >> (full log attached): >> >> >> >> | HASH[build go/importer] >> >> | HASH[build go/importer]: "go1.17.5" >> >> | HASH[build go/importer]: "compile\n" >> >> | HASH[build go/importer]: "goos linux goarch arm64\n" >> >> | HASH[build go/importer]: "import \"go/importer\"\n" >> >> | HASH[build go/importer]: "omitdebug false standard true local false >> >> prefix \"\"\n" >> >> | HASH[build go/importer]: "modinfo \"\"\n" >> >> | HASH[build go/importer]: "compile compile version go1.17.5 [] []\n" >> >> | HASH[build go/importer]: "=\n" >> >> | HASH >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/src/go/importer/importer.go: >> >> 030536f1a71bcd0c3615684f4b94373b4136a282de9e6cd9d283e454704be386 >> >> | HASH[build go/importer]: "file importer.go AwU28acbzQw2FWhPS5Q3\n" >> >> | HASH[build go/importer]: "import go/build XGXQDTt1BQjYRjE7nFi7\n" >> >> | HASH[build go/importer]: "import go/internal/gccgoimporter >> >> MqGIqtLxk8pkuc9XENIo\n" >> >> | HASH[build go/importer]: "import go/internal/gcimporter >> >> U16uHUOXrDggYRgVMENf\n" >> >> | HASH[build go/importer]: "import go/internal/srcimporter >> >> vtV3UGYK55GaAj4JI8MN\n" >> >> | HASH[build go/importer]: "import go/token 36MC7EMX8CqyCcPmrSmS\n" >> >> | HASH[build go/importer]: "import go/types EyjwGzDrQ1CtOXxe_UYb\n" >> >> | HASH[build go/importer]: "import io A3HnNVYVSU1F06BuLR5o\n" >> >> | HASH[build go/importer]: "import runtime TtpuHdFJwA5GfsHmM2LT\n" >> >> | HASH[build go/importer]: >> >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> >> | HASH subkey >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> >> "srcfiles" = >> e6f8fcd87c2dd28b3381ad27b9938048b5b3bde6a19db4a4837e184ef9cef82a >> >> | HASH subkey >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> >> "stdout" = >> 3cb42089ec7038a91addcc400ee71ea90feee998a35e992b699729f04ae85c1a >> >> | go tool dist: FAILED: >> >> >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/pkg/tool/native_native/go_bootstrap >> >> install -gcflags=all= -ldflags=all= std: exit status 2 >> >> | WARNING: >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939:175 >> >> exit 2 from './make.bash --target-only --no-banner std' >> >> | WARNING: Backtrace (BB generated script): >> >> | #1: do_compile, >> >> >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939, >> >> line 175 >> >> | #2: ma
Re: [OE-core] [PATCH 3/6] go: correctly set debug-prefix-map and build directory
I'm not immediately sure how to solve this though. We do want to keep those flags when they're defined. Ideas? Perhaps they could be defined empty in some place which is present in all distributions? Alex On Wed, 12 Jan 2022 at 15:56, Dmitry Baryshkov wrote: > пн, 10 янв. 2022 г. в 11:08, Alexander Kanavin : > > > > aarch64-linaro-linux-gcc: error: ${SECURITY_LDFLAGS}: No such file or > directory > > > > You need to find out why the variable isn't expanded. 'bitbake -e > go-runtime' may help. > > For the reference: > > # $CGO_LDFLAGS [2 operations] > # exported > /home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/go/go-runtime.inc:13 > # [export] "1" > # set > /home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/go/go-runtime.inc:13 > # "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" > # pre-expansion value: > # "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" > export CGO_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed > \${SECURITY_LDFLAGS}" > > Quoting bitbake manual: > > If the variable expansion syntax is used on a variable that does not > exist, the string is kept as is. For example, given the following > assignment, BAR expands to the literal string "${FOO}" as long as FOO > does not exist. > > BAR = "${FOO}" > > > > > > > Alex > > > > On Mon, 10 Jan 2022 at 05:34, Dmitry Baryshkov > wrote: > >> > >> сб, 1 янв. 2022 г. в 14:30, Alexander Kanavin : > >> > > >> > Go has its own system for creating temporary build > >> > sub-directories with randomized names, and setting > >> > up debug-prefix-map on the fly to prevent those > >> > directories leaking into target binaries. OE's own > >> > settings were clashing with it, so this change > >> > carefully avoids the two stepping on each other. > >> > > >> > Additionally, the top level build directory cannot > >> > be named 'go-something'. > >> > > >> > Signed-off-by: Alexander Kanavin > >> > >> This patch breaks the build here, with the following error messages > >> (full log attached): > >> > >> | HASH[build go/importer] > >> | HASH[build go/importer]: "go1.17.5" > >> | HASH[build go/importer]: "compile\n" > >> | HASH[build go/importer]: "goos linux goarch arm64\n" > >> | HASH[build go/importer]: "import \"go/importer\"\n" > >> | HASH[build go/importer]: "omitdebug false standard true local false > >> prefix \"\"\n" > >> | HASH[build go/importer]: "modinfo \"\"\n" > >> | HASH[build go/importer]: "compile compile version go1.17.5 [] []\n" > >> | HASH[build go/importer]: "=\n" > >> | HASH > /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/src/go/importer/importer.go: > >> 030536f1a71bcd0c3615684f4b94373b4136a282de9e6cd9d283e454704be386 > >> | HASH[build go/importer]: "file importer.go AwU28acbzQw2FWhPS5Q3\n" > >> | HASH[build go/importer]: "import go/build XGXQDTt1BQjYRjE7nFi7\n" > >> | HASH[build go/importer]: "import go/internal/gccgoimporter > >> MqGIqtLxk8pkuc9XENIo\n" > >> | HASH[build go/importer]: "import go/internal/gcimporter > >> U16uHUOXrDggYRgVMENf\n" > >> | HASH[build go/importer]: "import go/internal/srcimporter > >> vtV3UGYK55GaAj4JI8MN\n" > >> | HASH[build go/importer]: "import go/token 36MC7EMX8CqyCcPmrSmS\n" > >> | HASH[build go/importer]: "import go/types EyjwGzDrQ1CtOXxe_UYb\n" > >> | HASH[build go/importer]: "import io A3HnNVYVSU1F06BuLR5o\n" > >> | HASH[build go/importer]: "import runtime TtpuHdFJwA5GfsHmM2LT\n" > >> | HASH[build go/importer]: > >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d > >> | HASH subkey > b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d > >> "srcfiles" = > e6f8fcd87c2dd28b3381ad27b9938048b5b3bde6a19db4a4837e184ef9cef82a > >> | HASH subkey > b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d > >> "stdout" = > 3cb42089ec7038a91addcc400ee71ea90feee998a35e992b699729f04ae85c1a > >> | go tool dist: FAILED: > >> > /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/pkg/tool/native_native/go_bootstrap > >> install -gcflags=all= -ldflags=all= std: exit status 2 > >> | WARNING: > /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939:175 > >> exit 2 from './make.bash --target-only --no-banner std' > >> | WARNING: Backtrace (BB generated script): > >> | #1: do_compile, > >> > /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939, > >> line 175 > >> | #2: main, > /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939, > >> line 185 > >> > >> > >> > --- > >> > meta/classes/go.bbclass | 2 +- > >> > meta/recipes-devtools/go/go-common.inc | 2 +- > >> > meta/recipes-devtools/go/go-runtime.inc | 7 ++- > >> >
Re: [OE-core] [PATCH 3/6] go: correctly set debug-prefix-map and build directory
пн, 10 янв. 2022 г. в 11:08, Alexander Kanavin : > > aarch64-linaro-linux-gcc: error: ${SECURITY_LDFLAGS}: No such file or > directory > > You need to find out why the variable isn't expanded. 'bitbake -e go-runtime' > may help. For the reference: # $CGO_LDFLAGS [2 operations] # exported /home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/go/go-runtime.inc:13 # [export] "1" # set /home/lumag/Projects/RPB/build-rpb/conf/../../layers/openembedded-core/meta/recipes-devtools/go/go-runtime.inc:13 # "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" # pre-expansion value: # "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" export CGO_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed \${SECURITY_LDFLAGS}" Quoting bitbake manual: If the variable expansion syntax is used on a variable that does not exist, the string is kept as is. For example, given the following assignment, BAR expands to the literal string "${FOO}" as long as FOO does not exist. BAR = "${FOO}" > > Alex > > On Mon, 10 Jan 2022 at 05:34, Dmitry Baryshkov wrote: >> >> сб, 1 янв. 2022 г. в 14:30, Alexander Kanavin : >> > >> > Go has its own system for creating temporary build >> > sub-directories with randomized names, and setting >> > up debug-prefix-map on the fly to prevent those >> > directories leaking into target binaries. OE's own >> > settings were clashing with it, so this change >> > carefully avoids the two stepping on each other. >> > >> > Additionally, the top level build directory cannot >> > be named 'go-something'. >> > >> > Signed-off-by: Alexander Kanavin >> >> This patch breaks the build here, with the following error messages >> (full log attached): >> >> | HASH[build go/importer] >> | HASH[build go/importer]: "go1.17.5" >> | HASH[build go/importer]: "compile\n" >> | HASH[build go/importer]: "goos linux goarch arm64\n" >> | HASH[build go/importer]: "import \"go/importer\"\n" >> | HASH[build go/importer]: "omitdebug false standard true local false >> prefix \"\"\n" >> | HASH[build go/importer]: "modinfo \"\"\n" >> | HASH[build go/importer]: "compile compile version go1.17.5 [] []\n" >> | HASH[build go/importer]: "=\n" >> | HASH >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/src/go/importer/importer.go: >> 030536f1a71bcd0c3615684f4b94373b4136a282de9e6cd9d283e454704be386 >> | HASH[build go/importer]: "file importer.go AwU28acbzQw2FWhPS5Q3\n" >> | HASH[build go/importer]: "import go/build XGXQDTt1BQjYRjE7nFi7\n" >> | HASH[build go/importer]: "import go/internal/gccgoimporter >> MqGIqtLxk8pkuc9XENIo\n" >> | HASH[build go/importer]: "import go/internal/gcimporter >> U16uHUOXrDggYRgVMENf\n" >> | HASH[build go/importer]: "import go/internal/srcimporter >> vtV3UGYK55GaAj4JI8MN\n" >> | HASH[build go/importer]: "import go/token 36MC7EMX8CqyCcPmrSmS\n" >> | HASH[build go/importer]: "import go/types EyjwGzDrQ1CtOXxe_UYb\n" >> | HASH[build go/importer]: "import io A3HnNVYVSU1F06BuLR5o\n" >> | HASH[build go/importer]: "import runtime TtpuHdFJwA5GfsHmM2LT\n" >> | HASH[build go/importer]: >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> | HASH subkey >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> "srcfiles" = e6f8fcd87c2dd28b3381ad27b9938048b5b3bde6a19db4a4837e184ef9cef82a >> | HASH subkey >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> "stdout" = 3cb42089ec7038a91addcc400ee71ea90feee998a35e992b699729f04ae85c1a >> | go tool dist: FAILED: >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/pkg/tool/native_native/go_bootstrap >> install -gcflags=all= -ldflags=all= std: exit status 2 >> | WARNING: >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939:175 >> exit 2 from './make.bash --target-only --no-banner std' >> | WARNING: Backtrace (BB generated script): >> | #1: do_compile, >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939, >> line 175 >> | #2: main, >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939, >> line 185 >> >> >> > --- >> > meta/classes/go.bbclass | 2 +- >> > meta/recipes-devtools/go/go-common.inc | 2 +- >> > meta/recipes-devtools/go/go-runtime.inc | 7 ++- >> > meta/recipes-devtools/go/go-target.inc | 10 ++ >> > 4 files changed, 18 insertions(+), 3 deletions(-) >> > >> > diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass >> > index 5c1fdd7d5f..9c4c92bffd 100644 >> > --- a/meta/classes/go.bbclass >> > +++ b/meta/classes/go.bbclass >> > @@ -67,7 +67,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" >> > >> > B = "${WORKDIR}/build" >> > export GOPATH = "${B}" >> > -export GOTMPDIR ?=
Re: [OE-core] [PATCH 3/6] go: correctly set debug-prefix-map and build directory
пн, 10 янв. 2022 г. в 11:08, Alexander Kanavin : > > aarch64-linaro-linux-gcc: error: ${SECURITY_LDFLAGS}: No such file or > directory > > You need to find out why the variable isn't expanded. 'bitbake -e go-runtime' > may help. The distro I was using here (rpb if that matters) does not use security_flags.inc, so SECURITY_LDFLAGS are not defined. Please remove such dependency. We can not expect that every distro would include security_flags.inc > > Alex > > On Mon, 10 Jan 2022 at 05:34, Dmitry Baryshkov wrote: >> >> сб, 1 янв. 2022 г. в 14:30, Alexander Kanavin : >> > >> > Go has its own system for creating temporary build >> > sub-directories with randomized names, and setting >> > up debug-prefix-map on the fly to prevent those >> > directories leaking into target binaries. OE's own >> > settings were clashing with it, so this change >> > carefully avoids the two stepping on each other. >> > >> > Additionally, the top level build directory cannot >> > be named 'go-something'. >> > >> > Signed-off-by: Alexander Kanavin >> >> This patch breaks the build here, with the following error messages >> (full log attached): >> >> | HASH[build go/importer] >> | HASH[build go/importer]: "go1.17.5" >> | HASH[build go/importer]: "compile\n" >> | HASH[build go/importer]: "goos linux goarch arm64\n" >> | HASH[build go/importer]: "import \"go/importer\"\n" >> | HASH[build go/importer]: "omitdebug false standard true local false >> prefix \"\"\n" >> | HASH[build go/importer]: "modinfo \"\"\n" >> | HASH[build go/importer]: "compile compile version go1.17.5 [] []\n" >> | HASH[build go/importer]: "=\n" >> | HASH >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/src/go/importer/importer.go: >> 030536f1a71bcd0c3615684f4b94373b4136a282de9e6cd9d283e454704be386 >> | HASH[build go/importer]: "file importer.go AwU28acbzQw2FWhPS5Q3\n" >> | HASH[build go/importer]: "import go/build XGXQDTt1BQjYRjE7nFi7\n" >> | HASH[build go/importer]: "import go/internal/gccgoimporter >> MqGIqtLxk8pkuc9XENIo\n" >> | HASH[build go/importer]: "import go/internal/gcimporter >> U16uHUOXrDggYRgVMENf\n" >> | HASH[build go/importer]: "import go/internal/srcimporter >> vtV3UGYK55GaAj4JI8MN\n" >> | HASH[build go/importer]: "import go/token 36MC7EMX8CqyCcPmrSmS\n" >> | HASH[build go/importer]: "import go/types EyjwGzDrQ1CtOXxe_UYb\n" >> | HASH[build go/importer]: "import io A3HnNVYVSU1F06BuLR5o\n" >> | HASH[build go/importer]: "import runtime TtpuHdFJwA5GfsHmM2LT\n" >> | HASH[build go/importer]: >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> | HASH subkey >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> "srcfiles" = e6f8fcd87c2dd28b3381ad27b9938048b5b3bde6a19db4a4837e184ef9cef82a >> | HASH subkey >> b98eef9d67666fef158497b06bd4a9793d63af81f5e9e5008e51e0fa35b86a7d >> "stdout" = 3cb42089ec7038a91addcc400ee71ea90feee998a35e992b699729f04ae85c1a >> | go tool dist: FAILED: >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/go/pkg/tool/native_native/go_bootstrap >> install -gcflags=all= -ldflags=all= std: exit status 2 >> | WARNING: >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939:175 >> exit 2 from './make.bash --target-only --no-banner std' >> | WARNING: Backtrace (BB generated script): >> | #1: do_compile, >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939, >> line 175 >> | #2: main, >> /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/armv8a-linaro-linux/go-runtime/1.17.5-r0/temp/run.do_compile.2219939, >> line 185 >> >> >> > --- >> > meta/classes/go.bbclass | 2 +- >> > meta/recipes-devtools/go/go-common.inc | 2 +- >> > meta/recipes-devtools/go/go-runtime.inc | 7 ++- >> > meta/recipes-devtools/go/go-target.inc | 10 ++ >> > 4 files changed, 18 insertions(+), 3 deletions(-) >> > >> > diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass >> > index 5c1fdd7d5f..9c4c92bffd 100644 >> > --- a/meta/classes/go.bbclass >> > +++ b/meta/classes/go.bbclass >> > @@ -67,7 +67,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" >> > >> > B = "${WORKDIR}/build" >> > export GOPATH = "${B}" >> > -export GOTMPDIR ?= "${WORKDIR}/go-tmp" >> > +export GOTMPDIR ?= "${WORKDIR}/build-tmp" >> > GOTMPDIR[vardepvalue] = "" >> > >> > python go_do_unpack() { >> > diff --git a/meta/recipes-devtools/go/go-common.inc >> > b/meta/recipes-devtools/go/go-common.inc >> > index 5bbf35b787..83f8db7b39 100644 >> > --- a/meta/recipes-devtools/go/go-common.inc >> > +++ b/meta/recipes-devtools/go/go-common.inc >> > @@ -23,7 +23,7 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1" >> > SSTATE_SCAN_CMD = "true" >> > >> > export GOROOT_OVERRIDE = "1" >> > -export GOTMPDIR ?= "${WORKDIR}/go-tmp" >> > +export GOTMPDIR ?= "${WORKDIR}/build-tmp" >> > GOTMPDIR[vardepva
Re: [OE-core] [RFC PATCH v2 0/3] Extend create-spdx to build kernel spdx info
On Tue, Jan 11, 2022 at 6:59 PM Saul Wold wrote: > > This second change set, enables the kernel:do_strip() to share the > oe.package:runstrip() method. A copy of the kernel is made for the > kernel strip processing which is ultimately deployed, while the > unstripped kernel image can be used by package.bbclass to generate > the extended packagedata (debug info). The extended packagedata is > also used to genrate the SPDX data. > > This change also needs to strip out the "/usr/src/kernel" path since > the kernel uses work-shared, which is added to the search path. > > I have tested this with edgerouter which uses the > KERNEL_IMAGE_STRIP_EXTRA_SECTIONS variable > > If this looks good, I will send a non-RFC patch set tomorrow. > Minor comments from my side, the approach looks fine to me .. no major concerns! Bruce > > Sau! > > > Saul Wold (3): > create-spdx: Add kernel work-shared source > package: Add support for kernel stripping > kernel.bbclass: use common strip() > > meta/classes/create-spdx.bbclass | 6 - > meta/classes/kernel.bbclass | 44 ++-- > meta/classes/package.bbclass | 21 +-- > meta/lib/oe/package.py | 7 +++-- > 4 files changed, 36 insertions(+), 42 deletions(-) > > -- > 2.31.1 > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160483): https://lists.openembedded.org/g/openembedded-core/message/160483 Mute This Topic: https://lists.openembedded.org/mt/88362603/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [RFC PATCH v2 3/3] kernel.bbclass: use common strip()
On Tue, Jan 11, 2022 at 6:59 PM Saul Wold wrote: > > Re-use the runstrip() code from oe.packaging, for the kernel > stripping process. Since runstrip() is python the kernel do_strip() > need to be converted to Python also. The stripped kernel image > will be used for deployment in do_deploy(). This will allow the > package.bbclass to split an unstripped kernel binary for the debug > information and extended packagedata. The extended package data is > used by create-spdx. > > Signed-off-by: Saul Wold > --- > meta/classes/kernel.bbclass | 44 - > 1 file changed, 19 insertions(+), 25 deletions(-) > > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass > index 7685c6921fa..b2f9e3c8071 100644 > --- a/meta/classes/kernel.bbclass > +++ b/meta/classes/kernel.bbclass > @@ -700,30 +700,19 @@ do_kernel_link_images() { > } > addtask kernel_link_images after do_compile before do_strip > > -do_strip() { > - if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then > - if ! (echo "${KERNEL_IMAGETYPES}" | grep -wq "vmlinux"); then > - bbwarn "image type(s) will not be stripped (not > supported): ${KERNEL_IMAGETYPES}" > - return > - fi > - > - cd ${B} > - headers=`"$CROSS_COMPILE"readelf -S > ${KERNEL_OUTPUT_DIR}/vmlinux | \ > - grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ > - sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ > - gawk '{print $1}'` > - > - for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { > - if ! (echo "$headers" | grep -q "^$str$"); then > - bbwarn "Section not found: $str"; > - fi We are losing this warning in the relocated / common routine. It looks like something we could continue to detect and warn on, no ? > - > - "$CROSS_COMPILE"strip -s -R $str > ${KERNEL_OUTPUT_DIR}/vmlinux > - }; done > - > - bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping > sections:" \ > - "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" > - fi; > +python do_strip() { > +import shutil > + > +strip = d.getVar('STRIP') > +extra_sections = d.getVar('KERNEL_IMAGE_STRIP_EXTRA_SECTIONS') > +kernel_image = d.getVar('B') + "/" + d.getVar('KERNEL_OUTPUT_DIR') + > "/vmlinux" > + > +if (extra_sections is not None and kernel_image.find('boot/vmlinux') != > -1): Minor 'nit .. I'd probably just write that as: if extra_sections (versus the is not None) .. but maybe you have it that way due to that check not working. > +kernel_image_stripped = kernel_image + ".stripped" > +shutil.copy2(kernel_image, kernel_image_stripped) > +oe.package.runstrip((kernel_image_stripped, 8, strip, > extra_sections)) > +bb.note ("KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping > sections: " + \ > +extra_sections) In theory, we could move the debug log to the common routine when it detects the extra section argument > } > do_strip[dirs] = "${B}" > > @@ -768,7 +757,12 @@ kernel_do_deploy() { > > for imageType in ${KERNEL_IMAGETYPES} ; do > baseName=$imageType-${KERNEL_IMAGE_NAME} > - install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType > $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} > + > + if [ -s ${KERNEL_OUTPUT_DIR}/$imageType.stripped ] ; then > + install -m 0644 > ${KERNEL_OUTPUT_DIR}/$imageType.stripped > $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} > + else > + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType > $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} > + fi Is there a scenario when the ".stripped" image isn't available ? Wouldn't that already be an error, and so the deploy should just be an error, versus copying the non-stripped one ? Bruce > if [ -n "${KERNEL_IMAGE_LINK_NAME}" ] ; then > ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} > $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} > fi > -- > 2.31.1 > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160482): https://lists.openembedded.org/g/openembedded-core/message/160482 Mute This Topic: https://lists.openembedded.org/mt/88362607/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [RFC PATCH v2 2/3] package: Add support for kernel stripping
On Tue, Jan 11, 2022 at 6:59 PM Saul Wold wrote: > > Extend runstrip() to accept additional argument to enable > sharing it with the kernel do_strip() to that > KERNEL_IMAGE_STRIP_EXTRA_SECTIONS can be passed. > > Since is_elf() understands kernel modules there is no need to keep a > seperate list for kernmodules or hardcode the values to runstrip. > > Signed-off-by: Saul Wold > --- > meta/classes/package.bbclass | 21 +++-- > meta/lib/oe/package.py | 7 +-- > 2 files changed, 12 insertions(+), 16 deletions(-) > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > index 09cd376f4af..794996e6d6d 100644 > --- a/meta/classes/package.bbclass > +++ b/meta/classes/package.bbclass > @@ -390,10 +390,6 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, > debugappend, debugsrcdir, > dvar = d.getVar('PKGD') > objcopy = d.getVar("OBJCOPY") > > -# We ignore kernel modules, we don't generate debug info files. > -if file.find("/lib/modules/") != -1 and file.endswith(".ko"): > -return (file, sources) > - > newmode = None > if not os.access(file, os.W_OK) or os.access(file, os.R_OK): > origmode = os.stat(file)[stat.ST_MODE] > @@ -1122,7 +1118,6 @@ python split_and_strip_files () { > # > elffiles = {} > symlinks = {} > -kernmods = [] > staticlibs = [] > inodes = {} > libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir")) > @@ -1145,9 +1140,6 @@ python split_and_strip_files () { > if file in skipfiles: > continue > > -if file.endswith(".ko") and file.find("/lib/modules/") != -1: > -kernmods.append(file) > -continue > if oe.package.is_static_lib(file): > staticlibs.append(file) > continue > @@ -1164,8 +1156,11 @@ python split_and_strip_files () { > if not s: > continue > # Check its an executable > -if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & > stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \ > -or ((file.startswith(libdir) or > file.startswith(baselibdir)) and (".so" in f or ".node" in f)): > +if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & > stat.S_IXGRP) \ > +or (s[stat.ST_MODE] & stat.S_IXOTH) \ > +or ((file.startswith(libdir) or > file.startswith(baselibdir)) \ > +and (".so" in f or ".node" in f)) \ > +or (f.startswith('vmlinux') or ".ko" in f): > > if cpath.islink(file): > checkelflinks[file] = ltarget > @@ -1311,12 +1306,10 @@ python split_and_strip_files () { > for file in elffiles: > elf_file = int(elffiles[file]) > #bb.note("Strip %s" % file) > -sfiles.append((file, elf_file, strip)) > -for f in kernmods: > -sfiles.append((f, 16, strip)) > +sfiles.append((file, elf_file, strip, '')) > if (d.getVar('PACKAGE_STRIP_STATIC') == '1' or > d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): > for f in staticlibs: > -sfiles.append((f, 16, strip)) > +sfiles.append((f, 16, strip, '')) > > oe.utils.multiprocess_launch(oe.package.runstrip, sfiles, d) > > diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py > index dd700cbb0c9..7842a614e9f 100644 > --- a/meta/lib/oe/package.py > +++ b/meta/lib/oe/package.py > @@ -16,7 +16,7 @@ def runstrip(arg): > # 8 - shared library > # 16 - kernel module > > -(file, elftype, strip) = arg > +(file, elftype, strip, extra_strip_sections) = arg > > newmode = None > if not os.access(file, os.W_OK) or os.access(file, os.R_OK): > @@ -40,6 +40,9 @@ def runstrip(arg): > # shared or executable: > elif elftype & 8 or elftype & 4: > stripcmd.extend(["--remove-section=.comment", > "--remove-section=.note"]) > +if file.find("boot/vmlinux") != -1 and extra_strip_sections != '': > +for section in extra_strip_sections.split(): > +stripcmd.extend(["--remove-section=" + section]) One thought that came to mind when reading this, is does that really need to be restricted to boot/vmlinux ? The code would be simplified by just testing for 'if extra_strip_sections:' .. and then the sections are only passed for the kernel components that need it. The more broadly available functionality obviously isn't used (or maybe ever needed), but it does simplify things. But I'm only looking at the diff, so maybe I'm missing a nuance. > > stripcmd.append(file) > bb.debug(1, "runstrip: %s" % stripcmd) > @@ -172,7 +175,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, > base_libdir, d, qa_already_stripp > sfile
[OE-core] [PATCH] tune-cortexa72: Enable the crc extension by default for cortexa72
The crc extension is optional for the ARMv8.0 but is mandatory for the cortexa72, so there is no reason not to enable it for the cortexa72 tune. With this change, the cortexa72-crc seems redundant. But we had better to keep it to be compatible with the BSP which already used that tune. Signed-off-by: Kevin Hao --- .../machine/include/arm/armv8a/tune-cortexa72.inc| 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc index 3651cf6e802b..4c9add32f5f5 100644 --- a/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc +++ b/meta/conf/machine/include/arm/armv8a/tune-cortexa72.inc @@ -10,12 +10,12 @@ AVAILTUNES += "cortexa72 cortexa72-crc cortexa72-crc-crypto" ARMPKGARCH:tune-cortexa72 = "cortexa72" ARMPKGARCH:tune-cortexa72-crc = "cortexa72" ARMPKGARCH:tune-cortexa72-crc-crypto = "cortexa72" -TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a} cortexa72" -TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72} crc" -TUNE_FEATURES:tune-cortexa72-crc-crypto = "${TUNE_FEATURES:tune-cortexa72} crc crypto" -PACKAGE_EXTRA_ARCHS:tune-cortexa72= "${PACKAGE_EXTRA_ARCHS:tune-armv8} cortexa72" -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72 cortexa72-crc" -PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 cortexa72-crc cortexa72-crc-crypto" +TUNE_FEATURES:tune-cortexa72 = "${TUNE_FEATURES:tune-armv8a-crc} cortexa72" +TUNE_FEATURES:tune-cortexa72-crc = "${TUNE_FEATURES:tune-cortexa72}" +TUNE_FEATURES:tune-cortexa72-crc-crypto = "${TUNE_FEATURES:tune-cortexa72} crypto" +PACKAGE_EXTRA_ARCHS:tune-cortexa72= "${PACKAGE_EXTRA_ARCHS:tune-armv8-crc} cortexa72" +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} cortexa72" +PACKAGE_EXTRA_ARCHS:tune-cortexa72-crc-crypto= "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto} cortexa72 cortexa72-crc-crypto" BASE_LIB:tune-cortexa72= "lib64" BASE_LIB:tune-cortexa72-crc= "lib64" BASE_LIB:tune-cortexa72-crc-crypto = "lib64" -- 2.31.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160480): https://lists.openembedded.org/g/openembedded-core/message/160480 Mute This Topic: https://lists.openembedded.org/mt/88369540/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH] buildstats: support of custom disk usage command
This helps to make buildstats code usage easier in third-party projects like Isar (https://github.com/ilbers/isar/). In Isar rootfs is created using 'sudo' and some subpaths like '/proc' may be mounted. So, "du -sh" on rootfs produces incorrect result with multiple 'Permission denied' warnings. Customizable disk usage command allows to deal with these issues (e.g., "-x" option or "sudo" can be added) in such cases. Signed-off-by: Uladzimir Bely --- meta/classes/buildstats.bbclass | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass index 0de605200a..9f80cbd75c 100644 --- a/meta/classes/buildstats.bbclass +++ b/meta/classes/buildstats.bbclass @@ -8,6 +8,8 @@ BUILDSTATS_BASE = "${TMPDIR}/buildstats/" # +BUILDSTATS_DISK_USAGE_CMD ??= "du -sh" + def get_buildprocess_cputime(pid): with open("/proc/%d/stat" % pid, "r") as f: fields = f.readline().rstrip().split() @@ -244,7 +246,8 @@ python run_buildstats () { rootfs = d.getVar('IMAGE_ROOTFS') if os.path.isdir(rootfs): try: -rootfs_size = subprocess.check_output(["du", "-sh", rootfs], +rootfs_size = subprocess.check_output( +d.getVar('BUILDSTATS_DISK_USAGE_CMD').split() + [rootfs], stderr=subprocess.STDOUT).decode('utf-8') f.write("Uncompressed Rootfs size: %s" % rootfs_size) except subprocess.CalledProcessError as err: -- 2.20.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160479): https://lists.openembedded.org/g/openembedded-core/message/160479 Mute This Topic: https://lists.openembedded.org/mt/88369222/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-