From patchwork Thu Oct 15 23:18:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 166 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:e04f:0:0:0:0:0 with SMTP id v15csp1127042oos; Fri, 16 Oct 2020 01:18:10 -0700 (PDT) X-Received: by 2002:a1c:e256:: with SMTP id z83mr2429202wmg.37.1602836290312; Fri, 16 Oct 2020 01:18:10 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1602836290; cv=pass; d=google.com; s=arc-20160816; b=lR+txho/OdlzAqew8XgbpoLWJvNuP8uZMBKMI75pCT5+sdZCm4VAYVC7NzumQgwYL1 8/kz0Fc9bd6Z++Bqjg30ZtimmWdD0ag6EzZBINCym0RfblI0LW3OawUr0LBuh7IvBpJz rx9GFeOaLeGS7eshOA/+LWH+Cv5NfwiClGAX/ofxSYQh/MGq3t7N8/aq5L8M/M9S46Uf 2o1bnFd383Po0p6ANPw19LLoSjh+bQsViyfmXM59D6TfP9PZM/t3h4mUEsDNcLT0EiNr TSgSwaRejiqvxBn6D0DVf86vbMbF+2a4agVx9nFzwc+0w71Iv8N6qDnTVHaYfNN6QMYc ngOg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-language:in-reply-to :mime-version:user-agent:date:message-id:references:to:from:subject :sender:dkim-signature; bh=CObOqt4QS+tRs7g/1C0UzrPSAGWlmsW33wMrF1RRvFw=; b=Gp6KyK/OecOHLXtUhr3bSc8Kn0k3rv5dHmFqhnvubEmO/Zs/VHGMuhHWqtle4pXVfd qobmMzagYAnn/r6eXUydlc82wv/MOcWQ1bwu4d5WYDT1h7XhL+pW6915cK3/YS2JaW2e TcvKv/T8/8ghpPFuh03K/wxeRgs0XodWbGoljBEbwf26+aAs8aMOMfvu6mAVavsVlhBr WewvhupK8hrstMQlPID+/v4HApuSn+zbZbgNqJSnOMorjtZtKxhfiwp+YXrqSVJJrbti SjX/QPAOQynOpKzPp+BPIN/+JitJkAubj6c9KT45dcUisyDuNoGkLOK9/gFiBgooz9r+ ipzg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=BZEnHRW8; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbcji7smnv4nbbqnoux6akgqexsgtt6q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCJI7SMNV4NBBQNOUX6AKGQEXSGTT6Q@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id y205sor943745wmg.13.2020.10.16.01.18.09 (Google Transport Security); Fri, 16 Oct 2020 01:18:10 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcji7smnv4nbbqnoux6akgqexsgtt6q@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=BZEnHRW8; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbcji7smnv4nbbqnoux6akgqexsgtt6q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCJI7SMNV4NBBQNOUX6AKGQEXSGTT6Q@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1602836289; cv=pass; d=google.com; s=arc-20160816; b=jC4bJEAw0IO0lSp+JBIRQBdtk2GnQb49D9NGnmQcmieKBup9Is3fOeFRuNEqmtA72T nFrxPxyQJfuBNgOnlHFHkU2kEsUQNhj7xmmix0bq58uwdDP8ZoxEKDKtHj4INjdAjprc XKvV8JESO7dBB505P+EVgUhBEijKcTfjF8IZ5DamFNw50dJugb8B4JER5EMTb8GBLr44 baODbKXvC8Fqtyd1LHTdY59aW1EStQN9IKshxE7yj3NGtrGqDtxWb1nTONIqcKComW5x we1DqZ59fFmx4hyNhZWHMid6hrzoSWSzwqc1UO7CSk12wOTY73/49BK57Mf6U+WP75M0 QQGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-language:in-reply-to :mime-version:user-agent:date:message-id:references:to:from:subject :sender:dkim-signature; bh=CObOqt4QS+tRs7g/1C0UzrPSAGWlmsW33wMrF1RRvFw=; b=yleV4u4Mr5NbdOChxJqgtJ978qpCinbR8cQ5RhOmMtpNA7OSl61pIZYPg5jT7SRSO3 UQ+S7/8SU0MxCrGOmcZrBn9Qkp3SglJvD7z93m0Zrm+KyBhZkDOvdDN0Zj7FJa9kNZn9 oW5vdneg8FuJjLw6nntCSITWazSAkiXPvLoX8Du2fA4mKM9km67lUo3gLQsqYl0DxqmY ef/Ywb3vV1zJ3RyvX3FnDRacdFuVMuxJkeD/SjgZucpH4bS4XDHfvoAACfIoUwNSRBaO NscnAPlj28w6mNCvxMn4HpPOiNXKQLqZZ3HRKyetnLGqlZnY2gO/Vy8RgVCQCxlDrEe/ /SJw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:subject:from:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=CObOqt4QS+tRs7g/1C0UzrPSAGWlmsW33wMrF1RRvFw=; b=BZEnHRW8XY93aEHtjy4CXv9isusW3uPr22yeoAGZ5mo1OR/kGCtRZVE4tga7uAl8rg zISdXcqnyPY21bB/MkthB7ieJefpT/t1dRsR04Jp2oHA3W2uW9gSy0TYKE2iFY4OvchH MVzNsyAqFyXfKsD8unVFSVxuJ6PPdWGnERJh9YptgtQRMOK28+AE7lJzXX1SHjSnCA6R QlDEgqhFMnjzuQwFWqhcTJpseBtWI/Nq2obo07Gr3p2Es7lpcUVvDWBmUTVsx05iHDVX 3UiPTDHE2vgeAzUKK6b0+FhYvpOA1noSfhJTu5hFfNxHkWFXu29Pdfrv7SelZxNJKiI7 3bkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:from:to:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=CObOqt4QS+tRs7g/1C0UzrPSAGWlmsW33wMrF1RRvFw=; b=hTlbd1Rrioro+KkOLxbu+hmVBdvUPS79uPdm01ihhA4rAMhsv+e389A1Skh43NVPCf JCZ5p1NqoBEcTjFYNTZyciNNQNVIPYjlpQ6i0GUZbemiqC6GXTJ1Az+N6FhFI6e3Ca6F fIEX77d4HRkOFyzW2T3Y7xusKiDvnHeY0BEB3zRsQhg9uJHMISftIqisHr9Vb2+BZIy/ OKmNEMaQyC5+/LlxkKntN+WGk85lB7SXWlCJWkxXo0kHEJ02wxS+Q+F77s0KZ8AW/uR2 DNKMuOSdjO5DO881TyYEyTv2EYPBQtlGI8y9BNVymcraUCV7JklxPKGEh0LdemjY2+si HyoA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5311AlRgby4OUSfelbSSl4c9/H/HHJolG1SZJr0k66hsBkVcAYQB m6RrwOqQdsegum0GhetbyI4= X-Google-Smtp-Source: ABdhPJzri1OogBXU3aR+qj+yyRNTP9LyFnUMpNp6669MmLNeBgv77QGgmKynwgOhEyEorQpHtPU3Tg== X-Received: by 2002:a1c:63c3:: with SMTP id x186mr2684319wmb.66.1602836289792; Fri, 16 Oct 2020 01:18:09 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:a544:: with SMTP id j4ls1743828wrb.3.gmail; Fri, 16 Oct 2020 01:18:08 -0700 (PDT) X-Received: by 2002:adf:a51d:: with SMTP id i29mr2539870wrb.409.1602836288849; Fri, 16 Oct 2020 01:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602836288; cv=none; d=google.com; s=arc-20160816; b=gvW/JMFtvozSyFSzYH1fpMllMyYnhHekBBnh5cX8WI5ghPNZD9TJa73dr48/ybaTYF +vOfXSKd7OXM1TYpeFyuOcojMDAmLmNd49LyL103VDTCGoG1c+aiFlrGw7G4FWCuwSCu LDQeiEeGqCMWeQWR1kPoSLAUYVsZrvll2fBc5r5qgzeBANqWMW6tKKMuugklprLaV+6y 28qfwmizYegXCOUoINoJijPuN20EQSK2KNkjaYihYCLEE79evjViY27yNbtBhohRjqSn a2DdWwb4t1iakGpLkf6Ga1aSXMl8FCW48psAcju8f/Yt5BC0Ef6riXy1tML9zS+fxols 9ImA== 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:to:from:subject; bh=qQYZ3n1PKem3sk0rpNpo4FpnadoEzpYd/S0XbYMPiIs=; b=RcyPrNvNl/0K5KQ8Ppx2pV7+B6jX1vG6WwI6RNAKY4Gx83p9mTdtTuiNsVCJBninP8 3B2+kH3uSEdfVGoALrYEm9qqcvOGWJinOIwIJkl/xz+B49Uvr5/W4yIfPNETZVQ644Et VXT4KTjb6RRDSx+4B458SxUT0BRy83pMY+ZUo4k7TMp8H7RwZbOzdYRl3hdDUr41wWi+ +e9Nz+jKuNwzExmaWhHrEo5gtLvfpsvXHIg98VTh2EY/KEp98PIlmqyiKRymDdTGgw6d LU/8BYnYtXvLmZeg9lxH1z7o0X3Btmjl9PuqEnYBSUXDbqE79+ECeQbWn8JWCjHiF9al JmcA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id 14si46928wmf.4.2020.10.16.01.18.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Oct 2020 01:18:08 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; 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 09G8I8CM004330 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 16 Oct 2020 10:18:08 +0200 Received: from [139.22.112.51] ([139.22.112.51]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 09G8I6ti032196 for ; Fri, 16 Oct 2020 10:18:07 +0200 Subject: [PATCH v5 06/13] sdk: Update README.sdk From: Jan Kiszka To: isar-users References: <6b3b4b469b32c896f029397f6e0d5b7d62fce65e.1602079290.git.jan.kiszka@siemens.com> Message-ID: Date: Fri, 16 Oct 2020 10:18:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <6b3b4b469b32c896f029397f6e0d5b7d62fce65e.1602079290.git.jan.kiszka@siemens.com> Content-Language: en-US X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1679901901295426359?= X-GMAIL-MSGID: =?utf-8?q?1680695665895297292?= From: Jan Kiszka Document the out-of-chroot invocation and make it the preferred option. Remove irrelevant information about a toolchain check - it's always there. Append additional information in case the isar-apt is shipped and devel packages are not pre-installed. Signed-off-by: Jan Kiszka --- Partial update only due to the unclear "arm-linux-gnueabihf-gcc" issue, re-adding notes on dependency installations from isar-apt when applicable. .../sdkchroot/files/README.sdk | 71 ++++++++++--------- meta/recipes-devtools/sdkchroot/sdkchroot.bb | 27 +++++++ 2 files changed, 63 insertions(+), 35 deletions(-) diff --git a/meta/recipes-devtools/sdkchroot/files/README.sdk b/meta/recipes-devtools/sdkchroot/files/README.sdk index 9c1af6d3..3e06d8c5 100644 --- a/meta/recipes-devtools/sdkchroot/files/README.sdk +++ b/meta/recipes-devtools/sdkchroot/files/README.sdk @@ -1,42 +1,43 @@ -Building applications for targets in ISAR takes a lot of time as they are built under QEMU. -SDK helps to develop applications for target platform in crossbuild environment. +ISAR Target SDK +=============== -SDK contains cross-toolchain for target architecture and a copy of isar-apt repo with -locally prebuilt target debian packages. +This SDK helps to develop applications for an ISAR target platform in a +crossbuild environment. It contains a cross-toolchain and development packages +corresponding to the original target. - - First one have to mount the system directories for proper operation in chroot environement. -Just call supplied with sdk tarball in udo rootfs as an argument to the script `mount_chroot.sh`: +The SDK can be used in two ways, described in the following. -$ sudo mount_chroot.sh - - chroot to isar SDK rootfs: +Option 1 (recommended): Use cross-compiler in host environment +-------------------------------------------------------------- + +After unpacking the SDK at the desired location, it has to be relocated once: + +$ /relocate-sdk.sh + +Now you can add /usr/bin to the local path or adjust your project +to call the cross-compiler from the SDK. + + +Option 2 (fallback): Build inside chroot +---------------------------------------- + +First you have to mount the system directories for proper operation into the +chroot environment. Call the helper script supplied with SDK tarball: + +$ sudo /mount_chroot.sh + +Bind-mount the project into the rootfs: + +$ sudo mount -o bind /path/to/project /mnt + +If you have relocated the SDK previously for using option 1, you need to call +this next: + +$ /relocate-sdk.sh --restore-chroot + +Then chroot into the SDK rootfs: $ sudo chroot - - Check that cross toolchains are installed - -:~# dpkg -l | grep crossbuild-essential-armhf -ii crossbuild-essential-armhf 12.3 all Informational list of cross-build-essential packages - - - Install needed prebuilt target packages. - -:~# apt-get update -:~# apt-get install libhello-dev:armhf - - - Check the contents of the installed target package - -:~# dpkg -L libhello-dev -/. -/usr -/usr/include -/usr/include/hello.h -/usr/lib -/usr/lib/arm-linux-gnueabihf -/usr/lib/arm-linux-gnueabihf/libhello.a -/usr/lib/arm-linux-gnueabihf/libhello.la -/usr/share -/usr/share/doc -/usr/share/doc/libhello-dev -/usr/share/doc/libhello-dev/changelog.gz -/usr/share/doc/libhello-dev/copyright -~# +Now you can build the project under /mnt. diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb index c96cc772..3c299202 100644 --- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb +++ b/meta/recipes-devtools/sdkchroot/sdkchroot.bb @@ -63,6 +63,33 @@ ROOTFS_POSTPROCESS_COMMAND =+ "sdkchroot_install_files" sdkchroot_install_files() { # Configure root filesystem sudo install -m 644 ${WORKDIR}/README.sdk ${S} + if [ "${SDK_INCLUDE_ISAR_APT}" = "1" ]; then + sudo sh -c "cat <>${S}/README.sdk + +In case build dependencies have not been pre-installed, you need to do that +first, e.g.: + +:~# apt-get update +:~# apt-get install libhello-dev:armhf + +Check the contents of the installed package like this: + +:~# dpkg -L libhello-dev +/. +/usr +/usr/include +/usr/include/hello.h +/usr/lib +/usr/lib/arm-linux-gnueabihf +/usr/lib/arm-linux-gnueabihf/libhello.a +/usr/lib/arm-linux-gnueabihf/libhello.la +/usr/share +/usr/share/doc +/usr/share/doc/libhello-dev +/usr/share/doc/libhello-dev/changelog.gz +/usr/share/doc/libhello-dev/copyright +EOF" + fi sudo install -m 755 ${WORKDIR}/relocate-sdk.sh ${S} sudo install -m 755 ${WORKDIR}/gcc-sysroot-wrapper.sh ${S}/usr/bin sudo install -m 755 ${WORKDIR}/configscript.sh ${S}