Date
1 - 4 of 4
possible to append or patch existing machine .conf file?
Bernd <prof7bit@...>
Suppose I have the following bugfix patch for a 3rd party machine conf
file I am using: diff --git a/conf/machine/colibri-vf.conf b/conf/machine/colibri-vf.conf index 3ddef79..ba47488 100644 --- a/conf/machine/colibri-vf.conf +++ b/conf/machine/colibri-vf.conf @@ -35,6 +35,6 @@ MKUBIFS_ARGS = " -c 8112 -e 124KiB -m 2KiB -F" UBINIZE_ARGS = " -p 128KiB -m 2048 -s 2048" UBI_VOLNAME = "rootfs" -SERIAL_CONSOLE ?= "115200 ttyLP0" +SERIAL_CONSOLE = "115200 ttyLP0" MACHINE_FEATURES += "usbgadget usbhost vfat alsa touchscreen" Is there a proper way to somehow temporarily add something to my layer to apply this patch until it makes its way upstream and into the branch I am using? Or should I make my own machine file, include the original one and then change the variable? So far I have not found any elegant way to otherwise force this variable to its correct value in my image recipe, the only way I have found to work around this bug is to .bbappend the inittab recipe where this variable is actually used and change the value of another variable (SERIAL_CONSOLES, note the S at the end) which is derived from SERIAL_CONSOLE right there in this bbappend file. This seems to help. But while doing this I have also noticed a strange anomaly in the output of bitbake -e: * When I change the variable in my image recipe then bitbake -e will show another "set" access and both variables SERIAL_CONSOLE and SERIAL_CONSOLES will have the correct value as intended by me but the produced image will have the **wrong** entry in its inittab. * When I bbappend the inittab recipe to set SERIAL_CONSOLES right there where it is used then my final image will have a correct inittab and the serial console will work bit there is **no** mention of that variable change in the output of bitbake -e * Only when I change the machine conf file iitself to set the variable then bitbake -e and the produced image both show the correct entry. Why does it behave that way? |
|
Andre McCurdy <armccurdy@...>
On Thu, Oct 12, 2017 at 3:32 AM, Bernd <prof7bit@...> wrote:
Suppose I have the following bugfix patch for a 3rd party machine confThat would be one way. You could also over-ride from any other global config file, e.g. local.conf or the distro config file (if you have one). So far I have not found any elegant way to otherwise force thisRight, the variable is not used by the image recipe, so setting it there won't change anything. Variables in an image recipe generally only relate to how the image is constructed (what packages it contains and format of the final image - tar.gz, squashfs, etc). , the only way I haveFor variables which are specific to one recipe then over-riding in the context of that recipe is OK. However, SERIAL_CONSOLES is used in a few different recipes, so over-riding from a global config file would necessary to be sure of changing it consistently wherever it's used. But while doing this I have also noticed a strange anomaly in theIf you run bitbake -e for inittab and for the image recipe and compare the two it should show that setting the variable from within the image recipe has no effect on the inittab recipe. That's not a bug. * When I bbappend the inittab recipe to set SERIAL_CONSOLES rightSimilar to above, bitbake -e will give different results for each recipe. * Only when I change the machine conf file iitself to set the variableBecause the machine config is a global config file and any variables it sets are seen by every recipe. |
|
Ayoub Zaki <ayoub.zaki@...>
Hi,
On 12.10.2017 12:32, Bernd wrote: Suppose I have the following bugfix patch for a 3rd party machine confyou can add to local.conf or distro.conf : include conf/machine/${MACHINE}-extra.conf then create in your meta layer or bsp layer : conf/machine/beaglebone-extra.conf conf/machine/rasberrypi-extra.conf conf/machine/xyz-extra.conf which contains overrides for your machine settings. Note that is an include and not require, which means that if you machine has no *extra.conf then it's simply skkiped ( no overrides) -- Ayoub Zaki Embedded Systems Consultant Vaihinger Straße 2/1 D-71634 Ludwigsburg Tel. : +4971415074546 Mobile : +4917662901545 Email : ayoub.zaki@... Homepage : https://embexus.com |
|
Bernd <prof7bit@...>
I have now combined the last 2 answers:
toggle quoted message
Show quoted text
I did not want to put more customization than machine and distro into my local.conf and since I already have my own distro conf I have now put the include conf/machine/${MACHINE}-extra.conf into my own distro conf file and made colibri-vf-extra.conf, both files are now inside my own layer folder and under my project's version control so it won't get lost. This works. Thank you 2017-10-13 10:56 GMT+02:00 Bernd <prof7bit@...>: sorry, the gmail user interface sent the reply not to the list by |
|