From patchwork Thu Jul 6 21:23:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 27024 X-Patchwork-Delegate: reatmon@ti.com 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 C4050C001DE for ; Thu, 6 Jul 2023 21:23:42 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web10.36331.1688678620725722125 for ; Thu, 06 Jul 2023 14:23:40 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 188AC40C16; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vGmxaMajbMWG; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mail.denix.org (pool-100-15-88-116.washdc.fios.verizon.net [100.15.88.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id EEEEB40C13; Thu, 6 Jul 2023 21:23:38 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id BA2ED163BEE; Thu, 6 Jul 2023 17:23:38 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [kirkstone][PATCH 1/6] recipe-data: deprecate Date: Thu, 6 Jul 2023 21:23:30 +0000 Message-Id: <20230706212335.1893675-2-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706212335.1893675-1-denis@denix.org> References: <20230706212335.1893675-1-denis@denix.org> 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 ; Thu, 06 Jul 2023 21:23:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14786 From: Denys Dmytriyenko Deprecate custom recipe-data class. It was added when Bitbake started sanitizing "source" field of generated binary packages due to a CVE security vulnerability that could potentially leak local resource passwords. This class would bypass the sanitizing step by preserving source URLs from recipes to be used in TISDK bundle manifest. Even with a valid use case, this approach was still questionable and now it complicates latest TISDK bundle changes necessary for adding a proper secondary toolchain support. Plus bundle manifests don't seem to be used that much lately, so deprecate this class. Signed-off-by: Denys Dmytriyenko --- meta-arago-distro/classes/recipe-data.bbclass | 100 ------------------ .../classes/tisdk-bundle.bbclass | 43 +------- meta-arago-distro/conf/distro/arago.conf | 3 - 3 files changed, 1 insertion(+), 145 deletions(-) delete mode 100644 meta-arago-distro/classes/recipe-data.bbclass diff --git a/meta-arago-distro/classes/recipe-data.bbclass b/meta-arago-distro/classes/recipe-data.bbclass deleted file mode 100644 index be1db1ff..00000000 --- a/meta-arago-distro/classes/recipe-data.bbclass +++ /dev/null @@ -1,100 +0,0 @@ -# This class will record certain information about dependent recipes to a conf -# file. This way it can be retrieved by other recipes. For example, this can be -# used to obtain the SRC_URI for the SDK's SW manifest. - -# Configuration file to record the recipe data. -RECIPE_DATA_FILE ?= "${TMPDIR}/recipe_data.conf" - -# Variables to record -RECIPE_DATA_VARS ?= "PV SRC_URI FILE" - - -# Helper to load the data from the conf file -def recipe_data_load(d, recipe_data = bb.data.init()): - fn = d.getVar('RECIPE_DATA_FILE', True) - - if not fn: - bb.fatal('"RECIPE_DATA_FILE" is not defined!') - - if os.path.exists(fn): - with bb.utils.fileslocked([fn + '.lock']): - try: - bb.parse.handle(fn, recipe_data) - except Exception as e: - bb.warn('ERROR parsing "%s"' % fn) - bb.fatal(str(e)) - - return recipe_data - - -def recipe_data_get_var(var, pn, d): - if var not in (d.getVar('RECIPE_DATA_VARS', True) or '').split(): - bb.fatal('Variable "%s" was not configured to be recored' % var) - - recipe_data = recipe_data_load(d) - return recipe_data.getVar('%s_pn-%s' % (var,pn), True) - -# Add a shell variety so that it can work in shell tasks -# *** In shell tasks, inline python will be executed during parsing, so shell -# *** variables passed as input. -recipe_data_get_var_sh() { - local pn="$1" - local var="$2" - - sed -ne 's|'$var'_pn-'$pn'[ \t]*=[ \t]*"\(.*\)"[ \t]*$|\1|p' ${RECIPE_DATA_FILE} -} - -# Update the conf file with a new data. -# Variables such as "FILE" and "TOPDIR" are filtered out by default. -def recipe_data_update(fn, update_data, var_blacklist = ['__.*', 'FILE', 'TOPDIR'], expand = False): - import re - - recipe_data = bb.data.init() - - # Create the regex to filter out variables - re_blacklist = re.compile('^' + '$|^'.join(var_blacklist) + '$') - with bb.utils.fileslocked([fn + '.lock']): - try: - bb.parse.handle(fn, recipe_data) - except: - pass - - for var in update_data.keys(): - recipe_data.setVar(var, update_data.getVar(var,expand)) - - # We could use bb.data_smart's built in "emit_var", but that gives - # unnecessary comments. - with open(fn, "w") as f: - for var in recipe_data.keys(): - if not re_blacklist.match(var): - f.write('%s = "%s"\n' % (var, recipe_data.getVar(var,expand))) - - -addtask emit_recipe_data -do_emit_recipe_data[nostamp] = "1" -python do_emit_recipe_data(){ - recipe_vars = (d.getVar('RECIPE_DATA_VARS', True) or '').split() - recipe_data_file = d.getVar('RECIPE_DATA_FILE', True) - - pn = d.getVar('PN', True) or bb.fatal('"PN" is not defined!') - - data = bb.data.init() - - # Set pn-${PN} to the overrides for convenience - data.setVar('OVERRIDES', 'pn-${PN}') - for var in recipe_vars: - val = d.getVar(var, True) or '' - data.setVar('%s_pn-%s' % (var, pn), val) - - recipe_data_update(recipe_data_file, data) -} - -# Add empty task to control dependencies -addtask emit_recipe_data_all after do_emit_recipe_data -do_emit_recipe_data_all[noexec] = "1" -do_emit_recipe_data_all[nostamp] = "1" -do_emit_recipe_data_all[recrdeptask] = "do_emit_recipe_data_all do_emit_recipe_data" -do_emit_recipe_data_all[recideptask] = "do_${BB_DEFAULT_TASK}" -do_emit_recipe_data_all() { - : -} diff --git a/meta-arago-distro/classes/tisdk-bundle.bbclass b/meta-arago-distro/classes/tisdk-bundle.bbclass index dbdc9a5a..c7aba032 100644 --- a/meta-arago-distro/classes/tisdk-bundle.bbclass +++ b/meta-arago-distro/classes/tisdk-bundle.bbclass @@ -444,43 +444,6 @@ sw_manifest_host() { sw_manifest_table_footer } -# Use the recipe-data class to collect SRC_URI for the manifest. -# -# While this will need to be globally INHERIT'd to work properly, inherit -# locally so that parsing does not fail. -inherit recipe-data - -# Instead of re-adding the do_rootfs task, re-add the do_emit_recipe_data_all -# task to run before do_rootfs. -deltask do_emit_recipe_data_all - -# There seems to be something special with the rootfs task and task dependencies -# are not working as expected, so use the install task instead. -addtask emit_recipe_data_all after do_emit_recipe_data before do_install - -get_sources_from_recipe(){ - [ ! -z "$1" ] || return 0 - - # Check if a full URL is given (e.g. ipks from sourceipk class) - if [ $(echo "$1" | grep -c '://') -gt 0 ] - then - echo "$1" - return 0 - fi - - # Now assume that this was created by the package_ipk class - - # Cannot assume that recipe filename is ${PN}_${PV}.bb - # This is easily seen with BBCLASSEXTEND recipes. - for pn in $(sed -ne 's|FILE_pn-\([^ \t=]*\)[ \t]*=[ \t]*".*/'$1'".*|\1|p' "${RECIPE_DATA_FILE}") - do - # Only need a single PN incase there are native, nativesdk, target variants. - break - done - - recipe_data_get_var_sh "$pn" "SRC_URI" -} - # This function expects to be passed the following parameter # - The location to the opkg info directory containing the control files # of the installed packages @@ -491,9 +454,6 @@ generate_sw_manifest_table() { control_dir="$1" gplv3_only="$2" - # Call this here so that the function gets added to the task script - get_sources_from_recipe - if [ ! -d "$control_dir" ] then echo "Could not find the control directory ($control_dir)" @@ -583,8 +543,7 @@ EOF long_version="`cat $i | grep Version: | awk {'print $2'}`" license="`cat $i | grep License: | cut -d: -f2 `" architecture="`cat $i | grep Architecture: | awk {'print $2'}`" - recipe="`cat $i | grep Source: | cut -d ':' -f2-`" - sources="`get_sources_from_recipe $recipe`" + sources="`cat $i | grep Source: | cut -d ':' -f2-`" location="$package""_""$long_version""_""$architecture"".ipk" # Set the highlight color if the license in GPLv3. If this is diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf index e0087ab7..ceb74b6e 100644 --- a/meta-arago-distro/conf/distro/arago.conf +++ b/meta-arago-distro/conf/distro/arago.conf @@ -166,9 +166,6 @@ require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc #TARGET_CPPFLAGS += "-fstack-protector -D_FORTIFY_SOURCE=1" #TARGET_CPPFLAGS += "-fstack-protector" -# Inherit "recipe-data" class to populate SRC_URI in manifest -INHERIT += "recipe-data" - # Load default preferences require conf/distro/include/arago-prefs.inc From patchwork Thu Jul 6 21:23:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 27025 X-Patchwork-Delegate: reatmon@ti.com 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 B4331EB64DC for ; Thu, 6 Jul 2023 21:23:42 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web11.36480.1688678620743334924 for ; Thu, 06 Jul 2023 14:23:40 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 1D28A40C13; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ERdhAHYAoN_H; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mail.denix.org (pool-100-15-88-116.washdc.fios.verizon.net [100.15.88.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 05C6C40C85; Thu, 6 Jul 2023 21:23:38 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id BCE7F163BEF; Thu, 6 Jul 2023 17:23:38 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [kirkstone][PATCH 2/6] tisdk-core-bundle: simplify toolchain/SDK selection Date: Thu, 6 Jul 2023 21:23:31 +0000 Message-Id: <20230706212335.1893675-3-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706212335.1893675-1-denis@denix.org> References: <20230706212335.1893675-1-denis@denix.org> 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 ; Thu, 06 Jul 2023 21:23:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14784 From: Denys Dmytriyenko We used to generate a different toolchain/SDK based on whether the target was graphics-enabled or headless. Now we build the same full toolchain/SDK regardles, so there's no need to check for "opengl" distro feature inside TISDK bundle, as it's enabled in our distro unconditionally anyway. Signed-off-by: Denys Dmytriyenko --- meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc b/meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc index c7bd9629..43b1ef5f 100644 --- a/meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc +++ b/meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc @@ -31,8 +31,8 @@ DTB_FILTER:j721s2 = "j721s2" # List of target side images to build for the SDK TARGET_IMAGES = "tisdk-base-image tisdk-default-image tisdk-thinlinux-image tisdk-bootstrap-image" -TISDK_TOOLCHAIN = "${@bb.utils.contains('DISTRO_FEATURES','opengl','meta-toolchain-arago-tisdk','meta-toolchain-arago-tisdk-server',d)}" -TOOLCHAIN_SUFFIX = "${@bb.utils.contains('DISTRO_FEATURES','opengl','-tisdk','-tisdk-server',d)}" +TISDK_TOOLCHAIN = "meta-toolchain-arago-tisdk" +TOOLCHAIN_SUFFIX = "-tisdk" IMAGE_INSTALL = "\ packagegroup-arago-tisdk-amsdk-sdk-host \ From patchwork Thu Jul 6 21:23:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 27026 X-Patchwork-Delegate: reatmon@ti.com 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 C550DEB64DD for ; Thu, 6 Jul 2023 21:23:42 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web11.36481.1688678620782914698 for ; Thu, 06 Jul 2023 14:23:41 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 25A5640C85; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UUrCb2ErKLg9; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mail.denix.org (pool-100-15-88-116.washdc.fios.verizon.net [100.15.88.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 05AB040C83; Thu, 6 Jul 2023 21:23:39 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id C8239163BF0; Thu, 6 Jul 2023 17:23:38 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [kirkstone][PATCH 3/6] meta-arago-distro: remove old secondary toolchain support Date: Thu, 6 Jul 2023 21:23:32 +0000 Message-Id: <20230706212335.1893675-4-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706212335.1893675-1-denis@denix.org> References: <20230706212335.1893675-1-denis@denix.org> 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 ; Thu, 06 Jul 2023 21:23:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14787 From: Denys Dmytriyenko This was a rather hacky way to add a secondary toolchain for K3R5, based on external-arm-toolchain. This doesn't work with the internal toolchain, which is a default now. Signed-off-by: Denys Dmytriyenko --- .../conf/distro/include/toolchain-arm.inc | 6 ------ .../meta/external-arm-secondary-sdk-toolchain.bb | 4 ---- .../packagegroups/packagegroup-cross-canadian.bbappend | 10 ---------- 3 files changed, 20 deletions(-) delete mode 100644 meta-arago-distro/recipes-core/meta/external-arm-secondary-sdk-toolchain.bb delete mode 100644 meta-arago-distro/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend diff --git a/meta-arago-distro/conf/distro/include/toolchain-arm.inc b/meta-arago-distro/conf/distro/include/toolchain-arm.inc index 9b76917d..47e1f846 100644 --- a/meta-arago-distro/conf/distro/include/toolchain-arm.inc +++ b/meta-arago-distro/conf/distro/include/toolchain-arm.inc @@ -9,9 +9,6 @@ EAT_TARGET_SYS:arm = "${EAT_TARGET_SYS_ARMV5}" EAT_TARGET_SYS:armv7a = "${EAT_TARGET_SYS_ARMV7}" EAT_TARGET_SYS:aarch64 = "${EAT_TARGET_SYS_ARMV8}" -SECONDARY_TARGET_ARCH = "invalid" -SECONDARY_TARGET_ARCH:k3 = "armv7a" - TARGET_VENDOR = "" TOOLCHAIN_BASE ?= "/opt" @@ -34,9 +31,6 @@ PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}" #PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}" -PREFERRED_PROVIDER_gcc-cross-canadian-${SECONDARY_TARGET_ARCH} ?= "external-arm-secondary-sdk-toolchain-${SECONDARY_TARGET_ARCH}" -PREFERRED_PROVIDER_binutils-cross-canadian-${SECONDARY_TARGET_ARCH} ?= "external-arm-secondary-sdk-toolchain-${SECONDARY_TARGET_ARCH}" - # Special case for gdb to be built as part of canadian-cross-sdk, instead of packaged from external toolchain bindir:pn-gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${exec_prefix}/bin" PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" diff --git a/meta-arago-distro/recipes-core/meta/external-arm-secondary-sdk-toolchain.bb b/meta-arago-distro/recipes-core/meta/external-arm-secondary-sdk-toolchain.bb deleted file mode 100644 index 22a8aa0a..00000000 --- a/meta-arago-distro/recipes-core/meta/external-arm-secondary-sdk-toolchain.bb +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_ARCH := "${SECONDARY_TARGET_ARCH}" -MACHINEOVERRIDES := "${SECONDARY_TARGET_ARCH}" - -require recipes-core/meta/external-arm-sdk-toolchain.bb diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/meta-arago-distro/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend deleted file mode 100644 index 46df17f9..00000000 --- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -PR:append = ".arago0" - -SECONDARY_TARGET_ARCH ?= "invalid" - -SECONDARY_TOOLCHAIN = "gcc-cross-canadian-${SECONDARY_TARGET_ARCH} \ - binutils-cross-canadian-${SECONDARY_TARGET_ARCH}" - -RDEPENDS:${PN}:append = " \ - ${@oe.utils.conditional('SECONDARY_TARGET_ARCH', 'invalid', '', '${SECONDARY_TOOLCHAIN}', d)} \ -" From patchwork Thu Jul 6 21:23:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 27028 X-Patchwork-Delegate: reatmon@ti.com 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 C41B5C3DA40 for ; Thu, 6 Jul 2023 21:23:42 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web11.36482.1688678620887979669 for ; Thu, 06 Jul 2023 14:23:41 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 3FC3940C8A; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CbVmiKf38D64; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from mail.denix.org (pool-100-15-88-116.washdc.fios.verizon.net [100.15.88.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 1B24440C88; Thu, 6 Jul 2023 21:23:39 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id CAD97163BF1; Thu, 6 Jul 2023 17:23:38 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [kirkstone][PATCH 4/6] meta-arago: remove external toolchain support Date: Thu, 6 Jul 2023 21:23:33 +0000 Message-Id: <20230706212335.1893675-5-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706212335.1893675-1-denis@denix.org> References: <20230706212335.1893675-1-denis@denix.org> 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 ; Thu, 06 Jul 2023 21:23:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14788 From: Denys Dmytriyenko As meta-arago has moved away from using an external toolchain due to high maintenance burden, among other reasons, let's remove the corresponding support and related customizations. Signed-off-by: Denys Dmytriyenko --- .../conf/distro/include/toolchain-arm.inc | 112 --------------- .../distro/include/toolchain-external.inc | 4 - .../meta/external-arm-toolchain.bbappend | 36 ----- .../meta/external-arm-bfd-version.inc | 8 -- .../meta/external-arm-sdk-toolchain.bb | 131 ------------------ .../meta/external-arm-toolchain.bbappend | 73 ---------- .../recipes-core/meta/files/SUPPORTED | 1 - 7 files changed, 365 deletions(-) delete mode 100644 meta-arago-distro/conf/distro/include/toolchain-arm.inc delete mode 100644 meta-arago-distro/conf/distro/include/toolchain-external.inc delete mode 100644 meta-arago-distro/recipes-core/meta/external-arm-toolchain.bbappend delete mode 100644 meta-arago-extras/recipes-core/meta/external-arm-bfd-version.inc delete mode 100644 meta-arago-extras/recipes-core/meta/external-arm-sdk-toolchain.bb delete mode 100644 meta-arago-extras/recipes-core/meta/external-arm-toolchain.bbappend delete mode 100644 meta-arago-extras/recipes-core/meta/files/SUPPORTED diff --git a/meta-arago-distro/conf/distro/include/toolchain-arm.inc b/meta-arago-distro/conf/distro/include/toolchain-arm.inc deleted file mode 100644 index 47e1f846..00000000 --- a/meta-arago-distro/conf/distro/include/toolchain-arm.inc +++ /dev/null @@ -1,112 +0,0 @@ -# Select external binary prebuilt Arm toolchain -TCMODE = "external-arm" - -EAT_TARGET_SYS_ARMV5 ?= "arm-none-linux-gnueabi" -EAT_TARGET_SYS_ARMV7 ?= "arm-none-linux-gnueabihf" -EAT_TARGET_SYS_ARMV8 ?= "aarch64-none-linux-gnu" - -EAT_TARGET_SYS:arm = "${EAT_TARGET_SYS_ARMV5}" -EAT_TARGET_SYS:armv7a = "${EAT_TARGET_SYS_ARMV7}" -EAT_TARGET_SYS:aarch64 = "${EAT_TARGET_SYS_ARMV8}" - -TARGET_VENDOR = "" - -TOOLCHAIN_BASE ?= "/opt" -TOOLCHAIN_PATH_ARMV5 ?= "${TOOLCHAIN_BASE}/gcc-arm-9.2-ti2020.01-armv5-x86_64-${EAT_TARGET_SYS_ARMV5}" -TOOLCHAIN_PATH_ARMV7 ?= "${TOOLCHAIN_BASE}/gcc-arm-9.2-2019.12-x86_64-${EAT_TARGET_SYS_ARMV7}" -TOOLCHAIN_PATH_ARMV8 ?= "${TOOLCHAIN_BASE}/gcc-arm-9.2-2019.12-x86_64-${EAT_TARGET_SYS_ARMV8}" - -DEF_TOOLCHAIN_PATH:arm = "${TOOLCHAIN_PATH_ARMV5}" -DEF_TOOLCHAIN_PATH:armv7a = "${TOOLCHAIN_PATH_ARMV7}" -DEF_TOOLCHAIN_PATH:aarch64 = "${TOOLCHAIN_PATH_ARMV8}" - -TOOLCHAIN_PATH ?= "${DEF_TOOLCHAIN_PATH}" - -TOOLCHAIN_SYS := "${EAT_TARGET_SYS}" -TOOLCHAIN_PREFIX := "${TOOLCHAIN_SYS}-" - -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "external-arm-toolchain" - -PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}" -PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}" -#PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}" - -# Special case for gdb to be built as part of canadian-cross-sdk, instead of packaged from external toolchain -bindir:pn-gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${exec_prefix}/bin" -PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" - -# Set up runtime preferences -PREFERRED_PROVIDER_libgcc = "external-arm-toolchain" -PREFERRED_PROVIDER_gcc-runtime = "external-arm-toolchain" - -# Set Cross and SDK toolchain preferences -SDKGCCVERSION ?= "arm-9.2%" -SDKGDBVERSION ?= "9.2%" -SDKBINUVERSION ?= "2.35%" -SDKGLIBCVERSION ?= "2.32%" -SDKLINUXLIBCVERSION ?= "5.10%" - -PREFERRED_VERSION_gcc-crosssdk-${SDK_SYS} ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_SYS} ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_gdb-crosssdk-${SDK_SYS} ?= "${SDKGDBVERSION}" -PREFERRED_VERSION_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${SDKGDBVERSION}" -PREFERRED_VERSION_binutils-crosssdk-${SDK_SYS} ?= "${SDKBINUVERSION}" - -PREFERRED_VERSION_nativesdk-gcc-runtime ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_nativesdk-libgcc ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_nativesdk-libgcc-initial ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_nativesdk-linux-libc-headers ?= "${SDKLINUXLIBCVERSION}" -PREFERRED_VERSION_nativesdk-glibc ?= "${SDKGLIBCVERSION}" -PREFERRED_VERSION_nativesdk-glibc-locale ?= "${SDKGLIBCVERSION}" -PREFERRED_VERSION_nativesdk-glibc-initial ?= "${SDKGLIBCVERSION}" - -# Set target toolchain preferences to match Cross/SDK by default -# Can be overwritten globally, if needed -GCCVERSION ?= "arm-9.2%" -GDBVERSION ?= "9.2%" -BINUVERSION ?= "2.35%" -GLIBCVERSION ?= "2.32%" - -PREFERRED_VERSION_gcc ?= "${GCCVERSION}" -PREFERRED_VERSION_gdb ?= "${GDBVERSION}" -PREFERRED_VERSION_binutils ?= "${BINUVERSION}" -PREFERRED_VERSION_glibc ?= "${GLIBCVERSION}" -PREFERRED_VERSION_glibc-locale ?= "${GLIBCVERSION}" -PREFERRED_VERSION_glibc-initial ?= "${GLIBCVERSION}" - -# Licenses set for main components of the toolchain: -# (g)libc is always LGPL version 2 (or later) -# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1, -# see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html -# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but -# it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception -# was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html -# and http://www.gnu.org/licenses/gcc-exception.html, which was several days after -# gcc 4.3.3 was released - http://gcc.gnu.org/releases.html -# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according -# to the release schedule - http://www.gnu.org/software/gdb/schedule/ -# binutils version 2.17 was the last one under GPL version 2 (or later), according -# to the published releases - http://ftp.gnu.org/gnu/binutils/ - -python external_arm_toolchain_license_handler () { - if not isinstance(e, bb.event.ConfigParsed): - return - d = e.data - ld = d.createCopy() - ld.finalize() - - lc_libc = "LGPL-2.1" - lc_gcc = ["GPL-3.0", "GPL-2.0"][eat_get_gcc_version(ld) <= "4.2.1"] - lc_rle = ["GPL-3.0-with-GCC-exception", "GPL-2.0-with-GCC-exception"][eat_get_gcc_version(ld) <= "4.3.3"] - lc_gdb = ["GPL-3.0", "GPL-2.0"][eat_get_gdb_version(ld) <= "6.6"] -# lc_bfd = ["GPL-3.0", "GPL-2.0"][eat_get_bfd_version(ld) <= "2.17"] - - d.setVar('EAT_LIC_LIBC', lc_libc) - d.setVar('EAT_LIC_GCC', lc_gcc) - d.setVar('EAT_LIC_RLE', lc_rle) - d.setVar('EAT_LIC_GDB', lc_gdb) -# d.setVar('EAT_LIC_BFD', lc_bfd) - - d.setVar('EAT_LICENSE', "%s&%s&%s&%s" % (lc_libc, lc_gcc, lc_rle, lc_gdb)) -} -addhandler external_arm_toolchain_license_handler diff --git a/meta-arago-distro/conf/distro/include/toolchain-external.inc b/meta-arago-distro/conf/distro/include/toolchain-external.inc deleted file mode 100644 index c48b09d4..00000000 --- a/meta-arago-distro/conf/distro/include/toolchain-external.inc +++ /dev/null @@ -1,4 +0,0 @@ -# Set some default toolchain location variables -TOOLCHAIN_PATH ??= "/usr/local/sdk" -TOOLCHAIN_SYSPATH = "${TOOLCHAIN_PATH}/${TOOLCHAIN_SYS}" -EXTERNAL_TOOLCHAIN = "${TOOLCHAIN_PATH}" diff --git a/meta-arago-distro/recipes-core/meta/external-arm-toolchain.bbappend b/meta-arago-distro/recipes-core/meta/external-arm-toolchain.bbappend deleted file mode 100644 index ce22c453..00000000 --- a/meta-arago-distro/recipes-core/meta/external-arm-toolchain.bbappend +++ /dev/null @@ -1,36 +0,0 @@ -# This is a rather hacky way to install custom linux-libc-headers -# on top of the external-arm-toolchain, since simply depending -# on linux-libc-headers creates circular dependencies now. Mostly -# duplication of code from corresponding recipe. - -BRANCH = "ti-linux-5.10.y" -SRCREV = "bdfd5b0c1ee5617c9a94bacad0d818920d95b486" - -KERNEL_GIT_URI = "git://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git" -KERNEL_GIT_PROTOCOL = "https" -SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH}" - -PKGV:linux-libc-headers-dev = "5.10" -PKGV:linux-libc-headers = "5.10" - -inherit kernel-arch pkgconfig multilib_header - -EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}"" - -DEPENDS += "bison-native rsync-native" - -do_configure:append() { - cd ${WORKDIR}/git - oe_runmake allnoconfig -} - -do_install:append() { - cd ${WORKDIR}/git - oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix} - - CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" - cp ${CP_ARGS} ${B}${includedir} ${D}${exec_prefix} - - # The ..install.cmd conflicts between various configure runs - find ${D}${exec_prefix} -name ..install.cmd | xargs rm -f -} diff --git a/meta-arago-extras/recipes-core/meta/external-arm-bfd-version.inc b/meta-arago-extras/recipes-core/meta/external-arm-bfd-version.inc deleted file mode 100644 index 1d8eed17..00000000 --- a/meta-arago-extras/recipes-core/meta/external-arm-bfd-version.inc +++ /dev/null @@ -1,8 +0,0 @@ -TOOLCHAIN_PATH ??= "${STAGING_BINDIR_TOOLCHAIN}" - -def eat_get_bfd_version(d): - import subprocess,os,bb - if os.path.exists(d.getVar('TOOLCHAIN_PATH')+'/bin/'+d.getVar('TARGET_PREFIX')+'as'): - return subprocess.Popen([d.getVar('TOOLCHAIN_PATH')+'/bin/'+d.getVar('TARGET_PREFIX')+'as', '-v', '--version'], stderr=subprocess.STDOUT,stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[3] - -EAT_VER_BFD := "${@eat_get_bfd_version(d)}" diff --git a/meta-arago-extras/recipes-core/meta/external-arm-sdk-toolchain.bb b/meta-arago-extras/recipes-core/meta/external-arm-sdk-toolchain.bb deleted file mode 100644 index bbae8622..00000000 --- a/meta-arago-extras/recipes-core/meta/external-arm-sdk-toolchain.bb +++ /dev/null @@ -1,131 +0,0 @@ -inherit cross-canadian - -require external-arm-bfd-version.inc - -PR = "r9" - -PN = "external-arm-sdk-toolchain-${TARGET_ARCH}" -BPN = "external-arm-sdk-toolchain" - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_SYSROOT_STRIP = "1" -INHIBIT_DEFAULT_DEPS = "1" -EXCLUDE_FROM_SHLIBS = "1" - -# License applies to this recipe code, not the toolchain itself -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -INSANE_SKIP:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so staticdev file-rdeps" -INSANE_SKIP:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps" -INSANE_SKIP:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps" - -PROVIDES = "\ - gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \ - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', '', d)} \ - binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \ -" - -PACKAGES = "\ - gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \ - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', '', d)} \ - binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \ -" - -# Don't need the extra target triplet in the new SDK dir structure -bindir = "${exec_prefix}/bin" -libdir = "${exec_prefix}/lib" -libexecdir = "${exec_prefix}/libexec" -datadir = "${exec_prefix}/share" -gcclibdir = "${libdir}/gcc" - -FILES:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\ - ${prefix}/${EAT_TARGET_SYS}/lib/libstdc++.* \ - ${prefix}/${EAT_TARGET_SYS}/lib/libgcc_s.* \ - ${prefix}/${EAT_TARGET_SYS}/lib/libsupc++.* \ - ${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* \ - ${bindir}/${TARGET_PREFIX}gcov \ - ${bindir}/${TARGET_PREFIX}gcc* \ - ${bindir}/${TARGET_PREFIX}g++ \ - ${bindir}/${TARGET_PREFIX}cpp \ - ${libexecdir}/* \ -" - -FILES:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\ - ${bindir}/${TARGET_PREFIX}gdb \ - ${bindir}/${TARGET_PREFIX}gdbtui \ - ${datadir}/gdb/* \ - ${datadir}/info/* \ - ${datadir}/man/man1/${TARGET_PREFIX}* \ -" - -FILES:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\ - ${prefix}/${EAT_TARGET_SYS}/bin/ld* \ - ${prefix}/${EAT_TARGET_SYS}/bin/objcopy \ - ${prefix}/${EAT_TARGET_SYS}/bin/strip \ - ${prefix}/${EAT_TARGET_SYS}/bin/nm \ - ${prefix}/${EAT_TARGET_SYS}/bin/ranlib \ - ${prefix}/${EAT_TARGET_SYS}/bin/as \ - ${prefix}/${EAT_TARGET_SYS}/bin/ar \ - ${prefix}/${EAT_TARGET_SYS}/bin/objdump \ - ${prefix}/${EAT_TARGET_SYS}/lib/ldscripts/* \ - ${bindir}/${TARGET_PREFIX}ld* \ - ${bindir}/${TARGET_PREFIX}addr2line \ - ${bindir}/${TARGET_PREFIX}objcopy \ - ${bindir}/${TARGET_PREFIX}readelf \ - ${bindir}/${TARGET_PREFIX}strip \ - ${bindir}/${TARGET_PREFIX}nm \ - ${bindir}/${TARGET_PREFIX}ranlib \ - ${bindir}/${TARGET_PREFIX}gprof \ - ${bindir}/${TARGET_PREFIX}as \ - ${bindir}/${TARGET_PREFIX}c++filt \ - ${bindir}/${TARGET_PREFIX}ar \ - ${bindir}/${TARGET_PREFIX}strings \ - ${bindir}/${TARGET_PREFIX}objdump \ - ${bindir}/${TARGET_PREFIX}size \ -" - -DESCRIPTION:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "The GNU cc and gcc C compilers" -DESCRIPTION:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb - GNU debugger" -DESCRIPTION:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "A GNU collection of binary utilities" - -#LICENSE = "${ARG_LIC_LIBC}" -#LICENSE:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${ARG_LIC_GCC}" -#LICENSE:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${ARG_LIC_GDB}" -#LICENSE:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${ARG_LIC_BFD}" - -PKGV = "${EAT_VER_MAIN}" -PKGV:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GCC}" -PKGV:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GDB}" -PKGV:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_BFD}" - -LIBDIR = "lib" -LIBDIR:aarch64 = "lib64" - -do_install() { - install -d ${D}${prefix}/${EAT_TARGET_SYS}/bin - install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib - install -d ${D}${bindir} - install -d ${D}${libdir} - install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts - install -d ${D}${libexecdir} - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'install -d ${D}${datadir}/gdb', '', d)} - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'install -d ${D}${datadir}/info', '', d)} - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'install -d ${D}${datadir}/man/man1', '', d)} - install -d ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include - - cp -a ${TOOLCHAIN_PATH}/${EAT_TARGET_SYS}/${LIBDIR}/{libstdc++.*,libgcc_s.*,libsupc++.*} ${D}${prefix}/${EAT_TARGET_SYS}/lib - cp -a ${TOOLCHAIN_PATH}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC} - cp -a ${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}{gcov,gcc*,g++,cpp} ${D}${bindir} - cp -a ${TOOLCHAIN_PATH}/libexec/* ${D}${libexecdir} - - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'cp -a ${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gdb* ${D}${bindir}', '', d)} - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'cp -a ${TOOLCHAIN_PATH}/share/gdb/* ${D}${datadir}/gdb/', '', d)} - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'cp -a ${TOOLCHAIN_PATH}/share/info/* ${D}${datadir}/info/', '', d)} - ${@oe.utils.conditional('PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}', 'external-arm-sdk-toolchain', 'cp -a ${TOOLCHAIN_PATH}/share/man/man1/${TARGET_PREFIX}* ${D}${datadir}/man/man1/', '', d)} - - cp -a ${TOOLCHAIN_PATH}/${EAT_TARGET_SYS}/bin/{ld*,objcopy,strip,nm,ranlib,as,ar,objdump} ${D}${prefix}/${EAT_TARGET_SYS}/bin - cp -a ${TOOLCHAIN_PATH}/${EAT_TARGET_SYS}/lib/ldscripts/* ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts - cp -a ${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}{ld*,addr2line,objcopy,readelf,strip,nm,ranlib,gprof,as,c++filt,ar,strings,objdump,size} ${D}${bindir} -} diff --git a/meta-arago-extras/recipes-core/meta/external-arm-toolchain.bbappend b/meta-arago-extras/recipes-core/meta/external-arm-toolchain.bbappend deleted file mode 100644 index 478ba2ba..00000000 --- a/meta-arago-extras/recipes-core/meta/external-arm-toolchain.bbappend +++ /dev/null @@ -1,73 +0,0 @@ -ORIG_TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS'), ''][d.getVar('TARGET_OS') == ('' or 'custom')]}" - -do_install:append() { - install -d ${D}${base_sbindir} - cp -a ${TOOLCHAIN_PATH}/${EAT_TARGET_SYS}/libc/${base_sbindir}/ldconfig ${D}${base_sbindir}/ - install -d ${D}${sysconfdir} - echo -e "/lib\n/usr/lib" >> ${D}${sysconfdir}/ld.so.conf - - if [ ${EAT_TARGET_SYS} != ${ORIG_TARGET_SYS} ]; then - ln -sf ${EAT_TARGET_SYS} ${D}${libdir}/${ORIG_TARGET_SYS} - ln -sf ${EAT_TARGET_SYS} ${D}${includedir}/c++/${EAT_VER_GCC}/${ORIG_TARGET_SYS} - mv ${D}${libdir}/gcc/${EAT_TARGET_SYS} ${D}${libdir}/gcc/${ORIG_TARGET_SYS} - ln -sf ${ORIG_TARGET_SYS} ${D}${libdir}/gcc/${EAT_TARGET_SYS} - fi - - ln -sf libatomic.so.1 ${D}${libdir}/libatomic.so - ln -sf libgomp.so.1 ${D}${libdir}/libgomp.so - ln -sf libitm.so.1 ${D}${libdir}/libitm.so - ln -sf libssp.so.0 ${D}${libdir}/libssp.so - ln -sf libstdc++.so.6 ${D}${libdir}/libstdc++.so - ln -sf libubsan.so.1 ${D}${libdir}/libubsan.so - ln -sf libasan.so.5 ${D}${libdir}/libasan.so - ln -sf libgfortran.so.5 ${D}${libdir}/libgfortran.so - - cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ -} - -# Below FILES:* overrides are due to TARGET_SYS -> ORIG_TARGET_SYS move in ${libdir}/gcc -# to enable native compile on the target -FILES:libgcov-staticdev = "${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/libgcov.a" - -FILES:libgfortran-dev = "\ - ${libdir}/libgfortran*.so \ - ${libdir}/libgfortran.spec \ - ${libdir}/libgfortran.la \ - ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/libgfortranbegin.* \ - ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/libcaf_single* \ - ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/finclude/ \ -" - -FILES:gcc-sanitizers = "${libdir}/*.spec ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/include/sanitizer/*.h" - -# This is provided by gcc: -# ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/include -FILES:libgcc-dev = "\ - ${base_libdir}/libgcc*.so \ - ${@oe.utils.conditional('BASETARGET_SYS', '${ORIG_TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \ - ${libdir}/${TARGET_SYS}/${BINV}* \ - ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \ - ${libdir}/gcc/${TARGET_SYS} \ -" - -FILES:libssp-dev = "\ - ${libdir}/libssp*.so \ - ${libdir}/libssp*_nonshared.a \ - ${libdir}/libssp*.la \ - ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/include/ssp \ -" - -FILES:libquadmath-dev = "\ - ${libdir}/libquadmath*.so \ - ${libdir}/libquadmath.la \ - ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/include/quadmath* \ -" - -FILES:libgomp-dev = "\ - ${libdir}/libgomp*${SOLIBSDEV} \ - ${libdir}/libgomp*.la \ - ${libdir}/libgomp.spec \ - ${libdir}/gcc/${ORIG_TARGET_SYS}/${BINV}/include/omp.h \ -" - -INSANE_SKIP:libgcc-dev += "staticdev" diff --git a/meta-arago-extras/recipes-core/meta/files/SUPPORTED b/meta-arago-extras/recipes-core/meta/files/SUPPORTED deleted file mode 100644 index 9615075e..00000000 --- a/meta-arago-extras/recipes-core/meta/files/SUPPORTED +++ /dev/null @@ -1 +0,0 @@ -POSIX From patchwork Thu Jul 6 21:23:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 27027 X-Patchwork-Delegate: reatmon@ti.com 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 BA5FFC001B0 for ; Thu, 6 Jul 2023 21:23:42 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web10.36333.1688678622016979522 for ; Thu, 06 Jul 2023 14:23:42 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 5D71940C16; Thu, 6 Jul 2023 21:23:41 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ifu2xnJ2oCsR; Thu, 6 Jul 2023 21:23:41 +0000 (UTC) Received: from mail.denix.org (pool-100-15-88-116.washdc.fios.verizon.net [100.15.88.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 3D26C40C83; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id D80E4163BF2; Thu, 6 Jul 2023 17:23:38 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [kirkstone][PATCH 5/6] meta-arago: remove extra plumbing for internal toolchain Date: Thu, 6 Jul 2023 21:23:34 +0000 Message-Id: <20230706212335.1893675-6-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706212335.1893675-1-denis@denix.org> References: <20230706212335.1893675-1-denis@denix.org> 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 ; Thu, 06 Jul 2023 21:23:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14790 From: Denys Dmytriyenko No longer needed w/o external toolchain - use defaults from OE-Core. Also remove extra code that was trying to unify internal and external toolchains structures in meta-toolchain-arago. Signed-off-by: Denys Dmytriyenko --- meta-arago-distro/conf/distro/arago.conf | 10 ---- .../conf/distro/include/toolchain-gcc.inc | 41 -------------- .../distro/include/toolchain-internal.inc | 4 -- .../recipes-core/meta/meta-toolchain-arago.bb | 54 +++++-------------- 4 files changed, 14 insertions(+), 95 deletions(-) delete mode 100644 meta-arago-distro/conf/distro/include/toolchain-gcc.inc delete mode 100644 meta-arago-distro/conf/distro/include/toolchain-internal.inc diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf index ceb74b6e..f03c82bf 100644 --- a/meta-arago-distro/conf/distro/arago.conf +++ b/meta-arago-distro/conf/distro/arago.conf @@ -152,16 +152,6 @@ ARAGO_SYSTEST_ENABLE ?= "0" ARAGO_KERNEL_SUFFIX:append = "${@oe.utils.conditional("ARAGO_SYSTEST_ENABLE", "1", "-systest", "", d)}" IMAGE_FSTYPES:remove = "${@['','ubi ubifs'][d.getVar('ARAGO_SYSTEST_ENABLE') == '1']}" -# Toolchain should be selected by setting TOOLCHAIN_BRAND in local.conf -# Set some sane defaults, in case someone forgets to set them in local.conf -TC_SANE_DEFAULT ?= "arm" -TOOLCHAIN_TYPE ?= "internal" -TOOLCHAIN_TYPE:omapl138 = "internal" -TOOLCHAIN_BRAND ?= "${@[d.getVar('TC_SANE_DEFAULT'),'gcc'][d.getVar('TOOLCHAIN_TYPE') == 'internal']}" - -require conf/distro/include/toolchain-${TOOLCHAIN_BRAND}.inc -require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc - # Enable basic stack and buffer overflow protections #TARGET_CPPFLAGS += "-fstack-protector -D_FORTIFY_SOURCE=1" #TARGET_CPPFLAGS += "-fstack-protector" diff --git a/meta-arago-distro/conf/distro/include/toolchain-gcc.inc b/meta-arago-distro/conf/distro/include/toolchain-gcc.inc deleted file mode 100644 index 1c059a6f..00000000 --- a/meta-arago-distro/conf/distro/include/toolchain-gcc.inc +++ /dev/null @@ -1,41 +0,0 @@ -# Select internal gcc toolchain to be built from sources -TCMODE = "default" -TCLIBC = "glibc" - -LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION') or '') != '']}" - -# Match some of the external vars -TOOLCHAIN_SYS := "${TARGET_SYS}" -TOOLCHAIN_PREFIX := "${TARGET_PREFIX}" - -PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}" -PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}" -PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" - -# Set Cross and SDK toolchain preferences -SDKGCCVERSION ?= "11%" -SDKBINUVERSION ?= "2.38%" -SDKGLIBCVERSION ?= "2.35%" - -PREFERRED_VERSION_gcc-crosssdk-${SDK_SYS} ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_SYS} ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_binutils-crosssdk-${SDK_SYS} ?= "${SDKBINUVERSION}" - -PREFERRED_VERSION_nativesdk-gcc-runtime ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_nativesdk-libgcc ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_nativesdk-libgcc-initial ?= "${SDKGCCVERSION}" -PREFERRED_VERSION_nativesdk-glibc ?= "${SDKGLIBCVERSION}" -PREFERRED_VERSION_nativesdk-glibc-locale ?= "${SDKGLIBCVERSION}" -PREFERRED_VERSION_nativesdk-glibc-initial ?= "${SDKGLIBCVERSION}" - -# Set target toolchain preferences to match Cross/SDK by default -# Can be overwritten globally, if needed -GCCVERSION ?= "11%" -BINUVERSION ?= "2.38%" -GLIBCVERSION ?= "2.35%" - -PREFERRED_VERSION_gcc ?= "${GCCVERSION}" -PREFERRED_VERSION_binutils ?= "${BINUVERSION}" -PREFERRED_VERSION_glibc ?= "${GLIBCVERSION}" -PREFERRED_VERSION_glibc-locale ?= "${GLIBCVERSION}" -PREFERRED_VERSION_glibc-initial ?= "${GLIBCVERSION}" diff --git a/meta-arago-distro/conf/distro/include/toolchain-internal.inc b/meta-arago-distro/conf/distro/include/toolchain-internal.inc deleted file mode 100644 index cbc3b53d..00000000 --- a/meta-arago-distro/conf/distro/include/toolchain-internal.inc +++ /dev/null @@ -1,4 +0,0 @@ -# No special handling is required for locating the internal toolchain, just re-use existing vars -TOOLCHAIN_PATH ?= "${STAGING_BINDIR_TOOLCHAIN}" -TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}" -EXTERNAL_TOOLCHAIN = "${TOOLCHAIN_PATH}" diff --git a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb index 5c1c3ad0..8bff9abb 100644 --- a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb +++ b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb @@ -33,8 +33,8 @@ toolchain_create_sdk_env_script () { echo 'fi' >> $script echo 'export SDK_SYS=${SDK_SYS}' >> $script echo 'export REAL_MULTIMACH_TARGET_SYS=${REAL_MULTIMACH_TARGET_SYS}' >> $script - echo 'export TOOLCHAIN_SYS=${TOOLCHAIN_SYS}' >> $script - echo 'export TOOLCHAIN_PREFIX=$TOOLCHAIN_SYS-' >> $script + echo 'export TARGET_SYS=${TARGET_SYS}' >> $script + echo 'export TARGET_PREFIX=$TARGET_SYS-' >> $script echo 'export SDK_PATH_NATIVE=$SDK_PATH/sysroots/$SDK_SYS' >> $script echo 'export SDK_PATH_TARGET=$SDK_PATH/sysroots/$REAL_MULTIMACH_TARGET_SYS' >> $script echo 'export PATH=$SDK_PATH_NATIVE${bindir_nativesdk}:$SDK_PATH_NATIVE${bindir_nativesdk}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}:$PATH' >> $script @@ -43,18 +43,18 @@ toolchain_create_sdk_env_script () { echo 'export PKG_CONFIG_PATH=$SDK_PATH_TARGET${libdir}/pkgconfig:$SDK_PATH_TARGET${datadir}/pkgconfig' >> $script echo 'export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1' >> $script echo 'export CONFIG_SITE=$SDK_PATH/site-config-$REAL_MULTIMACH_TARGET_SYS' >> $script - printf 'export CC="\x24{TOOLCHAIN_PREFIX}gcc --sysroot=$SDK_PATH_TARGET"\n' >> $script - printf 'export CXX="\x24{TOOLCHAIN_PREFIX}g++ --sysroot=$SDK_PATH_TARGET"\n' >> $script - printf 'export GDB=\x24{TOOLCHAIN_PREFIX}gdb\n' >> $script - printf 'export CPP="\x24{TOOLCHAIN_PREFIX}gcc -E --sysroot=$SDK_PATH_TARGET"\n' >> $script - printf 'export LD="\x24{TOOLCHAIN_PREFIX}ld --sysroot=$SDK_PATH_TARGET"\n' >> $script - printf 'export NM=\x24{TOOLCHAIN_PREFIX}nm\n' >> $script - printf 'export AS=\x24{TOOLCHAIN_PREFIX}as\n' >> $script - printf 'export AR=\x24{TOOLCHAIN_PREFIX}ar\n' >> $script - printf 'export RANLIB=\x24{TOOLCHAIN_PREFIX}ranlib\n' >> $script - printf 'export OBJCOPY=\x24{TOOLCHAIN_PREFIX}objcopy\n' >> $script - printf 'export OBJDUMP=\x24{TOOLCHAIN_PREFIX}objdump\n' >> $script - printf 'export STRIP=\x24{TOOLCHAIN_PREFIX}strip\n' >> $script + printf 'export CC="\x24{TARGET_PREFIX}gcc --sysroot=$SDK_PATH_TARGET"\n' >> $script + printf 'export CXX="\x24{TARGET_PREFIX}g++ --sysroot=$SDK_PATH_TARGET"\n' >> $script + printf 'export GDB=\x24{TARGET_PREFIX}gdb\n' >> $script + printf 'export CPP="\x24{TARGET_PREFIX}gcc -E --sysroot=$SDK_PATH_TARGET"\n' >> $script + printf 'export LD="\x24{TARGET_PREFIX}ld --sysroot=$SDK_PATH_TARGET"\n' >> $script + printf 'export NM=\x24{TARGET_PREFIX}nm\n' >> $script + printf 'export AS=\x24{TARGET_PREFIX}as\n' >> $script + printf 'export AR=\x24{TARGET_PREFIX}ar\n' >> $script + printf 'export RANLIB=\x24{TARGET_PREFIX}ranlib\n' >> $script + printf 'export OBJCOPY=\x24{TARGET_PREFIX}objcopy\n' >> $script + printf 'export OBJDUMP=\x24{TARGET_PREFIX}objdump\n' >> $script + printf 'export STRIP=\x24{TARGET_PREFIX}strip\n' >> $script echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=$SDK_PATH_TARGET"' >> $script echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=$SDK_PATH_TARGET"' >> $script echo 'export CFLAGS="$CPPFLAGS"' >> $script @@ -97,32 +97,6 @@ arago_sdk_fixup () { done cleanup_toolchain_packages - - # Do some extra setup work due to new structure - mkdir -p "${SDK_OUTPUT}/${SDKPATHNATIVE}${prefix_nativesdk}/lib/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" - if [ "${TOOLCHAIN_TYPE}" = "internal" ]; then - lexec="${SDK_OUTPUT}/${SDKPATHNATIVE}${prefix_nativesdk}/libexec/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/gcc/${TOOLCHAIN_SYS}" - else - lexec="${SDK_OUTPUT}/${SDKPATHNATIVE}${prefix_nativesdk}/libexec/gcc/${TOOLCHAIN_SYS}" - fi - tcv=`ls -1 $lexec|head -1` - [ -e ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/lib/$tcv ] || ln -s . ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/lib/$tcv - [ -e ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/usr/lib/$tcv ] || ln -s . ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/usr/lib/$tcv - [ -e ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/lib/${TOOLCHAIN_SYS} ] || ln -s . ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/lib/${TOOLCHAIN_SYS} - [ -e ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/usr/lib/${TOOLCHAIN_SYS} ] || ln -s . ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/usr/lib/${TOOLCHAIN_SYS} - tcpath="${SDK_OUTPUT}/${SDKPATHNATIVE}${prefix_nativesdk}/${TOOLCHAIN_SYS}" - mkdir -p $tcpath - ( cd $tcpath; \ - ln -s ${SDKTARGETSYSROOT}/include include; \ - if [ "${TOOLCHAIN_BRAND}" != "arago" ]; then \ - mkdir -p libc; \ - cd libc; \ - fi; \ - mkdir -p usr; \ - ln -s ${SDKTARGETSYSROOT}/lib lib; \ - ln -s ${SDKTARGETSYSROOT}/usr/lib usr/lib; \ - ln -s ${SDKTARGETSYSROOT}/usr/include usr/include; \ - ) } fakeroot create_sdk_files() { From patchwork Thu Jul 6 21:23:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 27023 X-Patchwork-Delegate: reatmon@ti.com 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 B4301EB64D9 for ; Thu, 6 Jul 2023 21:23:42 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web11.36483.1688678621991471891 for ; Thu, 06 Jul 2023 14:23:42 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 5696640C13; Thu, 6 Jul 2023 21:23:41 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GDykO1S9FKWf; Thu, 6 Jul 2023 21:23:41 +0000 (UTC) Received: from mail.denix.org (pool-100-15-88-116.washdc.fios.verizon.net [100.15.88.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 3FCAF40C8E; Thu, 6 Jul 2023 21:23:40 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id E42B4163BF3; Thu, 6 Jul 2023 17:23:38 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [kirkstone][PATCH 6/6] tisdk-bundle: package up secondary K3R5 toolchain Date: Thu, 6 Jul 2023 21:23:35 +0000 Message-Id: <20230706212335.1893675-7-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706212335.1893675-1-denis@denix.org> References: <20230706212335.1893675-1-denis@denix.org> 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 ; Thu, 06 Jul 2023 21:23:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14789 From: Denys Dmytriyenko Use multiconfig to build and package a secondary toolchain for K3R5 cores. This makes some assumptions about k3r5 multiconfig using baremetal TCLIBC in meta-ti-bsp. The toolchain for k3r5 is not combined with the Linux one and is packaged independently as k3r5-devkit.sh along with the main linux-devkit.sh inside the TISDK bundle. Signed-off-by: Denys Dmytriyenko --- .../classes/tisdk-bundle.bbclass | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/meta-arago-distro/classes/tisdk-bundle.bbclass b/meta-arago-distro/classes/tisdk-bundle.bbclass index c7aba032..7bd46f2f 100644 --- a/meta-arago-distro/classes/tisdk-bundle.bbclass +++ b/meta-arago-distro/classes/tisdk-bundle.bbclass @@ -35,10 +35,21 @@ TARGET_IMAGES ?= "tisdk-base-image" # path to install the meta-toolchain package in the SDK TISDK_TOOLCHAIN_PATH ?= "linux-devkit" -# meta toolchain recipe to build and package as part of the tisdk image +# Linux glibc toolchain recipe(s) to build and package as part of the tisdk bundle TISDK_TOOLCHAIN ?= "meta-toolchain-arago" TOOLCHAIN_SUFFIX ?= "-sdk" +# K3R5 baremetal toolchain recipe(s) to build and package as part of the tisdk bundle +TOOLCHAIN_MC_DEP = "" +TOOLCHAIN_MC_DEP:k3 = "mc::k3r5:meta-toolchain-arago" +TISDK_TOOLCHAIN_K3R5 ?= "${TOOLCHAIN_MC_DEP}" +TOOLCHAIN_K3R5_SUFFIX ?= "-sdk" + +# Since K3R5 packaging happens in the main default MC, these vars +# are not accessible and have to be set here +ARMPKGARCH_K3R5 ?= "armv7a" +TARGET_OS_K3R5 ?= "eabi" + # List of the type of target file system images we want to include TARGET_IMAGE_TYPES ?= "tar.xz tar.gz ubi wic.gz wic.xz" @@ -81,6 +92,7 @@ do_rootfs[depends] += "${@string_set('%s:do_image_complete' % pn for pn in (d.ge # variable which will force us to build the toolchain first so that it will be # available for packaging do_rootfs[depends] += "${@string_set('%s:do_populate_sdk' % pn for pn in (d.getVar("TISDK_TOOLCHAIN") or "").split())}" +do_rootfs[mcdepends] += "${@string_set('%s:do_populate_sdk' % pn for pn in (d.getVar("TISDK_TOOLCHAIN_K3R5") or "").split())}" do_rootfs[nostamp] = "1" do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock" @@ -698,12 +710,16 @@ tisdk_image_setup () { mkdir -p ${IMAGE_ROOTFS}/var/lib/opkg mkdir -p ${IMAGE_ROOTFS}/lib - if [ -e ${DEPLOY_DIR}/sdk/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ] + if [ -e ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ] then - chmod 755 ${DEPLOY_DIR}/sdk/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}*.sh + chmod 755 ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh # Temporarily extract the toolchain sdk so we can read license information from it. - echo "${IMAGE_ROOTFS}/${TISDK_TOOLCHAIN_PATH}" | ${DEPLOY_DIR}/sdk/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}*.sh + echo "${IMAGE_ROOTFS}/${TISDK_TOOLCHAIN_PATH}" | ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh + fi + if [ -e ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH_K3R5}-${TARGET_OS_K3R5}${TOOLCHAIN_K3R5_SUFFIX}.sh ] + then + chmod 755 ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH_K3R5}-${TARGET_OS_K3R5}${TOOLCHAIN_K3R5_SUFFIX}.sh fi } @@ -849,11 +865,18 @@ tisdk_image_build () { # not the extracted version rm -rf ${IMAGE_ROOTFS}/${TISDK_TOOLCHAIN_PATH} - # Copy over the toolchain sdk installer an give it a simple name which + # Copy over Linux glibc toolchain sdk installer and give it a simple name which + # matches the traditional name within the SDK. + if [ -e ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ] + then + cp ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ${IMAGE_ROOTFS}/linux-devkit.sh + fi + + # Copy over K3R5 baremetal toolchain sdk installer and give it a simple name which # matches the traditional name within the SDK. - if [ -e ${DEPLOY_DIR}/sdk/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ] + if [ -e ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH_K3R5}-${TARGET_OS_K3R5}${TOOLCHAIN_K3R5_SUFFIX}.sh ] then - cp ${DEPLOY_DIR}/sdk/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ${IMAGE_ROOTFS}/linux-devkit.sh + cp ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH_K3R5}-${TARGET_OS_K3R5}${TOOLCHAIN_K3R5_SUFFIX}.sh ${IMAGE_ROOTFS}/k3r5-devkit.sh fi # Copy the opkg.conf used by the image to allow for future updates