From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6806948680239677440 X-Received: by 2002:adf:f68a:: with SMTP id v10mr17739252wrp.80.1584866244562; Sun, 22 Mar 2020 01:37:24 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f5cc:: with SMTP id k12ls572548wrp.6.gmail; Sun, 22 Mar 2020 01:37:23 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuwXTQwCmcQgxvbjWRh55Ocv8fp+E4DycIzDak/H2kXkH2RdlSTVKWa6UEqG9qSoVAIueie X-Received: by 2002:a5d:498f:: with SMTP id r15mr23489291wrq.81.1584866243862; Sun, 22 Mar 2020 01:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584866243; cv=none; d=google.com; s=arc-20160816; b=hdw8OUWq6/vfutL7zq5YM+raJ0+Y38yDvhGIASWBNsPOMHK5MGqKxTL9yUHVeoPfg7 np/ksK83quvc+igwXsokl2S3GOmxFh/RdIXJP1HxGepIpXGAOZN193eV0JK622KG0JrJ UaQXh3L23iBLuW07mZE8o/akXbdVreNvxeyydm37wXoUii9F0l+RlcKgpC4tcQXgHpIa PJXxlGLWj40xYjwP/tsMCZhhpix3ehq+yytjsbudwaPC8w0Qj0iXP8tzdJifHMuu/l4J pSPwerwsgxidXxH0oazviQLrVF6VB4N/R6Nkoa57S4RLDTKy7wkUvvQQm4yxVzEgwHkQ 8Z3w== 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=HJ0nHMecXhu6NMEXAaYtp9QLzzNl40+XZlRMIgG+FmE=; b=c6qYVpuJWfzZ3/GdPXAtGkWTPkfCl+/XbZIlbiu2xzBxSxLFgqZBbuW7Bksp1EO5m2 z+Nu5MRjJd6EdnjyGnnY4BRZIq82uFX151lAVPJTwr7FgqqINE8mFci2RBs3ozTc/Y/d B3keHX7KPWiEnQvN2T4dws+nc0RZf2v7JZ+zHH7v/G+Y3SdpzA/g1HP6+m4ou128Kxtm iq4RCBptnrXw9we9DBfppPfz72CKI4lPeJSyA9sjYjRXXdVXPSGv8JHu0B3n7KnTmqHq ZCucDcb8+q76S8luVlDyMD4l4TLIyYVWfZ+dUdSIEIc9Sx5ty1qBvXEyfxx++iq0Eo9j /ljw== 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 n9si527253wmi.0.2020.03.22.01.37.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Mar 2020 01:37:23 -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 02M8bN3q015323 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 22 Mar 2020 09:37:23 +0100 Received: from md1f2u6c.ad001.siemens.net ([167.87.6.154]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 02M8bL9a021520; Sun, 22 Mar 2020 09:37:23 +0100 From: Jan Kiszka To: isar-users Cc: Chao Zeng , Le Jin Subject: [PATCH 6/6] sdk: Update README.sdk Date: Sun, 22 Mar 2020 09:37:21 +0100 Message-Id: <9b490304a23f03a2366daeddcdf6a3d668174364.1584866240.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: References: In-Reply-To: References: X-TUID: lV53Mjt3mvnA 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 | 66 +++++++++++------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/meta/recipes-devtools/sdkchroot/files/README.sdk b/meta/recipes-devtools/sdkchroot/files/README.sdk index 9c1af6d3..1b228e4f 100644 --- a/meta/recipes-devtools/sdkchroot/files/README.sdk +++ b/meta/recipes-devtools/sdkchroot/files/README.sdk @@ -1,42 +1,38 @@ -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 + +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