public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 13/16] image: Limit ROOTFS_EXTRA to non-wic image type
Date: Tue, 11 Sep 2018 14:05:53 +0200	[thread overview]
Message-ID: <ee817d5a40ef36262c3f96c1e26ea312d407ca51.1536667556.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1536667556.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1536667556.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

wic does its own extra-space / overhead-factor management, and the
proper interface for that is the wks file. However, keep the
ROOTFS_EXTRA for other image types.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes/image.bbclass   | 12 ++++++------
 meta/classes/wic-img.bbclass |  3 +++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index c251477..3f00806 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -7,6 +7,12 @@ IMAGE_ROOTFS   = "${WORKDIR}/rootfs"
 
 IMAGE_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getVar("KERNEL_NAME", True) else ""}"
 
+# These variables are used by wic and start_vm
+KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
+INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
+
+inherit ${IMAGE_TYPE}
+
 # Extra space for rootfs in MB
 ROOTFS_EXTRA ?= "64"
 
@@ -57,12 +63,6 @@ python set_image_size () {
     d.setVarFlag('ROOTFS_SIZE', 'export', '1')
 }
 
-# These variables are used by wic and start_vm
-KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
-INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
-
-inherit ${IMAGE_TYPE}
-
 do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
 do_rootfs[depends] = "isar-apt:do_cache_config isar-bootstrap-target:do_bootstrap"
 
diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 475326d..3ac613c 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -9,6 +9,9 @@ python () {
         bb.fatal("WKS_FILE must be set")
 }
 
+# wic comes with reasonable defaults, and the proper interface is the wks file
+ROOTFS_EXTRA ?= "0"
+
 STAGING_DATADIR ?= "/usr/lib/"
 STAGING_LIBDIR ?= "/usr/lib/"
 STAGING_DIR ?= "${TMPDIR}"
-- 
2.16.4


  parent reply	other threads:[~2018-09-11 12:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 12:05 [PATCH 00/16] Cleanups, linux-custom fix, auto-expansion helper Jan Kiszka
2018-09-11 12:05 ` [PATCH 01/16] meta-isar: Adjust kernel params in sdimage-efi.wks Jan Kiszka
2018-09-11 12:05 ` [PATCH 02/16] meta-isar: Reduce grub timeout to 3 seconds Jan Kiszka
2018-09-11 12:05 ` [PATCH 03/16] meta-isar: Fix bananapi root disk specification Jan Kiszka
2018-09-12  8:57   ` Henning Schild
2018-09-12  8:59     ` Henning Schild
2018-09-11 12:05 ` [PATCH 04/16] meta-isar: Remove "=" after wic parameters Jan Kiszka
2018-09-11 12:05 ` [PATCH 05/16] u-boot-script: Become independent of target /etc/fstab Jan Kiszka
2018-09-11 12:05 ` [PATCH 06/16] isar-image-base: Disable rootfs check by default Jan Kiszka
2018-09-11 12:05 ` [PATCH 07/16] isar-image-base: Use generic parameters for rootfs entry in fstab Jan Kiszka
2018-09-11 12:05 ` [PATCH 08/16] meta: Remove ROOTFS_TYPE Jan Kiszka
2018-09-11 12:05 ` [PATCH 09/16] start_vm: Rename QEMU_ROOTFS_DEV to QEMU_DISK_ARGS Jan Kiszka
2018-09-11 12:05 ` [PATCH 10/16] start_vm: Rename ROOTFS_DEV to QEMU_ROOTFS_DEV Jan Kiszka
2018-09-11 12:05 ` [PATCH 11/16] RECIPE-API-CHANGELOG: Add ROOTFS_DEV/TYPE removal Jan Kiszka
2018-09-11 12:05 ` [PATCH 12/16] meta: Add expand-on-first-boot support package Jan Kiszka
2018-09-12 13:46   ` Henning Schild
2018-09-13  8:33     ` Jan Kiszka
2018-09-13  9:30       ` Henning Schild
2018-09-13 13:17         ` Jan Kiszka
2018-09-11 12:05 ` Jan Kiszka [this message]
2018-09-11 12:05 ` [PATCH 14/16] linux-custom: Simplify and clarify KERNEL_NAME-to-recipe matching Jan Kiszka
2018-09-11 12:05 ` [PATCH 15/16] meta-isar: Move init preinstallation into distro conf Jan Kiszka
2018-09-11 12:05 ` [PATCH 16/16] meta: Add enable-fsck helper recipe Jan Kiszka
2018-09-25 11:27 ` [PATCH 00/16] Cleanups, linux-custom fix, auto-expansion helper 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=ee817d5a40ef36262c3f96c1e26ea312d407ca51.1536667556.git.jan.kiszka@siemens.com \
    --to=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