public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Q. Gylstorff" <Quirin.Gylstorff@siemens.com>
To: Jan.Kiszka@siemens.com, isar-users@googlegroups.com
Cc: Quirin Gylstorff <quirin.gylstorff@siemens.com>
Subject: [PATCH v8 2/2] meta/classes: add cpiogz-img
Date: Fri,  5 Feb 2021 16:57:13 +0100	[thread overview]
Message-ID: <20210205155713.29133-3-Quirin.Gylstorff@siemens.com> (raw)
In-Reply-To: <20210205155713.29133-1-Quirin.Gylstorff@siemens.com>

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

to create a initramfs like filesystem.

Based on original patch by:  Michael Adler <michael.adler@siemens.com>
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../multiconfig/qemuamd64-buster-cpiogz.conf  |  9 +++++++++
 meta/classes/cpiogz-img.bbclass               | 20 +++++++++++++++++++
 scripts/ci_build.sh                           |  2 ++
 3 files changed, 31 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/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..8efdcb4
--- /dev/null
+++ b/meta/classes/cpiogz-img.bbclass
@@ -0,0 +1,20 @@
+# 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 005bda5..83461e5 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -28,6 +28,8 @@ 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-bullseye:isar-image-base \
             mc:qemumipsel-stretch:isar-image-base \
             mc:qemumipsel-buster:isar-image-base \
             mc:nand-ubi-demo-buster:isar-image-ubi \
-- 
2.20.1


  parent reply	other threads:[~2021-02-05 15:57 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27 13:27 [PATCH 0/3] some image classes Q. Gylstorff
2020-03-27 13:27 ` [PATCH 1/3] meta/classes: Generate a custom initramfs Q. Gylstorff
2020-03-30  7:25   ` Gylstorff Quirin
2020-03-30  8:08     ` Henning Schild
2020-03-27 13:28 ` [PATCH 2/3] meta/classes: Generate ova image for vmware or virtualbox Q. Gylstorff
2020-03-27 18:50   ` Henning Schild
2020-03-30  7:27     ` Gylstorff Quirin
2020-03-27 13:28 ` [PATCH 3/3] meta/classes: add cpiogz-img Q. Gylstorff
2020-03-27 19:01   ` Henning Schild
2020-03-30  7:29     ` Gylstorff Quirin
2020-03-27 14:51 ` [PATCH] Add ova configuration for testing Q. Gylstorff
2020-03-27 18:46   ` Henning Schild
2020-03-27 14:52 ` [PATCH] conf: Add multiconfig for cpiogz Q. Gylstorff
2020-04-03 14:55 ` [PATCH v2 0/3] some images classes Q. Gylstorff
2020-04-03 14:55   ` [PATCH v2 1/3] meta/support: Generate a custom initramfs Q. Gylstorff
2020-04-09  6:39     ` Henning Schild
2020-04-09 13:59       ` Gylstorff Quirin
2020-04-09 17:18         ` Henning Schild
2020-04-03 14:55   ` [PATCH v2 2/3] meta/classes: Generate ova image for vmware or virtualbox Q. Gylstorff
2020-04-09  6:48     ` Henning Schild
2020-04-09 14:28       ` Gylstorff Quirin
2020-04-03 14:55   ` [PATCH v2 3/3] meta/classes: add cpiogz-img Q. Gylstorff
2020-04-09  6:54   ` [PATCH v2 0/3] some images classes Henning Schild
2020-04-14 12:24     ` [PATCH v3 " Q. Gylstorff
2020-04-14 12:24       ` [PATCH v3 1/3] meta/support: Generate a custom initramfs Q. Gylstorff
2020-04-20 20:14         ` Henning Schild
2020-04-21 14:30           ` Gylstorff Quirin
2020-04-14 12:24       ` [PATCH v3 2/3] meta/classes: Generate ova image for vmware or virtualbox Q. Gylstorff
2020-04-14 12:24       ` [PATCH v3 3/3] meta/classes: add cpiogz-img Q. Gylstorff
2020-04-20 20:14       ` [PATCH v3 0/3] some images classes Henning Schild
2020-04-21 14:57         ` [PATCH v4 0/3] some images Q. Gylstorff
2020-04-21 14:57           ` [PATCH v4 1/3] meta/support: Generate a custom initramfs Q. Gylstorff
2020-04-21 14:57           ` [PATCH v4 2/3] meta/classes: Generate ova image for vmware or virtualbox Q. Gylstorff
2020-04-21 15:17             ` Jan Kiszka
2020-04-23  9:46               ` [PATCH v5 0/3] some images Q. Gylstorff
2020-04-23  9:46                 ` [PATCH v5 1/3] meta/support: Generate a custom initramfs Q. Gylstorff
2020-06-18 15:54                   ` Harald Seiler
2020-06-22 13:44                     ` Gylstorff Quirin
2020-06-25 12:56                     ` [PATCH v6 0/3] some images Q. Gylstorff
2020-06-25 12:56                       ` [PATCH v6 1/3] meta/support: Generate a custom initramfs Q. Gylstorff
2020-09-16 12:24                         ` Harald Seiler
2020-06-25 12:56                       ` [PATCH v6 2/3] meta/classes: Generate ova image for vmware or virtualbox Q. Gylstorff
2020-06-25 12:56                       ` [PATCH v6 3/3] meta/classes: add cpiogz-img Q. Gylstorff
2020-10-13 10:22                       ` [PATCH v6 0/3] some images Jan Kiszka
2021-02-05 10:07                         ` Gylstorff Quirin
2021-02-05 10:52                   ` [PATCH v7 0/2] CPIO & OVA Images Q. Gylstorff
2021-02-05 10:52                     ` [PATCH v7 1/2] meta/classes: Generate ova image for vmware or virtualbox Q. Gylstorff
2021-02-05 11:16                       ` Jan Kiszka
2021-02-05 10:52                     ` [PATCH v7 2/2] meta/classes: add cpiogz-img Q. Gylstorff
2021-02-05 11:09                       ` Jan Kiszka
2021-02-05 15:57                     ` [PATCH v8 0/2] CPIO & OVA Images Q. Gylstorff
2021-02-05 15:57                       ` [PATCH v8 1/2] meta/classes: Generate ova image for VMWare or Virtualbox Q. Gylstorff
2021-03-26 11:47                         ` Anton Mikanovich
2021-02-05 15:57                       ` Q. Gylstorff [this message]
2021-03-26 11:51                         ` [PATCH v8 2/2] meta/classes: add cpiogz-img Anton Mikanovich
2020-04-23  9:46                 ` [PATCH v5 2/3] meta/classes: Generate ova image for vmware or virtualbox Q. Gylstorff
2020-04-23  9:46                 ` [PATCH v5 3/3] meta/classes: add cpiogz-img Q. Gylstorff
2020-04-21 14:57           ` [PATCH v4 " Q. Gylstorff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210205155713.29133-3-Quirin.Gylstorff@siemens.com \
    --to=quirin.gylstorff@siemens.com \
    --cc=Jan.Kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox