From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6579174846558633984 X-Received: by 2002:adf:f04d:: with SMTP id t13-v6mr316158wro.10.1531856702272; Tue, 17 Jul 2018 12:45:02 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:9ecf:: with SMTP id h198-v6ls67684wme.6.gmail; Tue, 17 Jul 2018 12:45:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeknuj3mlF8MjO4SSJ+47r6K8mbZ78MjHBOuJAQLLAeRaLjETvzk5NICFil/aNBsChjDNX6 X-Received: by 2002:a7b:c047:: with SMTP id u7-v6mr307315wmc.9.1531856701703; Tue, 17 Jul 2018 12:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531856701; cv=none; d=google.com; s=arc-20160816; b=Tvki8e8ZalW1l59O8gkYaTz32frha7WvlZcmnRM45peRYH7EVHfs3U4beDGLOY+CPi sE8xPi+4hn7yUtWnKKa6F12+ck6Llj2/H32SdsxX+9YLnJU6eC2SN76dazg13Xf4vnzo V+1OJHwyG1m2/LDyrgTmeRmbXQo6xm95HV7oiJp6/MYKgeHnrbSSvwDDPrm6XaRIYzN/ jtGgXZGAqZLlDLWiRN31NSrP6aVmI5EVv3tyVHT5wseXo24nmVOXSuLiQBDCmuMjEdec d1xrrzPfIMpIEziYav2gsMlZryehzGu7cpUe0p4UvEMgzEH4rW7QdjTLzdcaODYOC7/Y Ejmg== 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=mmGosaj3V+H7pQ256CO3R5jJWOS129/8dabBO+Xls8E=; b=WvI3RtpfnkMkGwgceLezp6o8g4BCU21gyxIjlwoumIZnfJdOK8ghxqFlitKcT92voL ajxuzqAPAqKbu8+s6MgfPoCvZfjWm3I4lJZfmVulLFNlHl2n1sp5XvNiTEvGmzMl1u8R 68ZI6oCsd53XbJCkSt9zn3Yg3jzWHrTlSxrXZ22o5rFHxNoka+RhC8+y/miU5MzkxTKK o26jZizTljAgnrSBTTxR2iQPxH5hcdGbUpFFimGu49kq92pMRMybY6Xbsz/KyY0JmzP9 TFfAmzxk//AqrNqEU6OMvlae8IX5qvd5HGXvbaJK2DP/+rJJRDmFuzNMe+sZgxe4iiwT 8DRA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id h6-v6si11985wmb.1.2018.07.17.12.45.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 12:45:01 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id w6HJj1sO022383 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Jul 2018 21:45:01 +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 w6HJj0Ox028636; Tue, 17 Jul 2018 21:45:01 +0200 Subject: Re: [PATCH v3 0/7] Isar cross-compilation support To: Alexander Smirnov , isar-users@googlegroups.com References: <20180717131811.14239-1-asmirnov@ilbers.de> <5c45490f-9dce-b43a-14b3-8347931c40ef@siemens.com> <507beff8-3503-22a9-c3f6-0a01f3f7a132@ilbers.de> From: Jan Kiszka Message-ID: <1ed1ad84-acaf-1aa9-0ac7-f2f1353670ab@siemens.com> Date: Tue, 17 Jul 2018 21:45:00 +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: <507beff8-3503-22a9-c3f6-0a01f3f7a132@ilbers.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: kyKRZ96xzmjP 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? > > 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: | 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 Jan