<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/lib/wic/plugins/source, branch uninative-2.11</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.11</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.11'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-01-20T22:46:18+00:00</updated>
<entry>
<title>wic: Optimise fstab modification for ext2/3/4 and msdos partitions</title>
<updated>2021-01-20T22:46:18+00:00</updated>
<author>
<name>Paul Barker</name>
<email>pbarker@konsulko.com</email>
</author>
<published>2021-01-19T16:26:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=da846838fc5d2a1b421767be68561cdaa08bca42'/>
<id>urn:sha1:da846838fc5d2a1b421767be68561cdaa08bca42</id>
<content type='text'>
The fix for [Yocto #13994] required the rootfs directory to be copied
(using hardlinks if possible) when modifying the fstab file under wic.

We can optimise this copy away for filesystems where we have the tools
to modify the contents of the partition image after it is created. For
ext2/3/4 filesystems we have the debugfs tool and for msdos/vfat
filesystems we have the mcopy tool. So for any of these filesystems we
skip the modification of the fstab file in the rootfs directory (and
skip the associated copy unless it is otherwise necessary) and update
the contents of fstab directly in the partition image.

(From OE-Core rev: 5fb8ae0e9159597d7eaa9307a3a8543800bf9405)

Signed-off-by: Paul Barker &lt;pbarker@konsulko.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: Copy rootfs dir if fstab needs updating</title>
<updated>2021-01-20T22:46:18+00:00</updated>
<author>
<name>Paul Barker</name>
<email>pbarker@konsulko.com</email>
</author>
<published>2021-01-19T16:26:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=36575a949399953f98fc1cfda4a3dcb5a295b02c'/>
<id>urn:sha1:36575a949399953f98fc1cfda4a3dcb5a295b02c</id>
<content type='text'>
By default, wic updates the /etc/fstab in the rootfs to include details
of additional partitions described in the selected wks file. If this
modification is performed in place, other tasks which create an image
file from the rootfs directory (e.g. do_image_tar and do_image_ext4)
will pick up the modified fstab file which would not be appropriate for
those images as they do not include the additional partitions described
in the wks file. wic does undo modifications to the fstab file once it
has finished creating the filesystem image, however this leaves open a
race condition if one of the other tasks reads the contents of the fstab
file from the rootfs directory between the point where wic modifies the
fstab file and the point where wic restores the files original content.

This could be solved by adding a lockfile for tasks which use the rootfs
directory to ensure that no other such task is reading the rootfs
directory while do_image_wic is running. This would serialize several
do_image_* tasks and result in slower builds, especially for large
images. Another drawback of this solution is that it is hard to
selectively optimise - adding lockfiles to do_image_* tasks would result
in these tasks always being serialized even if no fstab modification
will take place.

An alternative solution is to copy the rootfs directory when fstab needs
to be modified. The code to do this in wic already exists as it is
needed when including or excluding content in the rootfs. This still
results in an impact on build times but the copy uses hardlinks if
possible (so little data is actually copied) and we can make selective
optimisations to improve things. The rootfs copy will only take place if
fstab modification is required (or if it was already needed to include
or exclude rootfs content). We can also follow up with further
optimisations after this commit. So this second solution is chosen.

Fixes [Yocto #13994]

(From OE-Core rev: ce682a73b7447652f898ce1d1d0416a456df5416)

Signed-off-by: Paul Barker &lt;pbarker@konsulko.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: Update pseudo db when excluding content from rootfs</title>
<updated>2021-01-20T22:46:18+00:00</updated>
<author>
<name>Paul Barker</name>
<email>pbarker@konsulko.com</email>
</author>
<published>2021-01-19T16:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f85a4a1462bc2105f7c62f2b09c1d092c7677ada'/>
<id>urn:sha1:f85a4a1462bc2105f7c62f2b09c1d092c7677ada</id>
<content type='text'>
To exclude content from the rootfs, wic makes a copy (using hardlinks if
possible) of the rootfs directory and associated pseudo db, then removes
files &amp; directories as needed. However if these files and directories
are removed using the python functions os.remove and shutil.rmtree, the
copied pseudo db will not be updated correctly. For files copied from
the original rootfs, if hardlinks were used successfully when copying
the rootfs this should mean that the relevant inodes can't be reused and
so the risk of pseudo aborts should be avoided. However, this logic
doesn't apply for directories (as they can't be hardlinked) or for files
added via the '--include-path' argument (as they weren't present in the
original rootfs) and so there remains some risk of inodes being reused
and the pseudo db becoming corrupted.

To fix this, use the 'rm' command under pseudo when removing files &amp;
directories from the copied rootfs to ensure that the copied pseudo db
is updated.

(From OE-Core rev: d5db7e268947f0392c2126137571a44acd29ccd6)

Signed-off-by: Paul Barker &lt;pbarker@konsulko.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: Introduce empty plugin to create unformatted empty partitions</title>
<updated>2020-12-15T22:51:56+00:00</updated>
<author>
<name>Diego Sueiro</name>
<email>diego.sueiro@arm.com</email>
</author>
<published>2020-12-08T11:42:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=75b74f6b8d8eb69dd5e15e71243dea5c34ab36c9'/>
<id>urn:sha1:75b74f6b8d8eb69dd5e15e71243dea5c34ab36c9</id>
<content type='text'>
The empty wic plugin is used to create unformatted empty partitions for wic
images.

To use it you must pass "empty" as argument for the "--source" parameter in
the wks file. For example:
    part foo --source empty --ondisk sda --size="1024" --align 1024

Also adds a selftest for this plugin where the 'Fstype' column from 'wic
ls' should be empty for the second partition as listed in
test_empty_plugin.wks.

(From OE-Core rev: 77d174fc80663403ef76c5b808aafc1117d3545c)

Signed-off-by: Diego Sueiro &lt;diego.sueiro@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>isoimage-isohybrid.py: Support adding files/dirs</title>
<updated>2020-11-08T14:03:20+00:00</updated>
<author>
<name>Chaitanya Vadrevu</name>
<email>chaitanya.vadrevu@ni.com</email>
</author>
<published>2020-11-03T22:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ea5880f9f943a94491fef3af3f3cf94cd6087c4a'/>
<id>urn:sha1:ea5880f9f943a94491fef3af3f3cf94cd6087c4a</id>
<content type='text'>
Add "payload_dir" parameter so user can add other files/dirs
to the ISO.

(From OE-Core rev: bbe84a33c81066fee96dd28a4009d8404b51e642)

Signed-off-by: Chaitanya Vadrevu &lt;chaitanya.vadrevu@ni.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi and bootimg-partition</title>
<updated>2020-09-15T10:53:28+00:00</updated>
<author>
<name>Khairul Rohaizzat Jamaluddin</name>
<email>khairul.rohaizzat.jamaluddin@intel.com</email>
</author>
<published>2020-09-14T10:10:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=85574ce0cf84eaf828334dd2fafadc18909e73b5'/>
<id>urn:sha1:85574ce0cf84eaf828334dd2fafadc18909e73b5</id>
<content type='text'>
Due to recent changes in bootimg-efi to include IMAGE_BOOT_FILES,
when both bootimg-partition and bootimg-efi occur in a single .wks
and IMAGE_BOOT_FILES are defined, files listed in IMAGE_BOOT_FILES
will be duplicated in both partition.
Since IMAGE_BOOT_FILES are crucial for bootimg-partition, but
optional for bootimg-efi, hence allowing bootimg-efi to have the option
to ignore it.

The new variable, IMAGE_EFI_BOOT_FILES, was added to help handle this
issue. Its basic usage is the same as IMAGE_BOOT_FILES.
Usage example:
        ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \

This commit is also squashed with the updated testcase to cover for
this change.

[YOCTO #14011]

(From OE-Core rev: 945339e06b273df1935cfd784f548ef57e0b7f4c)

Signed-off-by: Khairul Rohaizzat Jamaluddin &lt;khairul.rohaizzat.jamaluddin@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: fix typo</title>
<updated>2020-08-06T14:12:39+00:00</updated>
<author>
<name>Daniel Ammann</name>
<email>daniel.ammann@bytesatwork.ch</email>
</author>
<published>2020-08-05T10:52:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f39694933ace695e2dfe917c5ac74349a2e00409'/>
<id>urn:sha1:f39694933ace695e2dfe917c5ac74349a2e00409</id>
<content type='text'>
(From OE-Core rev: 9ab4c4571d899d2eefcd2fc53af0851863f29008)

Signed-off-by: Daniel Ammann &lt;daniel.ammann@bytesatwork.ch&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic/bootimg-efi: Add support for IMAGE_BOOT_FILES</title>
<updated>2020-07-25T14:11:05+00:00</updated>
<author>
<name>Khasim Mohammed</name>
<email>khasim.mohammed@arm.com</email>
</author>
<published>2020-07-23T09:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=801f07fc00d43d107cb6ae671dbbb57ee91cc6be'/>
<id>urn:sha1:801f07fc00d43d107cb6ae671dbbb57ee91cc6be</id>
<content type='text'>
List of files defined using IMAGE_BOOT_FILES are installed into
the boot partition when preparing an image using the wic tool with
the bootimg-efi source plugin.

The code snippet introduced is taken as is from bootimg-partition.py

Change-Id: I8dbb6b4e7c24870f587a6f31e6ae4a87d7033782
Issue-Id: PLATFORMS-3134
(From OE-Core rev: a44ab3a4ee5b3c57812909c6194456f299d6ba7f)

Signed-off-by: Khasim Syed Mohammed &lt;khasim.mohammed@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: rootfs: Combine path_validation in one function</title>
<updated>2020-04-26T13:00:50+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2020-04-19T06:35:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=31b14186e90d8ce28ce0b088dbafc637a902db97'/>
<id>urn:sha1:31b14186e90d8ce28ce0b088dbafc637a902db97</id>
<content type='text'>
Combine all the common path validation in a function to avoid code
duplication.

Cc: Paul Barker &lt;pbarker@konsulko.com&gt;
(From OE-Core rev: ebd12b10d17db0b4176b0188407d7e9b8420eab1)

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo@ribalda.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: root: Add an opt. destination on include-path</title>
<updated>2020-04-26T13:00:50+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2020-04-19T06:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a293c76c53f985efb4cfbb97aa4facb59c0ccfb6'/>
<id>urn:sha1:a293c76c53f985efb4cfbb97aa4facb59c0ccfb6</id>
<content type='text'>
Allow specifying an optional destination to include-path and make the
option aware of permissions and owners.

It is very useful for making a partition that contains the rootfs for a
host and a target Eg:

/ -&gt; Roofs for the host
/export/ -&gt; Rootfs for the target (which will netboot)

Although today we support making a partition for "/export" this might
not be compatible with some upgrade systems, or we might be limited by
the number of partitions.

With this patch we can use something like:

part / --source rootfs --fstype=ext4 --include-path core-image-minimal-mtdutils export/ --include-path hello

on the .wks file.

Cc: Paul Barker &lt;pbarker@konsulko.com&gt;
(From OE-Core rev: e8c21c6ebaebde88151697381bdb2452f1171090)

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo@ribalda.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
