<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/lib/wic/plugins, branch yocto-3.4</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.4</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.4'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-10-04T14:03:53+00:00</updated>
<entry>
<title>wic/bootimg-efi: Add Unified Kernel Image option</title>
<updated>2021-10-04T14:03:53+00:00</updated>
<author>
<name>Kristian Klausen</name>
<email>kristian@klausen.dk</email>
</author>
<published>2021-09-28T12:44:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b8c0f073f6a282f89fba7711ec168d0638749300'/>
<id>urn:sha1:b8c0f073f6a282f89fba7711ec168d0638749300</id>
<content type='text'>
"A unified kernel image is a single EFI PE executable combining an EFI
stub loader, a kernel image, an initramfs image, and the kernel command
line.

[...]

Images of this type have the advantage that all metadata and payload
that makes up the boot entry is monopolized in a single PE file that can
be signed cryptographically as one for the purpose of EFI
SecureBoot."[1]

This commit adds a create-unified-kernel-image=true option to the
bootimg-efi plugin for creating a Unified Kernel Image[1] and installing
it into $BOOT/EFI/Linux/ with a .efi extension per the the Boot Loader
Specification[1][2]. This is useful for implementing Secure Boot.

systemd-boot is the only mainstream bootloader implementing the
specification, but GRUB should be able to boot the EFI binary, this
commit however doesn't implement the necessary changes to the GRUB
config generation logic to boot the Unified Kernel Image.

[1] https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images
[2] https://systemd.io/BOOT_LOADER_SPECIFICATION/

(From OE-Core rev: b0573f240525df561ddef6e47cb285b217d38487)

Signed-off-by: Kristian Klausen &lt;kristian@klausen.dk&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic:direct.py: ignore invalid mountpoints during fstab update</title>
<updated>2021-09-26T15:35:00+00:00</updated>
<author>
<name>Markus Volk</name>
<email>f_l_k@t-online.de</email>
</author>
<published>2021-09-25T18:01:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=37b4fa7a102f1212843411bd1d97202ba9da0e19'/>
<id>urn:sha1:37b4fa7a102f1212843411bd1d97202ba9da0e19</id>
<content type='text'>
wic fstab-update creates invalid entries for partitons that are not supposed to
be mounted from userspace eg u-boot partitions.

The following lines were added to fstab on a rock-pi-4:
/dev/mmcblk1p1 loader1 vfat defaults 0 0
/dev/mmcblk1p2 reserved1 vfat defaults 0 0
/dev/mmcblk1p3 reserved2 vfat defaults 0 0
/dev/mmcblk1p4 loader2 vfat defaults 0 0
/dev/mmcblk1p5 atf vfat defaults 0 0
/dev/mmcblk1p6 /boot vfat defaults 0 0

With this patch only valid entries should be added
/dev/mmcblk1p6 /boot vfat defaults 0 0

(From OE-Core rev: 7aa678ce804c21dc1dc51b9be442671bc33c4041)

Signed-off-by: MarkusVolk &lt;f_l_k@t-online.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: Add extra-space argument</title>
<updated>2021-09-06T08:49:50+00:00</updated>
<author>
<name>Kristian Klausen</name>
<email>kristian@klausen.dk</email>
</author>
<published>2021-09-03T13:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=73384ac936041e0122e8911d6c82a398df52b85b'/>
<id>urn:sha1:73384ac936041e0122e8911d6c82a398df52b85b</id>
<content type='text'>
This allows extra space to be added after the last partition and is
especially useful when free space is needed for ex: adding partitions on
first boot with ex: systemd-repart[1] and the image is tested in QEMU.

[1] https://www.freedesktop.org/software/systemd/man/systemd-repart.html

(From OE-Core rev: f81b188bcf5aa18746fd622eb7b5c0dcb0b5c93d)

Signed-off-by: Kristian Klausen &lt;kristian@klausen.dk&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: Add --no-fstab-update part option</title>
<updated>2021-08-20T07:53:03+00:00</updated>
<author>
<name>Daniel Gomez</name>
<email>daniel@qtec.com</email>
</author>
<published>2021-08-17T20:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6fdbc5144f3505b11f09364775a0c08cf62f4d21'/>
<id>urn:sha1:6fdbc5144f3505b11f09364775a0c08cf62f4d21</id>
<content type='text'>
When embedding a rootfs image (e.g. 'rootfs-dir') as a partition we
might want to keep the stock fstab for that image. In such a case, use
this option to not update the fstab and use the stock one instead.

This option allows you to specify which partitions get the fstab
updated and which get the stock fstab.

The option matches the argument you can pass to wic itself where the
same action is performed but for all the partitions.

Example:
    part /export --source rootfs --rootfs-dir=hockeycam-image
--fstype=ext4 --label export --align 1024 --no-fstab-update

    part / --source rootfs --fstype=ext4 --label rootfs --align 1024

(From OE-Core rev: ab4c95af8ecd15dc136194ab761afae756db5803)

Signed-off-by: Daniel Gomez &lt;daniel@qtec.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Use the label provided when formating a dos partition</title>
<updated>2021-06-29T21:18:56+00:00</updated>
<author>
<name>jbouchard</name>
<email>jeanbouch418@gmail.com</email>
</author>
<published>2021-06-28T00:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a79b5f0f2139bbd77df31704944630c8a5a0b562'/>
<id>urn:sha1:a79b5f0f2139bbd77df31704944630c8a5a0b562</id>
<content type='text'>
Previously the bootimg-pcbios wic plugin was not respecting
the --label option provided from the wks file. The plugin
was setting the label to 'boot'. With this fix, the --label
option is use. If no option are specified, then the default
is 'boot'.

(From OE-Core rev: 0fd7a73c1bd2486b7a022f0f69bbcb2e0d9cb141)

Signed-off-by: jbouchard &lt;jeanbouch418@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Add support for erofs filesystems</title>
<updated>2021-05-31T13:31:01+00:00</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2021-05-25T11:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=63b3c44d273d03fe3ac98d6f7c8e8475b468b44e'/>
<id>urn:sha1:63b3c44d273d03fe3ac98d6f7c8e8475b468b44e</id>
<content type='text'>
Since Linux 5.4 a new read-only filesystem is available, erofs.
Compared to squashfs it offers much better read performance with and
without compression enabled.
It suppports two optional compressors, lz4 and lz4hc.

&gt;From the mkfs.erofs man page:
EROFS is a new enhanced lightweight linux read-only filesystem with
modern designs (eg. no buffer head, reduced metadata, inline
xattrs/data, etc.) for scenarios which need high-performance read-only
requirements, e.g. Android OS for smartphones and LIVECDs.
It also provides fixed-sized output compression support, which improves
storage density, keeps relatively higher compression ratios, which is
more useful to achieve high performance for embedded devices with
limited  memory since it has unnoticable memory overhead and page cache
thrashing.

This commit adds support for three new filesystem targets:
erofs: erofs without compression
erofs-lz4: erofs with lz4 compresssion enabled
erofs-lz4hc: erofs with lz4hc compression enabled

(From OE-Core rev: 41dead1ff8ccc49e6cd6e6f5d41a59d164693e0d)

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/lib/scripts: Use bb.utils.rename() instead of os.rename()</title>
<updated>2021-05-06T10:16:23+00:00</updated>
<author>
<name>Devendra Tewari</name>
<email>devendra.tewari@gmail.com</email>
</author>
<published>2021-04-19T14:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b71375304f393db62e0894af66e9a60bb9a5c8cc'/>
<id>urn:sha1:b71375304f393db62e0894af66e9a60bb9a5c8cc</id>
<content type='text'>
Incremental build in Docker fails with:

OSError: [Errno 18] Invalid cross-device link

when source and destination are on different overlay filesystems.

Rather than adding fallback code to every call site, use a new wrapper
in bitbake which detects this case and falls back to shutil.move
which is slower but will handtle the overlay docker filesystems correctly.

[YOCTO #14301]

(From OE-Core rev: 656a65b2b84e7d529b89cf5de7eb838f902d84a2)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: debug mode to keep tmp directory</title>
<updated>2021-02-09T08:56:11+00:00</updated>
<author>
<name>Lee Chee Yang</name>
<email>Chee.Yang.Lee@intel.com</email>
</author>
<published>2021-02-08T01:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=34ea1433fcf5e2f256083f91f120e0b78c613ed5'/>
<id>urn:sha1:34ea1433fcf5e2f256083f91f120e0b78c613ed5</id>
<content type='text'>
files in wic tmp directory can be usefull for debugging, so do not remove
tmp directory when wic create run with debugging mode (-D or --debug).

also update wic.Wic.test_debug_short and wic.Wic.test_debug_long to
check for tmp directory.

[YOCTO#14216]

(From OE-Core rev: a122e2418b67d38f691edcf8dd846c167d6b4fa9)

Signed-off-by: Lee Chee Yang &lt;Chee.Yang.Lee@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<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>
</feed>
