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