From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6806948680239677440 X-Received: by 2002:a5d:4984:: with SMTP id r4mr4503769wrq.121.1585394701208; Sat, 28 Mar 2020 04:25:01 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:afd4:: with SMTP id y20ls1423003wrd.5.gmail; Sat, 28 Mar 2020 04:25:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsgi7cI2qsuMpCeTxNnrOkKDktUf9exaDW6NrZn9dV5ZZIYNBM3TL+X9NNaZ3mfV1VQwyqQ X-Received: by 2002:a5d:6109:: with SMTP id v9mr4607886wrt.203.1585394700593; Sat, 28 Mar 2020 04:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585394700; cv=none; d=google.com; s=arc-20160816; b=dTuUY7LPZem4ubFQIRkRqOvfdpnjbjfABYnBF4dLs4YMZJ4mYxiyuutfeY9ApOmfAR en7Bsp7nkwNY696Gmy57BEYqZ8swNUmnM8SA0KGbXdoi/hNE9HNsBGkq8r2wuCoJXYyI YdYBa/aXJtTfXQBrBVQhCEF4OZo+ajdboFBTZMN3s9g4GC4mQSUU5GuWs/dXTyoPmpw4 6nFoxwXqRSPxhwPxmh9TeDvwBnzLM3PqEjp82bIZE51zY2jdfAJfDl2URME2ffUtG0/L l6VQ5z1ClIq7TEqTxMJTtHkyY5IX+8k1mYfdHjypdAWt8uswPjBCtVOtz8DEVDTiGzVe wbaQ== 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:cc:to:from; bh=7kadCAf7QX2ZD+PLh4r2eiECMiMOtd4ImZdQavWzmVk=; b=SoIz2u2ECg8fPBxwlEFVyjOXpUN5q5wSdFxje5iJlEdWMh+JZLpdnp95td/8SQ7bpt pWUHJ+L07wzIm7IwOHpUrPFrflVbSPRiYMyCaXa129VY5QBJcJsYKRsUsYFL6jZUNloy qzqfIRB8itwOUuY8lxHWTq7tyj6U/mkElAc8oKHgm4QlSt8AgfH+6SCUzYIP9ImR7ZnR V4Z3nbEe+fccRnFZf0Nbz5bY2+m8N1sSVclxnN93zvdkPwsa3kN6ZeZqoHclPWU85VBE gch9TTk5eS1RBhJvJoodKtJXybUYbdVaKxKan/HJyyIu8KATXB9azGvnSZLskjVDQj3y piMg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 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 david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id d16si354753wrv.4.2020.03.28.04.25.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2020 04:25:00 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 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 david.siemens.de (8.15.2/8.15.2) with ESMTPS id 02SBOxGQ001195 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 12:24:59 +0100 Received: from md1f2u6c.ad001.siemens.net ([167.87.129.190]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 02SBOlvt027066; Sat, 28 Mar 2020 12:24:58 +0100 From: Jan Kiszka To: isar-users Cc: Chao Zeng , Le Jin , Christopher Larson Subject: [PATCH v2 6/6] sdk: Update README.sdk Date: Sat, 28 Mar 2020 12:24:46 +0100 Message-Id: X-Mailer: git-send-email 2.16.4 In-Reply-To: References: In-Reply-To: References: X-TUID: J4mcC6rD62Q/ From: Jan Kiszka Document the out-of-chroot invocation and make it the preferred option. Also remove irrelevant information. Signed-off-by: Jan Kiszka --- meta/recipes-devtools/sdkchroot/files/README.sdk | 71 ++++++++++++------------ 1 file changed, 36 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. -- 2.16.4