From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6880878174534631424 X-Received: by 2002:a2e:7215:: with SMTP id n21mr1284988ljc.438.1602079296690; Wed, 07 Oct 2020 07:01:36 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:7c08:: with SMTP id x8ls368632ljc.6.gmail; Wed, 07 Oct 2020 07:01:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLckyvSmyRIRCQOqxwFQTER4Wp+yPmpIFhq/gYp8ykdHBywQORNHdod0ZCRJXbEN6UcqDy X-Received: by 2002:a2e:b174:: with SMTP id a20mr1203740ljm.407.1602079293885; Wed, 07 Oct 2020 07:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602079293; cv=none; d=google.com; s=arc-20160816; b=0bzMRWK5SvDqlFQYM9Hv8w406wu8S9QCs5cnkG4BDFkanqMJamNBjK8xoLjCb2Pwl2 f/+xgG2wYwLQFxXGca8X2tHQ9zhKi73CZ79P6LHgsknpnZMpouMY0sBFdk+rgjHDrAuv VpHdrTv6Dm4GIiqSad9CY4eRXf1q1lSEFNsSWq1fCGaZT2uQCxyP7aHOQVqa+gUSxTpJ DL4i7iwnjnrvURBZwFGeuXrNf4cAaeh8D7TUfSYnoENq+5aHnLK7C6JNSeqUfdAvkgU9 5oPIYDUmKy7dr/vtmW5ZVXM6zoQv+51F+DG2kVTlL6EKPEHWw7JPa56XIRejUnTzm4Ge r4TQ== 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:to:from; bh=S/a3MOndWgVxqIvSMX11sqMVlwXDesJB3XTNEsnz3Ng=; b=lnvbHBFskyuue+vNvp+CeK0z+FfNIbIalp8CwSBYfijatnDNaq5UBsmFsrpHuAFFUd 4Bk6E42iup4i3YcdeSgkFzN+lVILK+qfl+Rs/r7f+ppDSYNOw3GHLja9c2CRmSzxxIHV ZGLBcnlAWRKUx2UiAKsVOupD7NDjaCDs3i2cAxTKWWB22kamSa3Otn5YKrWlvDYRnbXB QMff9gV+e21kn1Qm0G6LyOqGWA2QBa6HKGFtzsrzU/X/FKCvcxmaJCzLJsAvmTsi0dAj XRcRY/PLISAT7J01CaKo9Pl0xJk+GVnwQm1fxbw/9J1aVIYgLqKphzK2KbpBJcZ28tIl CIhA== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id f23si68522ljg.8.2020.10.07.07.01.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Oct 2020 07:01:33 -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; 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 thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 097E1WMG017929 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 7 Oct 2020 16:01:33 +0200 Received: from md1f2u6c.ad001.siemens.net ([139.22.113.50]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 097E1Uk9019880 for ; Wed, 7 Oct 2020 16:01:32 +0200 From: Jan Kiszka To: isar-users Subject: [PATCH v4 06/13] sdk: Update README.sdk Date: Wed, 7 Oct 2020 16:01:23 +0200 Message-Id: <6b3b4b469b32c896f029397f6e0d5b7d62fce65e.1602079290.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: 4Fj+PovfM4a3 From: Jan Kiszka Document the out-of-chroot invocation and make it the preferred option. Also remove irrelevant information. Signed-off-by: Jan Kiszka --- .../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.26.2