[Buildroot] Does Buildroot provide a mechanism to patch the files of a package in the package directory?

Arnout Vandecappelle arnout at mind.be
Wed Sep 21 18:14:01 UTC 2022



On 21/09/2022 19:10, Jiwen Qi wrote:
> Hi,
> 
> Let's take the DirectFB package as an example.
> How can I patch the Config.in or directfb.mk file in 
> buildroot-2018.08.4/package/directfb. The buildroot-2018.08.4 directory is the 
> root directory of Buildroot.

  There is currently no way to do that. For the time being, the best approach is 
to write a wrapper script around your buildroot 'make' call that checks if 
patches have already been applied and applies them if not.

  Ideally we should indeed have a way to do this in a BR2_EXTERNAL, but it gets 
a bit complicated... One idea I had is to scan the .mk files in the external 
directory before including the internal ones, and create a list of packages that 
should be skipped from the internal one. That way, if you create an external 
package with the same name as an internal one, it will get overridden. There are 
a bunch of corner cases though: what happens if the same package gets defined 
twice in the external? What about support files like .hash, Config.in, patches, 
...? What with packages in subdirectories e.g. qt5?

  Regards,
  Arnout

> 
> I know Buildroot has mechanisms to patch the files 
> in buildroot-2018.08.4/output/build/directfb-1.7.7.
> 
> Thanks and regards
> 
> Jiwen
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



More information about the buildroot mailing list