From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6690944878080163840 X-Received: by 2002:a1c:494:: with SMTP id 142mr23577875wme.115.1557915119007; Wed, 15 May 2019 03:11:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f102:: with SMTP id r2ls488245wro.1.gmail; Wed, 15 May 2019 03:11:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2WuQ7+H8hG45LZakKhOm0nqtvSvb7/o9DIG+Foc0BBZ0hzHKrjDrXnnPdQL8SN3h5lHHj X-Received: by 2002:a5d:5282:: with SMTP id c2mr25508108wrv.88.1557915118614; Wed, 15 May 2019 03:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557915118; cv=none; d=google.com; s=arc-20160816; b=a0rVCxcNMxVsB/lKWkh1QDxmbXl8IbjQd8FY+cpn7xFE9b31fAVPUZ1/urIfNN55yi v47rRRR6yKycWTCBdX4PpvceFSQVAQeB/kQoQLtOU3+8ZykKTtFTKsaQEnO8uz9WDAHK dl9ie8k9nC2jm7nEq7ZVLb2+w8SMNJ5KgX7sqyF81Fv+tQ52LR8jiUG3LphdWEFJwYj7 VskL+rV+ndY1dcAMc5uXx7v5+teYnHDvF/Sy8+NnV2/7w95lf1HDnxnAuJKmDyRGyOYZ QGk1BXWBJRE0pObtLwEifXWGE9Rb82J6vGQXN6H1TZvP2JY2DUbKU9u6KsLS6KMVxLFh boig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Y/MTT1DT6ceXKP3gpK0YqOiK+R9wDhxO4qsiePcEbh0=; b=i2E0QwFirqZdPiOEgEtDVHKQE+Dk78pNCbgjKSUzofV7SnJrEAmip4bH9P/+Yi1Reb xGNrqQb+V7VjQEbuE0UkM4q22Y+5f9kbX/b6CYBWOt/COVCc7dB3CxURWY6WB6YIrvIt qlJCsuV1aWlhnSeIlisUtbQ257XREC9+TIK7dnNA/AVbr4709eG4Y9Knf/+S8fBWuKw7 iSS77eARY/msmBMG5hdVoo8CE2sePF47fbbPKTmAvBkD15FAYtNXlOoHAqi8fgFh+lvr 3V3Gt/Hpxau+dC6xGqV999ksZGrKbg2x0JBiRA2PrLTxEwkZXNT2Dsd3oJVdQUp4u+4m wt1A== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id d14si171232wrj.3.2019.05.15.03.11.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 03:11:58 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id x4FABvMK019505 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 May 2019 12:11:57 +0200 Received: from ring.ppmd.siemens.net (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x4FABv7O022198; Wed, 15 May 2019 12:11:57 +0200 From: claudius.heine.ext@siemens.com To: isar-users@googlegroups.com Cc: Claudius Heine , "Maxim Yu . Osipov" Subject: [PATCH v6 5/9] isar-bootstrap/buildchroot/sdkchroot: refactor PF and WORKDIR Date: Wed, 15 May 2019 12:11:45 +0200 Message-Id: <20190515101149.22187-6-claudius.heine.ext@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190515101149.22187-1-claudius.heine.ext@siemens.com> References: <20190515101149.22187-1-claudius.heine.ext@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: wSmLcEm2FsPd 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 [Maxim: rebased] Signed-off-by: Maxim Yu. Osipov --- meta/classes/image-sdk-extension.bbclass | 2 +- meta/classes/isar-bootstrap-helper.bbclass | 4 ++-- 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 | 3 ++- .../buildchroot/buildchroot-target.bb | 1 + meta/recipes-devtools/buildchroot/buildchroot.inc | 2 -- meta/recipes-devtools/sdkchroot/sdkchroot.bb | 5 ++--- 9 files changed, 14 insertions(+), 24 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/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass index 0d77929..8612be2 100644 --- a/meta/classes/isar-bootstrap-helper.bbclass +++ b/meta/classes/isar-bootstrap-helper.bbclass @@ -52,8 +52,8 @@ setup_root_file_system() { --clean) CLEAN=1 ;; --copyisarapt) COPYISARAPT=1 ;; --fstab) FSTAB=$2; shift ;; - --host-arch) ROOTFS_ARCH=${HOST_ARCH} ;; - --host-distro) ROOTFS_DISTRO=${HOST_DISTRO} ;; + --host-arch) ROOTFS_ARCH="$2-$ROOTFS_ARCH"; shift ;; + --host-distro) ROOTFS_DISTRO="$2"; shift ;; --keep-apt-cache) KEEP_APT_CACHE=1 ;; -*) bbfatal "$0: invalid option specified: $1" ;; *) break ;; diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 3a79df3..6bd644b 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -51,8 +51,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-${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}/rootfs" +BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target-${DISTRO}-${DISTRO_ARCH}/rootfs" 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 5501e35..ee8f362 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb @@ -6,19 +6,15 @@ # 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" require isar-bootstrap.inc # We only build debian host buildchroot environments DISTRO_BOOTSTRAP_KEYS = "" -inherit isar-bootstrap-helper -do_generate_keyrings[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 \ @@ -49,7 +45,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 39f12b5..77276e9 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_keyrings[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..73cd548 100644 --- a/meta/recipes-devtools/buildchroot/buildchroot-host.bb +++ b/meta/recipes-devtools/buildchroot/buildchroot-host.bb @@ -4,6 +4,7 @@ # Copyright (C) 2015-2018 ilbers GmbH DESCRIPTION = "Isar development filesystem for host" +PF = "${PN}-${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}" require buildchroot.inc @@ -27,5 +28,5 @@ BUILDCHROOT_PREINSTALL_append_arm64 += "binutils-aarch64-linux-gnu \ crossbuild-essential-arm64" -PARAMS = "--host-arch --host-distro" +PARAMS = "--host-arch '${HOST_ARCH}' --host-distro '${HOST_DISTRO}'" do_build[depends] = "isar-apt:do_cache_config isar-bootstrap-host:do_bootstrap" diff --git a/meta/recipes-devtools/buildchroot/buildchroot-target.bb b/meta/recipes-devtools/buildchroot/buildchroot-target.bb index ce6bd93..20f4d23 100644 --- a/meta/recipes-devtools/buildchroot/buildchroot-target.bb +++ b/meta/recipes-devtools/buildchroot/buildchroot-target.bb @@ -4,6 +4,7 @@ # Copyright (C) 2015-2018 ilbers GmbH DESCRIPTION = "Isar development filesystem for target" +PF = "${PN}-${DISTRO}-${DISTRO_ARCH}" require buildchroot.inc diff --git a/meta/recipes-devtools/buildchroot/buildchroot.inc b/meta/recipes-devtools/buildchroot/buildchroot.inc index 764bc5e..ca9ce51 100644 --- a/meta/recipes-devtools/buildchroot/buildchroot.inc +++ b/meta/recipes-devtools/buildchroot/buildchroot.inc @@ -15,10 +15,8 @@ PV = "1.0" 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..49aeb47 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}-${HOST_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" @@ -50,7 +49,7 @@ do_build() { packages="${SDKCHROOT_PREINSTALL} crossbuild-essential-${DISTRO_ARCH}" fi - setup_root_file_system --copyisarapt --host-arch --host-distro "${S}" $packages + setup_root_file_system --copyisarapt --host-arch '${HOST_ARCH}' --host-distro '${HOST_DISTRO}' "${S}" $packages # Configure root filesystem sudo install -m 644 ${WORKDIR}/README.sdk ${S} -- 2.20.1