From patchwork Thu Apr 22 00:32:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 448 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:c543:0:0:0:0:0 with SMTP id j3csp256586ooq; Thu, 22 Apr 2021 01:32:27 -0700 (PDT) X-Received: by 2002:ac2:5091:: with SMTP id f17mr1708520lfm.352.1619080347695; Thu, 22 Apr 2021 01:32:27 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1619080347; cv=pass; d=google.com; s=arc-20160816; b=L6z586b4g9HqEzvtRqI8nDUuN6nybXq6rGRfRZeBBfeWe2TLyJ6l9Lg1catyA0MGon 418IQ3DlWWKYq60L+Dyi4O5k/9RY3OchBNTtAsczwF23rfs/wGGOHZFOXxJEuEzKoGqx meXdk92JS0+X8trS6zLsNhCslonrjsBS6KCirqHCMXRLvRt+F6VF62wG1j+VbIzqZkQw 9Nfi1FUoHPU66RFUdj2ABDFXLmGdN3Oh4XGbpS/k2ucCd97iDsZyt4ZKpCyh17YwHHv1 jYpNSBr9UAY9D7QXBpUnTYBrdUa8WpX/gInNdTk1FzU02dEm75tunEwWZVx3uXZSXPi2 TSoA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=MaP7GEJefpomXdc11iXvUKmtQxluv9k/Ryf394x1FZg=; b=hgD5fW2h1ple6kFUcmoWfuMmCF/gUJB6sQxL5V49YScVGfzYEciXEM8K/U7MLnyeoy Mu7eqVubkTmgZtOGpafFBncZEGVz8KxvDMqi3WHshvzBi8KWM73F0vFocxZAG1Ymbt/K cC6h6z/9KfYrcjvDItxvhBEdt8iTbtLyK+mo/FejyHFLoE2ys7vFwzlylKsMBVFwiX+t G2H0w6mkN+QDARQkXKKLPzTGFllUBGntm78zAsdr5PX4iErfDp2Ldd/hzNU9tgD5/+Za 7uxzfESFwgHGbWhburdZlrD2tByNAxCftgSYpz6ikwrH2sTDuPGmC6YWbJu/zhq/aoy/ tD2A== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=EBrggQLL; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbctzztvx2qcrbgxjqscamgqekrsobkq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCTZZTVX2QCRBGXJQSCAMGQEKRSOBKQ@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id t23sor2284471ljg.65.2021.04.22.01.32.27 (Google Transport Security); Thu, 22 Apr 2021 01:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbctzztvx2qcrbgxjqscamgqekrsobkq@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=EBrggQLL; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbctzztvx2qcrbgxjqscamgqekrsobkq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCTZZTVX2QCRBGXJQSCAMGQEKRSOBKQ@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1619080347; cv=pass; d=google.com; s=arc-20160816; b=1Jq+bgPi0W+47uJdlWXxvjt5j9AO5+4be4N1i+H30sUq2UosRGD+UDVHVrogz+dP70 xswXs/SZ9R0yQlSDzc5awsOj7pL7deZB4XO37O5ORDqr2tR0w5i55WwFN+vUcwvjqZxc /Kb2BSEpcZTLk5KrTzlNgSsb/mwJvT2ihvuiyg9gMb+stu3ikqzUaNuUU1CN4lzm7lq9 bL0YivlY78/iyn4xJqCkTCTthbvn27AKv+TZKZCpZBFNjn16x55+QolRewbRRWlM70N1 jvinETjorOMP/Wph1TbqgdYAL8B10O8/lh6t62wJi0vzsMBvvhmOYYuq2W/qCsRGLrTV aSMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=MaP7GEJefpomXdc11iXvUKmtQxluv9k/Ryf394x1FZg=; b=j+iFaJdQOFJMIOmIa50dNUcgQ/RCHzvsRRcFwuCVPkEtYOmzNzwgrW7Bs47/gGpmGZ 82BPDLgdJOBTBwy6eXiv0HrsQmpNzb4rGQP3nlLm4W4zgmO9QXfNk/AvDYrO8Utv1bpw U3PkhNSzmmoYGz1ML2FOdT01y+uKtRDjNmvsaUO5zrIsYvvfjpqZgI0U5H5kojS4vC4I /yRJINrvUxQqpXvEmYTmdLfxwp+1z4pcaN2lP0MGD5r0iyfeNPAK3KgGA/qAOT11KnE3 AzbMLwLNlHIQYD8lIJCfVusHZSwfAwUB5GupV6iKNwFlX2osuTbcrgw7vltM5l1z7f/W c10g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=Quirin.Gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=MaP7GEJefpomXdc11iXvUKmtQxluv9k/Ryf394x1FZg=; b=EBrggQLLGHO3IsEcZQyuQ7UuN+IDzO7dBymE1zk4GrZAvACZbGWa4Ydulco50UhW6S sJ1z6s0dnJ1ucfQ/jeV432GXIaC1eW/N5rcS8VhMo8iyAKv2uj1RorWzpQMDPG22g1EF kTcX80BuzwXTE+EmJzYYdaeL5FKgggPjAS6Rl2McoU37BPV/j95XCaR6B0gsPkE1jDVy md2WJloidP+SBUe9Y0iKz4+poCoQGPRsf3aK+ceOwGtBhpO8Yf89xXjOLhJUnMDfPLW2 lVIbG3qjanICvitqrN+o29FXKRFoHmiAhuxEk9VEUNpVTeLKor98LN/hq6RZONjF+NFT Y5hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=MaP7GEJefpomXdc11iXvUKmtQxluv9k/Ryf394x1FZg=; b=EljmFstl/XTgItJDqnQnpSNkHuKL6gxIgpdqve3DzGSv+FsHfGpKt401dV6lhcUCEr tVIVxak/O1gQqekfy+vmtMyi11KRfJfk2erAvGdQklL65a/gwKes8rSjjx/AV5r455Eb R2Tw/e9mJOYv4SMuNt0VZ6Zuo3jAdFyUUXhG4DKHi6fBo+N2dVW9mjqEtk5xWukWIInd vmfze0t+tvn4eW7zVjU3xpPsAPm1aqt7d744pxmqQAYOPVfBnLKQY3czWsNDqs7RZ9Gy 00eTwbEPscL1/7H5NpULQkDbLf2rffEKxmANPzvHfnpS//Is7/z3lQOnsDTTsPC10zeT tzSw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531czAi4wQzCE7IgR6ttCXTKJdkyLlKwptg0Vbbh9qjRELlKM5F1 ZwHGeRdA3LnBYcQ+NitRbuw= X-Google-Smtp-Source: ABdhPJytrL6JjprCdtULELjtMJ6mPflzGNGopVW67iCZmCl3FFWMbk4JXf9J5NYoM7Qe3nYED4h79Q== X-Received: by 2002:a2e:9d95:: with SMTP id c21mr1760313ljj.156.1619080346895; Thu, 22 Apr 2021 01:32:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:f815:: with SMTP id a21ls249201lff.1.gmail; Thu, 22 Apr 2021 01:32:25 -0700 (PDT) X-Received: by 2002:a05:6512:1154:: with SMTP id m20mr1824070lfg.442.1619080345897; Thu, 22 Apr 2021 01:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619080345; cv=none; d=google.com; s=arc-20160816; b=N6E0DblA2rv6z0goI8rdtGyiMgIFqdE1Mffh7pr31P17fEmfy1PRuM/ienaCBo94Dg Jm1hRGUqmRDNAq+BLhGTg7deLSKdOjaIVNOL4g1Z7dsNtoILyG6ZLgOlxBSlROxNJsot f0zmVyuA6f5Z6jrHGmTeZU2+KaUBR/L+HGypzuZ3cvQDp/NfxI3Zl3qUU+yNW1dukm8z xjC1eD/KXoqF6eUxNHz6SsOqGG32e0N9nS3s1dWJOUnqAqlMDBY1sL7KIvcA5NSx3NCH bbPc+DLn5QTQFH2GxLYIxMYaURJC9dG9Qm92zppTi74B2RYw5vj5rvfeoJJlMdlVldJs iLJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=/SwlyCLoLNafVarwxV/uzMuFzdGORu4FdOO6QVbQhm8=; b=vLhnVXqSxXPeW+AVmYyn6/uiS5QZ4Og3w5UUc0gYXIYPFf/QJfsShjDSOmhtmqZph5 DLZM0l/CXJVbGUcjEAG+HseYDj5iMbNL3+R7vxm67xqBkIxwToxIJnTnAo9L8jZ9cHe9 3QTA9l65R38m1Cf4xhexkjnOJzPWv9SSijZCUbg4T0oWzx5TMDgaFyKLQrVePdjQj93l +FvFJ8BRNJQHfLSqQ1gdDXlV3MuWiihikQFBUaUom+3EDezrw75DO2wnC3ZSV4LN+X0u ywspiW/dcrK1q1q8Vy9M0VnIMikd6td+w91OHT83gjVjT0dqjglBb/0vQ1p0GTTvAnP1 qHMg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=Quirin.Gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id n10si324351lft.1.2021.04.22.01.32.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Apr 2021 01:32:25 -0700 (PDT) Received-SPF: pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 13M8WPOx008537 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Apr 2021 10:32:25 +0200 Received: from md2dvrtc.fritz.box ([167.87.28.149]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 13M8WOFr025851; Thu, 22 Apr 2021 10:32:24 +0200 From: "Q. Gylstorff" To: Jan.Kiszka@siemens.com, isar-users@googlegroups.com Cc: Quirin Gylstorff , Jan Kiszka Subject: [PATCH v11 2/2] meta/classes: add cpiogz-img Date: Thu, 22 Apr 2021 10:32:23 +0200 Message-Id: <20210422083223.2751-3-Quirin.Gylstorff@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210422083223.2751-1-Quirin.Gylstorff@siemens.com> References: <20210422083223.2751-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Original-Sender: quirin.gylstorff@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=Quirin.Gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1697728795070942849?= X-GMAIL-MSGID: =?utf-8?q?1697728795070942849?= From: Quirin Gylstorff This allows to create a initramfs like filesystem. Based on original patch by Michael Adler . Signed-off-by: Quirin Gylstorff [Jan: reformatting, dropped bullseye target, added to local.conf] Signed-off-by: Jan Kiszka --- meta-isar/conf/local.conf.sample | 1 + .../multiconfig/qemuamd64-buster-cpiogz.conf | 9 ++++++++ meta/classes/cpiogz-img.bbclass | 21 +++++++++++++++++++ scripts/ci_build.sh | 1 + 4 files changed, 32 insertions(+) create mode 100644 meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf create mode 100644 meta/classes/cpiogz-img.bbclass diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample index 6c1d299..02fc334 100644 --- a/meta-isar/conf/local.conf.sample +++ b/meta-isar/conf/local.conf.sample @@ -50,6 +50,7 @@ BBMULTICONFIG = " \ qemuamd64-stretch \ qemuamd64-buster \ qemuamd64-buster-tgz \ + qemuamd64-buster-cpiogz \ qemuamd64-bullseye \ container-stretch \ container-buster \ diff --git a/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf b/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf new file mode 100644 index 0000000..cadcdac --- /dev/null +++ b/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf @@ -0,0 +1,9 @@ +# This software is a part of ISAR. +# Copyright (c) Siemens AG, 2020 +# +# SPDX-License-Identifier: MIT + +MACHINE ?= "qemuamd64" +DISTRO ?= "debian-buster" + +IMAGE_TYPE = "cpiogz-img" diff --git a/meta/classes/cpiogz-img.bbclass b/meta/classes/cpiogz-img.bbclass new file mode 100644 index 0000000..940e2fb --- /dev/null +++ b/meta/classes/cpiogz-img.bbclass @@ -0,0 +1,21 @@ +# This software is a part of ISAR. +# Copyright (C) 2020 Siemens AG +# +# SPDX-License-Identifier: MIT + +CPIOGZ_FNAME ?= "${IMAGE_FULLNAME}.cpio.gz" +CPIOGZ_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${CPIOGZ_FNAME}" +IMAGER_INSTALL += "cpio" +CPIO_IMAGE_FORMAT ?= "newc" + +do_cpiogz_image() { + sudo rm -f ${CPIOGZ_IMAGE_FILE} + image_do_mounts + sudo chroot ${BUILDCHROOT_DIR} \ + sh -c "cd ${PP_ROOTFS}; /usr/bin/find . | \ + /usr/bin/cpio -H ${CPIO_IMAGE_FORMAT} -o | /usr/bin/gzip -9 > \ + ${PP_DEPLOY}/${CPIOGZ_FNAME}" + sudo chown $(id -u):$(id -g) ${CPIOGZ_IMAGE_FILE} +} + +addtask cpiogz_image before do_image after do_image_tools diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index a77cf5a..ccbb47f 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -37,6 +37,7 @@ TARGETS_SET="\ mc:qemuamd64-stretch:isar-image-base \ mc:qemuamd64-buster:isar-image-base \ mc:qemuamd64-buster-tgz:isar-image-base \ + mc:qemuamd64-buster-cpiogz:isar-image-base \ mc:qemuamd64-buster:isar-initramfs \ mc:qemumipsel-stretch:isar-image-base \ mc:qemumipsel-buster:isar-image-base \