From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6579174846558633984 X-Received: by 2002:a1c:168d:: with SMTP id 135-v6mr317914wmw.1.1531856884310; Tue, 17 Jul 2018 12:48:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:b641:: with SMTP id i1-v6ls627264wre.14.gmail; Tue, 17 Jul 2018 12:48:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeM5EBT2nskQP/4of0YNZqP6bSgjHs8G1W1ZNDEklYaHPsurtvsPa3YDGliF+Bi8CwhpX1h X-Received: by 2002:adf:9c8a:: with SMTP id d10-v6mr323080wre.4.1531856883815; Tue, 17 Jul 2018 12:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531856883; cv=none; d=google.com; s=arc-20160816; b=vwCi2lpJ68RZnZNcrrg7AOS4oEhCDy5E3LuXyYri5yc7jP+CfvRt3is2NWWyQ+b0sw P/rpzfiTMMgWr4knu/WFvHS5p3FYRgXgsI/JGP+27Z9vWTHrfzXIRuWeQQ/7m+0LKLOe U779rjcKjSYsfo3TD11CkmQjh1mASa/HY7uiRszhNMaLXlZVTtDlOdp1+t7nKilTfuRM sZK9mQ4pKboUCeRF1TPEbFkdsAcfQmCRPUfi3z/lq8YQ+ChGrTltkUM2poxEPJHH7P1Z 7eHdr0R9mIr6aAz/I42PY0ldLV5DwUvhyDWMHJyNAr0kV/tBz1LC4f/xjnpdbab1V9ai 6YPQ== 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:from:references:to:subject :arc-authentication-results; bh=qVBwKmtPQv7BthxzaVpouoKRhC8Yz+SDGL353LbHlAo=; b=ZcYFNR7Y3+SQAp1s2TRLBw1TdoTMix/h9NAYeEKQJM8ll5KBrzi381PHCUc+8nh7yK jyyDWDUR1eHhEG+jp1Yuu7o4PrFk+AYzYl/C10qB4Qfbx4MIT3hOLErm1vEhncvCJP18 PcjVMiLseGe5jsOW9SK6t6YmhxBDpashPUm18KusdV9Q4neZOQQJATHS4aXFOL97nKra vo09VbIr3Fto4wFSfh6+Iju1xtOrmCj6dVzlHdHN20bLN9b35+EP4VyC/CafHnxpsCje cKnfC0WzoCGpsAWvMAJeh9Tddobq28Gm0dIPJEEKddLAFVAT5JPa/lCh0W1v3XtwnFy/ cGWg== 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 Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id h6-v6si12168wmb.1.2018.07.17.12.48.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 12:48:03 -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; 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 Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w6HJm3VM006467 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Jul 2018 21:48:03 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w6HJm34j002651; Tue, 17 Jul 2018 21:48:03 +0200 Subject: Re: [PATCH v3 3/7] buildchroot: Add host buildchroot To: Alexander Smirnov , isar-users@googlegroups.com References: <20180717131811.14239-1-asmirnov@ilbers.de> <20180717131811.14239-4-asmirnov@ilbers.de> From: Jan Kiszka Message-ID: <3f4bc43c-105d-af9f-e44a-0e6bfbf9b10b@siemens.com> Date: Tue, 17 Jul 2018 21:48:02 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180717131811.14239-4-asmirnov@ilbers.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: hEDGj02/rTH5 On 2018-07-17 15:18, Alexander Smirnov wrote: > Add buildchroot for host architecture. > > Signed-off-by: Alexander Smirnov > --- > meta/conf/isar-bitbake.conf | 1 + > .../buildchroot/buildchroot-host.bb | 31 ++++++++++++++++++++++ > 2 files changed, 32 insertions(+) > create mode 100644 meta/recipes-devtools/buildchroot/buildchroot-host.bb > > diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf > index aaba96e..666c4a3 100644 > --- a/meta/conf/isar-bitbake.conf > +++ b/meta/conf/isar-bitbake.conf > @@ -21,6 +21,7 @@ > WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}" > DL_DIR = "${TOPDIR}/downloads" > SSTATE_DIR ?= "${TMPDIR}/sstate-cache" > +BUILDCHROOT_HOST_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-host/rootfs" > BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target/rootfs" > CACHE = "${TMPDIR}/cache" > > diff --git a/meta/recipes-devtools/buildchroot/buildchroot-host.bb b/meta/recipes-devtools/buildchroot/buildchroot-host.bb > new file mode 100644 > index 0000000..20b1e79 > --- /dev/null > +++ b/meta/recipes-devtools/buildchroot/buildchroot-host.bb > @@ -0,0 +1,31 @@ > +# Root filesystem for packages building > +# > +# This software is a part of ISAR. > +# Copyright (C) 2015-2018 ilbers GmbH > + > +DESCRIPTION = "Isar development filesystem for host" > + > +include buildchroot.inc > + > +BUILDCHROOT_PREINSTALL ?= "make \ > + debhelper \ > + autotools-dev \ > + dpkg \ > + locales \ > + docbook-to-man \ > + apt \ > + automake \ > + devscripts \ > + equivs \ > + libc6:${DISTRO_ARCH}" > + > +# Please note: this works for Stretch distro only. According to the wiki page: > +# https://wiki.debian.org/CrossToolchains > +# Jessie doesn't contain toolchain. It should be fetched from the external > +# repository: > +# http://emdebian.org/tools/debian/ > +BUILDCHROOT_PREINSTALL_append_armhf += "binutils-arm-linux-gnueabihf \ > + crossbuild-essential-armhf" Indention is a bit off. Here is the ARM64 addon that builds the kernel: diff --git a/meta/recipes-devtools/buildchroot/buildchroot-host.bb b/meta/recipes-devtools/buildchroot/buildchroot-host.bb index 20b1e79..c8d8373 100644 --- a/meta/recipes-devtools/buildchroot/buildchroot-host.bb +++ b/meta/recipes-devtools/buildchroot/buildchroot-host.bb @@ -26,6 +26,8 @@ BUILDCHROOT_PREINSTALL ?= "make \ # http://emdebian.org/tools/debian/ BUILDCHROOT_PREINSTALL_append_armhf += "binutils-arm-linux-gnueabihf \ crossbuild-essential-armhf" +BUILDCHROOT_PREINSTALL_append_arm64 += "binutils-aarch64-linux-gnu \ + crossbuild-essential-arm64" PARAMS = "--host-arch" do_build[depends] = "isar-apt:do_cache_config isar-bootstrap-host:do_bootstrap" diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh index ecfbf83..ca2c7b2 100644 --- a/meta/recipes-kernel/linux/files/build-kernel.sh +++ b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -18,6 +18,10 @@ if [ "$host_arch" != "$target_arch" ]; then export ARCH=arm export CROSS_COMPILE="arm-linux-gnueabihf-" ;; + arm64) + export ARCH=arm64 + export CROSS_COMPILE="aarch64-linux-gnu-" + ;; *) echo "error: unsupported architecture ($target_arch)" exit 1 > + > +PARAMS = "--host-arch" > +do_build[depends] = "isar-apt:do_cache_config isar-bootstrap-host:do_bootstrap" > Jan