public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v3 0/4] wic: Update to the latest revision
@ 2022-05-12 12:13 Felix Moessbauer
  2022-05-12 12:13 ` [PATCH v3 1/4] " Felix Moessbauer
  2022-05-12 12:13 ` [PATCH v3 2/4] meta-isar: add example how to split rootfs across partitions Felix Moessbauer
  0 siblings, 2 replies; 3+ messages in thread
From: Felix Moessbauer @ 2022-05-12 12:13 UTC (permalink / raw)
  To: isar-users; +Cc: henning.schild, jan.kiszka, florian.bezdeka, Felix Moessbauer

Changes since v2:

- removed redundant paths exclusion for home (reported by Florian Bezdeka, thanks)
- improved commit messages

Changes since v1:

- add example how to use splitted rootfs
- generate such an image in the ci
- test if the partition layout looks like what we expect

Best regards,
Felix

Felix Moessbauer (4):
  wic: Update to the latest revision
  meta-isar: add example how to split rootfs across partitions
  use multipart image for qemuamd64-bookworm target
  ci: test partition layout of splitted-rootfs image

 .../conf/multiconfig/qemuamd64-bookworm.conf  |  1 +
 .../lib/wic/canned-wks/multipart-efi.wks      |  8 +++
 scripts/lib/wic/misc.py                       |  1 +
 scripts/lib/wic/plugins/imager/direct.py      |  2 +-
 scripts/lib/wic/plugins/source/rootfs.py      |  5 +-
 testsuite/cibase.py                           | 58 +++++++++++++++++++
 testsuite/cibuilder.py                        |  6 +-
 testsuite/citest.py                           | 14 +++++
 8 files changed, 92 insertions(+), 3 deletions(-)
 create mode 100644 meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks

-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 1/4] wic: Update to the latest revision
  2022-05-12 12:13 [PATCH v3 0/4] wic: Update to the latest revision Felix Moessbauer
@ 2022-05-12 12:13 ` Felix Moessbauer
  2022-05-12 12:13 ` [PATCH v3 2/4] meta-isar: add example how to split rootfs across partitions Felix Moessbauer
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Moessbauer @ 2022-05-12 12:13 UTC (permalink / raw)
  To: isar-users; +Cc: henning.schild, jan.kiszka, florian.bezdeka, Felix Moessbauer

Update to the latest wic from OE-core.

OE-core Revision: b8878cf0d35cf3d1ac30576d9b9943a7761c011b

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 scripts/lib/wic/misc.py                  | 1 +
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 scripts/lib/wic/plugins/source/rootfs.py | 5 ++++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index 3e118229..3bc165fd 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -36,6 +36,7 @@ NATIVE_RECIPES = {"bmaptool": "bmap-tools",
                   "mkdosfs": "dosfstools",
                   "mkisofs": "cdrtools",
                   "mkfs.btrfs": "btrfs-tools",
+                  "mkfs.erofs": "erofs-utils",
                   "mkfs.ext2": "e2fsprogs",
                   "mkfs.ext3": "e2fsprogs",
                   "mkfs.ext4": "e2fsprogs",
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 35fff7c1..4d0b836e 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -259,7 +259,7 @@ class DirectPlugin(ImagerPlugin):
             if part.mountpoint == "/":
                 if part.uuid:
                     return "PARTUUID=%s" % part.uuid
-                elif part.label:
+                elif part.label and self.ptable_format != 'msdos':
                     return "PARTLABEL=%s" % part.label
                 else:
                     suffix = 'p' if part.disk.startswith('mmcblk') else ''
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 2e34e715..25bb41dd 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -50,7 +50,7 @@ class RootfsPlugin(SourcePlugin):
 
     @staticmethod
     def __get_rootfs_dir(rootfs_dir):
-        if os.path.isdir(rootfs_dir):
+        if rootfs_dir and os.path.isdir(rootfs_dir):
             return os.path.realpath(rootfs_dir)
 
         image_rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", rootfs_dir)
@@ -96,6 +96,9 @@ class RootfsPlugin(SourcePlugin):
         part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
         part.has_fstab = os.path.exists(os.path.join(part.rootfs_dir, "etc/fstab"))
         pseudo_dir = os.path.join(part.rootfs_dir, "../pseudo")
+        if not os.path.lexists(pseudo_dir):
+            pseudo_dir = os.path.join(cls.__get_rootfs_dir(None), '../pseudo')
+
         if not os.path.lexists(pseudo_dir):
             logger.warn("%s folder does not exist. "
                         "Usernames and permissions will be invalid " % pseudo_dir)
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 2/4] meta-isar: add example how to split rootfs across partitions
  2022-05-12 12:13 [PATCH v3 0/4] wic: Update to the latest revision Felix Moessbauer
  2022-05-12 12:13 ` [PATCH v3 1/4] " Felix Moessbauer
@ 2022-05-12 12:13 ` Felix Moessbauer
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Moessbauer @ 2022-05-12 12:13 UTC (permalink / raw)
  To: isar-users; +Cc: henning.schild, jan.kiszka, florian.bezdeka, Felix Moessbauer

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks

diff --git a/meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks b/meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks
new file mode 100644
index 00000000..b3abb3d0
--- /dev/null
+++ b/meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks
@@ -0,0 +1,8 @@
+# Example showing how to split a single rootfs across partitions
+part /boot --ondisk sda --source bootimg-efi-isar --sourceparams="loader=grub-efi" --label boot --active --align 1024
+# when excluding paths, just specify --exclude-path once and separate paths using spaces
+part /     --ondisk sda --source rootfs --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --exclude-path boot home --extra-space 1G
+# put home last to support auto-expand of this partition
+part /home --ondisk sda --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024
+
+bootloader --ptable gpt --timeout 3 --append "rootwait console=ttyS0,115200 console=tty0"
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-12 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 12:13 [PATCH v3 0/4] wic: Update to the latest revision Felix Moessbauer
2022-05-12 12:13 ` [PATCH v3 1/4] " Felix Moessbauer
2022-05-12 12:13 ` [PATCH v3 2/4] meta-isar: add example how to split rootfs across partitions Felix Moessbauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox