From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7142858516907163648 X-Received: by 2002:adf:dbc3:0:b0:22a:d393:bd84 with SMTP id e3-20020adfdbc3000000b0022ad393bd84mr10482043wrj.626.1663586454711; Mon, 19 Sep 2022 04:20:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:c395:0:b0:3b4:9792:b16c with SMTP id s21-20020a7bc395000000b003b49792b16cls1779136wmj.2.-pod-prod-gmail; Mon, 19 Sep 2022 04:20:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64bMg5kMozGXU1bI+bQ9lTqpj2fPw/xA1ilUhQas17wk3MnepYpBTd2YBeB9MCaGvmNmb3 X-Received: by 2002:a05:600c:500c:b0:3b4:92e4:c77c with SMTP id n12-20020a05600c500c00b003b492e4c77cmr11951096wmr.41.1663586453442; Mon, 19 Sep 2022 04:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663586453; cv=none; d=google.com; s=arc-20160816; b=wkBDjW/IChPlzFL/KcEDCrDY/gxFE2LxROOlK1xGxa0UzYZo4s+nK21loWbaUDNdLy AIjBWIf3ZQNUTq0eu3uDDRmmeEz5HUup7AKE4LlnVohjJEB1ZwNHwxaBPK//IZdvh6dq vwId6CZBAaDy3XU7S4GJyLYyImpdtxX9ST7B6cnujrFUvRpJEGxmdOnl35PZtdjv0NyR rzb60PJZqoI9lhSS4KscOUNvQX5WcSRHBJrxsfQF3JgDhrlrwejcmQoBH8VqTxQl5wUL XjCTvMLPA2VAGevuHbPgjrZkUluYqtXXqXczcC6EltYXYOX0S2qS1dt0T1bKwTZFg0Ga qCYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=nScJzCdFib1GDTDcpNHUtMmRyWoEw1cYxvDuSoTSu78=; b=ehIClEb2DrbKQOA6yLqv7mCwL6mGG+WlKl5e/6pGIINVnt2hB0x1LON3z33b4I91DR IiVVRK0dxaj1vdnEWYQPrOOL5fOFHOr3xhfGtjYKAlzgGmLtK2QX9VhGJ5rJ8S5tFJca 2SYmNNxZKZVyIphUvOUAl1JjS0RmBTXyxCwsV3cAzxS6TVcrnokdfhKN44H6ax0Ekrbs IAwDQS+NlNcDxCLu3waGxSpRfZ2z87BM0yzVRf9J70zV4qxHwbZBWiC8slrFdIFLYa/0 05GBZjhJB/YnK8wrPrxbXyqFrAw5vDwMXRDaYaplffTCU4dPmPQ8bRcRcLVFjgEy4LOI pEjQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=jisAWmhu; spf=pass (google.com: domain of fm-72506-20220919112053d122306753d3b6a47c-v1rc71@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-72506-20220919112053d122306753d3b6a47c-v1RC71@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id l6-20020a1c2506000000b003a6787eaf57si274018wml.2.2022.09.19.04.20.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2022 04:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-72506-20220919112053d122306753d3b6a47c-v1rc71@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=jisAWmhu; spf=pass (google.com: domain of fm-72506-20220919112053d122306753d3b6a47c-v1rc71@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-72506-20220919112053d122306753d3b6a47c-v1RC71@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20220919112053d122306753d3b6a47c for ; Mon, 19 Sep 2022 13:20:53 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=felix.moessbauer@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=nScJzCdFib1GDTDcpNHUtMmRyWoEw1cYxvDuSoTSu78=; b=jisAWmhuGsH5nTs8asEIzBmMfqJoj6ieQzrdWThBqjLxXhSP90o/pcGsYetKFvE95pBEJS ks3uvFzfKCRWgyvE5mtLyUQALwzm3MYqvT2659hluFt10PprSw1uApIonBfNDcr4+7y+EK7N GaFTKYBkZ0htxIarEO5SBRKQdPmKw=; From: Felix Moessbauer To: isar-users@googlegroups.com Cc: henning.schild@siemens.com, adriaan.schmidt@siemens.com, jan.kiszka@siemens.com, ibr@ilbers.de, amikan@ilbers.de, Felix Moessbauer Subject: [PATCH v5 2/5] run imager in buildchroot-host on cross Date: Mon, 19 Sep 2022 13:20:32 +0200 Message-Id: <20220919112035.830233-3-felix.moessbauer@siemens.com> In-Reply-To: <20220919112035.830233-1-felix.moessbauer@siemens.com> References: <20220919112035.830233-1-felix.moessbauer@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-72506:519-21489:flowmailer X-TUID: pG3JCf0Nnpdm When globally enabling ISAR_CROSS_COMPILE, the imager and compression tasks run in the host buildchroot as well (instead of the target buildchroot). Similar to the cross support for DPKG recipes, this can be toggled on a per-image basis by setting ISAR_CROSS_COMPILE in the image recipe. Signed-off-by: Felix Moessbauer --- doc/user_manual.md | 11 +++++++++++ meta/classes/image-tools-extension.bbclass | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/user_manual.md b/doc/user_manual.md index 5b2387d8..f38a133e 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -986,6 +986,17 @@ built for the compat arch need to be tagged individually by setting `PACKAGE_ARCH = "${COMPAT_DISTRO_ARCH}"` in the package recipe. Non-tagged packages will continue to be built for the primary target architecture. +### Cross Support for Imagers + +If `ISAR_CROSS_COMPILE = "1"`, the imager and optional compression tasks +run in the host buildchroot instead of the target buildchroot. +This gives a significant speedup when compressing the generated image, +as the compression is not emulated. + +In case your setup does not support cross-imaging, you can disable this +just for the particular image by adding `ISAR_CROSS_COMPILE = "0"` to your +image recipe. + ## Examining and debugging package generation inside their buildchroot diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass index b9968139..e13d4a3f 100644 --- a/meta/classes/image-tools-extension.bbclass +++ b/meta/classes/image-tools-extension.bbclass @@ -5,9 +5,6 @@ # # This file extends the image.bbclass to supply tools for futher imager functions -# Imager are expected to run natively, thus will use the target buildchroot. -ISAR_CROSS_COMPILE = "0" - inherit buildchroot IMAGER_INSTALL ??= "" -- 2.30.2