From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6680483261914808320 X-Received: by 2002:a1c:b48b:: with SMTP id d133mr2837857wmf.6.1555423192088; Tue, 16 Apr 2019 06:59:52 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:2292:: with SMTP id 18ls2265493wmf.3.canary-gmail; Tue, 16 Apr 2019 06:59:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWG47So+2HflzJ+9Q1F6kr5lxlz+YW8AaMRvsDO3zjwM6Qe0y0TQscSsOkyuXgecnQ2ORo X-Received: by 2002:a1c:4803:: with SMTP id v3mr2866356wma.12.1555423191754; Tue, 16 Apr 2019 06:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555423191; cv=none; d=google.com; s=arc-20160816; b=ShEa+9/vRyQRapTOUuHaPkdr672mwxLnubBmRmq+fc/kCwAJdbFsT37dttHpqzLWfN CZCD/Th3DsnqgNingI2paYPNZ0JPLkdMfKNCIdrTlS+d2+ko8a4KCg49lpU0CxC0IL0y nAq0/CB+oenutmPaBmx1cR2qfiM/5I/3d7GbgjHTrf8NshOvVlBp83IO/iAM4orAm+/Q +qlFfyXwOOj/SCr1rzWxVYy12bZhBl2RQSkkl5rfhruaetqXVWI2IO5BSvpC8goTH0+r IRBd0TwHuN0MaoUiBQj2DyLGYh/gLF9dymYedEpcI8JBfMpTXpbOvRxox2UF2r+bpzFw CxwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject; bh=s0O5kODQmcF9B/wayM+UEWXxrW9neHfuyAYlsEI3uLQ=; b=jdk6ZCAXEk/becVUPZUraWbz4ZKjcV/zAY91jeZJ15Ly2+oSZCpLstQ9tKKHiPKKuj 4K5xo6uxWmd6kEcXkIH/MoCveDNsdbhqPdkCxtAJwO6lJ5oUH+HV8fUPjQTFMBThcA0X JigirqxhZrHPeLNvyfFWmBSzOnVh6lqaDzvw1rqlAY3fcY5wkfhcXs10LvxuQkQ87TES 1f3PsFXOi1sAYQ1TncI7FnBWu0vD8L+OGKOaW5JiH+iSeSD4yd3v7TCXUBHDIBHwq3ov g4qOFQrTouf7vdA/bvg+/CH0Cm32I2OGXNBcqKf2rp7AsP/eSqa+geNmgjrV01zTzYsY F1Jg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id k15si2788261wrq.1.2019.04.16.06.59.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 06:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id x3GDxo9U011941 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Apr 2019 15:59:50 +0200 Received: from [139.25.69.232] (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x3GDxoZP004742; Tue, 16 Apr 2019 15:59:50 +0200 Subject: Re: [PATCH 4/8] isar-bootstrap/buildchroot/sdkchroot: refactor PF and WORKDIR To: Andreas Reichel Cc: isar-users@googlegroups.com, Claudius Heine References: <20190416132647.3074-1-claudius.heine.ext@siemens.com> <20190416132647.3074-5-claudius.heine.ext@siemens.com> <20190416134339.GA16075@iiotirae> From: Claudius Heine Message-ID: Date: Tue, 16 Apr 2019 15:59:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190416134339.GA16075@iiotirae> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 4TbQ49nMX1Kn Hi Andreas, On 16/04/2019 15.43, Andreas Reichel wrote: > On Tue, Apr 16, 2019 at 03:26:42PM +0200, [ext] claudius.heine.ext@siemens.com wrote: >> From: Claudius Heine >> >> Each of those are dependent on both HOST_ARCH and DISTRO_ARCH, so the >> stamps etc. should not be shared. >> >> Signed-off-by: Claudius Heine >> --- >> meta/classes/image-sdk-extension.bbclass | 2 +- >> meta/conf/bitbake.conf | 4 ++-- >> .../isar-bootstrap/isar-bootstrap-host.bb | 11 +++-------- >> .../isar-bootstrap/isar-bootstrap-target.bb | 6 +----- >> meta/recipes-devtools/buildchroot/buildchroot-host.bb | 1 + >> meta/recipes-devtools/buildchroot/buildchroot.inc | 3 +-- >> meta/recipes-devtools/sdkchroot/sdkchroot.bb | 3 +-- >> 7 files changed, 10 insertions(+), 20 deletions(-) >> >> diff --git a/meta/classes/image-sdk-extension.bbclass b/meta/classes/image-sdk-extension.bbclass >> index 1838080..8df3ed1 100644 >> --- a/meta/classes/image-sdk-extension.bbclass >> +++ b/meta/classes/image-sdk-extension.bbclass >> @@ -5,7 +5,7 @@ >> # >> # This class extends the image.bbclass to supply the creation of a sdk >> >> -SDKCHROOT_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/sdkchroot-${HOST_DISTRO}-${HOST_ARCH}" >> +SDKCHROOT_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/sdkchroot-${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}" >> >> do_populate_sdk[stamp-extra-info] = "${DISTRO}-${MACHINE}" >> do_populate_sdk[depends] = "sdkchroot:do_build" >> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf >> index 0e521bb..7c1c89f 100644 >> --- a/meta/conf/bitbake.conf >> +++ b/meta/conf/bitbake.conf >> @@ -50,8 +50,8 @@ DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap" >> DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}" >> DL_DIR ?= "${TOPDIR}/downloads" >> SSTATE_DIR ?= "${TMPDIR}/sstate-cache" >> -BUILDCHROOT_HOST_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-host/rootfs" >> -BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target/rootfs" >> +BUILDCHROOT_HOST_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-host-${DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}/rootfs" >> +BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target-${DISTRO}-${DISTRO_ARCH}/rootfs" > > maybe first define a variable for ${DISTRO}-${DISTRO_ARCH} and then > prepend this with ${HOST_ARCH}- where needed makes the code more > readable. I understand your point, but this is the 'bitbake.conf' so any variable will be available everywhere. So I would like to avoid creating any helper variables that are of limited use anywhere else and create mostly noise. Also changing the order would lead to more inconsistencies IMO. Everywhere the 'DISTRO' code word is named first, then followed by the native architecture of that root file system. This change just adds the architecture of the target machine to the last place for the cross-tool-chain. Thanks, Claudius > >> CACHE = "${TMPDIR}/cache" >> >> OVERRIDES = "${DISTRO_ARCH}:${MACHINE}:${DISTRO}:forcevariable" >> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb >> index 08b068f..6d0f5f5 100644 >> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb >> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb >> @@ -6,17 +6,13 @@ >> # SPDX-License-Identifier: MIT >> >> Description = "Minimal host Debian root file system" >> +PF = "${PN}-${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}" >> >> -WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${HOST_DISTRO}-${HOST_ARCH}" >> -DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}" >> -ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}.lock" >> +DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}" >> +ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}.lock" >> > > Same here > >> require isar-bootstrap.inc >> -inherit isar-bootstrap-helper >> >> -do_generate_keyring[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >> - >> -do_apt_config_prepare[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >> do_apt_config_prepare[dirs] = "${WORKDIR}" >> do_apt_config_prepare[vardeps] += "\ >> APTPREFS \ >> @@ -47,7 +43,6 @@ addtask apt_config_prepare before do_bootstrap after do_unpack >> >> OVERRIDES_append = ":${@get_distro_needs_https_support(d, True)}" >> >> -do_bootstrap[stamp-extra-info] = "${HOST_DISTRO}-${HOST_ARCH}" >> do_bootstrap[vardeps] += "HOST_DISTRO_APT_SOURCES" >> do_bootstrap() { >> isar_bootstrap --host >> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb >> index 79f3e34..552a317 100644 >> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb >> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb >> @@ -6,16 +6,13 @@ >> # SPDX-License-Identifier: MIT >> >> Description = "Minimal target Debian root file system" >> +PF = "${PN}-${DISTRO}-${DISTRO_ARCH}" >> >> -WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}" >> DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${DISTRO}-${DISTRO_ARCH}" >> ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_BOOTSTRAP}/${DISTRO}-${DISTRO_ARCH}.lock" >> >> require isar-bootstrap.inc >> >> -do_generate_keyring[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >> - >> -do_apt_config_prepare[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >> do_apt_config_prepare[dirs] = "${WORKDIR}" >> do_apt_config_prepare[vardeps] += "\ >> APTPREFS \ >> @@ -44,7 +41,6 @@ addtask apt_config_prepare before do_bootstrap after do_unpack >> >> OVERRIDES_append = ":${@get_distro_needs_https_support(d, False)}" >> >> -do_bootstrap[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >> do_bootstrap[vardeps] += "DISTRO_APT_SOURCES" >> do_bootstrap() { >> isar_bootstrap >> diff --git a/meta/recipes-devtools/buildchroot/buildchroot-host.bb b/meta/recipes-devtools/buildchroot/buildchroot-host.bb >> index c8c10c0..e8f7f69 100644 >> --- a/meta/recipes-devtools/buildchroot/buildchroot-host.bb >> +++ b/meta/recipes-devtools/buildchroot/buildchroot-host.bb >> @@ -6,6 +6,7 @@ >> DESCRIPTION = "Isar development filesystem for host" >> >> require buildchroot.inc >> +PF = "${PN}-${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}" >> >> BUILDCHROOT_PREINSTALL ?= "make \ >> debhelper \ >> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.inc b/meta/recipes-devtools/buildchroot/buildchroot.inc >> index 764bc5e..cdb4c07 100644 >> --- a/meta/recipes-devtools/buildchroot/buildchroot.inc >> +++ b/meta/recipes-devtools/buildchroot/buildchroot.inc >> @@ -12,13 +12,12 @@ SRC_URI = "file://configscript.sh \ >> file://common.sh \ >> file://deps.sh" >> PV = "1.0" >> +PF = "${PN}-${DISTRO}-${DISTRO_ARCH}" >> >> inherit isar-bootstrap-helper >> >> -WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}" >> BUILDCHROOT_DIR = "${WORKDIR}/rootfs" >> >> -do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" >> do_build[root_cleandirs] = "${BUILDCHROOT_DIR} \ >> ${BUILDCHROOT_DIR}/isar-apt \ >> ${BUILDCHROOT_DIR}/downloads \ >> diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb >> index 895a454..249fa94 100644 >> --- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb >> +++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb >> @@ -14,6 +14,7 @@ SRC_URI = " \ >> PV = "0.1" >> >> inherit isar-bootstrap-helper >> +PF = "${PN}-${ROOTFS_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}" >> >> SDKCHROOT_PREINSTALL := "debhelper \ >> autotools-dev \ >> @@ -25,11 +26,9 @@ SDKCHROOT_PREINSTALL := "debhelper \ >> devscripts \ >> equivs" >> >> -WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${HOST_DISTRO}-${HOST_ARCH}" >> S = "${WORKDIR}/rootfs" >> >> do_build[dirs] = "${DEPLOY_DIR_IMAGE}" >> -do_build[stamp-extra-info] = "${HOST_DISTRO}-${HOST_ARCH}" >> do_build[root_cleandirs] = "${S} \ >> ${S}/isar-apt" >> >> -- >> 2.20.1 >> >> -- >> You received this message because you are subscribed to the Google Groups "isar-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. >> To post to this group, send email to isar-users@googlegroups.com. >> To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20190416132647.3074-5-claudius.heine.ext%40siemens.com. >> For more options, visit https://groups.google.com/d/optout. > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de