Search code examples
yoctobitbakeopenembeddedyocto-recipe

Do machine specific overrides for a machine configuration required by my custom machine configuration, get used when I build for my custom machine?


I would like to create a new machine configuration that extends an existing machine configuration.

Let's suppose the machine configuration I want to base mine off of is named foo-mach.conf. My my-mach configuration looks like this.

require conf/machine/foo-mach.conf

# Remove some stuff not needed.
# Add custom device tree to KERNEL_DEVICETREE.
# Etc.

The BSP layer that contains foo-mach.conf contains a lot of machine specific overrides for foo-mach in all sorts of recipes.

Will the machine specific overrides for the foo-mach machine that my-mach requires, get used when I do I bitbake build for my-mach?

Edit: solution based on accepted answer

require conf/machine/foo-mach.conf

MACHINEOVERRIDES =. "foo-mach:"

# Remove some stuff not needed.
# Add custom device tree to KERNEL_DEVICETREE.
# Etc.

Solution

  • Just set MACHINEOVERRIDES. For example, qemu-generic-arm64.conf includes generic-arm64.conf and then extends the overrides with MACHINEOVERRIDES =. "generic-arm64:" so that both the current machine and the inherited machine are both valid overrides.