From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6592834179222732800 X-Received: by 2002:adf:9a32:: with SMTP id z47-v6mr2562469wrb.21.1535013826021; Thu, 23 Aug 2018 01:43:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:23c4:: with SMTP id j187-v6ls902130wmj.2.canary-gmail; Thu, 23 Aug 2018 01:43:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbVq1wjdwxGkxe/IOWwqebWyIjSzk+OUa5fhvKGvxXf2yZa3d8y4RpZfP4xuSN+ng+DUGap X-Received: by 2002:a1c:187:: with SMTP id 129-v6mr662318wmb.25.1535013825547; Thu, 23 Aug 2018 01:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535013825; cv=none; d=google.com; s=arc-20160816; b=cM/2Z5zs40jreN1yvEF50VSaeJMMl3H6gRdFtV3xJ5eux9I6usIQb0UskBkUxrM8vW PIn7pMJnuxj0Paoy9u3K9nO5hw1c4Fc+L8/LGokEfuEZF0T/jX31Rk9rFDBGXLWRnR41 Lp7WGlr2ARnWPGuGYXOWUJuIIhxGwOIYOus5y07qpw66U8ewviFNLys91/hQUYlu64NQ 49NtbvXo6VO5lw9qoApWzs5QQvy9GTyEqNQOfcqLTkfQSj7giyHZ5jGJDw4J879X5E9K 7STXnq7xI4qZYTrtIVOMy65EbLm3/gjZoOyzeiFPqO7bBcpkI/v32xuWYTNzgNG6neqw NdGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:references:in-reply-to:message-id:date :subject:to:from:arc-authentication-results; bh=9CIWRZxMsweJA3lDz+KtFiv6nJr7dE+NUgkKxz1E/h8=; b=t+su62dEeTUcHQzfBYjFe3VGcsCEePqivmWBi0f8mhhYpVqu2k9bjNVy7qcinmfQC9 Wy560SgaexoZUQd2Xyy1PGKTVfioka1XXGRWoadCpzTywbJGnih6tRVKKT3bH07GV4PD RrlWTni6AF4a2QIl/YkiyF4gP0dLAC4gxGndC8Ro3pyex0c3zn6Ezh6MMAL5+L/KsH6f 6qrnl3B4Tf0oRlFOp4C8r8RPHJCDpMGmdxIXI/S158N8/HD+31N2+1qICB5RroizdZf1 AN8WWKUgxEVkN75J3bWla2iHnKPzWcSROZBUFZu508lOlcHbkcH0yT+jRj7ZoGk8bezz oM5g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id z14-v6si117500wrh.4.2018.08.23.01.43.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 01:43:45 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w7N8hiO0008104 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 23 Aug 2018 10:43:45 +0200 Received: from md1f2u6c.ad001.siemens.net ([167.87.52.209]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w7N8hhee013109 for ; Thu, 23 Aug 2018 10:43:44 +0200 From: Jan Kiszka To: isar-users Subject: [PATCH 3/3] sdk: Properly deploy Date: Thu, 23 Aug 2018 10:43:43 +0200 Message-Id: X-Mailer: git-send-email 2.16.4 In-Reply-To: References: In-Reply-To: References: X-TUID: tgREm9eiQdn3 From: Jan Kiszka Avoid pointing the user into the work directory and rather deploy the SDK rootfs as archive. This simplifies the handover to other machines. In addition, we set a link from the deploy directory to the generated rootfs in case direct use is required. Signed-off-by: Jan Kiszka --- doc/user_manual.md | 7 ++++--- meta/recipes-devtools/sdkchroot/sdkchroot.bb | 9 +++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/user_manual.md b/doc/user_manual.md index d99f1f0..37a422d 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -593,9 +593,10 @@ 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 multiconfig:${MACHINE}-${DISTRO}:isar-image-base`. -The resulting SDK rootfs is located under `tmp/work/${DISTRO}-${DISTRO_ARCH}/sdkchroot-${HOST_DISTRO}-${HOST_ARCH}/rootfs`. -SDK rootfs directory `/isar-apt` contains the copy of isar-apt repo with locally prebuilt target debian packages (for ). -One may chroot to SDK and install required target packages with the help of `apt-get install :` command. +The resulting SDK rootfs is archived into `tmp/deploy/images/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz`. +It is additionally available for direct use under `tmp/deploy/images/sdk-${DISTRO}-${DISTRO_ARCH}/`. +The SDK rootfs directory `/isar-apt` contains a copy of isar-apt repo with locally prebuilt target debian packages (for ). +One may chroot into the SDK and install required target packages with the help of `apt-get install :` command. ### Limitation diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb index 705a56a..e143ae7 100644 --- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb +++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb @@ -26,6 +26,7 @@ SDKCHROOT_PREINSTALL := "debhelper \ 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" @@ -52,4 +53,12 @@ do_build() { # Configure root filesystem sudo install -m 755 ${WORKDIR}/configscript.sh ${S} sudo chroot ${S} /configscript.sh ${DISTRO_ARCH} + + # Create SDK archive + sudo umount ${S}/dev ${S}/proc + sudo tar -C ${WORKDIR} --transform="s|^rootfs|sdk-${DISTRO}-${DISTRO_ARCH}|" \ + -c rootfs | xz -T0 > ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz + + # Install deployment link for local use + ln -Tfsr ${S} ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH} } -- 2.16.4