From: claudius.heine.ext@siemens.com
To: isar-users@googlegroups.com
Cc: Claudius Heine <ch@denx.de>
Subject: [PATCH v5 2/5] meta/classes: added ubifs-img class
Date: Mon, 11 Feb 2019 10:09:18 +0100 [thread overview]
Message-ID: <20190211090921.9294-3-claudius.heine.ext@siemens.com> (raw)
In-Reply-To: <20190211090921.9294-1-claudius.heine.ext@siemens.com>
From: Claudius Heine <ch@denx.de>
This class adds support for UBIFS file system images.
Signed-off-by: Claudius Heine <ch@denx.de>
---
doc/user_manual.md | 1 +
meta/classes/ubifs-img.bbclass | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 meta/classes/ubifs-img.bbclass
diff --git a/doc/user_manual.md b/doc/user_manual.md
index 11a0576..ebaf54c 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -476,6 +476,7 @@ Isar contains additional image type classes that can be used as reference:
- `ext4-img`
- `rpi-sdimg`
- `targz-img`
+ - `ubifs-img`
- `wic-img`
---
diff --git a/meta/classes/ubifs-img.bbclass b/meta/classes/ubifs-img.bbclass
new file mode 100644
index 0000000..ed37357
--- /dev/null
+++ b/meta/classes/ubifs-img.bbclass
@@ -0,0 +1,30 @@
+# This software is a part of ISAR.
+# Copyright (C) Siemens AG, 2019
+#
+# SPDX-License-Identifier: MIT
+
+python() {
+ if not d.getVar("MKUBIFS_ARGS"):
+ bb.fatal("MKUBIFS_ARGS must be set")
+}
+
+inherit image
+
+UBIFS_IMAGE_FILE ?= "${IMAGE_FULLNAME}.ubifs.img"
+
+IMAGER_INSTALL += "mtd-utils"
+
+do_ubifs_image[stamp-extra-info] = "${DISTRO}-${MACHINE}"
+
+# Generate ubifs filesystem image
+do_ubifs_image() {
+ rm -f '${DEPLOY_DIR_IMAGE}/${UBIFS_IMAGE_FILE}'
+
+ image_do_mounts
+
+ # Create ubifs image using buildchroot tools
+ sudo chroot ${BUILDCHROOT_DIR} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
+ -r '${PP_ROOTFS}' '${PP_DEPLOY}/${UBIFS_IMAGE_FILE}'
+}
+
+addtask ubifs_image before do_build after do_copy_boot_files do_install_imager_deps
--
2.20.1
next prev parent reply other threads:[~2019-02-11 9:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 9:09 [PATCH v5 0/5] UBI support claudius.heine.ext
2019-02-11 9:09 ` [PATCH v5 1/5] meta/image.bbclass: add image_do_mounts for image specific mounts claudius.heine.ext
2019-02-11 10:49 ` chombourger
2019-02-11 11:33 ` Claudius Heine
2019-02-11 9:09 ` claudius.heine.ext [this message]
2019-02-11 9:09 ` [PATCH v5 3/5] meta/classes: added ubi-img class claudius.heine.ext
2019-02-11 9:09 ` [PATCH v5 4/5] meta/classes: added fit-img class for creation of fit images claudius.heine.ext
2019-02-11 9:09 ` [PATCH v5 5/5] meta-isar: added nand-ubi-demo example to demonstrate UBI use claudius.heine.ext
2019-02-11 9:45 ` [PATCH v5 0/5] UBI support Henning Schild
2019-02-12 11:24 ` Maxim Yu. Osipov
2019-02-12 13:16 ` Claudius Heine
2019-02-12 13:35 ` Claudius Heine
2019-02-12 13:36 ` Maxim Yu. Osipov
2019-02-12 14:06 ` Maxim Yu. Osipov
2019-02-12 14:09 ` Claudius Heine
2019-02-12 14:36 ` Baurzhan Ismagulov
2019-02-12 14:56 ` Claudius Heine
2019-02-12 15:51 ` Claudius Heine
2019-02-12 16:36 ` Claudius Heine
2019-02-13 8:36 ` Maxim Yu. Osipov
2019-02-13 9:53 ` Claudius Heine
2019-02-15 14:47 ` Maxim Yu. Osipov
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=20190211090921.9294-3-claudius.heine.ext@siemens.com \
--to=claudius.heine.ext@siemens.com \
--cc=ch@denx.de \
--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