Search code examples
yoctobitbakerecipe

Multiple configuration build in yocto


I have to build u-boot for multiple configurations, 6 different configurations to be precise. I need to create multiple binaries for all 6 configurations.

I have achieved by creating multiple machine for each configuration and I am able to build all the configurations. Each configuration add different patch that's why we need theses may configurations. But issue I am facing is that we need single machine type and how to I build multiple configurations from single machine.

COMPATIBLE_MACHINE_mx6 = "mx6"

COMPATIBLE_MACHINE_imx6-abc = "imx6-abc"

COMPATIBLE_MACHINE_imx6-xyz = "imx6-xyz"

COMPATIBLE_MACHINE_abc-uboot-imx = "abc-uboot-imx"

COMPATIBLE_MACHINE_abc-uboot-imx-secure = "abc-uboot-imx-secure"

COMPATIBLE_MACHINE_abc-uboot-secure = "abc-uboot-secure"

COMPATIBLE_MACHINE_abc-encryption = "abc-encryption"

COMPATIBLE_MACHINE_abc-provisioning = "abc-provisioning"

COMPATIBLE_MACHINE_abc-factory-test = "abc-factory-test"

COMPATIBLE_MACHINE_xyz-factory-test = "xyz-factory-test"

Above machines build the separate configurations images but I need to achieve the same with single machine only.

COMPATIBLE_MACHINE_mx6 = "mx6"

COMPATIBLE_MACHINE_imx6-abc = "imx6-abc"

COMPATIBLE_MACHINE_imx6-xyz = "imx6-xyz"

With only one machine type, how i should build multiple configuration. Please comment!


Solution

  • From what you describe you are looking for UBOOT_CONFIG.

    You could do the following in your single machine configuration:

    UBOOT_CONFIG = "abc def xyz"
    UBOOT_CONFIG[abc] = "ubootconfig1_defconfig"
    UBOOT_CONFIG[def] = "ubootconfig2_defconfig"
    UBOOT_CONFIG[xyz] = "ubootconfig3_defconfig"
    

    See: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-UBOOT_CONFIG