From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6579174846558633984 X-Received: by 2002:a2e:3203:: with SMTP id y3-v6mr225315ljy.4.1531860467705; Tue, 17 Jul 2018 13:47:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:9888:: with SMTP id a130-v6ls82740lfe.0.gmail; Tue, 17 Jul 2018 13:47:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUtgXR+lUjB9yszip8BDqjkk7eEL3UT92G7iU5BuE/gHmMDFMyCNF1DwaR8S8XZOhCExaZ X-Received: by 2002:a19:d825:: with SMTP id p37-v6mr171760lfg.15.1531860467158; Tue, 17 Jul 2018 13:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531860467; cv=none; d=google.com; s=arc-20160816; b=EcPamDdH8vMrKN1YnYD4al4ks0OMHaGp62ynWQ6RdYAaVqM5vGjAmFvAqfq7CEiId6 3lfuK22uTm7VAzMIiVu+zgtSZTuf5c5x/uiQyEqhjBqVQB8iQYpR64pK5NZq7VzswP2f Z2r5nbp22nyUKMT7Q065uwSkjsjh6Qg2zVnpC4UvfNF7ZcNiqTs4SJToM6Gikn0C0kKl 5vNZOmX6oIBHA9lvk449hMw8BQDYVQzKnJzYHGCanlKkzuxCI0mx0C69xdeq/OtL7W/w vTsNSWA2cMDHm/+44OAS06STAc2nOx2J/x3wuAhWyEixgd1sBu78O+phAWV4vn3kN0dJ 9c2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:subject:user-agent :references:in-reply-to:message-id:date:to:from :arc-authentication-results; bh=SiiIMxizafHa6z3wfMm+rsz1jBgDfbRL4/TMkHH2G/k=; b=TSEWLGTo69fX3aErOiExHpySgTDAw6lYav3K8mzfwN4EGcjoLR/5s7nHEJWj9Itznd KuwbmnuyrvTAZZ6mbn3k2niosiY0p1jnKyB27DT23ToKIKE4nRP6/jsrQR7vwxgd5bvX 9Trt32kdatpj2du+cOWT5T1QUNTcI/55jWbachtteH5WWvASqPOfdb7mXI3HHLqDKmGR qpiaZmZHFqi5rKJ20/pATRdoNRIcOsAwKysEGba6hfykxkhzL3BvVOG/O+0EmmUjrHel 34FEkN56YMKvPVTgZST81MwPweqnzlQnWHkbe01NjLDStmWAiUpe3oxsOFPCcVkrmTNV MclA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id u1-v6si77714lfc.0.2018.07.17.13.47.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 13:47:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [192.168.2.18] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w6HKlhaV026036; Tue, 17 Jul 2018 22:47:45 +0200 From: Alexander Smirnov To: Jan Kiszka , Date: Tue, 17 Jul 2018 23:48:12 +0300 Message-ID: <164aa001af8.27ac.034a6b0541ed39b7fb4e17f4ac219eaa@ilbers.de> In-Reply-To: <1ed1ad84-acaf-1aa9-0ac7-f2f1353670ab@siemens.com> References: <20180717131811.14239-1-asmirnov@ilbers.de> <5c45490f-9dce-b43a-14b3-8347931c40ef@siemens.com> <507beff8-3503-22a9-c3f6-0a01f3f7a132@ilbers.de> <1ed1ad84-acaf-1aa9-0ac7-f2f1353670ab@siemens.com> User-Agent: AquaMail/1.15.0-916 (build: 101500003) Subject: Re: [PATCH v3 0/7] Isar cross-compilation support MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Transfer-Encoding: 8bit X-TUID: 21hpNHihaUgl Jan Kiszka 17 июля 2018 г. 22:45:11 написал: > On 2018-07-17 17:41, Alexander Smirnov wrote: >> >> >> On 07/17/2018 04:38 PM, Jan Kiszka wrote: >>> On 2018-07-17 15:18, Alexander Smirnov wrote: >>>> Hi everybody, >>>> >>>> sorry for the delay, this is the third version of cross-compilation >>>> support for Isar. >>> >>> Thanks for the update! >>> >>>> Supported targets for cross-compilation: >>>> - stretch armhf >>>> - stretch amd64 >>>> >>>> Artifacts could be cross-compiled: >>>> - dpkg.bbclass users >>>> - dpkg-raw.bbclass users >>>> - kernel >>>> >>>> Known issues: >>>> - if target and host architectures are the same, there is no need >>>> to use host buildchroot. >>>> - kernel module doesn't support cross-compilation. Default >>>> linux-headers >>>> package depends from target gcc binaries. So attempt to install, for >>>> example linux-headers-armmp, tries to install gcc:armhf, what rises >>>> conflict with the host tools. >>> >>> Could you imagine overriding such specialties with extra rules, even if >>> package specific? Not having kernel module in the cross compilation >>> chain main cause troubles (or does it work fine to cross-build the >>> kernel and then natively build the modules?). >> >> What I'd like to try: >> 1. Add ARM defconfig for linux-cip >> 2. Try to build example module for linux-cip for armhf >> >> Regarding overriding default Debian kernel, ATM I don't see any >> possibilities. Just as an exercise - I tried to install >> linux-headers-armmp: >> >> $ sudo dpkg --add-architecture armhf >> $ sudo apt-get update >> $ sudo apt-get install linux-headers-armmp >> >> No chances here, this package pulls lots of armhf binaries that conflict >> with the host ones. The only way I see now is to manually fetch and >> unpack this package. But it's an ugly hack IMHO :-( > > But maybe we can resolve that issue for self-built kernel by providing > also a compatible headers package? I need to investigate this topic in more details. > > >> >> Regarding hybrid mode (apps and kernel are compiled cross, modules are >> compiled natively) - this works. You could check this by trying >> cross-build for qemuarm-stretch, for example. > > I suppose to opt-out a package from cross-building, I need to add > ISAR_CROSS_COMPILE = "0" to its recipe, right? Currently trying... no: Hmm, actually it should. That's how I disable cross-comp for kernel modules. Could you try more strength assignment := ? > > | Broken jailhouse-build-deps:arm64 Depends on > linux-headers-jailhouse-arm64:arm64 < none @un H > > | Removing jailhouse-build-deps:arm64 because I can't find > linux-headers-jailhouse-arm64:arm64 > > The problem seems to be that the header package is generate as :amd64, > so I can't install it into the arm64 buildchroot. However, the cross > build also fails because it searches for :arm64 as well: > > | Broken jailhouse-cross-build-deps:arm64 Depends on > linux-headers-jailhouse-arm64:arm64 < none @un H > > | Removing jailhouse-cross-build-deps:arm64 because I can't find > linux-headers-jailhouse-arm64:arm64 > > By requesting :amd64 versions of the header as well as some python deps, > I'm getting further and then fail differently: > > | dpkg-architecture: warning: specified GNU system type > aarch64-linux-gnu does not match CC system type x86_64-linux-gnu, try > setting a correct CC environment variable > | dpkg-source --before-build git > | dpkg-buildpackage: info: host architecture arm64 > | dpkg-checkbuilddeps: error: Unmet build dependencies: python-pip:amd64 > python-setuptools:amd64 python-mako:amd64 > > "host architecture arm64", that is suspicious... > > > And then python - I'm still facing that issue with another package as well: > > | Setting up python2.7-minimal:arm64 (2.7.13-2+deb9u2) ... > | /var/lib/dpkg/info/python2.7-minimal.postinst: 42: > /var/lib/dpkg/info/python2.7-minimal.postinst: python2.7: not found > | dpkg: error processing package python2.7-minimal:arm64 (--configure): > | subprocess installed post-installation script returned error exit > status 127 > | dpkg: dependency problems prevent configuration of python-minimal:arm64: > | python-minimal:arm64 depends on python2.7-minimal (>= 2.7.13-1~); > however: > | Package python2.7-minimal:arm64 is not configured yet. > | > | dpkg: error processing package python-minimal:arm64 (--configure): > | dependency problems - leaving unconfigured > | Errors were encountered while processing: > | python2.7-minimal:arm64 > | python-minimal:arm64 > | E: Sub-process /usr/bin/dpkg returned an error code (1) > > Corresponding build dependencies there: > Build-Depends: wget, cpio, unzip, rsync, python, bc > > Here I get my job done by hacking it this way: > Build-Depends: wget, cpio, unzip, rsync, python:amd64, bc Is it possible to reproduce these results on my machine? I.e. are these artifacts available in public? In my series I only guarantee that isar tree is buildable, but unfortunately it doesn't cover all the possible cases. :-( As mention above, we definetely need to add ARM kernel configs to meta-isar to test real cross-compilation out of the box. Alex > > Jan > > -- > You received this message because you are subscribed to the Google Groups > "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to isar-users+unsubscribe@googlegroups.com. > To post to this group, send email to isar-users@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/isar-users/1ed1ad84-acaf-1aa9-0ac7-f2f1353670ab%40siemens.com. > For more options, visit https://groups.google.com/d/optout.