From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6572049490740510720 X-Received: by 2002:a2e:8345:: with SMTP id l5-v6mr213846ljh.38.1530279112395; Fri, 29 Jun 2018 06:31:52 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:7502:: with SMTP id y2-v6ls1350740lfe.4.gmail; Fri, 29 Jun 2018 06:31:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd7haxXS5Kkarj+jnwgHPRTXjCr0X5ZvuBBxBs3TKSKp+meGLYL0cTua4vC2w3a4Msxy2Lc X-Received: by 2002:a19:cd0b:: with SMTP id d11-v6mr745688lfg.3.1530279111943; Fri, 29 Jun 2018 06:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530279111; cv=none; d=google.com; s=arc-20160816; b=HnOJpQzCYSQBWIzKEaHPW/2jICy+Mw1QPNdz745lvbtTyUxPOXYyYVVDNygkbNGU3P tHyogckczJTQ+YClmJW3QGF9yzFSvDO3IJvnsoLuwWA8RjHMHGUy9KYp5VBMsDMK/16Y OztNLLzlsSsD1x1f13bBB0wM5a/cgJppaDVTB8ZOC+DJSc4z/198vCTiZ+2ZNFdFKDLq cngtCQgTz71XiuoFNPcbyOKjbKBj+crSik4MZbvgZ6+kUK1GmIDEO0laAUZDeg/cT2qj BganufJ3xzm5DqCgI6P100o9kevjCHg5OnkFS8xpcPdOqmaZd4R5/dsvVX5fDoMkeGvS QKeA== 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:subject:cc:to:from:date:arc-authentication-results; bh=EzMH/bvjr5Kfk/2jL+2dxHTZVm9ZA3yZMJ/reS904Bo=; b=I1Q1lSMIxd4tJB+Xm6osD/HmN+wt2sbAjinwkSS5Qp7SjTlaVh7oowK1YhSmrq0yfd N3Fsatgr1irWX5ziKABCkmURVN4DB/iJNkppya8LhcRLLsccadw5x5dCT7/DvUokwfbb Zk/lrFLuge5+ZVLdyWOGrbGic6sOJuq3mgsQ0mIUaFQOX/jN8ok9T5TyCPPxtIZSyR8c RpTsWAjg1Xx48RThbdp0M6RTBV6eBdwU5RRYiznn163Ch6zZMvnq7DUl5LFjYJpHBKBW xdRrcFW21aAMv2LTM2Glk4qaBLpy+fqbToOHWUjeVYexWpHzPrQXMfMOZFix0VI3PV/h 9qLQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id z74-v6si345730lff.3.2018.06.29.06.31.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 06:31:51 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@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 henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w5TDVoTS022873 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jun 2018 15:31:51 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w5TDVo15006103; Fri, 29 Jun 2018 15:31:50 +0200 Date: Fri, 29 Jun 2018 15:31:49 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH v2 00/12] Cross-compilation Message-ID: <20180629153149.0134de8f@md1pvb1c.ad001.siemens.net> In-Reply-To: <20180628082810.3571-1-asmirnov@ilbers.de> References: <20180628082810.3571-1-asmirnov@ilbers.de> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: yn66BcUlp/Sf Am Thu, 28 Jun 2018 10:27:58 +0200 schrieb Alexander Smirnov : > Hi all, > > [NOTE] > Cover letter is too long, so I don't expect that you read it all. > So I'd like to start with this message to avoid possible > question. :-) This series has intersection with SDK one, so it should > be rebased after SDK is applied to next. Thanks! > [/NOTE] [NOTE] Stopped review here, waiting for v3 since SDK has been applied. [/NOTE] Henning > > here is the second version of cross-compilation support. > This version adds support for cross-compiling stretch-armhf target. > > What's new here: > - Build dependencies are resolved automatically, so isar-image-base > could be built using cross-compilation only (libhello, example-hello, > example-raw) > - Linux kernel could be also cross-compiled now for arm > > Test scenarios: > 1. Build isar-image-base: > - Set variable in local.conf ISAR_CROSS_COMPILE to "1" > - Edit recipes: libhello and example-hello and replace > "inherit dpkg" by "inherit dpkg-cross" > - Build using "bitbake multiconfig:qemuarm-stretch:isar-image-base" > - With cross-compilation the image is generated twice faster > > 2. Build arm kernel: > - Set variable in local.conf ISAR_CROSS_COMPILE to "1" > - There is no default arm config, so I derived the one from linux-cip > tree: "zx_config" and add it to recipe > - Build it "bitbake multiconfig:qemuarm-stretch:linux-cip" > - Aftewards I have the following packages: > * linux-image-4.4.112-cip18_4.4.112-cip18-1_armhf.deb > * linux-image-4.4.112-cip18-dbg_4.4.112-cip18-1_armhf.deb > * linux-headers-4.4.112-cip18_4.4.112-cip18-1_armhf.deb > - The compilation tooks me about 2-3 minutes. Much faster than in > QEMU > > Issue: > 1. No support for jessie. The main issue here, that jessie doesn't > have armhf compiler in default apt. Official wiki asks you to use > embian apt to get it > 2. mk-build-deps has two params: --host-arch, --cross-arch. But they > seem to work incorrectly. If set both of them in deps list I got > unexisting packages. Now I use --host-arch only and it works good. I > want to check this in buster and then probably ask Debian community > reagrding this 3. i386 architecture for now is not considered as a > target for cross compilation > 4. Currently libhello and example-hello applications have hardcoded > native compilation (inherit dpkg). This should be reworked to depend > on ISAR_CROSS_COMPILE variable > > Huh, no more ideas, let's start with this. > > Alex > > Alexander Smirnov (12): > isar-bootstrap: Add routine to determine host arch > isar-bootstrap: Move common part to include > isar-bootstrap: Add host architecture support > isar-bootstrap-helper: Add parameter to set arch > buildchroot-cross: Initial implementation > classes/dpkg*: Relocate dependency from buildchroot > classes/dpkg*: Drop hardcoded buildchroot blobs > build.sh: Add target parameter > classes/dpkg-cross: Initial implementation > dpkg: Resolve dep from buildchroot > linux: Add cross-compilation support > local.conf: Add cross-compilation option > > meta-isar/conf/local.conf.sample | 5 + > meta/classes/dpkg-base.bbclass | 33 ++- > meta/classes/dpkg-cross.bbclass | 12 + > meta/classes/dpkg-raw.bbclass | 2 +- > meta/classes/dpkg.bbclass | 4 +- > meta/classes/image.bbclass | 2 +- > meta/classes/isar-bootstrap-helper.bbclass | 19 +- > meta/conf/isar-bitbake.conf | 1 + > .../isar-bootstrap/isar-bootstrap-host.bb | 44 ++++ > .../isar-bootstrap/isar-bootstrap-target.bb | 44 ++++ > meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 259 > --------------------- .../recipes-core/isar-bootstrap/isar-bootstrap.inc > | 223 > ++++++++++++++++++ .../buildchroot/buildchroot-cross.bb > | 57 +++++ meta/recipes-devtools/buildchroot/buildchroot.bb | 2 > +- meta/recipes-devtools/buildchroot/files/build.sh | 17 +- > meta/recipes-kernel/linux/files/build-kernel.sh | 16 ++ > meta/recipes-kernel/linux/linux-custom.inc | 6 +- 17 files > changed, 468 insertions(+), 278 deletions(-) create mode 100644 > meta/classes/dpkg-cross.bbclass create mode 100644 > meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb create mode > 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb > delete mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap.bb > create mode 100644 > meta/recipes-core/isar-bootstrap/isar-bootstrap.inc create mode > 100644 meta/recipes-devtools/buildchroot/buildchroot-cross.bb >