public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 00/12] Cross-compilation
Date: Fri, 29 Jun 2018 15:31:49 +0200	[thread overview]
Message-ID: <20180629153149.0134de8f@md1pvb1c.ad001.siemens.net> (raw)
In-Reply-To: <20180628082810.3571-1-asmirnov@ilbers.de>

Am Thu, 28 Jun 2018 10:27:58 +0200
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> 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
> 


  parent reply	other threads:[~2018-06-29 13:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28  8:27 Alexander Smirnov
2018-06-28  8:27 ` [PATCH v2 01/12] isar-bootstrap: Add routine to determine host arch Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 02/12] isar-bootstrap: Move common part to include Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 03/12] isar-bootstrap: Add host architecture support Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 04/12] isar-bootstrap-helper: Add parameter to set arch Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 05/12] buildchroot-cross: Initial implementation Alexander Smirnov
2018-06-29 17:36   ` Jan Kiszka
2018-07-04 19:56     ` Alexander Smirnov
2018-07-04 20:05       ` Jan Kiszka
2018-06-28  8:28 ` [PATCH v2 06/12] classes/dpkg*: Relocate dependency from buildchroot Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 07/12] classes/dpkg*: Drop hardcoded buildchroot blobs Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 08/12] build.sh: Add target parameter Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 09/12] classes/dpkg-cross: Initial implementation Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 10/12] dpkg: Resolve dep from buildchroot Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 11/12] linux: Add cross-compilation support Alexander Smirnov
2018-06-28  8:28 ` [PATCH v2 12/12] local.conf: Add cross-compilation option Alexander Smirnov
2018-06-29 13:31 ` Henning Schild [this message]
2018-06-29 18:28 ` [PATCH v2 00/12] Cross-compilation Jan Kiszka
2018-06-30  9:05   ` Jan Kiszka
2018-07-04 19:40   ` Alexander Smirnov
2018-07-04 20:03     ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180629153149.0134de8f@md1pvb1c.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox