From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6875334414772994048 X-Received: by 2002:a19:e602:: with SMTP id d2mr2065584lfh.514.1600788541675; Tue, 22 Sep 2020 08:29:01 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:544e:: with SMTP id d14ls376308lfn.2.gmail; Tue, 22 Sep 2020 08:29:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFXaXnUrrPm2CKM8IPhuCHEs7MNAGTLw4Gc12bZEOnF0tBWgegC5qEsvK5dSwVG7YxDbd7 X-Received: by 2002:a19:4c87:: with SMTP id z129mr1897744lfa.189.1600788540563; Tue, 22 Sep 2020 08:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600788540; cv=none; d=google.com; s=arc-20160816; b=ovi9yg+IftYRXgLbqS+KJ+7MyWSKMJKWEu4lBbbGhY3ARzIAOHmFoAsh+WOKlvAQBT IAEkZgOEf+JfnN5FXAfUgh8vLL8hJJxrDa3t3uzn/zsd5Fe13s/llBxFk/+h/dtkWV/D 1KsouWf9aQb+jkK83ry/EFxcHPpwXmRlCn7NpEZsm9PrZc5VjgcgwKG99oJxl+OLsR2m LUgfnN9tyrw7OeeEh/ppPprJYikpwx6l/3kJomSDxtsvGq3m4wwYl4LYEyBML8pKYRze AJ0dcLjJUcdZITv5AJCzvYQ4leJFX+w5mkK/Hn9nHdZVaZjPk6DSWrzWOQ939GDtX+tK 8Blw== 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=Wf7gm+oivgxuRM/W7xHEBvxDF6l1LOXzRTDfmh487dhkRU1ifxOvH9/IwZiTIruq/n Z5GdR0KnBVE6vIvdK2/rJlMJlgnaQ3Ku9vwSA16ZaKUsz3E/fpN87qRIT9etewWA4dee Qrrso0QDaQGAMAIBSKIYlAgIvHDyZz3VRaBtCqi/hrdgdbkqvQDJzZFNwZcryMUN5fMa iicm279zQ0TJcpFd6iNVfZXunSbZNCWRQimU8TsCbWq7vijJkPrKwjPGSKk/f5VPrJ6X eowhTqiMRmduJdSvNJ4CCL8ymESrq0MuuOrPS/k1B/mLtaHCFd2NmNItZA9x7c9l2njl kF6w== 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 h22si417565ljh.7.2020.09.22.08.28.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 08:28:59 -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 08MFSw8w027300 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 22 Sep 2020 17:28:58 +0200 Received: from md1f2u6c.ad001.siemens.net ([139.22.130.132]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 08MFSsVE031723 for ; Tue, 22 Sep 2020 17:28:58 +0200 From: Jan Kiszka To: isar-users Subject: [PATCH v3 11/16] sdk: Update README.sdk Date: Tue, 22 Sep 2020 17:28:49 +0200 Message-Id: <11551cdba375ebeef9fda6523c62387bdd60826a.1600788534.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: QAxzZp1u/N7P 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