summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--documentation/README10
-rw-r--r--documentation/bsp-guide/bsp.rst54
-rw-r--r--documentation/contributor-guide/submit-changes.rst4
-rw-r--r--documentation/dev-manual/building.rst4
-rw-r--r--documentation/dev-manual/debugging.rst4
-rw-r--r--documentation/dev-manual/new-recipe.rst2
-rw-r--r--documentation/dev-manual/sbom.rst3
-rw-r--r--documentation/dev-manual/start.rst2
-rw-r--r--documentation/dev-manual/vulnerabilities.rst2
-rw-r--r--documentation/migration-guides/migration-5.3.rst42
-rw-r--r--documentation/migration-guides/release-5.0.rst1
-rw-r--r--documentation/migration-guides/release-notes-4.3.rst4
-rw-r--r--documentation/migration-guides/release-notes-5.0.10.rst208
-rw-r--r--documentation/migration-guides/release-notes-5.1.rst2
-rw-r--r--documentation/migration-guides/release-notes-5.2.rst4
-rw-r--r--documentation/overview-manual/concepts.rst25
-rw-r--r--documentation/overview-manual/development-environment.rst6
-rw-r--r--documentation/overview-manual/yp-intro.rst2
-rw-r--r--documentation/ref-manual/classes.rst245
-rw-r--r--documentation/ref-manual/resources.rst4
-rw-r--r--documentation/ref-manual/system-requirements.rst2
-rw-r--r--documentation/ref-manual/variables.rst84
-rw-r--r--documentation/standards.md11
-rw-r--r--documentation/transitioning-to-a-custom-environment.rst4
-rw-r--r--documentation/what-i-wish-id-known.rst4
-rw-r--r--meta/classes-recipe/rust-target-config.bbclass65
-rw-r--r--meta/conf/machine/include/riscv/README122
-rw-r--r--meta/conf/machine/include/riscv/arch-riscv.inc138
-rw-r--r--meta/conf/machine/include/riscv/tune-riscv.inc40
-rw-r--r--meta/conf/machine/qemuriscv32.conf4
-rw-r--r--meta/lib/oe/__init__.py2
-rw-r--r--meta/lib/oe/rust.py2
-rw-r--r--meta/lib/oe/tune.py81
-rw-r--r--meta/lib/oeqa/utils/commands.py15
-rw-r--r--meta/recipes-devtools/go/go-binary-native_1.24.4.bb1
-rw-r--r--meta/recipes-devtools/go/go-common.inc1
36 files changed, 958 insertions, 246 deletions
diff --git a/documentation/README b/documentation/README
index 02037e0f7e..56eac7ca19 100644
--- a/documentation/README
+++ b/documentation/README
@@ -314,6 +314,16 @@ See https://stackoverflow.com/questions/27420317/restructured-text-rst-http-link
314Anchor (<#link>) links are forbidden as they are not checked by Sphinx during 314Anchor (<#link>) links are forbidden as they are not checked by Sphinx during
315the build and may be broken without knowing about it. 315the build and may be broken without knowing about it.
316 316
317It is also possible to refer to another document within yocto-docs with the
318:doc: directive (c.f.
319https://www.sphinx-doc.org/en/master/usage/referencing.html#role-doc), e.g.:
320
321 For more information, read :doc:`/bsp-guide/index`.
322
323Note that only "absolute" paths (starting with a '/') are allowed. The root
324directory of that path is documentation/, that is, :doc:`/bsp-guide/index`
325points at documentation/bsp-guide/index.rst.
326
317References 327References
318========== 328==========
319 329
diff --git a/documentation/bsp-guide/bsp.rst b/documentation/bsp-guide/bsp.rst
index 35972f1726..09246b4ae4 100644
--- a/documentation/bsp-guide/bsp.rst
+++ b/documentation/bsp-guide/bsp.rst
@@ -674,21 +674,21 @@ to the kernel recipe by using a similarly named append file, which is
674located in the BSP Layer for your target device (e.g. the 674located in the BSP Layer for your target device (e.g. the
675``meta-bsp_root_name/recipes-kernel/linux`` directory). 675``meta-bsp_root_name/recipes-kernel/linux`` directory).
676 676
677Suppose you are using the ``linux-yocto_4.4.bb`` recipe to build the 677Suppose you are using the ``linux-yocto_6.12.bb`` recipe to build the
678kernel. In other words, you have selected the kernel in your 678kernel. In other words, you have selected the kernel in your
679``"bsp_root_name".conf`` file by adding 679``"bsp_root_name".conf`` file by adding
680:term:`PREFERRED_PROVIDER` and :term:`PREFERRED_VERSION` 680:term:`PREFERRED_PROVIDER` and :term:`PREFERRED_VERSION`
681statements as follows:: 681statements as follows::
682 682
683 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" 683 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
684 PREFERRED_VERSION_linux-yocto ?= "4.4%" 684 PREFERRED_VERSION_linux-yocto ?= "6.12%"
685 685
686.. note:: 686.. note::
687 687
688 When the preferred provider is assumed by default, the :term:`PREFERRED_PROVIDER` 688 When the preferred provider is assumed by default, the :term:`PREFERRED_PROVIDER`
689 statement does not appear in the ``"bsp_root_name".conf`` file. 689 statement does not appear in the ``"bsp_root_name".conf`` file.
690 690
691You would use the ``linux-yocto_4.4.bbappend`` file to append specific 691You would use the ``linux-yocto_6.12.bbappend`` file to append specific
692BSP settings to the kernel, thus configuring the kernel for your 692BSP settings to the kernel, thus configuring the kernel for your
693particular BSP. 693particular BSP.
694 694
@@ -698,14 +698,19 @@ in the Yocto Project Linux Kernel Development Manual.
698 698
699An alternate scenario is when you create your own kernel recipe for the 699An alternate scenario is when you create your own kernel recipe for the
700BSP. A good example of this is the Raspberry Pi BSP. If you examine the 700BSP. A good example of this is the Raspberry Pi BSP. If you examine the
701``recipes-kernel/linux`` directory you see the following:: 701``recipes-kernel/linux`` directory in that layer you see the following
702Raspberry Pi-specific recipes and associated files::
702 703
704 files/
705 linux-raspberrypi_6.12.bb
706 linux-raspberrypi_6.1.bb
707 linux-raspberrypi_6.6.bb
703 linux-raspberrypi-dev.bb 708 linux-raspberrypi-dev.bb
704 linux-raspberrypi.inc 709 linux-raspberrypi.inc
705 linux-raspberrypi_4.14.bb 710 linux-raspberrypi-v7_6.12.bb
706 linux-raspberrypi_4.9.bb 711 linux-raspberrypi-v7_6.1.bb
707 712 linux-raspberrypi-v7_6.6.bb
708The directory contains three kernel recipes and a common include file. 713 linux-raspberrypi-v7.inc
709 714
710Developing a Board Support Package (BSP) 715Developing a Board Support Package (BSP)
711======================================== 716========================================
@@ -876,7 +881,7 @@ The requirements for a released BSP that conform to the Yocto Project are:
876 ``recipes-*`` subdirectories specific to the recipe's function, or 881 ``recipes-*`` subdirectories specific to the recipe's function, or
877 within a subdirectory containing a set of closely-related recipes. 882 within a subdirectory containing a set of closely-related recipes.
878 The recipes themselves should follow the general guidelines for 883 The recipes themselves should follow the general guidelines for
879 recipes found in the ":doc:`../contributor-guide/recipe-style-guide`" 884 recipes found in the ":doc:`/contributor-guide/recipe-style-guide`"
880 in the Yocto Project and OpenEmbedded Contributor Guide. 885 in the Yocto Project and OpenEmbedded Contributor Guide.
881 886
882- *License File:* You must include a license file in the 887- *License File:* You must include a license file in the
@@ -910,7 +915,7 @@ The requirements for a released BSP that conform to the Yocto Project are:
910 - The name and contact information for the BSP layer maintainer. 915 - The name and contact information for the BSP layer maintainer.
911 This is the person to whom patches and questions should be sent. 916 This is the person to whom patches and questions should be sent.
912 For information on how to find the right person, see the 917 For information on how to find the right person, see the
913 :doc:`../contributor-guide/submit-changes` section in the Yocto Project and 918 :doc:`/contributor-guide/submit-changes` section in the Yocto Project and
914 OpenEmbedded Contributor Guide. 919 OpenEmbedded Contributor Guide.
915 920
916 - Instructions on how to build the BSP using the BSP layer. 921 - Instructions on how to build the BSP using the BSP layer.
@@ -1177,7 +1182,7 @@ Use these steps to create a BSP layer:
1177 1182
1178- *Create a Kernel Recipe:* Create a kernel recipe in 1183- *Create a Kernel Recipe:* Create a kernel recipe in
1179 ``recipes-kernel/linux`` by either using a kernel append file or a 1184 ``recipes-kernel/linux`` by either using a kernel append file or a
1180 new custom kernel recipe file (e.g. ``linux-yocto_4.12.bb``). The BSP 1185 new custom kernel recipe file (e.g. ``linux-yocto_6.12.bb``). The BSP
1181 layers mentioned in the previous step also contain different kernel 1186 layers mentioned in the previous step also contain different kernel
1182 examples. See the ":ref:`kernel-dev/common:modifying an existing recipe`" 1187 examples. See the ":ref:`kernel-dev/common:modifying an existing recipe`"
1183 section in the Yocto Project Linux Kernel Development Manual for 1188 section in the Yocto Project Linux Kernel Development Manual for
@@ -1242,7 +1247,7 @@ located in :yocto_git:`poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
1242 1247
1243 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" 1248 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
1244 1249
1245 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" 1250 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
1246 1251
1247 EXTRA_IMAGEDEPENDS += "virtual/bootloader" 1252 EXTRA_IMAGEDEPENDS += "virtual/bootloader"
1248 1253
@@ -1258,23 +1263,21 @@ located in :yocto_git:`poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
1258 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0" 1263 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0"
1259 1264
1260 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" 1265 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
1261 PREFERRED_VERSION_linux-yocto ?= "6.1%" 1266 PREFERRED_VERSION_linux-yocto ?= "6.12%"
1262 1267
1263 KERNEL_IMAGETYPE = "zImage" 1268 KERNEL_IMAGETYPE = "zImage"
1264 KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" 1269 DTB_FILES = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
1265 KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" 1270 KERNEL_DEVICETREE = '${@' '.join('ti/omap/%s' % d for d in '${DTB_FILES}'.split())}'
1266 1271
1267 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" 1272 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
1268 1273
1269 SPL_BINARY = "MLO" 1274 SPL_BINARY = "MLO"
1270 UBOOT_SUFFIX = "img" 1275 UBOOT_SUFFIX = "img"
1271 UBOOT_MACHINE = "am335x_evm_defconfig" 1276 UBOOT_MACHINE = "am335x_evm_defconfig"
1272 UBOOT_ENTRYPOINT = "0x80008000"
1273 UBOOT_LOADADDRESS = "0x80008000"
1274 1277
1275 MACHINE_FEATURES = "usbgadget usbhost vfat alsa" 1278 MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
1276 1279
1277 IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} ${SPL_BINARY} ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE}" 1280 IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} ${SPL_BINARY} ${KERNEL_IMAGETYPE} ${DTB_FILES}"
1278 1281
1279 # support runqemu 1282 # support runqemu
1280 EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" 1283 EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
@@ -1328,12 +1331,12 @@ Project Reference Manual.
1328 needed in the root filesystem. In this case, the U-Boot recipe must 1331 needed in the root filesystem. In this case, the U-Boot recipe must
1329 be built for the image. 1332 be built for the image.
1330 1333
1331 At the end of the file, we also use this setings to implement 1334 At the end of the file, we also use this setting to implement
1332 ``runqemu`` support on the host machine. 1335 ``runqemu`` support on the host machine.
1333 1336
1334- :term:`DEFAULTTUNE`: Machines 1337- :term:`DEFAULTTUNE`: Machines
1335 use tunings to optimize machine, CPU, and application performance. 1338 use tunings to optimize machine, CPU, and application performance.
1336 These features, which are collectively known as "tuning features", 1339 These features --- collectively known as "tuning features" ---
1337 are set in the :term:`OpenEmbedded-Core (OE-Core)` layer. In this 1340 are set in the :term:`OpenEmbedded-Core (OE-Core)` layer. In this
1338 example, the default tuning file is :oe_git:`tune-cortexa8 1341 example, the default tuning file is :oe_git:`tune-cortexa8
1339 </openembedded-core/tree/meta/conf/machine/include/arm/armv7a/tune-cortexa8.inc>`. 1342 </openembedded-core/tree/meta/conf/machine/include/arm/armv7a/tune-cortexa8.inc>`.
@@ -1363,8 +1366,7 @@ Project Reference Manual.
1363 to create the sysroot when building a Wic image. 1366 to create the sysroot when building a Wic image.
1364 1367
1365- :term:`SERIAL_CONSOLES`: 1368- :term:`SERIAL_CONSOLES`:
1366 Defines a serial console (TTY) to enable using getty. In this case, 1369 Defines one or more serial consoles (TTYs) to enable using getty.
1367 the baud rate is "115200" and the device name is "ttyO0".
1368 1370
1369- :term:`PREFERRED_PROVIDER_virtual/kernel <PREFERRED_PROVIDER>`: 1371- :term:`PREFERRED_PROVIDER_virtual/kernel <PREFERRED_PROVIDER>`:
1370 Specifies the recipe that provides "virtual/kernel" when more than 1372 Specifies the recipe that provides "virtual/kernel" when more than
@@ -1374,7 +1376,7 @@ Project Reference Manual.
1374 1376
1375- :term:`PREFERRED_VERSION_linux-yocto <PREFERRED_VERSION>`: 1377- :term:`PREFERRED_VERSION_linux-yocto <PREFERRED_VERSION>`:
1376 Defines the version of the recipe used to build the kernel, which is 1378 Defines the version of the recipe used to build the kernel, which is
1377 "6.1" in this case. 1379 "6.12" in this case.
1378 1380
1379- :term:`KERNEL_IMAGETYPE`: 1381- :term:`KERNEL_IMAGETYPE`:
1380 The type of kernel to build for the device. In this case, the 1382 The type of kernel to build for the device. In this case, the
@@ -1416,12 +1418,6 @@ Project Reference Manual.
1416 Specifies the value passed on the make command line when building 1418 Specifies the value passed on the make command line when building
1417 a U-Boot image. 1419 a U-Boot image.
1418 1420
1419 - :term:`UBOOT_ENTRYPOINT`:
1420 Specifies the entry point for the U-Boot image.
1421
1422 - :term:`UBOOT_LOADADDRESS`:
1423 Specifies the load address for the U-Boot image.
1424
1425- :term:`MACHINE_FEATURES`: 1421- :term:`MACHINE_FEATURES`:
1426 Specifies the list of hardware features the BeagleBone device is 1422 Specifies the list of hardware features the BeagleBone device is
1427 capable of supporting. In this case, the device supports "usbgadget 1423 capable of supporting. In this case, the device supports "usbgadget
diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
index 6d5d69d7cf..adb78fa08d 100644
--- a/documentation/contributor-guide/submit-changes.rst
+++ b/documentation/contributor-guide/submit-changes.rst
@@ -76,7 +76,7 @@ Clone the Git repository for the component to modify
76---------------------------------------------------- 76----------------------------------------------------
77 77
78After identifying the component to modify as described in the 78After identifying the component to modify as described in the
79":doc:`../contributor-guide/identify-component`" section, clone the 79":doc:`/contributor-guide/identify-component`" section, clone the
80corresponding Git repository. Here is an example for OpenEmbedded-Core:: 80corresponding Git repository. Here is an example for OpenEmbedded-Core::
81 81
82 git clone https://git.openembedded.org/openembedded-core 82 git clone https://git.openembedded.org/openembedded-core
@@ -872,7 +872,7 @@ in regards to the use of generative AI tools. See:
872https://www.linuxfoundation.org/legal/generative-ai. 872https://www.linuxfoundation.org/legal/generative-ai.
873 873
874All of the existing guidelines in this document are expected to be followed, 874All of the existing guidelines in this document are expected to be followed,
875including in the :doc:`recipe-style-guide`, and contributing the changes with 875including in the :doc:`/contributor-guide/recipe-style-guide`, and contributing the changes with
876additional requirements to the items in section 876additional requirements to the items in section
877:ref:`contributor-guide/submit-changes:Implement and commit changes`. 877:ref:`contributor-guide/submit-changes:Implement and commit changes`.
878 878
diff --git a/documentation/dev-manual/building.rst b/documentation/dev-manual/building.rst
index 807c665f68..865d2e1b67 100644
--- a/documentation/dev-manual/building.rst
+++ b/documentation/dev-manual/building.rst
@@ -48,7 +48,7 @@ The following figure and list overviews the build process:
48 :width: 100% 48 :width: 100%
49 49
50#. *Set up Your Host Development System to Support Development Using the 50#. *Set up Your Host Development System to Support Development Using the
51 Yocto Project*: See the ":doc:`start`" section for options on how to get a 51 Yocto Project*: See the ":doc:`/dev-manual/start`" section for options on how to get a
52 build host ready to use the Yocto Project. 52 build host ready to use the Yocto Project.
53 53
54#. *Initialize the Build Environment:* Initialize the build environment 54#. *Initialize the Build Environment:* Initialize the build environment
@@ -113,7 +113,7 @@ The following figure and list overviews the build process:
113Building Images for Multiple Targets Using Multiple Configurations 113Building Images for Multiple Targets Using Multiple Configurations
114================================================================== 114==================================================================
115 115
116See the :doc:`multiconfig` section of the Yocto Project Development Tasks 116See the :doc:`/dev-manual/multiconfig` section of the Yocto Project Development Tasks
117Manual. 117Manual.
118 118
119Building an Initial RAM Filesystem (Initramfs) Image 119Building an Initial RAM Filesystem (Initramfs) Image
diff --git a/documentation/dev-manual/debugging.rst b/documentation/dev-manual/debugging.rst
index 8552b26aea..6c45ccf652 100644
--- a/documentation/dev-manual/debugging.rst
+++ b/documentation/dev-manual/debugging.rst
@@ -890,7 +890,7 @@ The build should work without issue.
890As with all solved problems, if they originated upstream, you need to 890As with all solved problems, if they originated upstream, you need to
891submit the fix for the recipe in OE-Core and upstream so that the 891submit the fix for the recipe in OE-Core and upstream so that the
892problem is taken care of at its source. See the 892problem is taken care of at its source. See the
893":doc:`../contributor-guide/submit-changes`" section for more information. 893":doc:`/contributor-guide/submit-changes`" section for more information.
894 894
895Debugging With the GNU Project Debugger (GDB) Remotely 895Debugging With the GNU Project Debugger (GDB) Remotely
896====================================================== 896======================================================
@@ -1261,7 +1261,7 @@ Here are some other tips that you might find useful:
1261 :yocto_bugs:`Bugzilla <>`. For information on 1261 :yocto_bugs:`Bugzilla <>`. For information on
1262 how to submit a bug against the Yocto Project, see the Yocto Project 1262 how to submit a bug against the Yocto Project, see the Yocto Project
1263 Bugzilla :yocto_wiki:`wiki page </Bugzilla_Configuration_and_Bug_Tracking>` 1263 Bugzilla :yocto_wiki:`wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
1264 and the ":doc:`../contributor-guide/report-defect`" section. 1264 and the ":doc:`/contributor-guide/report-defect`" section.
1265 1265
1266 .. note:: 1266 .. note::
1267 1267
diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index 9792bd4c1f..c49881efe6 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -1401,7 +1401,7 @@ Following Recipe Style Guidelines
1401================================= 1401=================================
1402 1402
1403When writing recipes, it is good to conform to existing style guidelines. 1403When writing recipes, it is good to conform to existing style guidelines.
1404See the ":doc:`../contributor-guide/recipe-style-guide`" in the Yocto Project 1404See the ":doc:`/contributor-guide/recipe-style-guide`" in the Yocto Project
1405and OpenEmbedded Contributor Guide for reference. 1405and OpenEmbedded Contributor Guide for reference.
1406 1406
1407It is common for existing recipes to deviate a bit from this style. 1407It is common for existing recipes to deviate a bit from this style.
diff --git a/documentation/dev-manual/sbom.rst b/documentation/dev-manual/sbom.rst
index e6806ce929..ca0fc8b9d6 100644
--- a/documentation/dev-manual/sbom.rst
+++ b/documentation/dev-manual/sbom.rst
@@ -60,6 +60,9 @@ more information in the output :term:`SPDX` data:
60- Add a description of the source files used to generate host tools and target 60- Add a description of the source files used to generate host tools and target
61 packages (:term:`SPDX_INCLUDE_SOURCES`) 61 packages (:term:`SPDX_INCLUDE_SOURCES`)
62 62
63- Add a description of the **compiled** source files used to generate host tools
64 and target packages (:term:`SPDX_INCLUDE_COMPILED_SOURCES`)
65
63- Add archives of these source files themselves (:term:`SPDX_ARCHIVE_SOURCES`). 66- Add archives of these source files themselves (:term:`SPDX_ARCHIVE_SOURCES`).
64 67
65Though the toplevel :term:`SPDX` output is available in 68Though the toplevel :term:`SPDX` output is available in
diff --git a/documentation/dev-manual/start.rst b/documentation/dev-manual/start.rst
index 73548132a3..d77da04276 100644
--- a/documentation/dev-manual/start.rst
+++ b/documentation/dev-manual/start.rst
@@ -234,7 +234,7 @@ particular working environment and set of practices.
234 - The Yocto Project community encourages you to send patches to the 234 - The Yocto Project community encourages you to send patches to the
235 project to fix bugs or add features. If you do submit patches, 235 project to fix bugs or add features. If you do submit patches,
236 follow the project commit guidelines for writing good commit 236 follow the project commit guidelines for writing good commit
237 messages. See the ":doc:`../contributor-guide/submit-changes`" 237 messages. See the ":doc:`/contributor-guide/submit-changes`"
238 section in the Yocto Project and OpenEmbedded Contributor Guide. 238 section in the Yocto Project and OpenEmbedded Contributor Guide.
239 239
240 - Send changes to the core sooner than later as others are likely 240 - Send changes to the core sooner than later as others are likely
diff --git a/documentation/dev-manual/vulnerabilities.rst b/documentation/dev-manual/vulnerabilities.rst
index d901ff975b..5331a63991 100644
--- a/documentation/dev-manual/vulnerabilities.rst
+++ b/documentation/dev-manual/vulnerabilities.rst
@@ -22,7 +22,7 @@ issues may be impacting Poky and OE-Core. It is up to the maintainers, users,
22contributors and anyone interested in the issues to investigate and possibly fix them by 22contributors and anyone interested in the issues to investigate and possibly fix them by
23updating software components to newer versions or by applying patches to address them. 23updating software components to newer versions or by applying patches to address them.
24It is recommended to work with Poky and OE-Core upstream maintainers and submit 24It is recommended to work with Poky and OE-Core upstream maintainers and submit
25patches to fix them, see ":doc:`../contributor-guide/submit-changes`" for details. 25patches to fix them, see ":doc:`/contributor-guide/submit-changes`" for details.
26 26
27Vulnerability check at build time 27Vulnerability check at build time
28================================= 28=================================
diff --git a/documentation/migration-guides/migration-5.3.rst b/documentation/migration-guides/migration-5.3.rst
index 22653fc911..09095c7bb2 100644
--- a/documentation/migration-guides/migration-5.3.rst
+++ b/documentation/migration-guides/migration-5.3.rst
@@ -59,6 +59,48 @@ Removed classes
59 59
60The following classes have been removed in this release: 60The following classes have been removed in this release:
61 61
62- ``kernel-fitimage.bbclass``: the class has been replaced by the
63 :ref:`ref-classes-kernel-fit-image` class. The new implementation resolves
64 the long-standing :yocto_bugs:`bug 12912</show_bug.cgi?id=12912>`.
65
66 If you are using the kernel FIT image support, you will need to:
67
68 #. Make sure to include ``kernel-fit-extra-artifacts`` in your :term:`KERNEL_CLASSES`
69 variable to ensure the required files are exposed to the :term:`DEPLOY_DIR_IMAGE`
70 directory::
71
72 KERNEL_CLASSES += "kernel-fit-extra-artifacts"
73
74 #. Use the specific FIT image recipe rather than the base kernel recipe.
75 For example, instead of::
76
77 bitbake linux-yocto
78
79 the FIT image is now build by::
80
81 bitbake linux-yocto-fitimage
82
83 For custom kernel recipes, creating a corresponding custom FIT image recipe
84 is usually a good approach.
85
86 #. If a FIT image is used as a replacement for the kernel image in the root
87 filesystem, add the following configuration to your machine configuration
88 file::
89
90 # Create and deploy the vmlinux artifact which gets included into the FIT image
91 KERNEL_CLASSES += "kernel-fit-extra-artifacts"
92
93 # Do not install the kernel image package
94 RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = ""
95 # Install the FIT image package
96 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "linux-yocto-fitimage"
97
98 # Configure the image.bbclass to depend on the FIT image instead of only
99 # the kernel to ensure the FIT image is built and deployed with the image
100 KERNEL_DEPLOY_DEPEND = "linux-yocto-fitimage:do_deploy"
101
102 See the :ref:`ref-classes-kernel-fit-image` section for more information.
103
62Removed features 104Removed features
63~~~~~~~~~~~~~~~~ 105~~~~~~~~~~~~~~~~
64 106
diff --git a/documentation/migration-guides/release-5.0.rst b/documentation/migration-guides/release-5.0.rst
index 3eb7349c78..b3e7a67912 100644
--- a/documentation/migration-guides/release-5.0.rst
+++ b/documentation/migration-guides/release-5.0.rst
@@ -16,3 +16,4 @@ Release 5.0 (scarthgap)
16 release-notes-5.0.7 16 release-notes-5.0.7
17 release-notes-5.0.8 17 release-notes-5.0.8
18 release-notes-5.0.9 18 release-notes-5.0.9
19 release-notes-5.0.10
diff --git a/documentation/migration-guides/release-notes-4.3.rst b/documentation/migration-guides/release-notes-4.3.rst
index 0103ac985e..aa3f31a2ce 100644
--- a/documentation/migration-guides/release-notes-4.3.rst
+++ b/documentation/migration-guides/release-notes-4.3.rst
@@ -272,9 +272,9 @@ New Features / Enhancements in 4.3
272 272
273- Prominent documentation updates: 273- Prominent documentation updates:
274 274
275 - New :doc:`../contributor-guide/index` document. 275 - New :doc:`/contributor-guide/index` document.
276 276
277 - New :doc:`../dev-manual/security-subjects` chapter in the Development 277 - New :doc:`/dev-manual/security-subjects` chapter in the Development
278 Tasks Manual. 278 Tasks Manual.
279 279
280 - Long overdue documentation for the :ref:`ref-classes-devicetree` class. 280 - Long overdue documentation for the :ref:`ref-classes-devicetree` class.
diff --git a/documentation/migration-guides/release-notes-5.0.10.rst b/documentation/migration-guides/release-notes-5.0.10.rst
new file mode 100644
index 0000000000..e9845aa315
--- /dev/null
+++ b/documentation/migration-guides/release-notes-5.0.10.rst
@@ -0,0 +1,208 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Release notes for Yocto-5.0.10 (Scarthgap)
4------------------------------------------
5
6Security Fixes in Yocto-5.0.10
7~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
9- binutils: Fix :cve_nist:`2025-1153`, :cve_nist:`2025-1179`, :cve_nist:`2025-1180` and
10 :cve_nist:`2025-1182`
11- connman: Fix :cve_nist:`2025-32366` and :cve_nist:`2025-32743`
12- curl: Fix :cve_nist:`2024-11053` and :cve_nist:`2025-0167`
13- elfutils: Fix :cve_nist:`2025-1371`
14- ffmpeg: Fix :cve_nist:`2024-7055`, :cve_nist:`2024-32230`, :cve_nist:`2024-35366`,
15 :cve_nist:`2024-36613`, :cve_nist:`2024-36616`, :cve_nist:`2024-36617` and :cve_nist:`2024-36619`
16- git: Fix :cve_nist:`2024-50349` and :cve_nist:`2024-52006`
17- glib-2.0: fix :cve_nist:`2025-3360` and :cve_nist:`2025-4373`
18- iputils: Fix :cve_nist:`2025-47268`
19- libpam: Fix :cve_nist:`2024-10041`
20- libsoup-2.4: Fix :cve_nist:`2024-52530`, :cve_nist:`2024-52531`, :cve_nist:`2024-52532`,
21 :cve_nist:`2025-32906`, :cve_nist:`2025-32909`, :cve_nist:`2025-32910`, :cve_nist:`2025-32911`,
22 :cve_nist:`2025-32912`, :cve_nist:`2025-32913`, :cve_nist:`2025-32914` and :cve_nist:`2025-46420`
23- libsoup: Fix :cve_nist:`2025-4476`, :cve_nist:`2025-32906`, :cve_nist:`2025-32909`,
24 :cve_nist:`2025-32910`, :cve_nist:`2025-32911`, :cve_nist:`2025-32912`, :cve_nist:`2025-32913`,
25 :cve_nist:`2025-32914` and :cve_nist:`2025-46420`
26- libxml2: Fix :cve_nist:`2025-32414` and :cve_nist:`2025-32415`
27- openssh: Fix :cve_nist:`2025-32728`
28- perl: Fix :cve_nist:`2024-56406`
29- ppp: Fix :cve_nist:`2024-58250`
30- python3-jinja2: Fix :cve_nist:`2024-56201`, :cve_nist:`2024-56326` and :cve_nist:`2025-27516`
31- ruby: Fix :cve_nist:`2025-27221`
32- sqlite3: Fix :cve_nist:`2025-3277`, :cve_nist:`2025-29087` and :cve_nist:`2025-29088`
33
34
35Fixes in Yocto-5.0.10
36~~~~~~~~~~~~~~~~~~~~~
37
38- binutils: stable 2.42 branch updates
39- bluez5: add missing tools to noinst-tools package
40- bluez5: backport a patch to fix btmgmt -i
41- bluez5: make media control a :term:`PACKAGECONFIG` option
42- build-appliance-image: Update to scarthgap head revision
43- buildtools-tarball: Make buildtools respects host CA certificates
44- buildtools-tarball: add envvars into :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
45- buildtools-tarball: move setting of envvars to respective envfile
46- contributor-guide/submit-changes: encourage patch version changelogs
47- cve-check.bbclass: Fix symlink handling also for text files
48- cve-update-nvd2-native: Revert "cve-update-nvd2-native: Tweak to work better with NFS DL_DIR"
49- dev-manual/sbom.rst: fix wrong build outputs
50- docs: Fix dead links that use the :term:`DISTRO` macro
51- docs: conf.py: tweak SearchEnglish to be hyphen-friendly
52- docs:conf.py: define a manpage url
53- ffmpeg: upgrade to 6.1.2
54- git: upgrade to 2.44.3
55- glibc-y2038-tests: remove glibc-y2038-tests_2.39.bb recipe
56- glibc: Add single-threaded fast path to rand()
57- glibc: stable 2.39 branch updates
58- initscripts: add function log_success_msg/log_failure_msg/log_warning_msg
59- libatomic-ops: Update :term:`GITHUB_BASE_URI`
60- manuals: remove repeated word
61- migration-guides: add release notes for 4.0.26, 5.0.8, 5.0.9
62- module.bbclass: add KBUILD_EXTRA_SYMBOLS to install
63- perl: upgrade to 5.38.4
64- perlcross: upgrade to 1.6.2
65- poky.conf: bump version for 5.0.10
66- poky.yaml: introduce DISTRO_LATEST_TAG
67- python3-jinja2: upgrade to 3.1.6
68- ref-manual/release-process: update releases.svg
69- ref-manual/variables.rst: HOST_CC_ARCH: fix wrong SDK reference
70- ref-manual/variables.rst: WATCHDOG_TIMEOUT: fix recipe name
71- ref-manual/variables.rst: add manpage links for toolchain variables
72- ref-manual/variables.rst: add missing documentation for BUILD_* variables
73- ref-manual/variables.rst: document HOST_*_ARCH variables
74- ref-manual/variables.rst: document :term:`INHIBIT_DEFAULT_RUST_DEPS`
75- ref-manual/variables.rst: document :term:`INHIBIT_UPDATERCD_BBCLASS`
76- ref-manual/variables.rst: document :term:`SSTATE_SKIP_CREATION`
77- ref-manual/variables.rst: document :term:`WIC_CREATE_EXTRA_ARGS`
78- ref-manual/variables.rst: document autotools class related variables
79- ref-manual/variables.rst: document missing SDK_*_ARCH variables
80- ref-manual/variables.rst: document the :term:`IMAGE_ROOTFS_MAXSIZE` variable
81- ref-manual/variables.rst: document the :term:`INITRAMFS_MAXSIZE` variable
82- ref-manual/variables.rst: improve the :term:`PKGV` documentation
83- ref-manual/variables.rst: update :term:`ROOT_HOME` documentation
84- ref-manual: kernel-fitimage.bbclass does not use :term:`SPL_SIGN_KEYNAME`
85- scripts/install-buildtools: Update to 5.0.9
86- sphinx-lint: missing space after literal
87- sphinx-lint: trailing whitespace
88- sphinx-lint: unbalanced inline literal markup
89- systemd: Password agents shouldn't be optional
90- systemd: upgrade to 255.18
91- test-manual/intro: remove Buildbot version used
92- tzdata/tzcode-native: upgrade 2025a -> 2025b
93- u-boot: ensure keys are generated before assembling U-Boot FIT image
94- util-linux: Add fix to isolate test fstab entries using CUSTOM_FSTAB
95- wic: bootimg-efi: Support + symbol in filenames
96
97
98Known Issues in Yocto-5.0.10
99~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100
101- There is an issue where the target libsoup-2.4 build may fail if apachectl is present on the build
102 host. The issue only affects test binaries which aren't actually used. The issue can be fixed by
103 disabling the tests or updating to more recent changes on the scarthgap branch which fix this.
104
105
106Contributors to Yocto-5.0.10
107~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108
109Thanks to the following people who contributed to this release:
110
111- Adrian Freihofer
112- Aleksandar Nikolic
113- Alexander Kanavin
114- Alon Bar-Lev
115- Alper Ak
116- Andrew Kreimer
117- Antonin Godard
118- Archana Polampalli
119- Ashish Sharma
120- Changqing Li
121- Christos Gavros
122- Deepesh Varatharajan
123- Divya Chellam
124- Divyanshu Rathore
125- Enrico Jörns
126- Etienne Cordonnier
127- Guðni Már Gilbert
128- Haixiao Yan
129- Harish Sadineni
130- Igor Opaniuk
131- Jeroen Hofstee
132- Lee Chee Yang
133- Nguyen Dat Tho
134- Niko Mauno
135- Peter Marko
136- Praveen Kumar
137- Priyal Doshi
138- Rogerio Guerra Borin
139- Shubham Kulkarni
140- Soumya Sambu
141- Steve Sakoman
142- Sunil Dora
143- Trevor Woerner
144- Vijay Anusuri
145- Virendra Thakur
146- Vyacheslav Yurkov
147- Yi Zhao
148- Yogita Urade
149- rajmohan r
150
151Repositories / Downloads for Yocto-5.0.10
152~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153
154poky
155
156- Repository Location: :yocto_git:`/poky`
157- Branch: :yocto_git:`scarthgap </poky/log/?h=scarthgap>`
158- Tag: :yocto_git:`yocto-5.0.10 </poky/log/?h=yocto-5.0.10>`
159- Git Revision: :yocto_git:`ac257900c33754957b2696529682029d997a8f28 </poky/commit/?id=ac257900c33754957b2696529682029d997a8f28>`
160- Release Artefact: poky-ac257900c33754957b2696529682029d997a8f28
161- sha: ddca7e54b331e78214bea65b346320d4fbcddf4b51103bfbbd9fc3960f32cdc7
162- Download Locations:
163 https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.10/poky-ac257900c33754957b2696529682029d997a8f28.tar.bz2
164 https://mirrors.kernel.org/yocto/yocto/yocto-5.0.10/poky-ac257900c33754957b2696529682029d997a8f28.tar.bz2
165
166openembedded-core
167
168- Repository Location: :oe_git:`/openembedded-core`
169- Branch: :oe_git:`scarthgap </openembedded-core/log/?h=scarthgap>`
170- Tag: :oe_git:`yocto-5.0.10 </openembedded-core/log/?h=yocto-5.0.10>`
171- Git Revision: :oe_git:`d5342ffc570d47a723b18297d75bd2f63c2088db </openembedded-core/commit/?id=d5342ffc570d47a723b18297d75bd2f63c2088db>`
172- Release Artefact: oecore-d5342ffc570d47a723b18297d75bd2f63c2088db
173- sha: daa62094f2327f4b3fbcc485e8964d1b86a4722f58fb37e0d8e8e9885094a262
174- Download Locations:
175 https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.10/oecore-d5342ffc570d47a723b18297d75bd2f63c2088db.tar.bz2
176 https://mirrors.kernel.org/yocto/yocto/yocto-5.0.10/oecore-d5342ffc570d47a723b18297d75bd2f63c2088db.tar.bz2
177
178meta-mingw
179
180- Repository Location: :yocto_git:`/meta-mingw`
181- Branch: :yocto_git:`scarthgap </meta-mingw/log/?h=scarthgap>`
182- Tag: :yocto_git:`yocto-5.0.10 </meta-mingw/log/?h=yocto-5.0.10>`
183- Git Revision: :yocto_git:`bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f </meta-mingw/commit/?id=bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f>`
184- Release Artefact: meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f
185- sha: ab073def6487f237ac125d239b3739bf02415270959546b6b287778664f0ae65
186- Download Locations:
187 https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.10/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
188 https://mirrors.kernel.org/yocto/yocto/yocto-5.0.10/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
189
190bitbake
191
192- Repository Location: :oe_git:`/bitbake`
193- Branch: :oe_git:`2.8 </bitbake/log/?h=2.8>`
194- Tag: :oe_git:`yocto-5.0.10 </bitbake/log/?h=yocto-5.0.10>`
195- Git Revision: :oe_git:`696c2c1ef095f8b11c7d2eff36fae50f58c62e5e </bitbake/commit/?id=696c2c1ef095f8b11c7d2eff36fae50f58c62e5e>`
196- Release Artefact: bitbake-696c2c1ef095f8b11c7d2eff36fae50f58c62e5e
197- sha: fc83f879cd6dd14b9b7eba0161fec23ecc191fed0fb00556ba729dceef6c145f
198- Download Locations:
199 https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.10/bitbake-696c2c1ef095f8b11c7d2eff36fae50f58c62e5e.tar.bz2
200 https://mirrors.kernel.org/yocto/yocto/yocto-5.0.10/bitbake-696c2c1ef095f8b11c7d2eff36fae50f58c62e5e.tar.bz2
201
202yocto-docs
203
204- Repository Location: :yocto_git:`/yocto-docs`
205- Branch: :yocto_git:`scarthgap </yocto-docs/log/?h=scarthgap>`
206- Tag: :yocto_git:`yocto-5.0.10 </yocto-docs/log/?h=yocto-5.0.10>`
207- Git Revision: :yocto_git:`3996388e337377bedc113d072a51fe9d68dd40c6 </yocto-docs/commit/?id=3996388e337377bedc113d072a51fe9d68dd40c6>`
208
diff --git a/documentation/migration-guides/release-notes-5.1.rst b/documentation/migration-guides/release-notes-5.1.rst
index 267934a71e..bab0c14581 100644
--- a/documentation/migration-guides/release-notes-5.1.rst
+++ b/documentation/migration-guides/release-notes-5.1.rst
@@ -377,7 +377,7 @@ New Features / Enhancements in 5.1
377 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` and does not trigger a rebuild on a 377 :term:`SIGGEN_EXCLUDERECIPES_ABISAFE` and does not trigger a rebuild on a
378 change for dependent tasks. 378 change for dependent tasks.
379 379
380 - In :ref:`ref-classes-kernel-fitimage`, the existence of 380 - In ``kernel-fitimage``, the existence of
381 :term:`EXTERNAL_KERNEL_DEVICETREE` is checked more thoroughly to avoid 381 :term:`EXTERNAL_KERNEL_DEVICETREE` is checked more thoroughly to avoid
382 false positives. 382 false positives.
383 383
diff --git a/documentation/migration-guides/release-notes-5.2.rst b/documentation/migration-guides/release-notes-5.2.rst
index aad5a2eda0..5fc426c050 100644
--- a/documentation/migration-guides/release-notes-5.2.rst
+++ b/documentation/migration-guides/release-notes-5.2.rst
@@ -29,7 +29,7 @@ New Features / Enhancements in |yocto-ver|
29 ``RuntimeWatchdogSec`` option in ``/etc/systemd/system.conf``. 29 ``RuntimeWatchdogSec`` option in ``/etc/systemd/system.conf``.
30 30
31 - :term:`FIT_UBOOT_ENV` to allow including a u-boot script as a text in a 31 - :term:`FIT_UBOOT_ENV` to allow including a u-boot script as a text in a
32 fit image. See the :ref:`ref-classes-kernel-fitimage` for more information. 32 fit image. See the ``kernel-fitimage`` for more information.
33 33
34 - :ref:`ref-classes-meson`: :term:`MESON_INSTALL_TAGS` to allow passing 34 - :ref:`ref-classes-meson`: :term:`MESON_INSTALL_TAGS` to allow passing
35 install tags (``--tags``) to the ``meson install`` command during the 35 install tags (``--tags``) to the ``meson install`` command during the
@@ -684,7 +684,7 @@ New Features / Enhancements in |yocto-ver|
684 command-line tool was added to the different Yocto Project and OpenEmbedded 684 command-line tool was added to the different Yocto Project and OpenEmbedded
685 repositories. 685 repositories.
686 686
687 - :ref:`ref-classes-kernel-fitimage`: handle :doc:`multiconfig 687 - ``kernel-fitimage``: handle :doc:`multiconfig
688 </dev-manual/multiconfig>` dependency when 688 </dev-manual/multiconfig>` dependency when
689 :term:`INITRAMFS_MULTICONFIG` is set. 689 :term:`INITRAMFS_MULTICONFIG` is set.
690 690
diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst
index 85dea9fe05..c9405cdd33 100644
--- a/documentation/overview-manual/concepts.rst
+++ b/documentation/overview-manual/concepts.rst
@@ -98,7 +98,7 @@ files, and how to package the compiled output.
98 98
99The term "package" is sometimes used to refer to recipes. However, since 99The term "package" is sometimes used to refer to recipes. However, since
100the word "package" is used for the packaged output from the OpenEmbedded 100the word "package" is used for the packaged output from the OpenEmbedded
101build system (i.e. ``.ipk`` or ``.deb`` files), this document avoids 101build system (i.e. ``.ipk``, ``.deb`` or ``.rpm`` files), this document avoids
102using the term "package" when referring to recipes. 102using the term "package" when referring to recipes.
103 103
104Classes 104Classes
@@ -256,7 +256,7 @@ development environment.
256.. note:: 256.. note::
257 257
258 The 258 The
259 scripts/oe-setup-builddir 259 ``scripts/oe-setup-builddir``
260 script uses the 260 script uses the
261 ``$TEMPLATECONF`` 261 ``$TEMPLATECONF``
262 variable to determine which sample configuration files to locate. 262 variable to determine which sample configuration files to locate.
@@ -352,7 +352,7 @@ layers the build system uses to further control the build. These layers
352provide Metadata for the software, machine, and policies. 352provide Metadata for the software, machine, and policies.
353 353
354In general, there are three types of layer input. You can see them below 354In general, there are three types of layer input. You can see them below
355the "User Configuration" box in the `general workflow 355the "User Configuration" box in the :ref:`general workflow
356figure <overview-manual/concepts:openembedded build system concepts>`: 356figure <overview-manual/concepts:openembedded build system concepts>`:
357 357
358- *Metadata (.bb + Patches):* Software layers containing 358- *Metadata (.bb + Patches):* Software layers containing
@@ -420,14 +420,14 @@ build.
420Distro Layer 420Distro Layer
421~~~~~~~~~~~~ 421~~~~~~~~~~~~
422 422
423The distribution layer provides policy configurations for your 423A distribution layer provides policy configurations for your
424distribution. Best practices dictate that you isolate these types of 424distribution. Best practices dictate that you isolate these types of
425configurations into their own layer. Settings you provide in 425configurations into their own layer. Settings you provide in
426``conf/distro/distro.conf`` override similar settings that BitBake finds 426``conf/distro/distro.conf`` override similar settings that BitBake finds
427in your ``conf/local.conf`` file in the :term:`Build Directory`. 427in your ``conf/local.conf`` file in the :term:`Build Directory`.
428 428
429The following list provides some explanation and references for what you 429The following list provides some explanation and references for what you
430typically find in the distribution layer: 430typically find in a distribution layer:
431 431
432- *classes:* Class files (``.bbclass``) hold common functionality that 432- *classes:* Class files (``.bbclass``) hold common functionality that
433 can be shared among recipes in the distribution. When your recipes 433 can be shared among recipes in the distribution. When your recipes
@@ -454,7 +454,7 @@ typically find in the distribution layer:
454BSP Layer 454BSP Layer
455~~~~~~~~~ 455~~~~~~~~~
456 456
457The BSP Layer provides machine configurations that target specific 457A BSP layer provides machine configurations that target specific
458hardware. Everything in this layer is specific to the machine for which 458hardware. Everything in this layer is specific to the machine for which
459you are building the image or the SDK. A common structure or form is 459you are building the image or the SDK. A common structure or form is
460defined for BSP layers. You can learn more about this structure in the 460defined for BSP layers. You can learn more about this structure in the
@@ -465,7 +465,7 @@ defined for BSP layers. You can learn more about this structure in the
465 In order for a BSP layer to be considered compliant with the Yocto 465 In order for a BSP layer to be considered compliant with the Yocto
466 Project, it must meet some structural requirements. 466 Project, it must meet some structural requirements.
467 467
468The BSP Layer's configuration directory contains configuration files for 468A BSP layer's configuration directory contains configuration files for
469the machine (``conf/machine/machine.conf``) and, of course, the layer 469the machine (``conf/machine/machine.conf``) and, of course, the layer
470(``conf/layer.conf``). 470(``conf/layer.conf``).
471 471
@@ -477,18 +477,18 @@ formfactors, graphics support systems, and so forth.
477.. note:: 477.. note::
478 478
479 While the figure shows several 479 While the figure shows several
480 recipes-\* 480 ``recipes-*``
481 directories, not all these directories appear in all BSP layers. 481 directories, not all these directories appear in all BSP layers.
482 482
483Software Layer 483Software Layer
484~~~~~~~~~~~~~~ 484~~~~~~~~~~~~~~
485 485
486The software layer provides the Metadata for additional software 486A software layer provides the Metadata for additional software
487packages used during the build. This layer does not include Metadata 487packages used during the build. This layer does not include Metadata
488that is specific to the distribution or the machine, which are found in 488that is specific to the distribution or the machine, which are found in
489their respective layers. 489their respective layers.
490 490
491This layer contains any recipes, append files, and patches, that your 491This layer contains any recipes, append files, and patches that your
492project needs. 492project needs.
493 493
494Sources 494Sources
@@ -560,9 +560,8 @@ source tree used by the group).
560 560
561The canonical method through which to include a local project is to use the 561The canonical method through which to include a local project is to use the
562:ref:`ref-classes-externalsrc` class to include that local project. You use 562:ref:`ref-classes-externalsrc` class to include that local project. You use
563either the ``local.conf`` or a recipe's append file to override or set the 563either ``local.conf`` or a recipe's append file to override or set the
564recipe to point to the local directory on your disk to pull in the whole 564recipe to point to the local directory from which to fetch the source.
565source tree.
566 565
567Source Control Managers (Optional) 566Source Control Managers (Optional)
568~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 567~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/documentation/overview-manual/development-environment.rst b/documentation/overview-manual/development-environment.rst
index d79173ff55..066d784314 100644
--- a/documentation/overview-manual/development-environment.rst
+++ b/documentation/overview-manual/development-environment.rst
@@ -240,7 +240,7 @@ and so forth.
240 240
241 For information on finding out who is responsible for (maintains) a 241 For information on finding out who is responsible for (maintains) a
242 particular area of code in the Yocto Project, see the 242 particular area of code in the Yocto Project, see the
243 ":doc:`../contributor-guide/identify-component`" 243 ":doc:`/contributor-guide/identify-component`"
244 section of the Yocto Project and OpenEmbedded Contributor Guide. 244 section of the Yocto Project and OpenEmbedded Contributor Guide.
245 245
246The Yocto Project ``poky`` Git repository also has an upstream 246The Yocto Project ``poky`` Git repository also has an upstream
@@ -272,7 +272,7 @@ push them into the "contrib" area and subsequently request that the
272maintainer include them into an upstream branch. This process is called 272maintainer include them into an upstream branch. This process is called
273"submitting a patch" or "submitting a change." For information on 273"submitting a patch" or "submitting a change." For information on
274submitting patches and changes, see the 274submitting patches and changes, see the
275":doc:`../contributor-guide/submit-changes`" section in the Yocto Project 275":doc:`/contributor-guide/submit-changes`" section in the Yocto Project
276and OpenEmbedded Contributor Guide. 276and OpenEmbedded Contributor Guide.
277 277
278In summary, there is a single point of entry for changes into the 278In summary, there is a single point of entry for changes into the
@@ -347,7 +347,7 @@ Book <https://book.git-scm.com>`__.
347 this type of change, you format the patch and then send the email 347 this type of change, you format the patch and then send the email
348 using the Git commands ``git format-patch`` and ``git send-email``. 348 using the Git commands ``git format-patch`` and ``git send-email``.
349 For information on how to use these scripts, see the 349 For information on how to use these scripts, see the
350 ":doc:`../contributor-guide/submit-changes`" section in the Yocto Project 350 ":doc:`/contributor-guide/submit-changes`" section in the Yocto Project
351 and OpenEmbedded Contributor Guide. 351 and OpenEmbedded Contributor Guide.
352 352
353Git 353Git
diff --git a/documentation/overview-manual/yp-intro.rst b/documentation/overview-manual/yp-intro.rst
index 15dfb3a6b6..40e9693a8d 100644
--- a/documentation/overview-manual/yp-intro.rst
+++ b/documentation/overview-manual/yp-intro.rst
@@ -51,7 +51,7 @@ Here are features and advantages of the Yocto Project:
51 RISC-V and other architectures. Most ODMs, OSVs, and chip vendors create and 51 RISC-V and other architectures. Most ODMs, OSVs, and chip vendors create and
52 supply BSPs that support their hardware. If you have custom silicon, you can 52 supply BSPs that support their hardware. If you have custom silicon, you can
53 create a BSP that supports that architecture. See 53 create a BSP that supports that architecture. See
54 :doc:`ref-manual/yocto-project-supported-features` for details on the level 54 :doc:`/ref-manual/yocto-project-supported-features` for details on the level
55 of support for some of these architectures. 55 of support for some of these architectures.
56 56
57 Aside from broad architecture support, the Yocto Project fully 57 Aside from broad architecture support, the Yocto Project fully
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 54a98bf24f..f2f6e6e411 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -1732,77 +1732,158 @@ Its behavior is mainly controlled by the following variables:
1732- :term:`KERNEL_DTC_FLAGS`: flags for ``dtc``, the Device Tree Compiler 1732- :term:`KERNEL_DTC_FLAGS`: flags for ``dtc``, the Device Tree Compiler
1733- :term:`KERNEL_PACKAGE_NAME`: base name of the kernel packages 1733- :term:`KERNEL_PACKAGE_NAME`: base name of the kernel packages
1734 1734
1735.. _ref-classes-kernel-fitimage: 1735.. _ref-classes-kernel-fit-image:
1736 1736
1737``kernel-fitimage`` 1737``kernel-fit-image``
1738=================== 1738====================
1739 1739
1740The :ref:`ref-classes-kernel-fitimage` class provides support to pack a kernel image, 1740The :ref:`ref-classes-kernel-fit-image` class provides support to pack a kernel image,
1741device trees, a U-boot script, an :term:`Initramfs` bundle and a RAM disk 1741device trees, a U-boot script, and an :term:`Initramfs` into a single FIT image.
1742into a single FIT image. In theory, a FIT image can support any number 1742In theory, a FIT image can support any number of kernels, U-boot scripts,
1743of kernels, U-boot scripts, :term:`Initramfs` bundles, RAM disks and device-trees. 1743:term:`Initramfs`, and device trees.
1744However, :ref:`ref-classes-kernel-fitimage` currently only supports 1744However, :ref:`ref-classes-kernel-fit-image` currently only supports
1745limited usecases: just one kernel image, an optional U-boot script, 1745limited usecases: just one kernel image, an optional U-boot script,
1746an optional :term:`Initramfs` bundle, an optional RAM disk, and any number of 1746an optional :term:`Initramfs`, and any number of device trees.
1747device trees. 1747
1748 1748The FIT image is created by a recipe which inherits the
1749To create a FIT image, it is required that :term:`KERNEL_CLASSES` 1749:ref:`ref-classes-kernel-fit-image` class.
1750is set to include ":ref:`ref-classes-kernel-fitimage`" and one of :term:`KERNEL_IMAGETYPE`, 1750One such example is the ``linux-yocto-fitimage`` recipe which creates a FIT
1751:term:`KERNEL_ALT_IMAGETYPE` or :term:`KERNEL_IMAGETYPES` to include "fitImage". 1751image for the Linux Yocto kernel.
1752 1752Additionally, it is required that :term:`KERNEL_CLASSES` is set to include
1753The options for the device tree compiler passed to ``mkimage -D`` 1753:ref:`ref-classes-kernel-fit-extra-artifacts`.
1754when creating the FIT image are specified using the 1754The :ref:`ref-classes-kernel-fit-extra-artifacts` class exposes the required kernel
1755:term:`UBOOT_MKIMAGE_DTCOPTS` variable. 1755artifacts to the :term:`DEPLOY_DIR_IMAGE` which are used by the
1756 1756:ref:`ref-classes-kernel-fit-image` class to create the FIT image.
1757Only a single kernel can be added to the FIT image created by 1757
1758:ref:`ref-classes-kernel-fitimage` and the kernel image in FIT is mandatory. The 1758The simplest example for building a FIT image is to add::
1759address where the kernel image is to be loaded by U-Boot is 1759
1760specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by 1760 KERNEL_CLASSES += "kernel-fit-extra-artifacts"
1761:term:`UBOOT_ENTRYPOINT`. Setting :term:`FIT_ADDRESS_CELLS` to "2" 1761
1762is necessary if such addresses are 64 bit ones. 1762to the machine :term:`configuration file` and to execute::
1763 1763
1764Multiple device trees can be added to the FIT image created by 1764 bitbake linux-yocto-fitimage
1765:ref:`ref-classes-kernel-fitimage` and the device tree is optional. 1765
1766The address where the device tree is to be loaded by U-Boot is 1766This results in a ``fitImage`` file deployed to the :term:`DEPLOY_DIR_IMAGE`
1767specified by :term:`UBOOT_DTBO_LOADADDRESS` for device tree overlays 1767directory and a ``linux-yocto-fitimage`` package which can be installed.
1768and by :term:`UBOOT_DTB_LOADADDRESS` for device tree binaries. 1768
1769 1769The same approach works for all variants of the ``linux-yocto`` kernel.
1770Only a single RAM disk can be added to the FIT image created by 1770For example, if the ``linux-yocto-rt`` kernel should be used, add the following
1771:ref:`ref-classes-kernel-fitimage` and the RAM disk in FIT is optional. 1771lines to the machine configuration file::
1772The address where the RAM disk image is to be loaded by U-Boot 1772
1773is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by 1773 KERNEL_CLASSES += "kernel-fit-extra-artifacts"
1774:term:`UBOOT_RD_ENTRYPOINT`. The ramdisk is added to the FIT image when 1774 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
1775:term:`INITRAMFS_IMAGE` is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE` 1775
1776is not set to 1. 1776The FIT image, this time including the RT kernel, is built again by calling::
1777 1777
1778Only a single :term:`Initramfs` bundle can be added to the FIT image created by 1778 bitbake linux-yocto-fitimage
1779:ref:`ref-classes-kernel-fitimage` and the :term:`Initramfs` bundle in FIT is optional. 1779
1780In case of :term:`Initramfs`, the kernel is configured to be bundled with the root filesystem 1780For other kernels provided by other layers, the same approach would work.
1781in the same binary (example: zImage-initramfs-:term:`MACHINE`.bin). 1781However, it is usually more intuitive to add a custom FIT image recipe next to
1782When the kernel is copied to RAM and executed, it unpacks the :term:`Initramfs` root filesystem. 1782the custom kernel recipe.
1783The :term:`Initramfs` bundle can be enabled when :term:`INITRAMFS_IMAGE` 1783For example, if a layer provides a ``linux-vanilla`` recipe, a
1784is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 1. 1784``linux-vanilla-fitimage`` recipe may be added as well.
1785The address where the :term:`Initramfs` bundle is to be loaded by U-boot is specified 1785The ``linux-vanilla-fitimage`` recipe can be created as a customized copy of
1786by :term:`UBOOT_LOADADDRESS` and the entrypoint by :term:`UBOOT_ENTRYPOINT`. 1786the ``linux-yocto-fitimage`` recipe.
1787 1787
1788Only a single U-boot boot script can be added to the FIT image created by 1788Usually the kernel is built as a dependency of an image.
1789:ref:`ref-classes-kernel-fitimage` and the boot script is optional. 1789If the FIT image should be used as a replacement for the kernel image which
1790The boot script is specified in the ITS file as a text file containing 1790is installed in the root filesystem, then the following variables can be set
1791U-boot commands. When using a boot script the user should configure the 1791e.g. in the machine configuration file::
1792U-boot :ref:`ref-tasks-install` task to copy the script to sysroot. 1792
1793So the script can be included in the FIT image by the :ref:`ref-classes-kernel-fitimage` 1793 # Create and deploy the vmlinux artifact which gets included into the FIT image
1794class. At run-time, U-boot CONFIG_BOOTCOMMAND define can be configured to 1794 KERNEL_CLASSES += "kernel-fit-extra-artifacts"
1795load the boot script from the FIT image and execute it. 1795
1796 1796 # Do not install the kernel image package
1797The FIT image generated by the :ref:`ref-classes-kernel-fitimage` class is signed when the 1797 RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = ""
1798variables :term:`UBOOT_SIGN_ENABLE`, :term:`UBOOT_MKIMAGE_DTCOPTS`, 1798 # Install the FIT image package
1799:term:`UBOOT_SIGN_KEYDIR` and :term:`UBOOT_SIGN_KEYNAME` are set 1799 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "linux-yocto-fitimage"
1800appropriately. The default values used for :term:`FIT_HASH_ALG` and 1800
1801:term:`FIT_SIGN_ALG` in :ref:`ref-classes-kernel-fitimage` are "sha256" and 1801 # Configure the image.bbclass to depend on the FIT image instead of only
1802"rsa2048" respectively. The keys for signing the FIT image can be generated using 1802 # the kernel to ensure the FIT image is built and deployed with the image
1803the :ref:`ref-classes-kernel-fitimage` class when both :term:`FIT_GENERATE_KEYS` and 1803 KERNEL_DEPLOY_DEPEND = "linux-yocto-fitimage:do_deploy"
1804:term:`UBOOT_SIGN_ENABLE` are set to "1". 1804
1805 1805The :ref:`ref-classes-kernel-fit-image` class processes several variables that
1806allow configuration:
1807
1808- The options for the device tree compiler passed to ``mkimage -D``
1809 when creating the FIT image are specified using the
1810 :term:`UBOOT_MKIMAGE_DTCOPTS` variable.
1811
1812- Only a single kernel can be added to the FIT image created by
1813 :ref:`ref-classes-kernel-fit-image` and it is a mandatory component of the
1814 FIT image.
1815 The address where the kernel image is to be loaded by U-Boot is
1816 specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by
1817 :term:`UBOOT_ENTRYPOINT`. Setting :term:`FIT_ADDRESS_CELLS` to "2"
1818 is necessary if such addresses are 64 bit ones.
1819
1820- Multiple device trees can be added to the FIT image created by
1821 :ref:`ref-classes-kernel-fit-image` and the device tree is optional.
1822 The address where the device tree is to be loaded by U-Boot is
1823 specified by :term:`UBOOT_DTBO_LOADADDRESS` for device tree overlays
1824 and by :term:`UBOOT_DTB_LOADADDRESS` for device tree binaries.
1825
1826- Only a single :term:`Initramfs` can be added to the FIT image created by
1827 :ref:`ref-classes-kernel-fit-image`. The :term:`Initramfs` in FIT is optional.
1828 The address where the RAM disk image is to be loaded by U-Boot
1829 is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by
1830 :term:`UBOOT_RD_ENTRYPOINT`. The :term:`Initramfs` is added to the FIT image
1831 when :term:`INITRAMFS_IMAGE` is specified.
1832
1833- It's recommended to add the :term:`Initramfs` and the kernel image as
1834 independent image nodes to the FIT image.
1835 Bundling a RAM disk image with the kernel image and including the bundle
1836 (:term:`INITRAMFS_IMAGE_BUNDLE` set to "1") in the FIT image is possible.
1837 However, this approach has the disadvantage that any change to the RAM
1838 disk image necessitates rebuilding the kernel image.
1839 This process requires the full kernel build directory, which is kind of
1840 incompatible with the :term:`SSTATE_DIR` and, consequently, with SDKs.
1841
1842- Only a single U-Boot boot script can be added to the FIT image created by
1843 :ref:`ref-classes-kernel-fit-image`. The boot script is optional.
1844 The boot script is specified in the ITS file as a text file containing
1845 U-Boot commands. When using a boot script the recipe which inherits the
1846 :ref:`ref-classes-kernel-fit-image` class should add the script to
1847 :term:`SRC_URI` and set the :term:`FIT_UBOOT_ENV` variable to the name of the
1848 file like the following::
1849
1850 FIT_UBOOT_ENV = "boot.txt"
1851 SRC_URI += "file://${FIT_UBOOT_ENV}"
1852
1853 At run-time, U-boot's boot command can be configured to load the boot script
1854 from the FIT image and source it.
1855
1856- The FIT image generated by the :ref:`ref-classes-kernel-fit-image` class is signed when the
1857 variables :term:`UBOOT_SIGN_ENABLE`, :term:`UBOOT_MKIMAGE_DTCOPTS`,
1858 :term:`UBOOT_SIGN_KEYDIR` and :term:`UBOOT_SIGN_KEYNAME` are set
1859 appropriately. The default values used for :term:`FIT_HASH_ALG` and
1860 :term:`FIT_SIGN_ALG` in :ref:`ref-classes-kernel-fit-image` are "sha256" and
1861 "rsa2048" respectively. The keys for signing the FIT image can be generated using
1862 the :ref:`ref-classes-kernel-fit-image` class when both :term:`FIT_GENERATE_KEYS` and
1863 :term:`UBOOT_SIGN_ENABLE` are set to "1".
1864
1865.. _ref-classes-kernel-fit-extra-artifacts:
1866
1867``kernel-fit-extra-artifacts``
1868==============================
1869
1870The :ref:`ref-classes-kernel-fit-extra-artifacts` class exposes the required
1871kernel artifacts to the :term:`DEPLOY_DIR_IMAGE` directory.
1872These artifacts are used by the :ref:`ref-classes-kernel-fit-image` class to
1873create a FIT image that can include the kernel, device trees, an optional
1874U-Boot script, and an optional Initramfs.
1875
1876This class is typically included by adding it to the :term:`KERNEL_CLASSES`
1877variable in your kernel recipe or machine configuration when building FIT images.
1878It ensures that all necessary files are available for packaging into the FIT image,
1879such as the kernel binary, device tree blobs (DTBs), and other related files.
1880
1881For example, to enable this class, set::
1882
1883 KERNEL_CLASSES += "kernel-fit-extra-artifacts"
1884
1885This is required when using the :ref:`ref-classes-kernel-fit-image` class to
1886generate FIT images for your kernel.
1806 1887
1807.. _ref-classes-kernel-grub: 1888.. _ref-classes-kernel-grub:
1808 1889
@@ -2050,7 +2131,8 @@ a couple different ways:
2050 Not using this naming convention can lead to subtle problems 2131 Not using this naming convention can lead to subtle problems
2051 caused by existing code that depends on that naming convention. 2132 caused by existing code that depends on that naming convention.
2052 2133
2053- Create or modify a target recipe that contains the following:: 2134- Or, create a :ref:`ref-classes-native` variant of any target recipe (e.g.
2135 ``myrecipe.bb``) by adding the following to the recipe::
2054 2136
2055 BBCLASSEXTEND = "native" 2137 BBCLASSEXTEND = "native"
2056 2138
@@ -2081,24 +2163,25 @@ couple different ways:
2081 inherit statement in the recipe after all other inherit statements so 2163 inherit statement in the recipe after all other inherit statements so
2082 that the :ref:`ref-classes-nativesdk` class is inherited last. 2164 that the :ref:`ref-classes-nativesdk` class is inherited last.
2083 2165
2084- Create a :ref:`ref-classes-nativesdk` variant of any recipe by adding the following:: 2166 .. note::
2085 2167
2086 BBCLASSEXTEND = "nativesdk" 2168 When creating a recipe, you must follow this naming convention::
2087 2169
2088 Inside the 2170 nativesdk-myrecipe.bb
2089 recipe, use ``:class-nativesdk`` and ``:class-target`` overrides to
2090 specify any functionality specific to the respective SDK machine or
2091 target case.
2092 2171
2093.. note::
2094 2172
2095 When creating a recipe, you must follow this naming convention:: 2173 Not doing so can lead to subtle problems because there is code that
2174 depends on the naming convention.
2096 2175
2097 nativesdk-myrecipe.bb 2176- Or, create a :ref:`ref-classes-nativesdk` variant of any target recipe (e.g.
2177 ``myrecipe.bb``) by adding the following to the recipe::
2098 2178
2179 BBCLASSEXTEND = "nativesdk"
2099 2180
2100 Not doing so can lead to subtle problems because there is code that 2181 Inside the
2101 depends on the naming convention. 2182 recipe, use ``:class-nativesdk`` and ``:class-target`` overrides to
2183 specify any functionality specific to the respective SDK machine or
2184 target case.
2102 2185
2103Although applied differently, the :ref:`ref-classes-nativesdk` class is used with both 2186Although applied differently, the :ref:`ref-classes-nativesdk` class is used with both
2104methods. The advantage of the second method is that you do not need to 2187methods. The advantage of the second method is that you do not need to
@@ -3436,7 +3519,7 @@ See U-Boot's documentation for details about `verified boot
3436and the `signature process 3519and the `signature process
3437<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/signature.txt>`__. 3520<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/signature.txt>`__.
3438 3521
3439See also the description of :ref:`ref-classes-kernel-fitimage` class, which this class 3522See also the description of :ref:`ref-classes-kernel-fit-image` class, which this class
3440imitates. 3523imitates.
3441 3524
3442.. _ref-classes-uki: 3525.. _ref-classes-uki:
diff --git a/documentation/ref-manual/resources.rst b/documentation/ref-manual/resources.rst
index 4eaaca942e..bcbc7ebaca 100644
--- a/documentation/ref-manual/resources.rst
+++ b/documentation/ref-manual/resources.rst
@@ -23,7 +23,7 @@ The Yocto Project gladly accepts contributions. You can submit changes
23to the project either by creating and sending pull requests, or by 23to the project either by creating and sending pull requests, or by
24submitting patches through email. For information on how to do both as 24submitting patches through email. For information on how to do both as
25well as information on how to identify the maintainer for each area of 25well as information on how to identify the maintainer for each area of
26code, see the :doc:`../contributor-guide/index`. 26code, see the :doc:`/contributor-guide/index`.
27 27
28.. _resources-bugtracker: 28.. _resources-bugtracker:
29 29
@@ -45,7 +45,7 @@ your expectations).
45For a general procedure and guidelines on how to use Bugzilla to submit a bug 45For a general procedure and guidelines on how to use Bugzilla to submit a bug
46against the Yocto Project, see the following: 46against the Yocto Project, see the following:
47 47
48- The ":doc:`../contributor-guide/report-defect`" 48- The ":doc:`/contributor-guide/report-defect`"
49 section in the Yocto Project and OpenEmbedded Contributor Guide. 49 section in the Yocto Project and OpenEmbedded Contributor Guide.
50 50
51- The Yocto Project :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>` 51- The Yocto Project :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
diff --git a/documentation/ref-manual/system-requirements.rst b/documentation/ref-manual/system-requirements.rst
index b64a13320a..14b635013b 100644
--- a/documentation/ref-manual/system-requirements.rst
+++ b/documentation/ref-manual/system-requirements.rst
@@ -145,7 +145,7 @@ tested on former revisions of "&DISTRO_NAME;", but no longer are:
145 interested in hearing about your experience. For information on 145 interested in hearing about your experience. For information on
146 how to submit a bug, see the Yocto Project 146 how to submit a bug, see the Yocto Project
147 :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>` 147 :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
148 and the ":doc:`../contributor-guide/report-defect`" 148 and the ":doc:`/contributor-guide/report-defect`"
149 section in the Yocto Project and OpenEmbedded Contributor Guide. 149 section in the Yocto Project and OpenEmbedded Contributor Guide.
150 150
151Required Packages for the Build Host 151Required Packages for the Build Host
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 5c18b852d1..c6ae3fb8bc 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -2576,7 +2576,7 @@ system and gives an overview of their function and contents.
2576 You can safely share this directory between multiple builds on the 2576 You can safely share this directory between multiple builds on the
2577 same development machine. For additional information on how the build 2577 same development machine. For additional information on how the build
2578 process gets source files when working behind a firewall or proxy 2578 process gets source files when working behind a firewall or proxy
2579 server, see this specific question in the ":doc:`faq`" 2579 server, see this specific question in the ":doc:`/ref-manual/faq`"
2580 chapter. You can also refer to the 2580 chapter. You can also refer to the
2581 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" 2581 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
2582 Wiki page. 2582 Wiki page.
@@ -2790,7 +2790,7 @@ system and gives an overview of their function and contents.
2790 ``meta/classes-recipe`` to see how the variable is used. 2790 ``meta/classes-recipe`` to see how the variable is used.
2791 2791
2792 :term:`EXTERNAL_KERNEL_DEVICETREE` 2792 :term:`EXTERNAL_KERNEL_DEVICETREE`
2793 When inheriting :ref:`ref-classes-kernel-fitimage` and a 2793 When inheriting :ref:`ref-classes-kernel-fit-image` and a
2794 :term:`PREFERRED_PROVIDER` for ``virtual/dtb`` set to ``devicetree``, the 2794 :term:`PREFERRED_PROVIDER` for ``virtual/dtb`` set to ``devicetree``, the
2795 variable :term:`EXTERNAL_KERNEL_DEVICETREE` can be used to specify a 2795 variable :term:`EXTERNAL_KERNEL_DEVICETREE` can be used to specify a
2796 directory containing one or more compiled device tree or device tree 2796 directory containing one or more compiled device tree or device tree
@@ -3318,7 +3318,7 @@ system and gives an overview of their function and contents.
3318 Specifies the value of the ``#address-cells`` value for the 3318 Specifies the value of the ``#address-cells`` value for the
3319 description of the FIT image. 3319 description of the FIT image.
3320 3320
3321 The default value is set to "1" by the :ref:`ref-classes-kernel-fitimage` 3321 The default value is set to "1" by the :ref:`ref-classes-kernel-fit-image`
3322 class, which corresponds to 32 bit addresses. 3322 class, which corresponds to 32 bit addresses.
3323 3323
3324 For platforms that need to set 64 bit addresses, for example in 3324 For platforms that need to set 64 bit addresses, for example in
@@ -3337,11 +3337,11 @@ system and gives an overview of their function and contents.
3337 Specifies the default device tree binary (dtb) file for a FIT image 3337 Specifies the default device tree binary (dtb) file for a FIT image
3338 when multiple ones are provided. 3338 when multiple ones are provided.
3339 3339
3340 This variable is used in the :ref:`ref-classes-kernel-fitimage` class. 3340 This variable is used in the :ref:`ref-classes-kernel-fit-image` class.
3341 3341
3342 :term:`FIT_DESC` 3342 :term:`FIT_DESC`
3343 Specifies the description string encoded into a FIT image. The 3343 Specifies the description string encoded into a FIT image. The
3344 default value is set by the :ref:`ref-classes-kernel-fitimage` class as 3344 default value is set by the :ref:`ref-classes-kernel-fit-image` class as
3345 follows:: 3345 follows::
3346 3346
3347 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" 3347 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
@@ -3350,12 +3350,12 @@ system and gives an overview of their function and contents.
3350 Decides whether to generate the keys for signing the FIT image if 3350 Decides whether to generate the keys for signing the FIT image if
3351 they don't already exist. The keys are created in 3351 they don't already exist. The keys are created in
3352 :term:`UBOOT_SIGN_KEYDIR`. The default value is set to "0" 3352 :term:`UBOOT_SIGN_KEYDIR`. The default value is set to "0"
3353 by the :ref:`ref-classes-kernel-fitimage` class. 3353 by the :ref:`ref-classes-kernel-fit-image` class.
3354 3354
3355 :term:`FIT_HASH_ALG` 3355 :term:`FIT_HASH_ALG`
3356 Specifies the hash algorithm used in creating the FIT Image. 3356 Specifies the hash algorithm used in creating the FIT Image.
3357 This variable is set by default to "sha256" by the 3357 This variable is set by default to "sha256" by the
3358 :ref:`ref-classes-kernel-fitimage` class. 3358 :ref:`ref-classes-kernel-fit-image` class.
3359 3359
3360 :term:`FIT_KERNEL_COMP_ALG` 3360 :term:`FIT_KERNEL_COMP_ALG`
3361 The compression algorithm to use for the kernel image inside the FIT Image. 3361 The compression algorithm to use for the kernel image inside the FIT Image.
@@ -3374,31 +3374,31 @@ system and gives an overview of their function and contents.
3374 :term:`FIT_KEY_GENRSA_ARGS` 3374 :term:`FIT_KEY_GENRSA_ARGS`
3375 Arguments to ``openssl genrsa`` for generating a RSA private key for 3375 Arguments to ``openssl genrsa`` for generating a RSA private key for
3376 signing the FIT image. The default value is set to "-F4" by the 3376 signing the FIT image. The default value is set to "-F4" by the
3377 :ref:`ref-classes-kernel-fitimage` class. 3377 :ref:`ref-classes-kernel-fit-image` class.
3378 3378
3379 :term:`FIT_KEY_REQ_ARGS` 3379 :term:`FIT_KEY_REQ_ARGS`
3380 Arguments to ``openssl req`` for generating a certificate for signing 3380 Arguments to ``openssl req`` for generating a certificate for signing
3381 the FIT image. The default value is "-batch -new" by the 3381 the FIT image. The default value is "-batch -new" by the
3382 :ref:`ref-classes-kernel-fitimage` class, "batch" for 3382 :ref:`ref-classes-kernel-fit-image` class, "batch" for
3383 non interactive mode and "new" for generating new keys. 3383 non interactive mode and "new" for generating new keys.
3384 3384
3385 :term:`FIT_KEY_SIGN_PKCS` 3385 :term:`FIT_KEY_SIGN_PKCS`
3386 Format for the public key certificate used for signing the FIT image. 3386 Format for the public key certificate used for signing the FIT image.
3387 The default value is set to "x509" by the 3387 The default value is set to "x509" by the
3388 :ref:`ref-classes-kernel-fitimage` class. 3388 :ref:`ref-classes-kernel-fit-image` class.
3389 3389
3390 :term:`FIT_SIGN_ALG` 3390 :term:`FIT_SIGN_ALG`
3391 Specifies the signature algorithm used in creating the FIT Image. 3391 Specifies the signature algorithm used in creating the FIT Image.
3392 This variable is set by default to "rsa2048" by the 3392 This variable is set by default to "rsa2048" by the
3393 :ref:`ref-classes-kernel-fitimage` class. 3393 :ref:`ref-classes-kernel-fit-image` class.
3394 3394
3395 :term:`FIT_PAD_ALG` 3395 :term:`FIT_PAD_ALG`
3396 Specifies the padding algorithm used in creating the FIT Image. 3396 Specifies the padding algorithm used in creating the FIT Image.
3397 The default value is set to "pkcs-1.5" by the 3397 The default value is set to "pkcs-1.5" by the
3398 :ref:`ref-classes-kernel-fitimage` class. 3398 :ref:`ref-classes-kernel-fit-image` class.
3399 3399
3400 :term:`FIT_SIGN_INDIVIDUAL` 3400 :term:`FIT_SIGN_INDIVIDUAL`
3401 If set to "1", the :ref:`ref-classes-kernel-fitimage` class signs each 3401 If set to "1", the :ref:`ref-classes-kernel-fit-image` class signs each
3402 image node individually, including the kernel, DTB, RAM disk, and any 3402 image node individually, including the kernel, DTB, RAM disk, and any
3403 other image types present in the FIT image, in addition to signing the 3403 other image types present in the FIT image, in addition to signing the
3404 configuration nodes. 3404 configuration nodes.
@@ -3431,13 +3431,13 @@ system and gives an overview of their function and contents.
3431 :term:`FIT_SIGN_NUMBITS` 3431 :term:`FIT_SIGN_NUMBITS`
3432 Size of the private key used in the FIT image, in number of bits. 3432 Size of the private key used in the FIT image, in number of bits.
3433 The default value for this variable is set to "2048" 3433 The default value for this variable is set to "2048"
3434 by the :ref:`ref-classes-kernel-fitimage` class. 3434 by the :ref:`ref-classes-kernel-fit-image` class.
3435 3435
3436 :term:`FIT_UBOOT_ENV` 3436 :term:`FIT_UBOOT_ENV`
3437 This variable allows to add a U-Boot script as a text file to the 3437 This variable allows to add a U-Boot script as a text file to the
3438 FIT image. Such a script can be sourced from the U-Boot shell. 3438 FIT image. Such a script can be sourced from the U-Boot shell.
3439 3439
3440 When inheriting the :ref:`ref-classes-kernel-fitimage` class a 3440 When inheriting the :ref:`ref-classes-kernel-fit-image` class a
3441 script file should be included in the :term:`SRC_URI` of the Linux 3441 script file should be included in the :term:`SRC_URI` of the Linux
3442 kernel recipe. 3442 kernel recipe.
3443 3443
@@ -5075,9 +5075,7 @@ system and gives an overview of their function and contents.
5075 :term:`KERNEL_CLASSES` 5075 :term:`KERNEL_CLASSES`
5076 A list of classes defining kernel image types that the 5076 A list of classes defining kernel image types that the
5077 :ref:`ref-classes-kernel` class should inherit. You typically 5077 :ref:`ref-classes-kernel` class should inherit. You typically
5078 append this variable to enable extended image types. An example is 5078 append this variable to enable extended image types.
5079 ":ref:`ref-classes-kernel-fitimage`", which enables
5080 FIT image support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``.
5081 You can register custom kernel image types with the 5079 You can register custom kernel image types with the
5082 :ref:`ref-classes-kernel` class using this variable. 5080 :ref:`ref-classes-kernel` class using this variable.
5083 5081
@@ -8764,6 +8762,28 @@ system and gives an overview of their function and contents.
8764 image), compared to just using the :ref:`ref-classes-create-spdx` class 8762 image), compared to just using the :ref:`ref-classes-create-spdx` class
8765 with no option. 8763 with no option.
8766 8764
8765 :term:`SPDX_INCLUDE_COMPILED_SOURCES`
8766 This option allows the same as :term:`SPDX_INCLUDE_SOURCES` but including
8767 only the sources used to compile the host tools and the target packages.
8768 While :term:`SPDX_INCLUDE_SOURCES` includes all files in the source
8769 directory as source file descriptions, :term:`SPDX_INCLUDE_COMPILED_SOURCES`
8770 includes only the sources that are used to produce the binaries delivered
8771 as packages. The source files that are not used during compilation are not
8772 included in the SBOM. It uses debugsource information generated during
8773 ``do_package`` to filter out source files.
8774
8775 This enables an external tool to use the SPDX information to disregard
8776 vulnerabilities that are not compiled in the packages.
8777
8778 Enable this option as follows::
8779
8780 SPDX_INCLUDE_COMPILED_SOURCES = "1"
8781
8782 According to our tests, building ``core-image-minimal`` for the
8783 ``qemux86-64`` machine, enabling this option compared with the
8784 :term:`SPDX_INCLUDE_SOURCES` reduces the size of the ``tmp/deploy/spdx``
8785 directory from 2GB to 1.6GB.
8786
8767 :term:`SPDX_NAMESPACE_PREFIX` 8787 :term:`SPDX_NAMESPACE_PREFIX`
8768 This option could be used in order to change the prefix of ``spdxDocument`` 8788 This option could be used in order to change the prefix of ``spdxDocument``
8769 and the prefix of ``documentNamespace``. It is set by default to 8789 and the prefix of ``documentNamespace``. It is set by default to
@@ -10321,13 +10341,13 @@ system and gives an overview of their function and contents.
10321 :term:`UBOOT_DTB_LOADADDRESS` 10341 :term:`UBOOT_DTB_LOADADDRESS`
10322 Specifies the load address for the dtb image used by U-Boot. During FIT 10342 Specifies the load address for the dtb image used by U-Boot. During FIT
10323 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in 10343 image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
10324 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be 10344 :ref:`ref-classes-kernel-fit-image` class to specify the load address to be
10325 used in creating the dtb sections of Image Tree Source for the FIT image. 10345 used in creating the dtb sections of Image Tree Source for the FIT image.
10326 10346
10327 :term:`UBOOT_DTBO_LOADADDRESS` 10347 :term:`UBOOT_DTBO_LOADADDRESS`
10328 Specifies the load address for the dtbo image used by U-Boot. During FIT 10348 Specifies the load address for the dtbo image used by U-Boot. During FIT
10329 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in 10349 image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
10330 :ref:`ref-classes-kernel-fitimage` class to specify the load address to be 10350 :ref:`ref-classes-kernel-fit-image` class to specify the load address to be
10331 used in creating the dtbo sections of Image Tree Source for the FIT image. 10351 used in creating the dtbo sections of Image Tree Source for the FIT image.
10332 10352
10333 :term:`UBOOT_ENTRYPOINT` 10353 :term:`UBOOT_ENTRYPOINT`
@@ -10339,7 +10359,7 @@ system and gives an overview of their function and contents.
10339 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation. 10359 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation.
10340 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation. 10360 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation.
10341 10361
10342 This variable is used by the :ref:`ref-classes-kernel-fitimage`, 10362 This variable is used by the :ref:`ref-classes-kernel-fit-image`,
10343 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`, 10363 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`,
10344 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` 10364 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
10345 classes. 10365 classes.
@@ -10616,7 +10636,7 @@ system and gives an overview of their function and contents.
10616 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation. 10636 - The :term:`FIT_ADDRESS_CELLS` variable for FIT image creation.
10617 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation. 10637 - The :term:`UBOOT_FIT_ADDRESS_CELLS` variable for U-Boot FIT image creation.
10618 10638
10619 This variable is used by the :ref:`ref-classes-kernel-fitimage`, 10639 This variable is used by the :ref:`ref-classes-kernel-fit-image`,
10620 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`, 10640 :ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`,
10621 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` 10641 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
10622 classes. 10642 classes.
@@ -10644,15 +10664,15 @@ system and gives an overview of their function and contents.
10644 10664
10645 :term:`UBOOT_MKIMAGE` 10665 :term:`UBOOT_MKIMAGE`
10646 Specifies the name of the mkimage command as used by the 10666 Specifies the name of the mkimage command as used by the
10647 :ref:`ref-classes-kernel-fitimage` class to assemble 10667 :ref:`ref-classes-kernel-fit-image` class to assemble
10648 the FIT image. This can be used to substitute an alternative command, wrapper 10668 the FIT image. This can be used to substitute an alternative command, wrapper
10649 script or function if desired. The default is "uboot-mkimage". 10669 script or function if desired. The default is "uboot-mkimage".
10650 10670
10651 :term:`UBOOT_MKIMAGE_DTCOPTS` 10671 :term:`UBOOT_MKIMAGE_DTCOPTS`
10652 Options for the device tree compiler passed to ``mkimage -D`` feature 10672 Options for the device tree compiler passed to ``mkimage -D`` feature
10653 while creating a FIT image with the :ref:`ref-classes-kernel-fitimage` 10673 while creating a FIT image with the :ref:`ref-classes-kernel-fit-image`
10654 class. If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then the 10674 class. If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then the
10655 :ref:`ref-classes-kernel-fitimage` class will not pass the ``-D`` option 10675 :ref:`ref-classes-kernel-fit-image` class will not pass the ``-D`` option
10656 to ``mkimage``. 10676 to ``mkimage``.
10657 10677
10658 This variable is also used by the :ref:`ref-classes-uboot-sign` class. 10678 This variable is also used by the :ref:`ref-classes-uboot-sign` class.
@@ -10663,42 +10683,42 @@ system and gives an overview of their function and contents.
10663 10683
10664 :term:`UBOOT_MKIMAGE_SIGN` 10684 :term:`UBOOT_MKIMAGE_SIGN`
10665 Specifies the name of the mkimage command as used by the 10685 Specifies the name of the mkimage command as used by the
10666 :ref:`ref-classes-kernel-fitimage` class to sign 10686 :ref:`ref-classes-kernel-fit-image` class to sign
10667 the FIT image after it has been assembled (if enabled). This can be used 10687 the FIT image after it has been assembled (if enabled). This can be used
10668 to substitute an alternative command, wrapper script or function if 10688 to substitute an alternative command, wrapper script or function if
10669 desired. The default is "${:term:`UBOOT_MKIMAGE`}". 10689 desired. The default is "${:term:`UBOOT_MKIMAGE`}".
10670 10690
10671 :term:`UBOOT_MKIMAGE_SIGN_ARGS` 10691 :term:`UBOOT_MKIMAGE_SIGN_ARGS`
10672 Optionally specifies additional arguments for the 10692 Optionally specifies additional arguments for the
10673 :ref:`ref-classes-kernel-fitimage` class to pass to the 10693 :ref:`ref-classes-kernel-fit-image` class to pass to the
10674 mkimage command when signing the FIT image. 10694 mkimage command when signing the FIT image.
10675 10695
10676 :term:`UBOOT_RD_ENTRYPOINT` 10696 :term:`UBOOT_RD_ENTRYPOINT`
10677 Specifies the entrypoint for the RAM disk image. During FIT image 10697 Specifies the entrypoint for the RAM disk image. During FIT image
10678 creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in 10698 creation, the :term:`UBOOT_RD_ENTRYPOINT` variable is used in
10679 :ref:`ref-classes-kernel-fitimage` class to specify the entrypoint to be 10699 :ref:`ref-classes-kernel-fit-image` class to specify the entrypoint to be
10680 used in creating the Image Tree Source for the FIT image. 10700 used in creating the Image Tree Source for the FIT image.
10681 10701
10682 :term:`UBOOT_RD_LOADADDRESS` 10702 :term:`UBOOT_RD_LOADADDRESS`
10683 Specifies the load address for the RAM disk image. During FIT image 10703 Specifies the load address for the RAM disk image. During FIT image
10684 creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in 10704 creation, the :term:`UBOOT_RD_LOADADDRESS` variable is used in
10685 :ref:`ref-classes-kernel-fitimage` class to specify the load address to 10705 :ref:`ref-classes-kernel-fit-image` class to specify the load address to
10686 be used in creating the Image Tree Source for the FIT image. 10706 be used in creating the Image Tree Source for the FIT image.
10687 10707
10688 :term:`UBOOT_SIGN_ENABLE` 10708 :term:`UBOOT_SIGN_ENABLE`
10689 Enable signing of FIT image. The default value is "0". 10709 Enable signing of FIT image. The default value is "0".
10690 10710
10691 This variable is used by the :ref:`ref-classes-kernel-fitimage`, 10711 This variable is used by the :ref:`ref-classes-kernel-fit-image`,
10692 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign` 10712 :ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
10693 classes. 10713 classes.
10694 10714
10695 :term:`UBOOT_SIGN_KEYDIR` 10715 :term:`UBOOT_SIGN_KEYDIR`
10696 Location of the directory containing the RSA key and certificate used for 10716 Location of the directory containing the RSA key and certificate used for
10697 signing FIT image, used by the :ref:`ref-classes-kernel-fitimage` and 10717 signing FIT image, used by the :ref:`ref-classes-kernel-fit-image` and
10698 :ref:`ref-classes-uboot-sign` classes. 10718 :ref:`ref-classes-uboot-sign` classes.
10699 10719
10700 :term:`UBOOT_SIGN_KEYNAME` 10720 :term:`UBOOT_SIGN_KEYNAME`
10701 The name of keys used by the :ref:`ref-classes-kernel-fitimage` class 10721 The name of keys used by the :ref:`ref-classes-kernel-fit-image` class
10702 for signing U-Boot FIT image stored in the :term:`UBOOT_SIGN_KEYDIR` 10722 for signing U-Boot FIT image stored in the :term:`UBOOT_SIGN_KEYDIR`
10703 directory. If we have for example a ``dev.key`` key and a ``dev.crt`` 10723 directory. If we have for example a ``dev.key`` key and a ``dev.crt``
10704 certificate stored in the :term:`UBOOT_SIGN_KEYDIR` directory, you will 10724 certificate stored in the :term:`UBOOT_SIGN_KEYDIR` directory, you will
diff --git a/documentation/standards.md b/documentation/standards.md
index 8300d813dc..801efe3457 100644
--- a/documentation/standards.md
+++ b/documentation/standards.md
@@ -126,7 +126,16 @@ that most themes only style these two admonitions.
126 126
127## ReStructured Text Syntax standards 127## ReStructured Text Syntax standards
128 128
129This section has not been filled yet 129### doc directive
130
131The [doc directive](https://www.sphinx-doc.org/en/master/usage/referencing.html#role-doc)
132allows to refer to another document within yocto-docs, like:
133
134 For more information, read :doc:`/bsp-guide/index`.
135
136Note that only "absolute" paths (starting with a '/') are allowed. The root
137directory of that path is documentation/, that is, :doc:`/bsp-guide/index`
138points at documentation/bsp-guide/index.rst.
130 139
131## Adding screenshots 140## Adding screenshots
132 141
diff --git a/documentation/transitioning-to-a-custom-environment.rst b/documentation/transitioning-to-a-custom-environment.rst
index 6ff55e5619..a5f55c567a 100644
--- a/documentation/transitioning-to-a-custom-environment.rst
+++ b/documentation/transitioning-to-a-custom-environment.rst
@@ -8,8 +8,8 @@ Transitioning to a custom environment for systems development
8 8
9.. note:: 9.. note::
10 10
11 So you've finished the :doc:`brief-yoctoprojectqs/index` and 11 So you've finished the :doc:`/brief-yoctoprojectqs/index` and
12 glanced over the document :doc:`what-i-wish-id-known`, the latter contains 12 glanced over the document :doc:`/what-i-wish-id-known`, the latter contains
13 important information learned from other users. You're well prepared. But 13 important information learned from other users. You're well prepared. But
14 now, as you are starting your own project, it isn't exactly straightforward what 14 now, as you are starting your own project, it isn't exactly straightforward what
15 to do. And, the documentation is daunting. We've put together a few hints to 15 to do. And, the documentation is daunting. We've put together a few hints to
diff --git a/documentation/what-i-wish-id-known.rst b/documentation/what-i-wish-id-known.rst
index 836097910d..ddee6ad749 100644
--- a/documentation/what-i-wish-id-known.rst
+++ b/documentation/what-i-wish-id-known.rst
@@ -49,7 +49,7 @@ contact us with other suggestions.
49 their silicon. These layers have names such as "meta-intel" or "meta-ti". Try 49 their silicon. These layers have names such as "meta-intel" or "meta-ti". Try
50 not to build layers from scratch. If you do have custom silicon, use one of 50 not to build layers from scratch. If you do have custom silicon, use one of
51 these layers as a guide or template and familiarize yourself with the 51 these layers as a guide or template and familiarize yourself with the
52 :doc:`bsp-guide/index`. 52 :doc:`/bsp-guide/index`.
53 53
54#. **Do not put everything into one layer:** 54#. **Do not put everything into one layer:**
55 Use different layers to logically separate information in your build. As an 55 Use different layers to logically separate information in your build. As an
@@ -127,7 +127,7 @@ contact us with other suggestions.
127 You can build and run a specific task for a specific package (including 127 You can build and run a specific task for a specific package (including
128 devshell) or even a single recipe. When developers first start using the 128 devshell) or even a single recipe. When developers first start using the
129 Yocto Project, the instructions found in the 129 Yocto Project, the instructions found in the
130 :doc:`brief-yoctoprojectqs/index` show how to create an image 130 :doc:`/brief-yoctoprojectqs/index` show how to create an image
131 and then run or flash that image. However, you can actually build just a 131 and then run or flash that image. However, you can actually build just a
132 single recipe. Thus, if some dependency or recipe isn't working, you can just 132 single recipe. Thus, if some dependency or recipe isn't working, you can just
133 say "bitbake foo" where "foo" is the name for a specific recipe. As you 133 say "bitbake foo" where "foo" is the name for a specific recipe. As you
diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
index c04940ce54..906a5083d7 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/classes-recipe/rust-target-config.bbclass
@@ -77,8 +77,33 @@ def llvm_features_from_tune(d):
77 f.append("+a15") 77 f.append("+a15")
78 if 'cortexa17' in feat: 78 if 'cortexa17' in feat:
79 f.append("+a17") 79 f.append("+a17")
80 if ('riscv64' in feat) or ('riscv32' in feat): 80 if 'rv' in feat:
81 f.append("+a,+c,+d,+f,+m") 81 if 'm' in feat:
82 f.append("+m")
83 if 'a' in feat:
84 f.append("+a")
85 if 'f' in feat:
86 f.append("+f")
87 if 'd' in feat:
88 f.append("+d")
89 if 'c' in feat:
90 f.append("+c")
91 if 'v' in feat:
92 f.append("+v")
93 if 'zicbom' in feat:
94 f.append("+zicbom")
95 if 'zicsr' in feat:
96 f.append("+zicsr")
97 if 'zifencei' in feat:
98 f.append("+zifencei")
99 if 'zba' in feat:
100 f.append("+zba")
101 if 'zbb' in feat:
102 f.append("+zbb")
103 if 'zbc' in feat:
104 f.append("+zbc")
105 if 'zbs' in feat:
106 f.append("+zbs")
82 return f 107 return f
83llvm_features_from_tune[vardepvalue] = "${@llvm_features_from_tune(d)}" 108llvm_features_from_tune[vardepvalue] = "${@llvm_features_from_tune(d)}"
84 109
@@ -236,19 +261,19 @@ TARGET_POINTER_WIDTH[powerpc64le] = "64"
236TARGET_C_INT_WIDTH[powerpc64le] = "32" 261TARGET_C_INT_WIDTH[powerpc64le] = "32"
237MAX_ATOMIC_WIDTH[powerpc64le] = "64" 262MAX_ATOMIC_WIDTH[powerpc64le] = "64"
238 263
239## riscv32gc-unknown-linux-{gnu, musl} 264## riscv32-unknown-linux-{gnu, musl}
240DATA_LAYOUT[riscv32gc] = "e-m:e-p:32:32-i64:64-n32-S128" 265DATA_LAYOUT[riscv32] = "e-m:e-p:32:32-i64:64-n32-S128"
241TARGET_ENDIAN[riscv32gc] = "little" 266TARGET_ENDIAN[riscv32] = "little"
242TARGET_POINTER_WIDTH[riscv32gc] = "32" 267TARGET_POINTER_WIDTH[riscv32] = "32"
243TARGET_C_INT_WIDTH[riscv32gc] = "32" 268TARGET_C_INT_WIDTH[riscv32] = "32"
244MAX_ATOMIC_WIDTH[riscv32gc] = "32" 269MAX_ATOMIC_WIDTH[riscv32] = "32"
245 270
246## riscv64gc-unknown-linux-{gnu, musl} 271## riscv64-unknown-linux-{gnu, musl}
247DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128" 272DATA_LAYOUT[riscv64] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
248TARGET_ENDIAN[riscv64gc] = "little" 273TARGET_ENDIAN[riscv64] = "little"
249TARGET_POINTER_WIDTH[riscv64gc] = "64" 274TARGET_POINTER_WIDTH[riscv64] = "64"
250TARGET_C_INT_WIDTH[riscv64gc] = "32" 275TARGET_C_INT_WIDTH[riscv64] = "32"
251MAX_ATOMIC_WIDTH[riscv64gc] = "64" 276MAX_ATOMIC_WIDTH[riscv64] = "64"
252 277
253## loongarch64-unknown-linux-{gnu, musl} 278## loongarch64-unknown-linux-{gnu, musl}
254DATA_LAYOUT[loongarch64] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128" 279DATA_LAYOUT[loongarch64] = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
@@ -271,19 +296,11 @@ def arch_to_rust_target_arch(arch):
271 return "arm" 296 return "arm"
272 elif arch == "powerpc64le": 297 elif arch == "powerpc64le":
273 return "powerpc64" 298 return "powerpc64"
274 elif arch == "riscv32gc":
275 return "riscv32"
276 elif arch == "riscv64gc":
277 return "riscv64"
278 else: 299 else:
279 return arch 300 return arch
280 301
281# Convert a rust target string to a llvm-compatible triplet 302# Convert a rust target string to a llvm-compatible triplet
282def rust_sys_to_llvm_target(sys): 303def rust_sys_to_llvm_target(sys):
283 if sys.startswith('riscv32gc-'):
284 return sys.replace('riscv32gc-', 'riscv32-', 1)
285 if sys.startswith('riscv64gc-'):
286 return sys.replace('riscv64gc-', 'riscv64-', 1)
287 return sys 304 return sys
288 305
289# generates our target CPU value 306# generates our target CPU value
@@ -380,9 +397,9 @@ def rust_gen_target(d, thing, wd, arch):
380 else: 397 else:
381 tspec['env'] = "gnu" 398 tspec['env'] = "gnu"
382 if "riscv64" in tspec['llvm-target']: 399 if "riscv64" in tspec['llvm-target']:
383 tspec['llvm-abiname'] = "lp64d" 400 tspec['llvm-abiname'] = d.getVar('TUNE_RISCV_ABI')
384 if "riscv32" in tspec['llvm-target']: 401 if "riscv32" in tspec['llvm-target']:
385 tspec['llvm-abiname'] = "ilp32d" 402 tspec['llvm-abiname'] = d.getVar('TUNE_RISCV_ABI')
386 if "loongarch64" in tspec['llvm-target']: 403 if "loongarch64" in tspec['llvm-target']:
387 tspec['llvm-abiname'] = "lp64d" 404 tspec['llvm-abiname'] = "lp64d"
388 tspec['vendor'] = "unknown" 405 tspec['vendor'] = "unknown"
diff --git a/meta/conf/machine/include/riscv/README b/meta/conf/machine/include/riscv/README
new file mode 100644
index 0000000000..beef68f523
--- /dev/null
+++ b/meta/conf/machine/include/riscv/README
@@ -0,0 +1,122 @@
12025/06/08 - Mark Hatle <mark.hatle@amd.com>
2 - Initial Revision
3
4The RISC-V ISA is broken into two parts, a base ISA and extensions. As
5of the writing of this document these are documented at:
6
7https://lf-riscv.atlassian.net/wiki/spaces/HOME/pages/16154769/RISC-V+Technical+Specifications
8
9Specifically "The RISC-V Instruction Set Manual Volume I: Unprivileged ISA"
10was used to create this implementation.
11
12Requirements
13------------
14As RISC-V is a “variable” ISA (a base isa plus numerous extensions), a
15mechanism is required to specify a series of ISA features that a user or
16tune can use to specify a specific CPU instantiation.
17
18Not all ratified or draft features should or can be implemented with the
19available resources.
20
21The implementation should work for Linux, baremetal (newlib), zephyr and
22other operating systems. Supported extensions should be based on
23real-world examples.
24
25Linux
26-----
27Linux required base and support extensions should be available. Linux
28requires:
29* Base: rv32ima & rv64ima
30* Optional FPU: fd
31* Optional RISCV_ISA_C: c
32* Optiona RISCV_ISA_V: v
33* Required additional: _zicsr_zifencei
34* Optional RISCV_ISA_ZBA: _zba
35* Optional RISCV_ISA_ZBB: _zbb
36* Optional RISCV_ISA_ZBC: _zbc (not supported by current QEMU design)
37
38See: https://git.yoctoproject.org/linux-yocto/tree/arch/riscv/Makefile?h=v6.12/base
39
40Baremetal
41---------
42AMD Microblaze-V FPGA support uses the following static configurations:
43Base: rv32e, rv32i, rv64i
44Extensions: m, a, f, d, c, b, zicsr, zifencei
45
46Zephyr
47------
48AMD Microblaze-V development for Zephyr is the same as Baremetal, with a
49few additional extensions: zbc, zicbom
50
51ABI
52---
53The following ABIs are supported GNU tools and some combination of systems.
54* ilp32 - Integer, long and pointer are 32-bit
55* lp64 - Long and pointer are 64-bit (integer is 32-bit)
56
57The ABI is dependent upon the core system implementation, as ilp32 can
58only used on an ‘rv32’ system, while lp64 can only be used on an ‘rv64’
59system.
60
61There are additional variations of each ABI:
62* e - used with the Reduced register extension
63* f - used when single precision floating point (but not double precision) is
64 enabled
65* d - used when both single and double precision floating point is enabled
66
67Based on the above, the ABI should be automatically determined based on
68the selected Base ISA and Extensions.
69
70Implementation
71--------------
72To make it easier to generate the RISC-V canonical arch, ISA based -march,
73and the ABI string, a few new variables are added for specific RISC-V items.
74
75TUNE_RISCV_ARCH - This contains the canonical GNU style arch, generally this
76 will evaluate to "riscv32" or "riscv64".
77
78TUNE_RISCV_MARCH - This will contain an ISA based -march string compatible
79 with gcc and similar toolchains. For example:
80 rv32imacfd_zicsr_zifencei
81
82TUNE_RISCV_ABI - This is the generated ABI that corresponds to the ARCH and
83 MARCH/ISA values. For riscv32, the value will be ilp32
84 (int, long and pointer is 32-bit) with the ISA
85 variation. For riscv64, the value will be lp64 (long
86 and pointer are 64-bit bit, while int is 32-bit) with the
87 ISA variation. The ISA affects the ABI when the 'e', 'f'
88 and 'd' extension are used.
89
90TUNE_RISCV_PKGARCH - This is the generated PKGARCH value.
91
92The standard variables are defined as:
93
94TUNE_CCARGS = "${@ '-march=${TUNE_RISCV_MARCH} -mabi=${TUNE_RISCV_ABI}' if not d.getVar('TUNE_CCARGS:tune-${DEFAULTTUNE}') else 'TUNE_CCARGS:tune-${DEFAULTTUNE}'}"
95
96The above will allow the user to specify an implementation specific
97TUNE_CCARGS for a given processor tune if the default implementtion is
98not adequate for some reason. It is expected that most, if not all,
99implementations will use the default behavior.
100
101TUNE_ARCH = "${TUNE_RISCV_ARCH}"
102TUNE_PKGARCH = "${TUNE_RISCV_PKGARCH}"
103
104The above two will always base their setting off the standard TUNE_FEATURES.
105
106Ratified and draft extensions should be implemented as TUNE_FEATURES in
107the arch-riscv.inc file.
108
109Vendor specific extensions and processor specific settings should go
110into a 'tune-<vendor>.inc' file, with tune-riscv.inc being reserved for
111general purpose tunes.
112
113TUNE_FEATURE Helper
114-------------------
115A special helper function has been written that will convert RISC-V ISA
116notation into TUNE_FEATURE notion, for example:
117
118rv32g -> rv 32 i m a f d zicsr zifencei
119
120The helper can be called using oe.tune.riscv_isa_to_tune("<ISA>") such as
121oe.tune.riscv_isa_to_tune("rv64gc") which would return:
122 rv 64 i m a f d c zicsr zifencei
diff --git a/meta/conf/machine/include/riscv/arch-riscv.inc b/meta/conf/machine/include/riscv/arch-riscv.inc
index b34064e78f..99bed8fde5 100644
--- a/meta/conf/machine/include/riscv/arch-riscv.inc
+++ b/meta/conf/machine/include/riscv/arch-riscv.inc
@@ -1,14 +1,140 @@
1# RISCV Architecture definition 1# RISCV Architecture definition
2 2
3DEFAULTTUNE ?= "riscv64" 3# Based on the RISC-V Instruction Set Manual Volume I: Unprivileged ISA from May 2025
4# As well as the RISC-V options for using GCC (as of June 2025)
4 5
5TUNE_ARCH = "${TUNE_ARCH:tune-${DEFAULTTUNE}}" 6# Note: the following should be implemented in the order that GCC expects
6TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}" 7# -march= values to be defined in.
7TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nf', ' -mabi=lp64', ' ', d)}"
8TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv32nf', ' -mabi=ilp32', ' ', d)}"
9 8
10TUNE_CCARGS:append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv64nc', ' -march=rv64imafd', ' ', d)}" 9# Base ISA
10# All supported march strings must start with rv32 or rv64
11TUNEVALID[rv] = "RISC-V"
12TUNE_RISCV_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "rv", "riscv", "", d)}"
13TUNE_RISCV_MARCH = "${@bb.utils.contains("TUNE_FEATURES", "rv", "rv", "", d)}"
14TUNE_RISCV_ABI = ""
11 15
16# There are two primary ABIs, ilp32 and lp64
17# There are variants of both, that appears to be based on extensions above
18# For example:
19# rv32i uses ilp32, rv32e uses ilp32e, rv32f uses ilp32f
20# rv64i uses lp64, rv64if uses lp64f, rv64id uses lp64d
21TUNEVALID[32] = "ISA XLEN - 32-bit"
22TUNECONFLICTS[32] = "64"
23TUNE_RISCV_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "32", "32", "", d)}"
24TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "32", "32", "", d)}"
25TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "32", "ilp32", "", d)}"
26
27TUNEVALID[64] = "ISA XLEN - 64-bit"
28TUNECONFLICTS[64] = "32"
29TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "64", "64", "", d)}"
30TUNE_RISCV_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "64", "64", "", d)}"
31TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "64", "lp64", "", d)}"
32
33# The package arch starts with the canonical arch, but adds some extensions to make
34# package compatibility clear
35TUNE_RISCV_PKGARCH = "${TUNE_RISCV_ARCH}"
36
37# i, e, or g are defined by gcc, but 'g' refers to 'i' + extensions 'MAFD Zicsr Zifencei'
38# So 'g' will not be defined here as it is an abbreviation of the expanded version
39TUNEVALID[e] = "Reduced register base integer extension"
40TUNECONFLICTS[e] = "i"
41TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "e", "e", "", d)}"
42TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "e", "e", "", d)}"
43TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "e", "e", "", d)}"
44
45TUNEVALID[i] = "Base integer extension"
46TUNECONFLICTS[i] = "e"
47TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "i", "i", "", d)}"
48TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "i", "i", "", d)}"
49
50# Extensions
51TUNEVALID[m] = "Integer multiplication and division extension"
52TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m", "m", "", d)}"
53TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m", "m", "", d)}"
54
55TUNEVALID[a] = "Atomic extension"
56TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "a", "a", "", d)}"
57TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "a", "a", "", d)}"
58
59TUNEVALID[f] = "Single-precision floating-point extension"
60TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "f d", "f", "", d)}"
61TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "f d", "f", "", d)}"
62
63TUNEVALID[d] = "Double-precision floating-point extension"
64TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "d", "d", "", d)}"
65TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "d", "d", "", d)}"
66
67# Only f OR d, but just one
68TUNE_RISCV_ABI .= "${@bb.utils.contains("TUNE_FEATURES", "d", "d", bb.utils.contains("TUNE_FEATURES", "f", "f", "", d), d)}"
69
70TUNEVALID[c] = "Compressed extension"
71TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "c", "c", "", d)}"
72TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "c", "c", "", d)}"
73
74TUNEVALID[b] = "Bit Manipulation extension"
75# Handled below via zba, zbb, zbs
76# This matches current Linux kernel behavior
77#TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "b", "b", "", d)}"
78#TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "b", "b", "", d)}"
79
80TUNEVALID[v] = "Vector operations extension"
81TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "v", "v", "", d)}"
82TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "v", "v", "", d)}"
83
84# Now the special Z extensions
85TUNEVALID[zicbom] = "Cache-block management extension"
86TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicbom", "_zicbom", "", d)}"
87TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicbom", "_zicbom", "", d)}"
88
89TUNEVALID[zicsr] = "Control and status register access extension"
90TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicsr f d", "_zicsr", "", d)}"
91# If zicsr (or zifencei) is in the path, OpenSBI fails to use the extensions, do to (Makefile):
92# # Check whether the assembler and the compiler support the Zicsr and Zifencei extensions
93# CC_SUPPORT_ZICSR_ZIFENCEI := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -march=rv$(OPENSBI_CC_XLEN)imafd_zicsr_zifencei -x c /dev/null -o /dev/null 2>&1 | grep -e "zicsr" -e "zifencei" > /dev/null && echo n || echo y)
94# this will match on the path containing zicsr or zifencei when an error is reported, which
95# will always happens in this check.
96#
97# Yocto Project Bugzilla 15897
98#
99#TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zicsr f d", "_zicsr", "", d)}"
100
101TUNEVALID[zifencei] = "Instruction-fetch fence extension"
102TUNE_RISCV_MARCH .= "${@bb.utils.contains("TUNE_FEATURES", "zifencei", "_zifencei", "", d)}"
103# See above Bug 15897
104#TUNE_RISCV_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "zifencei", "_zifencei", "", d)}"
105
106TUNEVALID[zba] = "Address bit manipulation extension"
107TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zba", "_zba", "", d)}"
108TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zba", "_zba", "", d)}"
109
110TUNEVALID[zbb] = "Basic bit manipulation extension"
111TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbb", "_zbb", "", d)}"
112TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbb", "_zbb", "", d)}"
113
114TUNEVALID[zbc] = "Carry-less multiplication extension"
115TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zbc", "_zbc", "", d)}"
116TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "zbc", "_zbc", "", d)}"
117
118TUNEVALID[zbs] = "Single-bit manipulation extension"
119TUNE_RISCV_MARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbs", "_zbs", "", d)}"
120TUNE_RISCV_PKGARCH .= "${@bb.utils.contains_any("TUNE_FEATURES", "b zbs", "_zbs", "", d)}"
121
122# Construct TUNE_CCARGS
123# This should result in a CCARG similar to:
124# -march=rv32imac -mabi=ilp32
125TUNE_CCARGS = "${@ '-march=${TUNE_RISCV_MARCH} -mabi=${TUNE_RISCV_ABI}' if not d.getVar('TUNE_CCARGS:tune-${DEFAULTTUNE}') else 'TUNE_CCARGS:tune-${DEFAULTTUNE}'}"
126
127# Construct TUNE_ARCH
128# This should result in an arch string similar to:
129# riscv32
130TUNE_ARCH = "${TUNE_RISCV_ARCH}"
131
132# Construct TUNE_PKGARCH
133# This should result in a package are like:
134# riscv32imac
135TUNE_PKGARCH = "${TUNE_RISCV_PKGARCH}"
136
137# Misc settings
12# Fix: ld: unrecognized option '--hash-style=sysv' 138# Fix: ld: unrecognized option '--hash-style=sysv'
13LINKER_HASH_STYLE:libc-newlib = "" 139LINKER_HASH_STYLE:libc-newlib = ""
14LINKER_HASH_STYLE:libc-picolibc = "" 140LINKER_HASH_STYLE:libc-picolibc = ""
diff --git a/meta/conf/machine/include/riscv/tune-riscv.inc b/meta/conf/machine/include/riscv/tune-riscv.inc
index 804712077e..12c1125c8b 100644
--- a/meta/conf/machine/include/riscv/tune-riscv.inc
+++ b/meta/conf/machine/include/riscv/tune-riscv.inc
@@ -1,41 +1,23 @@
1require conf/machine/include/riscv/arch-riscv.inc 1require conf/machine/include/riscv/arch-riscv.inc
2 2
3TUNEVALID[riscv64] = "Enable 64-bit RISC-V optimizations" 3DEFAULTTUNE ?= "riscv64"
4TUNEVALID[riscv32] = "Enable 32-bit RISC-V optimizations"
5
6TUNEVALID[riscv64nf] = "Enable 64-bit RISC-V optimizations no floating point"
7TUNEVALID[riscv32nf] = "Enable 32-bit RISC-V optimizations no floating point"
8
9TUNEVALID[riscv64nc] = "Enable 64-bit RISC-V optimizations without compressed instructions"
10
11TUNEVALID[bigendian] = "Big endian mode"
12 4
13AVAILTUNES += "riscv64 riscv32 riscv64nc riscv64nf riscv32nf" 5AVAILTUNES += "riscv64 riscv32 riscv64nc riscv64nf riscv32nf"
14 6
15# Default 7# Default
16TUNE_FEATURES:tune-riscv64 = "riscv64" 8TUNE_FEATURES:tune-riscv64 := "${@oe.tune.riscv_isa_to_tune("rv64gc")}"
17TUNE_ARCH:tune-riscv64 = "riscv64" 9PACKAGE_EXTRA_ARCHS:tune-riscv64 = "${TUNE_RISCV_PKGARCH}"
18TUNE_PKGARCH:tune-riscv64 = "riscv64"
19PACKAGE_EXTRA_ARCHS:tune-riscv64 = "riscv64"
20 10
21TUNE_FEATURES:tune-riscv32 = "riscv32" 11TUNE_FEATURES:tune-riscv32 := "${@oe.tune.riscv_isa_to_tune("rv32gc")}"
22TUNE_ARCH:tune-riscv32 = "riscv32" 12PACKAGE_EXTRA_ARCHS:tune-riscv32 = "${TUNE_RISCV_PKGARCH}"
23TUNE_PKGARCH:tune-riscv32 = "riscv32"
24PACKAGE_EXTRA_ARCHS:tune-riscv32 = "riscv32"
25 13
26# No float 14# No float
27TUNE_FEATURES:tune-riscv64nf = "${TUNE_FEATURES:tune-riscv64} riscv64nf" 15TUNE_FEATURES:tune-riscv64nf := "${@oe.tune.riscv_isa_to_tune("rv64imac_zicsr_zifencei")}"
28TUNE_ARCH:tune-riscv64nf = "riscv64" 16PACKAGE_EXTRA_ARCHS:tune-riscv64nf = "${TUNE_RISCV_PKGARCH}"
29TUNE_PKGARCH:tune-riscv64nf = "riscv64nf"
30PACKAGE_EXTRA_ARCHS:tune-riscv64nf = "riscv64nf"
31 17
32TUNE_FEATURES:tune-riscv32nf = "${TUNE_FEATURES:tune-riscv32} riscv32nf" 18TUNE_FEATURES:tune-riscv32nf := "${@oe.tune.riscv_isa_to_tune("rv32imac_zicsr_zifencei")}"
33TUNE_ARCH:tune-riscv32nf = "riscv32" 19PACKAGE_EXTRA_ARCHS:tune-riscv32nf = "${TUNE_RISCV_PKGARCH}"
34TUNE_PKGARCH:tune-riscv32nf = "riscv32nf"
35PACKAGE_EXTRA_ARCHS:tune-riscv32nf = "riscv32nf"
36 20
37# no compressed 21# no compressed
38TUNE_FEATURES:tune-riscv64nc = "${TUNE_FEATURES:tune-riscv64} riscv64nc" 22TUNE_FEATURES:tune-riscv64nc := "${@oe.tune.riscv_isa_to_tune("rv64imafd_zicsr_zifencei")}"
39TUNE_ARCH:tune-riscv64nc = "riscv64" 23PACKAGE_EXTRA_ARCHS:tune-riscv64nc = "${TUNE_RISCV_PKGARCH}"
40TUNE_PKGARCH:tune-riscv64nc = "riscv64nc"
41PACKAGE_EXTRA_ARCHS:tune-riscv64nc = "riscv64nc"
diff --git a/meta/conf/machine/qemuriscv32.conf b/meta/conf/machine/qemuriscv32.conf
index d3858dc051..aff36c28a5 100644
--- a/meta/conf/machine/qemuriscv32.conf
+++ b/meta/conf/machine/qemuriscv32.conf
@@ -2,9 +2,9 @@
2#@NAME: generic riscv32 machine 2#@NAME: generic riscv32 machine
3#@DESCRIPTION: Machine configuration for running a generic riscv32 3#@DESCRIPTION: Machine configuration for running a generic riscv32
4 4
5require conf/machine/include/riscv/qemuriscv.inc 5DEFAULTTUNE ?= "riscv32"
6 6
7DEFAULTTUNE = "riscv32" 7require conf/machine/include/riscv/qemuriscv.inc
8 8
9PREFERRED_VERSION_openocd-native = "riscv" 9PREFERRED_VERSION_openocd-native = "riscv"
10PREFERRED_VERSION_openocd = "riscv" 10PREFERRED_VERSION_openocd = "riscv"
diff --git a/meta/lib/oe/__init__.py b/meta/lib/oe/__init__.py
index dd094a874a..73de774266 100644
--- a/meta/lib/oe/__init__.py
+++ b/meta/lib/oe/__init__.py
@@ -12,4 +12,4 @@ __path__ = extend_path(__path__, __name__)
12BBIMPORTS = ["qa", "data", "path", "utils", "types", "package", "packagedata", \ 12BBIMPORTS = ["qa", "data", "path", "utils", "types", "package", "packagedata", \
13 "packagegroup", "sstatesig", "lsb", "cachedpath", "license", "qemu", \ 13 "packagegroup", "sstatesig", "lsb", "cachedpath", "license", "qemu", \
14 "reproducible", "rust", "buildcfg", "go", "spdx30_tasks", "spdx_common", \ 14 "reproducible", "rust", "buildcfg", "go", "spdx30_tasks", "spdx_common", \
15 "cve_check"] 15 "cve_check", "tune"]
diff --git a/meta/lib/oe/rust.py b/meta/lib/oe/rust.py
index 185553eeeb..1dc9cf150d 100644
--- a/meta/lib/oe/rust.py
+++ b/meta/lib/oe/rust.py
@@ -8,6 +8,4 @@
8def arch_to_rust_arch(arch): 8def arch_to_rust_arch(arch):
9 if arch == "ppc64le": 9 if arch == "ppc64le":
10 return "powerpc64le" 10 return "powerpc64le"
11 if arch in ('riscv32', 'riscv64'):
12 return arch + 'gc'
13 return arch 11 return arch
diff --git a/meta/lib/oe/tune.py b/meta/lib/oe/tune.py
new file mode 100644
index 0000000000..7fda19430d
--- /dev/null
+++ b/meta/lib/oe/tune.py
@@ -0,0 +1,81 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: GPL-2.0-only
5#
6
7# riscv_isa_to_tune(isa)
8#
9# Automatically translate a RISC-V ISA string to TUNE_FEATURES
10#
11# Abbreviations, such as rv32g -> rv32imaffd_zicsr_zifencei are supported.
12#
13# Profiles, such as rva22u64, are NOT supported, you must use ISA strings.
14#
15def riscv_isa_to_tune(isa):
16 _isa = isa.lower()
17
18 feature = []
19 iter = 0
20
21 # rv or riscv
22 if _isa[iter:].startswith('rv'):
23 feature.append('rv')
24 iter = iter + 2
25 elif _isa[iter:].startswith('riscv'):
26 feature.append('rv')
27 iter = iter + 5
28 else:
29 # Not a risc-v ISA!
30 return _isa
31
32 while (_isa[iter:]):
33 # Skip _ and whitespace
34 if _isa[iter] == '_' or _isa[iter].isspace():
35 iter = iter + 1
36 continue
37
38 # Length, just capture numbers here
39 if _isa[iter].isdigit():
40 iter_end = iter
41 while iter_end < len(_isa) and _isa[iter_end].isdigit():
42 iter_end = iter_end + 1
43
44 feature.append(_isa[iter:iter_end])
45 iter = iter_end
46 continue
47
48 # Typically i, e or g is next, followed by extensions.
49 # Extensions are single character, except for Z, Ss, Sh, Sm, Sv, and X
50
51 # If the extension starts with 'Z', 'S' or 'X' use the name until the next _, whitespace or end
52 if _isa[iter] in ['z', 's', 'x']:
53 ext_type = _isa[iter]
54 iter_end = iter + 1
55
56 # Multicharacter extension, these are supposed to have a _ before the next multicharacter extension
57 # See 37.4 and 37.5:
58 # 37.4: Underscores "_" may be used to separate ISA extensions...
59 # 37.5: All multi-letter extensions ... must be separated from other multi-letter extensions by an underscore...
60 # Some extensions permit only alphabetic characters, while others allow alphanumeric chartacters
61 while iter_end < len(_isa) and _isa[iter_end] != "_" and not _isa[iter_end].isspace():
62 iter_end = iter_end + 1
63
64 feature.append(_isa[iter:iter_end])
65 iter = iter_end
66 continue
67
68 # 'g' is special, it's an abbreviation for imafd_zicsr_zifencei
69 # When expanding the abbreviation, any additional letters must appear before the _z* extensions
70 if _isa[iter] == 'g':
71 _isa = 'imafd' + _isa[iter+1:] + '_zicsr_zifencei'
72 iter = 0
73 continue
74
75 feature.append(_isa[iter])
76 iter = iter + 1
77 continue
78
79 # Eliminate duplicates, but preserve the order
80 feature = list(dict.fromkeys(feature))
81 return ' '.join(feature)
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 2a47f90e32..b60a6e6c38 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -285,7 +285,20 @@ def get_bb_vars(variables=None, target=None, postconfig=None):
285 return values 285 return values
286 286
287def get_bb_var(var, target=None, postconfig=None): 287def get_bb_var(var, target=None, postconfig=None):
288 return get_bb_vars([var], target, postconfig)[var] 288 if postconfig:
289 return bitbake("-e %s" % target or "", postconfig=postconfig).output
290 else:
291 # Fast-path for the non-postconfig case
292 cmd = ["bitbake-getvar", "--quiet", "--value", var]
293 if target:
294 cmd.extend(["--recipe", target])
295 try:
296 return subprocess.run(cmd, check=True, text=True, stdout=subprocess.PIPE).stdout.strip()
297 except subprocess.CalledProcessError as e:
298 # We need to return None not the empty string if the variable hasn't been set.
299 if e.returncode == 1:
300 return None
301 raise
289 302
290def get_test_layer(bblayers=None): 303def get_test_layer(bblayers=None):
291 if bblayers is None: 304 if bblayers is None:
diff --git a/meta/recipes-devtools/go/go-binary-native_1.24.4.bb b/meta/recipes-devtools/go/go-binary-native_1.24.4.bb
index 9f788536c4..a5324d0f06 100644
--- a/meta/recipes-devtools/go/go-binary-native_1.24.4.bb
+++ b/meta/recipes-devtools/go/go-binary-native_1.24.4.bb
@@ -17,6 +17,7 @@ UPSTREAM_CHECK_URI = "https://golang.org/dl/"
17UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux" 17UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
18 18
19CVE_PRODUCT = "golang:go" 19CVE_PRODUCT = "golang:go"
20CVE_STATUS[CVE-2024-3566] = "not-applicable-platform: Issue only applies on Windows"
20 21
21S = "${WORKDIR}/go" 22S = "${WORKDIR}/go"
22 23
diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
index ca8469dbd9..a79c90faf8 100644
--- a/meta/recipes-devtools/go/go-common.inc
+++ b/meta/recipes-devtools/go/go-common.inc
@@ -21,6 +21,7 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
21 21
22# all recipe variants are created from the same product 22# all recipe variants are created from the same product
23CVE_PRODUCT = "golang:go" 23CVE_PRODUCT = "golang:go"
24CVE_STATUS[CVE-2024-3566] = "not-applicable-platform: Issue only applies on Windows"
24 25
25INHIBIT_PACKAGE_DEBUG_SPLIT = "1" 26INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
26SSTATE_SCAN_CMD = "true" 27SSTATE_SCAN_CMD = "true"