Appending an existing machine .conf file


Mike Frampton
 

Greetings Yocto,

I'm interested in assigning custom config settings for machine type qemuarm.

I tried a method suggested in this thread
https://lists.yoctoproject.org/g/yocto/message/38359 by Ayoub Zaki, he
suggested defining the following in local.conf

include conf/machine/${MACHINE}-extra.conf
However, this doesn't work for me because quemuarm.conf in poky/meta
**assigns** its variables, e.g.,

QB_OPT_APPEND = "-device VGA,edid=on"
QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"
So that if I define a value for this, it will be overwritten.

Is there another method for achieving this? If not I could submit a
patch to change poky's definitions to "??" assignments.

Cheers,
--Mike


Frederic Martinsons
 

Hello, 

 you can customize QB_OPT_APPEND by removing options you don't want, e.g.

QB_OPT_APPEND_remove = "-device usb-tablet"

and add your own after.

But maybe a lazy operator in the original conf file would be more suitable.

On Sat, 19 Jun 2021 at 06:41, Mike Frampton <mikeframpo@...> wrote:
Greetings Yocto,

I'm interested in assigning custom config settings for machine type qemuarm.

I tried a method suggested in this thread
https://lists.yoctoproject.org/g/yocto/message/38359 by Ayoub Zaki, he
suggested defining the following in local.conf

> include conf/machine/${MACHINE}-extra.conf

However, this doesn't work for me because quemuarm.conf in poky/meta
**assigns** its variables, e.g.,

> QB_OPT_APPEND = "-device VGA,edid=on"
> QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"

So that if I define a value for this, it will be overwritten.

Is there another method for achieving this? If not I could submit a
patch to change poky's definitions to "??" assignments.

Cheers,
--Mike




Mike Frampton
 

Hi Frédéric,

Thanks for your suggestion,

you can customize QB_OPT_APPEND by removing options you don't want, e.g.

QB_OPT_APPEND_remove = "-device usb-tablet"

and add your own after.
I suppose this would be a bit less maintainable, as it's effectively
duplicating the entry in the base config... but I think it will work
for me for now. Thank you.

Regards,
--Mike