Yocto recipes to build u-boot

Hello,

i need to modify the u-boot recipes, but which is the recipes to use between bitbake u-boot, u-boot-toradex or virtual/bootloader and in this case wich is the recipes used.

Thank you.

Best regards

Flavio

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Hello Flavio,

For modifying U-Boot recipes in Toradex BSPs, you should use virtual/bootloader(1)(2). This is the virtual recipe name that represents the bootloader component in the Yocto build system.

Which Recipe is Actually Used

When you build with virtual/bootloader, the actual recipe used is u-boot-toradex(1)(2). You can verify this by running:

bitbake -c checkuri virtual/bootloader > log

(1)(2)

This will show you the actual recipe path, which will be something like:

/work/oe-core/build/../layers/meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex_2020.04.bb

(1)

Recommended Workflow for Modifications

  1. Initialize the build environment:
cd /work/oe-core/
. export

(1)(2)

  1. Clean the bootloader recipe (if you’ve made previous changes):
bitbake -c cleansstate virtual/bootloader

(1)(2)

  1. Use devshell for development:
bitbake -c devshell virtual/bootloader

(1)(2)

  1. Create patches using quilt (from within devshell):
quilt new YourPatchName.patch

(1)

  1. Apply patches via bbappend files - Create a .bbappend file in your layer to add patches to the recipe(1)(2).

Important Notes

  • Always use virtual/bootloader rather than directly calling bitbake u-boot or bitbake u-boot-toradex
  • The bootloader virtual recipe name ensures you’re building the correct U-Boot variant for your Toradex module(1)(2)
  • After modifying U-Boot, you may need to clean and rebuild your OS image as well(2)

This approach ensures you’re working with the Toradex-specific U-Boot implementation that includes all necessary patches and configurations for your module.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.