From patchwork Fri Jun 18 05:39:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 542 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:6456:0:0:0:0:0 with SMTP id d22csp201102oof; Fri, 18 Jun 2021 06:39:59 -0700 (PDT) X-Received: by 2002:a2e:8757:: with SMTP id q23mr9555472ljj.268.1624023598844; Fri, 18 Jun 2021 06:39:58 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1624023598; cv=pass; d=google.com; s=arc-20160816; b=VU7GkVnUeBsZovOdZIh8lglLvd55sq5PpKau2fYk1Fbk+hTfatKhszfACeMPqw9+fl 6NyYNeWeNa+lLDoU7niNlet48rOe4u5lJ+1QmZzYLwsWTiZfVIj7DdPKrBxetxR095CG F9posWyilFK93gxbE0qF5iBvTR4AF4qdfkQ7qFUJGHhB/6lZpnSfPE/nC9fzL1tuDMLI BVzvLrp7QSNn3txtIRMFLz/0czxpNwldhfKsrl9TxZUsesbaNKCaRM757IZLAVeeJU6A YgVRcw8dmFB5mWzg+oTL3ij0KTSN5noZcCV/lHmP1GUx7dovNKITj2IlcU40nJWQgQC9 NniQ== 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=KYp4ZDtVbiuk5mQo8Xbt3Vl33RPAZkIvCFnquCpqYU8=; b=gS7r3UtTcuOQ+9PwzLgeHI5asUDjQ4oQiCP3kPiHmEhsElWnf6SZ5v8Y7BFcZNhV1T WxiQ+Uigz0UFmtbAFH4LCkgu0yLwh37Anjtqp+0x2TJUyi5oV4rtKUl5kFPMy1hB54xk PHbqIlr6gn7EpyBNd+6y5LtsdBqTTeHb2eSy0yknmUXwuGJ9Wht2ZOsguHMBCjiJm6BZ 6CDUcpyFnqjstzxl+qfY/NhxVF02/JiBp9N+tgIZ2W7GCN15Zpva9HShU/+nVys5ShiE 8Cc6grPyUr7EwA7TKNEyF5ffJmdE46HbZvl3dUytoT7x2uSamGyr+8HuhXPMwg9Hgwf0 43CA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=VO8MHWVT; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbctzztvx2qcrblwewkdamgqe6peie4q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCTZZTVX2QCRBLWEWKDAMGQE6PEIE4Q@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 l22sor1331806lji.47.2021.06.18.06.39.58 (Google Transport Security); Fri, 18 Jun 2021 06:39:58 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbctzztvx2qcrblwewkdamgqe6peie4q@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=VO8MHWVT; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbctzztvx2qcrblwewkdamgqe6peie4q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCTZZTVX2QCRBLWEWKDAMGQE6PEIE4Q@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1624023598; cv=pass; d=google.com; s=arc-20160816; b=NA/89+5kL3XDYv+fq5KTVihq6/LfOyQ7Khhx3MjzGE4mJ7OZ2gLjrDQPmb/m171H3o LB7yLhEcfu5m74TcTMOWty1gPcNa7LlozOnPlN6RMLwvnG7Bij2znBtVlCOM4a1ukfOL dtAeTytB0fE5+xkfMicNRqnS2QJj8gWuNJ2hmQeKd7yzhtMaaO7uNeHaryXSuplfDua3 YUeYIIoRhSoNJ2zt9Z+RHG81SnemvXx/SrxCCKdNIiHTqbYZcL5uufdO1ehUfJrP3ruj qWEdNVu+GGpud2XrMrHd3+7p9Ir2ZFVRypd+4X/pUoHvHlqyY11nI0/3mIj2X1MjzwHt skig== 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=KYp4ZDtVbiuk5mQo8Xbt3Vl33RPAZkIvCFnquCpqYU8=; b=ZH/3fCbwK2NXQsWBIV3+RxCjJ9kHWG4VlWVrNmA8fgrlHtvFCANuH75PnyDwTZAnxC 6VAucPVIY8+7E+u9nOhBlBGlINhDHrjSI/ADQsXG9FaRheQVBgDD/HXUrRyOvGdqIhzN NS112N+QVpTB1fKV/IRMjWfACw1TYvqyBDBx7sgo2Y37y1wV0pGFkrBaZKZsFe5Opl5F 8hrTp52h8ipk5sx9/VYURjzay+/M2H82Rb/L3Nmbb+c3tveMB8WMzkIZ1Lv8PL6cgZY8 BKMoD56i5WhWes1yKpg5WpJPrfNPF4w3llLx2/nHZxWlBTJhf2iFtLhsRfJmPvREXKS2 oCIA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.40 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=KYp4ZDtVbiuk5mQo8Xbt3Vl33RPAZkIvCFnquCpqYU8=; b=VO8MHWVT6Jd8Fw9ExwR+hCgbDPiWFP+09aMZxsddivZ2J1VWsvNlBlj2rWKLs47TTQ NUtgEdr9wc/sG2++SRk0h0XQiGoqxPe+uGwI6N/vkVPzT79asMhgd+rQvk5X6jXfeVz/ /94Oc2nkXEHt919l9/fYPXrsfesoJCFeLMC5aJmXII2D3atkTZcr7OCHn/uiiX4xmIg+ fIbZW13fqLCeh4UrKTGQ4H7mUbS8ytUzXZQTkM5DiwprQ4uVYtyl/KU3g9qQ0rauV9EX Qn3pZdHA5fcfbM6CtCuImWhNvbHLy/8RwexwRoXWLN6UxNaUXG3EDNGtZmDu3MzJzOpX tQ/g== 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=KYp4ZDtVbiuk5mQo8Xbt3Vl33RPAZkIvCFnquCpqYU8=; b=HVgnpe4w33ISbwy+gkGL0LdQKBZn4htw8+tgtVuqvTk6zNvj1H6s2mcRs8susWDKGA LIL4+1p4yMvbU6CV4TuJbq8rjvxwK6om7Sr6I8jhlm2xc0wjzbomtLbxi8I9RM9fbBRU M93BQOKvWIsyHZvItSRUAwB1RShX9Ya46plsEPU7r/QbNRbAkne1wW2KxAt4RkHDebmI MeAWP+zHTmMk110Q7HBpmgQwCwuYn93i5LS8PFcgMGsCEta/ofyP9doY+FkvlRgjYoWB Ct5JY/bB0xXkNgJuqfnPmOF1bX2HrzHaSgiS9HfydAO2SJ0bBZPAl655eFY3lfSNTO6m baXQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5316PiCoCqEZYd6rRFwbTnGYdBTYU8+LiTsCgk5h1WtFBCDaEW8A 5YT4RHpKgAKwlHyxDBQkboo= X-Google-Smtp-Source: ABdhPJyZTmR0RBDIoy66ox5mjBc86Cq3Mfn0OA1n3Kmjw4zFzItslZF9/+/qpR0Fmk3NfuIfd/rSbw== X-Received: by 2002:a2e:910d:: with SMTP id m13mr7470755ljg.401.1624023598248; Fri, 18 Jun 2021 06:39:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:3a86:: with SMTP id q6ls807687lfu.3.gmail; Fri, 18 Jun 2021 06:39:57 -0700 (PDT) X-Received: by 2002:a05:6512:39ca:: with SMTP id k10mr3267455lfu.473.1624023597483; Fri, 18 Jun 2021 06:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624023597; cv=none; d=google.com; s=arc-20160816; b=W6ENpu/69uazWta+Z6GzcGv8veMtNOvsWi+s8qJRqtenHZxKeyFWti6z3UKMarB4MC Gr2foE5LRaNbz6IdeFQ+g+NXGAWvZBI7ocRYxiwgedWhBYxTeWlNBM6pM//U2DIhHJT6 mZaC3BNIwVNIHAF2i6mJqXkMejAP0ymasguKBxE+7AYiokuhCBQRfZ1ueq66G9zJixsy JG5oxD6ELrv4034cnhKGxuKPqlB1JxULrs2xQeUolQbnnvPtOhqYWliwVAtznlM1HnPv zKtjIGKX5XBYCMPIE4lj0+5Kx4O8k6TBoUes1crZo9SPXYq63v5vCsk+z9v46xmdROqH vsJQ== 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=AStdNfVX3ca/tzFOaujw0fPeqQjUHMhnCL56eNO8wGI=; b=EottnYAdcRvjLjpGdj62jk4qOn3OUAZV0YYON+UP3h6A/zQm6BkuLuDirTk9ap7fp1 L5jOETBWU5dlShOmDXI0S1ghQ567i4OcximW8kWqgw7k8J1TRHjO8qmfygIQRRKAEuj5 Wzrrn4yzwAd32yRcb3fhB1ePTpQZIotMSprg9JxNMCXQqNp5fywEyhZz8ENnBcbpizDE 91x5pfjxXYDJBs1nZ7qo30s8Tnz3/Nh9ZtUhSCzXb3N7BXIWyqTxDGO3JHl2S4PviRIe HMycaPmsXYPhqYXCrw/D+TUA6zUClgvcwq30J/o6dCje7RlV72BDTJ24IJ2KRKp7J/B5 jr/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=Quirin.Gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id q10si374649lfo.11.2021.06.18.06.39.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jun 2021 06:39:57 -0700 (PDT) Received-SPF: pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; 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 15IDduOg018066 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Jun 2021 15:39:56 +0200 Received: from md2dvrtc.fritz.box ([167.87.2.150]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 15IDdtlU017493; Fri, 18 Jun 2021 15:39:56 +0200 From: "Q. Gylstorff" To: isar-users@googlegroups.com, amikan@ilbers.de, jan.kiszka@siemens.com Cc: Quirin Gylstorff Subject: [PATCH v12 2/2] meta/classes: add cpiogz-img Date: Fri, 18 Jun 2021 15:39:55 +0200 Message-Id: <20210618133955.22505-3-Quirin.Gylstorff@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210618133955.22505-1-Quirin.Gylstorff@siemens.com> References: <20210618133955.22505-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.40 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?1702912168945649179?= X-GMAIL-MSGID: =?utf-8?q?1702912168945649179?= 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 Signed-off-by: Quirin Gylstorff --- 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 7b20a62..fcdc277 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-amd64-stretch \ container-amd64-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 b1bbe51..a2895f6 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 \