Openembedded Core Discussions
 help / color / mirror / Atom feed
* (No subject)
@ 2017-11-27 16:20 Volker Vogelhuber
  2017-11-27 16:20 ` [PATCH] Allow specifying subdir for rootfs when using wic -e Volker Vogelhuber
  2017-11-27 16:32 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Volker Vogelhuber @ 2017-11-27 16:20 UTC (permalink / raw)
  To: openembedded-core

I currently have an image with six different partitions. See the 
following partition configuration:

># bootloader
>part /boot/EFI --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk mmcblk --fstype=vfat --label boot --active --align 1024 --size 20 --overhead-factor=1.0 --uuid="1EFC2AC2-449B-6ABB-AA63-7EA004446DF1"
>
>#--use-uuid
># primary / recovery image
>part / --source rootfs --rootfs-dir=image --exclude-path opt/something/ opt/else/ opt/somemore/ --ondisk mmcblk --fstype=ext4 --label primary_rootfs --align 1024 --size 768 --overhead-factor=1.0 --uuid="2779D408-1362-AEF5-AEB1-00BF5674C065"
>part /recovery --source rootfs --rootfs-dir=image-recovery --ondisk mmcblk --fstype=ext4 --label recovery_rootfs --align 1024 --size 640 --overhead-factor=1.0 --uuid="528B6F25-5143-47B3-8D12-391820EAF1CF"
>
># additional partitions
>part /opt/something --source rootfs --rootfs-dir=image --rootfs-subdir=opt/something --ondisk mmcblk --fstype=ext4 --label persist --align 1024 --size 64 --overhead-factor=1.0 --use-uuid
>part /opt/else --source rootfs --rootfs-dir=image --rootfs-subdir=opt/else --ondisk mmcblk --fstype=ext4 --label de --align 1024 --size 256 --overhead-factor=1.0 --use-uuid
>part /opt/somemore --source rootfs --rootfs-dir=image --rootfs-subdir=opt/somemore --ondisk mmcblk --fstype=ext4 --label data --align 1024 --size 1700 --overhead-factor=1.0 --use-uuid
>
>bootloader --timeout=0 --ptable gpt --configfile="disk.cfg"

My problem is now that if I use the wic -e option to specify an image 
name as rootfs-dir I can not extract subdirectories from the rootfs 
to different partitions. Or at least I didn't found out a way.
That's why I added a rootfs-subdir option to wic that allows appending 
a rootfs dir to the one received by IMAGE_ROOTFS. I read something 
about spliting should be done on recipe level 
(https://lists.yoctoproject.org/pipermail/yocto/2016-March/029301.html), 
but I couldn't figure out how that should be done and that patch seems 
much easier for me.



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

* [PATCH] Allow specifying subdir for rootfs when using wic -e
  2017-11-27 16:20 (No subject) Volker Vogelhuber
@ 2017-11-27 16:20 ` Volker Vogelhuber
  2017-11-27 16:32 ` ✗ patchtest: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Volker Vogelhuber @ 2017-11-27 16:20 UTC (permalink / raw)
  To: openembedded-core

---
 scripts/lib/wic/ksparser.py              | 1 +
 scripts/lib/wic/partition.py             | 1 +
 scripts/lib/wic/plugins/source/rootfs.py | 7 ++++---
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 99b66eebc5..a9e07fcd2f 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -146,6 +146,7 @@ class KickStart():
         part.add_argument("--overhead-factor", type=overheadtype)
         part.add_argument('--part-type')
         part.add_argument('--rootfs-dir')
+        part.add_argument('--rootfs-subdir')
 
         # --size and --fixed-size cannot be specified together; options
         # ----extra-space and --overhead-factor should also raise a parser
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index b623bb9e6d..b42529ce48 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -53,6 +53,7 @@ class Partition():
         self.overhead_factor = args.overhead_factor
         self.part_type = args.part_type
         self.rootfs_dir = args.rootfs_dir
+        self.rootfs_subdir = args.rootfs_subdir
         self.size = args.size
         self.fixed_size = args.fixed_size
         self.source = args.source
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index aec720fb22..8dcf5a2872 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -83,7 +83,7 @@ class RootfsPlugin(SourcePlugin):
 
         part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
 
-        new_rootfs = None
+        new_rootfs = part.rootfs_dir
         # Handle excluded paths.
         if part.exclude_path is not None:
             # We need a new rootfs directory we can delete files from. Copy to
@@ -121,6 +121,7 @@ class RootfsPlugin(SourcePlugin):
                 else:
                     # Delete whole directory.
                     shutil.rmtree(full_path)
-
+        if not part.rootfs_subdir is None:
+            new_rootfs = os.path.join(new_rootfs, part.rootfs_subdir)
         part.prepare_rootfs(cr_workdir, oe_builddir,
-                            new_rootfs or part.rootfs_dir, native_sysroot)
+                            new_rootfs, native_sysroot)
-- 
2.11.0



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

* ✗ patchtest: failure for Allow specifying subdir for rootfs when using wic -e
  2017-11-27 16:20 (No subject) Volker Vogelhuber
  2017-11-27 16:20 ` [PATCH] Allow specifying subdir for rootfs when using wic -e Volker Vogelhuber
@ 2017-11-27 16:32 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-11-27 16:32 UTC (permalink / raw)
  To: Volker Vogelhuber; +Cc: openembedded-core

== Series Details ==

Series: Allow specifying subdir for rootfs when using wic -e
Revision: 1
URL   : https://patchwork.openembedded.org/series/9964/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 33418ed064)

* Patch            Allow specifying subdir for rootfs when using wic -e
 Issue             Shortlog does not follow expected format [test_shortlog_format] 
  Suggested fix    Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"

* Patch            Allow specifying subdir for rootfs when using wic -e
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

end of thread, other threads:[~2017-11-27 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-27 16:20 (No subject) Volker Vogelhuber
2017-11-27 16:20 ` [PATCH] Allow specifying subdir for rootfs when using wic -e Volker Vogelhuber
2017-11-27 16:32 ` ✗ patchtest: failure for " Patchwork

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