Overwriting a bbclass
Hello,
I would like modify how the extlinux/extlinux.conf file is create during build. I have figured out that the file responsible for the generation of this file is poky/meta/classes/uboot-extlinux-config.bbclass. I need to change the UBOOT_EXTLINUX_FDT value there and add an additional variable and parsing of it to the python code part (FDTOVERLAYS). For the former, I can change the value in some other custom conf file, as the UBOOT_EXTLINUX_FDT variable is already parsed in the given bbclass. Since FDTOVERLAYS is not handled at all in poky/meta/classes/uboot-extlinux-config.bbclass, I cannot do it the same way. I would need a UBOOT_EXTLINUX_FDT code there, but for the FDTOVERLAYS.
What is the best way to accomplish this? I thought initially that I could:
1. Somehow disable the default poky/meta/classes/uboot-extlinux-config.bbclass,
2. Overwrite it with a copy of this file that resides outside poky (inform the build system about this somehow),
3. Manually implement modifications in my bbclass file copy.
If this is the way to go, then I just do now how to do this in practice. I would appreciate all help!
I have figured that instead of trying to overwrite this specific class, I could as well allow it to run and generate the extlinux/extlinux.conf file "as is", and then create a new custom recipe or class that would pick that file up and edit it. Question is, what is the best way to do that? The way i understood what the bbclass'es are for in Yocto, makes it difficult for me to grasp why is the poky/meta/classes/uboot-extlinux-config.bbclass creating a "python program", instead of providing generic functionality for eventual inheritance.
So If I wanted to write something similar to this file, should it by design be a custom bb, bbappend or a bbclass file? And then, how to include it in the build, assuming my custom layer is already added? I would appreciate all feedback!