From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6806948680239677440 X-Received: by 2002:a19:4854:: with SMTP id v81mr12015166lfa.189.1591611749207; Mon, 08 Jun 2020 03:22:29 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:43bb:: with SMTP id t27ls1946106lfl.3.gmail; Mon, 08 Jun 2020 03:22:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLfs2gNQ4N3dNxhxNgjJvUW7+E79bozK4oOL/1Ld2AuQ1sGEz7+5PyJHNvcW5hkqjlnXVm X-Received: by 2002:a05:6512:3329:: with SMTP id l9mr11970595lfe.138.1591611748278; Mon, 08 Jun 2020 03:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591611748; cv=none; d=google.com; s=arc-20160816; b=mt4dpzrBectyr9HP5cKI7NPtJtjaoRc2Qx/8ra9oQ900E31wxDup6KlJjst96Jspsn igD+w5O1A/gK/kJfuSqJXLGhC3MoCP2Ndpoy5Cn9BSIYjUJKzJYLckXCfpfF0P2ZHORr 0DvvbVpERmeWq/1El2V5uPLhHFELzeY1E1M1ZQhgD1sZG83SpFzAIRB8PcISw+BVPJxu 3euVr6Y4ZbRAj7q792FusJdGuL3h3LzLdasktXRr1RQ9r13r9fZcHF5WOvQEtl8xuBPL 1KayWOLZdrZi/05nHObbufFedJ7jEZk9elMSrYS+CqZuqMyV0njyi0ZBmdTHcD35dO1a az8w== 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:references:cc:to:from:subject; bh=19fOAieuBGXwkOcinzClWQ30HJflDy/7Lvr6E7s1Jig=; b=dqTMWEYTdzPYowlk8XASG4o0AL8sM2Dc0ClCCUKXv28eviFs0eJborT5biZuYDhe9Y ItjZ/i2Jy/FeUNhsx0iz04o63RXkBBWOKe/NN21yzY/UiNiokAeoCLb0BfWEVRqNZ669 BYCwyjg4pMSv6/9MVOibuBYIs2Eu9ry26qXmsbbyZw10UXBm0gXcvOZzzdH0DejlKL86 hPNWVR0hHBtBnGSFMnKnSy2/vpJD4aq4gG0Jpzn9FL3jmp/Ifc+ghopzYcJopp3hBvNH rx5dyM3GzBQISq3UOYae5qCDnVEyguE58U5ud9YA27MXD4rpTdOkKG3UI91jmA4rI0SI NgJw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id o23si739276lfb.4.2020.06.08.03.22.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2020 03:22:28 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 058AMQ86006734 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Jun 2020 12:22:26 +0200 Received: from [139.22.122.178] ([139.22.122.178]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 058AMQeJ002547; Mon, 8 Jun 2020 12:22:26 +0200 Subject: Re: [PATCH v2 1/6] sdk: Add support for adding self-defined sdk packages From: Jan Kiszka To: isar-users Cc: Chao Zeng , Le Jin , Christopher Larson References: <474ed5e64a311c861761d46a723e1bfef3bab973.1585394686.git.jan.kiszka@siemens.com> Message-ID: <392d9aec-1b35-b9e5-3ad6-c6b2f1b7a102@siemens.com> Date: Mon, 8 Jun 2020 12:22:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <474ed5e64a311c861761d46a723e1bfef3bab973.1585394686.git.jan.kiszka@siemens.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: c6oDCgF+eEZw On 28.03.20 12:24, [ext] Jan Kiszka wrote: > From: Jan Kiszka > > We do not yet have a good algorithm for automatically adding build > dependencies to the sdk beyond the basic set, let's allow users to > append what they need by appending SDK_PREINSTALL. Analogously to other > images, also allow to install self-built packages, consequently using > SDK_INSTALL. > > Based on original patch by Le Jin. > > Signed-off-by: Jan Kiszka > --- > doc/user_manual.md | 1 + > meta/recipes-devtools/sdkchroot/sdkchroot.bb | 25 +++++++++++++++---------- > 2 files changed, 16 insertions(+), 10 deletions(-) > > diff --git a/doc/user_manual.md b/doc/user_manual.md > index 0582ac74..6d95f26b 100644 > --- a/doc/user_manual.md > +++ b/doc/user_manual.md > @@ -744,6 +744,7 @@ target binary artifacts. Developer chroots to sdk rootfs and develops applicatio > > User manually triggers creation of SDK root filesystem for his target platform by launching the task `do_populate_sdk` for target image, f.e. > `bitbake -c do_populate_sdk mc:${MACHINE}-${DISTRO}:isar-image-base`. > +Packages that should be additionally installed into the SDK can be appended to `SDK_PREINSTALL` (external repositories) and `SDK_INSTALL` (self-built). > > The resulting SDK rootfs is archived into `tmp/deploy/images/${MACHINE}/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz`. > It is additionally available for direct use under `tmp/deploy/images/${MACHINE}/sdk-${DISTRO}-${DISTRO_ARCH}/`. > diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb > index 467e6824..ab0a66dc 100644 > --- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb > +++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb > @@ -13,6 +13,10 @@ SRC_URI = " \ > file://README.sdk" > PV = "0.1" > > +SDK_INSTALL ?= "" > + > +DEPENDS += "${SDK_INSTALL}" > + > TOOLCHAIN = "crossbuild-essential-${DISTRO_ARCH}" > TOOLCHAIN_${HOST_ARCH} = "build-essential" > TOOLCHAIN_i386 = "build-essential" > @@ -21,7 +25,7 @@ inherit rootfs > ROOTFS_ARCH = "${HOST_ARCH}" > ROOTFS_DISTRO = "${HOST_DISTRO}" > ROOTFSDIR = "${S}" > -ROOTFS_PACKAGES = "${SDKCHROOT_PREINSTALL} ${TOOLCHAIN}" > +ROOTFS_PACKAGES = "${SDK_PREINSTALL} ${SDK_INSTALL} ${TOOLCHAIN}" > ROOTFS_FEATURES += "clean-package-cache generate-manifest" > ROOTFS_MANIFEST_DEPLOY_DIR = "${DEPLOY_DIR_SDKCHROOT}" > > @@ -31,15 +35,16 @@ python() { > d.getVar("ROOTFS_ARCH"))) > } > > -SDKCHROOT_PREINSTALL := "debhelper \ > - autotools-dev \ > - dpkg \ > - locales \ > - docbook-to-man \ > - apt \ > - automake \ > - devscripts \ > - equivs" > +SDK_PREINSTALL += " \ > + debhelper \ > + autotools-dev \ > + dpkg \ > + locales \ > + docbook-to-man \ > + apt \ > + automake \ > + devscripts \ > + equivs" > > S = "${WORKDIR}/rootfs" > > I just realized another design issue with current sdk building: sdkchroot is shared with all image recipes that request do_populated_sdk. You may expect that defining SDP_[PRE]INSTALL there would have any impact, but that's not true therefore. Only adding those to an appended sdkchroot recipe or the global configuration works right now. As these additions may very well be specific to individual target images, neither of those options are perfect. We rather need to make the sdkchroot specific to the target image requesting it. That said, such a rework could happen later because the current form is already fine for a lot of use cases (and is being used for a longer while now). Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux