<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/lib/wic, branch 5.3_M1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=5.3_M1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=5.3_M1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-06-16T16:57:30+00:00</updated>
<entry>
<title>wic: Avoid problems with "-" characters in plugin names</title>
<updated>2025-06-16T16:57:30+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2025-06-13T16:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d672a6c43f1791dc5e99305c3c028f1e206e6d2e'/>
<id>urn:sha1:d672a6c43f1791dc5e99305c3c028f1e206e6d2e</id>
<content type='text'>
Remap "-" characters in plugin names to "_" so wic plugins
can be extended using standard python class inheritance.

This change means wic files can be incrementally updated over time
to the correct name rather than breaking everything. Actual plugin
module files will need to be renamed as done in previous patches.

Also remove a double call to get_plugins() which isn't needed.

(From OE-Core rev: 6d9c76196ffad39e628aff76d53d6ecbb517cfa1)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: Update after plugin name changes</title>
<updated>2025-06-16T16:57:30+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2025-05-26T11:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a65fd2b9d58a9b7dc4c17a557eee555356334c2c'/>
<id>urn:sha1:a65fd2b9d58a9b7dc4c17a557eee555356334c2c</id>
<content type='text'>
Update the plugin names to account for the "-" to "_" plugin name change.

(From OE-Core rev: afa1b5c9f6ed17c021e37a54d0d6abee50a60bf9)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: plugins source bootimage/isoimage rename to allow be imported</title>
<updated>2025-06-16T16:57:30+00:00</updated>
<author>
<name>Anibal Limon</name>
<email>anibal@limonsoftware.com</email>
</author>
<published>2024-03-23T19:53:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=26694f2009f5df3a740c128fa55f3ed08769ff1e'/>
<id>urn:sha1:26694f2009f5df3a740c128fa55f3ed08769ff1e</id>
<content type='text'>
Python not support importing modules with - so change to _.

(From OE-Core rev: 2de444fc3ef450f45f8f93403544e8f7461657b0)

Signed-off-by: Anibal Limon &lt;anibal@limonsoftware.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: pluginbase ensure layer order when load plugins</title>
<updated>2025-06-16T16:57:30+00:00</updated>
<author>
<name>Anibal Limon</name>
<email>anibal@limonsoftware.com</email>
</author>
<published>2025-06-11T15:33:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c284a6c9ce7d77b44f765bfa11d0376e6b2aff8f'/>
<id>urn:sha1:c284a6c9ce7d77b44f765bfa11d0376e6b2aff8f</id>
<content type='text'>
To support extensions on wic plugins, the load order needs
to be grauntee matching BBLAYERS variable.

Fix cases when try to import a plugin from another layer,
example of the case to fix,

```
Traceback (most recent call last):
  File "/workspaces/ls/linux/layers/openembedded-core/scripts/wic",line
547, in &lt;module&gt;
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
...
  File "/workspaces/ls/linux/layers/openembedded-core/scripts/lib/wic/
engine.py", line 137, in list_source_plugins
    plugins = PluginMgr.get_plugins('source')
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/ls/linux/layers/openembedded-core/scripts/lib/wic/
pluginbase.py", line 73, in get_plugins
    spec.loader.exec_module(module)
  File "&lt;frozen importlib._bootstrap_external&gt;", line 940, in exec_module
  File "&lt;frozen importlib._bootstrap&gt;", line 241, in _call_with_frames_removed
  File "/workspaces/ls/linux/limonsoftware/bsp/scripts/lib/wic/plugins/
source/bootimg_rpi_autoboot_partition.py", line 1, in &lt;module&gt;
    from wic.plugins.source.bootimg_partition import BootimgPartitionPlugin
ModuleNotFoundError: No module named 'wic.plugins.source.bootimg_partition'
```

(From OE-Core rev: 16c8251e5272510ad96613b8c6623550c5a72a34)

Signed-off-by: Anibal Limon &lt;anibal@limonsoftware.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic bootimg-efi.py: fail build if no binaries installed</title>
<updated>2025-06-02T21:17:24+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2025-05-30T11:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c9cb41e293556e64bb8adb0fabd6b9608acb3211'/>
<id>urn:sha1:c9cb41e293556e64bb8adb0fabd6b9608acb3211</id>
<content type='text'>
With systemd-boot, some builds included correct EFI
bootloader binaries and some not. Thus some builds
booted and some not. Check that some boot binary
was installed so that build fails if none were installed.

(From OE-Core rev: 93fad905b9d5f5cee89408901e4be1630955ab75)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake.conf/pseudo: Switch from exclusion list to inclusion list</title>
<updated>2025-05-12T21:01:56+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2025-05-10T15:54:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6a2ad60ecc7739d7dbfdf74d67200df374bca4ef'/>
<id>urn:sha1:6a2ad60ecc7739d7dbfdf74d67200df374bca4ef</id>
<content type='text'>
Currently, pseudo tracks all files referenced within its presence unless
they're listed in an exclusion list. The exclusion list has grown to be
fairly unwieldy.

This patch swaps PSEUDO_IGNORE_PATHS for PSEUDO_INCLUDE_PATHS which in
theory should be easier and more explicit to maintain.

This change does drop many directories from pseudo coverage including
/home and /tmp. There may be adapatations needed for recipes/classes
using pseudo in specific ways.

(From OE-Core rev: 2502da81709f25de499277b28d33c915638c45f6)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>efi-uki-bootdisk.wks.in: reduce ESP boot partition size</title>
<updated>2025-04-29T08:59:01+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2025-04-23T08:46:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ad6d71a326727eb5f48458950566e475f1b44489'/>
<id>urn:sha1:ad6d71a326727eb5f48458950566e475f1b44489</id>
<content type='text'>
This sample ESP partition is used mostly for testing purposes.
It's not expected to host multiple UKI binaries for example.
Thus reduce size from 500 Mb to size of needed boot binaries
72 Mb plus around 20% free space 88Mb. This is enough for
all test cases and fits to RAM when using PMEM memory based
block device on real target boards with just a few Gb of RAM.

(From OE-Core rev: 7a4b90ef3815aa227236ec9b95540233db8ac3b3)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: do not ignore ROOTFS_SIZE if the rootfs is modified</title>
<updated>2025-04-17T10:03:22+00:00</updated>
<author>
<name>Trevor Woerner</name>
<email>twoerner@gmail.com</email>
</author>
<published>2025-04-15T02:04:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=35807e8f634ce86bc77b3461cb0deb466c08a9d2'/>
<id>urn:sha1:35807e8f634ce86bc77b3461cb0deb466c08a9d2</id>
<content type='text'>
If the *.wks file contains a "--source rootfs" then
lib/wic/plugins/source/rootfs.py will be invoked to generate (what is assumed
to be) the rootfs partition. If the rootfs partition needs to be tweaked or
modified, the "rootfs.py" plugin will make a copy of the filesystem and then
perform the changes on that copy. In other words, if the "--source rootfs"
line of the *.wks file also contains any of:

	--exclude-path
	--include-path
	--change-directory
	--use-label (i.e. modify etc/fstab)

then the rootfs will be copied first, then the copy is modified.

If, for example, the unmodified IMAGE_ROOTFS is:

	.../tmp/work/qemuarm64_secureboot-oe-linux/core-image-base/1.0/rootfs

then the copy would be made at:

	.../tmp/work/qemuarm64_secureboot-oe-linux/core-image-base/1.0/tmp-wic/rootfs${LINENO}

where ${LINENO} is the line number where this "--source rootfs" line appears
in the *wks file.

When it comes time to make an actual partition of a specific filesystem type,
lib/wic/partition.py::prepare_rootfs() is called. It is in this function that
wic figures out if any extra size needs to be added. The bitbake variable used
to specify the ultimate rootfs size is ROOTFS_SIZE, and since this variable is
only valid for the rootfs (and not any other partitions), the code also
verifies that the partition being created is ${IMAGE_ROOTFS}:

	rsize_bb = get_bitbake_var('ROOTFS_SIZE')
	rdir = get_bitbake_var('IMAGE_ROOTFS')
	if rsize_bb and rdir == rootfs_dir:
		&lt;use rsize_bb&gt;
	else:
		&lt;calculate the partition size using "du -ks $p"&gt;

As noted above, if lib/wic/plugins/source/rootfs.py has made a copy, then the
"rdir == rootfs_dir" clause will fail and the code will assume this partition
is not a rootfs since the strings do not compare equal.

Therefore, in order to determine if this is a rootfs, retain the existing
"rdir == rootfs_dir" comparison, but also add another one to check whether or
not this is a wic-generated copy of the rootfs.

STEPS TO REPRODUCE:
	- start with the following *wks file:
		bootloader --ptable gpt
		part /boot --size=100M --active --fstype=ext4 --label boot
		part /     --source rootfs      --fstype=ext4 --label root
	- and the following extra variable in conf/local.conf:
		IMAGE_ROOTFS_EXTRA_SPACE = "500000"
	- build an image
	- run it in qemu
		$ runqemu slirp nographic serial
	- verify the root partition has extra space:
		root@qemuarm64-secureboot:~# df -h
		Filesystem                Size      Used Available Use% Mounted on
		/dev/root               721.5M     67.4M    600.6M  10% /
		devtmpfs                477.7M         0    477.7M   0% /dev
		tmpfs                    40.0K         0     40.0K   0% /mnt
		tmpfs                   489.3M     92.0K    489.2M   0% /run
		tmpfs                   489.3M     68.0K    489.2M   0% /var/volatile
		/dev/vda1               120.4M     19.9M     91.4M  18% /boot
	- modify the "/" line of the *wks file to be:
		part /     --source rootfs      --fstype=ext4 --label root --exclude-path boot/
	- build image

	when it fails:
		root@qemuarm64-secureboot:~# df -h
		Filesystem                Size      Used Available Use% Mounted on
		/dev/root                73.4M     41.9M     25.8M  62% /
		devtmpfs                477.7M         0    477.7M   0% /dev
		tmpfs                    40.0K         0     40.0K   0% /mnt
		tmpfs                   489.3M     92.0K    489.2M   0% /run
		tmpfs                   489.3M     68.0K    489.2M   0% /var/volatile
		/dev/vda1               120.4M     19.9M     91.4M  18% /boot

	after this fix:
		root@qemuarm64-secureboot:~# df -h
		Filesystem                Size      Used Available Use% Mounted on
		/dev/root               721.5M     47.4M    620.6M   7% /
		devtmpfs                477.7M         0    477.7M   0% /dev
		tmpfs                    40.0K         0     40.0K   0% /mnt
		tmpfs                   489.3M     92.0K    489.2M   0% /run
		tmpfs                   489.3M     68.0K    489.2M   0% /var/volatile
		/dev/vda1               120.4M     19.9M     91.4M  18% /boot

Doing the math we see that the /boot partition is ~20MB and in the first image
the / partition contains this ~20MB in addition to the rest of the rootfs.
This ~20MB is completely wasted since it is used in the / partition, but then
the /boot partition is mounted on top of it, making the /boot directory of /
inaccessible. After the fix the / partition has an additional ~20MB since the
/boot portion is excluded.

Fixes [YOCTO #15555]

(From OE-Core rev: 1c690aa046ebca13d7b29de50d42b5d8a4a8486c)

Signed-off-by: Trevor Woerner &lt;twoerner@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: bootimg-efi: Support + symbol in filenames</title>
<updated>2025-02-10T13:03:58+00:00</updated>
<author>
<name>Igor Opaniuk</name>
<email>igor.opaniuk@foundries.io</email>
</author>
<published>2025-02-06T20:05:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=10870db533607cd6db73801f4c044ef58a5a06d7'/>
<id>urn:sha1:10870db533607cd6db73801f4c044ef58a5a06d7</id>
<content type='text'>
Allow the '+' symbol as a valid character in filenames listed in the
IMAGE_EFI_BOOT_FILES variable.

The '+' symbol might be used to support boot counting for boot entries,
as described in the UAPI Boot Loader Specification [1]:

The boot counting data is stored in the name of the boot loader entry.
A boot loader entry file name may contain a plus (+) followed by a
number. This may optionally be followed by a minus (-)
followed by a second number. The dot (.) and file name suffix
(conf or efi) must immediately follow.
Boot counting is enabled for entries which match this pattern.

Example:
IMAGE_EFI_BOOT_FILES:append = " entry.conf;loader/entries/entry+3.conf"

[1] https://uapi-group.org/specifications/specs/boot_loader_specification/#boot-counting
(From OE-Core rev: 3f25822281eb9423ff86105eaebb0bed48663648)

Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@foundries.io&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wic: add documentation for existing options to help.py</title>
<updated>2024-12-28T10:57:00+00:00</updated>
<author>
<name>Stefan Gloor</name>
<email>code@stefan-gloor.ch</email>
</author>
<published>2024-12-25T12:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=25520303d9f64f574f3c8c4740781211cb34c18a'/>
<id>urn:sha1:25520303d9f64f574f3c8c4740781211cb34c18a</id>
<content type='text'>
Add wic kickstart help for undocumented options for part/partition and
bootloader command.

(From OE-Core rev: 59786183c41b93b49fe97926dd77904c8d66b356)

Signed-off-by: Stefan Gloor &lt;code@stefan-gloor.ch&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
