From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6594490675806339072 X-Received: by 2002:adf:d08b:: with SMTP id y11-v6mr3077218wrh.7.1536136291015; Wed, 05 Sep 2018 01:31:31 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:7e03:: with SMTP id z3-v6ls325991wmc.4.gmail; Wed, 05 Sep 2018 01:31:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZtrqqZVRV3gWkns4F89VZLm06Z1b1IY8BUSNlXmCM6Pudu3Me98tdKWCITYZBfO4ZTAHqT X-Received: by 2002:a1c:160e:: with SMTP id 14-v6mr1690732wmw.12.1536136290603; Wed, 05 Sep 2018 01:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536136290; cv=none; d=google.com; s=arc-20160816; b=cJcZvMhhnXjKU7vfoShirfqti8gCaJ0YaCWd0i+XyooRKl9uF7HiiNfthjnMrBxGdd xoeC7UTrdRS/bB38Tpkz/hvXnjo6Qu+vY8ahevccZIJuqSzZE85daoNkKhqtdfZEVfrR PDHgEAOb89z4GgCmkZrntE5T2mA0qeeialv6N5wi8Ahbrkv+H8P0ei4e1udU6MiCJNB/ 5b7rMaSG+TibFExlB4wpu49sH9xRis1ETAvL6RO93V/fNvddMMqyZwsT4gYIN0/xuJ0X 6wkuNu2d+2dVY3rSQDz9rPDgAlRMl/6HjvW2ixC5BH/OU7Pm1+HyQ/2xO1rqSzTY3v62 lZvA== 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:organization:from:references:cc:to :subject; bh=0gMiHuU+Kuvlogtb5CVZhlQ1wimhnqiY9MkvET5uk2Y=; b=xGfwbDRhcHfvpukWenN60F7RNWe93KvnPYEu4mfUWKmfrFiYeWwU2uFTJ2Ykyag3oL q4nAlvCqM/7OyRmwb+O/7RwCCakqc2rSj3qutrcpAXMwdIOk5+x+qReeoTDwaPZQhL7g BUN5LPXqIfR2tfXDugN7NtGnUzp1mUUzgwDRqStALnnT6u417LjRfT47RNo+/OdbOoyG Cth1mm62KZs3SsgM+s6B5Avq0vqW373mZSpFcgDnHPQLfQkdI39ENDaV/pw9IMWz2rU9 wZc/wMTsfANU1slpBIMyG6pVFZ0woBKoUeYTQ/9hD8ghwFk0vGoGeI7aD7PhYyKlhHGa uWoA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id a8-v6si44434wro.0.2018.09.05.01.31.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 01:31:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of mosipov@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 mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.180] (d51A48A80.access.telenet.be [81.164.138.128]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w858VLhH011921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 5 Sep 2018 10:31:22 +0200 Subject: Re: crossbuild broken with host-distro != target-distro To: Jan Kiszka , Alexander Smirnov Cc: isar-users References: <7074054d-bb57-dc87-5bb4-f74eca265c51@siemens.com> <1f9a5d5c-ffcf-1a3f-1edf-d60bf653e651@siemens.com> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: Date: Wed, 5 Sep 2018 10:31:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1f9a5d5c-ffcf-1a3f-1edf-d60bf653e651@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: ehRdtib0VbXh Hi Jan, On 08/30/2018 11:24 AM, Jan Kiszka wrote: > On 2018-08-27 21:51, [ext] Jan Kiszka wrote: >> Hi folks, >> >> I ran into a remaining glitch for the crossbuild support: When the >> target distro name differs from the host distro, buildchroot-host fails. >> >> That initially looked like it would be easy to fix and even made sense >> for a while: >> >> diff --git a/meta/recipes-devtools/buildchroot/buildchroot-host.bb >> b/meta/recipes-devtools/buildchroot/buildchroot-host.bb >> index daf92a2..01d426d 100644 >> --- a/meta/recipes-devtools/buildchroot/buildchroot-host.bb >> +++ b/meta/recipes-devtools/buildchroot/buildchroot-host.bb >> @@ -30,5 +30,5 @@ BUILDCHROOT_PREINSTALL_append_arm64 += >> "binutils-aarch64-linux-gnu \ >>                                           crossbuild-essential-arm64" >> -PARAMS = "--host-arch" >> +PARAMS = "--host-arch --host-distro" >>   do_build[depends] = "isar-apt:do_cache_config >> isar-bootstrap-host:do_bootstrap" >> >> >> However, that only broke setup_root_file_system differently because it >> now tried to mount the non-existing host isar-apt repo. Workaround hack: >> >> diff --git a/meta/classes/isar-bootstrap-helper.bbclass >> b/meta/classes/isar-bootstrap-helper.bbclass >> index d45cdd7..4ad552f 100644 >> --- a/meta/classes/isar-bootstrap-helper.bbclass >> +++ b/meta/classes/isar-bootstrap-helper.bbclass >> @@ -93,9 +93,9 @@ setup_root_file_system() { >>           sudo tee "$ROOTFSDIR/etc/apt/preferences.d/isar" >/dev/null >>       if [ ${COPYISARAPT} ]; then >> -        sudo cp -Trpfx ${DEPLOY_DIR_APT}/${ROOTFS_DISTRO} >> $ROOTFSDIR/isar-apt >> +        sudo cp -Trpfx ${DEPLOY_DIR_APT}/${DISTRO} $ROOTFSDIR/isar-apt >>       else >> -        sudo mount --bind ${DEPLOY_DIR_APT}/${ROOTFS_DISTRO} >> $ROOTFSDIR/isar-apt >> +        sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} >> $ROOTFSDIR/isar-apt >>       fi >>       sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs $ROOTFSDIR/dev >>       sudo mount -t proc none $ROOTFSDIR/proc >> >> >> That will likely break sdkchroot, the only recipe that depends on >> isar-apt-host, so far the only caller of setup_root_file_system that >> passed --host-distro. But I'm not getting yet why the SDK has some own >> isar-apt repo and no one else. Can you clarify and maybe even explain >> how to fix the issue best? The initial idea is that sdk may be distributed to other hosts - so we need to copy local isar-apt to sdk chroot. Actually copying of isar-apt here is redundant, as the same is done later in do_populate_sdk to get all latest prebuilt packages for target distro. >> Thanks, >> Jan >> > > Could you comment on this bug? It's a blocker here. I'm OK with your patch - it's reasonable. I've throughly tested it together with my v2 sdk: Move deployment to populate_sdk. Just sent a v2 series. Kind regards, Maxim. -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov