Aspire
Aspire

Reputation: 960

In Yocto how to append COMPATIBLE_MACHINE in my layer meta-test

In Yocto kirkstone I'm adding support for new qemu added machine.conf(qemu-test.conf) file in my layer meta-test. How to append COMPATIBLE_MACHINE with my machine qemu-test for the kernel recipe linux-yocto_5.10.bb in my layer with bbappend ?

COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32)$"

Upvotes: 0

Views: 500

Answers (1)

cracked_machine
cracked_machine

Reputation: 61

Let's assume your machine extension is called extend-qemux86-64.

You can either

  1. create a linux-yocto_5.10.bbappend in your layer and add your machine to the `COMPATIBLE_MACHINE variable:

    COMPATIBLE_MACHINE = "^(extend-qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32)$"
    
  2. Or you can just use MACHINEOVERRIDES in your extend-qemux86-64.conf to modify the overrides for an existing machine that you are extending:

    MACHINEOVERRIDES:append = ":qemux86-64"
    

    MACHINEOVERRIDES will now read:

    MACHINEOVERRIDES="qemuall:extend-qemux86-64:qemux86-64"
    

    This is read right to left: qemux86-64 variables will be overridden with extend-qemux86-64. This is why you cannot use MACHINEOVERRIDES:prepend

Upvotes: 0

Related Questions