From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6652197203295076352 X-Received: by 2002:a1c:10c:: with SMTP id 12mr326007wmb.8.1549876164083; Mon, 11 Feb 2019 01:09:24 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:e919:: with SMTP id q25ls1575035wmc.6.gmail; Mon, 11 Feb 2019 01:09:23 -0800 (PST) X-Google-Smtp-Source: AHgI3IbpNVyKZ+orj7nGJckBnUjXX27P3YHbNMJBIDTrf4v9/Nxv0MLhXX//O6yrrS06sP5lUdbJ X-Received: by 2002:a1c:dc82:: with SMTP id t124mr680310wmg.0.1549876163639; Mon, 11 Feb 2019 01:09:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549876163; cv=none; d=google.com; s=arc-20160816; b=BGqjne2bUGOpKdK8LPp+nIYtmeQICZaGfJMctip8XO4fLHST8At68thvz7SihhWhJ3 1dWaaxiTAB3U7FtaCIDlO+/0aKTvM3ZIuCBBthGCCkTH+VCbGMHoN/jFhLCKGIFQ1H/d lYmQ1hYr4M370O5IoK8bt/Vi+qzNQrYcWBWZhdcEKdg2pQ5OIYjvkTA7kqpC2/1rC610 gDtjvbl/l7Fa8HKqe/Kg8Q8FWuZdU3YNBpzj3vhHa0DE0/wfOgK1bCo183+ipp3bO/2E rEFxhyDPtE6ENVOgouDTZVzlFvZvnOFYDLUxxZ4Qf2AQrIi1cTvq57LCaIlZCQcvrCvi ZkLQ== 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=H0R9poOGYZ6VNCPo4dpWjJvmznAyX1rRNTsuksyidQ0=; b=tW78nEouJ0MMLctZcxBYio7/i3gILIhT7yxP6f7KHVFgPnPUe35ARBgPVsVJx9Vz+F LPD8tLdVMkG/Ru+nDUHwvXJTJUgQFP7+zjH4bBMGAA/S3VBiFt/ZE524GRaijUyaitDw snDudKfA2aJUnqp9zHdBIhTszNup+oxOXiU6rT4qqzej8RqduK9O3SvjZp1FhMTzjtoD Nmw+9Dd8QZBJM3jQ2nGC3b4QXZZKmQVX7N2t7bliGRCkeZ0kciDMYWXRaMODkuLTKmJ4 4Qt8fpT6wAt0OXI4n0qKRlvySAorf2BeBOYnF+Ud7eNpHypypNWNvoZqQzpbwgw+725Y KnHw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id l22si695810wmg.4.2019.02.11.01.09.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 01:09:23 -0800 (PST) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x1B99MpT031829 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Feb 2019 10:09:22 +0100 Received: from ring.ppmd.siemens.net (linux-ses-ext02.ppmd.siemens.net [139.25.69.181]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x1B99Mww017002; Mon, 11 Feb 2019 10:09:22 +0100 From: claudius.heine.ext@siemens.com To: isar-users@googlegroups.com Cc: Claudius Heine Subject: [PATCH v5 2/5] meta/classes: added ubifs-img class Date: Mon, 11 Feb 2019 10:09:18 +0100 Message-Id: <20190211090921.9294-3-claudius.heine.ext@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211090921.9294-1-claudius.heine.ext@siemens.com> References: <20190211090921.9294-1-claudius.heine.ext@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: CiOmsFkJktRf From: Claudius Heine This class adds support for UBIFS file system images. Signed-off-by: Claudius Heine --- 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