[Buildroot] customizations to package recipes in BR2_EXTERNAL?

Liam Staskawicz liam at stask.net
Mon Jun 18 17:16:46 UTC 2018

> On Jun 18, 2018, at 4:48 AM, Carlos Santos <casantos at datacom.com.br> wrote:
>> From: "Liam Staskawicz" <liam at stask.net>
>> To: "buildroot" <buildroot at busybox.net>
>> Sent: Sunday, June 17, 2018 6:30:14 PM
>> Subject: [Buildroot] customizations to package recipes in BR2_EXTERNAL?
>> Hello,
>> I'd like to slightly modify an existing package (nvidia-driver) to target a
>> different version (not the latest version, just the specific version my project
>> is using). The changes are simple - updating the version string, and .hash
>> entries - but it's not clear how best to manage these changes in a BR2_EXTERNAL
>> based workflow, as patches in BR2_GLOBAL_PATCH_DIR get applied after the
>> sources have been downloaded and unpacked.
>> I'd like to avoid maintaining a clone of the buildroot repo with these changes,
>> if possible. Is there a recommended workflow for this situation?
>> Thanks,
>> Liam
> Allowing users to customize existing packages in a BR2_EXTERNAL could
> lead to unpredictable results. If you need a custom nvidia-driver then
> copy/edit the original package definition to <my-project>-nvidia-driver
> in your BR2_EXTERNAL. That's quite easy, since no other package depends
> on nvidia-driver.

Thanks. This is not exactly straightforward, as it requires significant renaming of variables in the package to match the new package name, which is a bit brittle.

If there were a mechanism that allowed for a copy of the package in BR2_EXTERNAL to take precedence over a package with the same name in the core buildroot packages directory, that could address some of those issues, but perhaps there are other issues with it that I'm not aware of.

If this is really the best option, I would probably just maintain a clone of the buildroot repo with my changes in it, as that would be simpler (though as I originally mentioned, not desirable).

> A more generic solution would be allowing the user to select the desired
> version by means of a sub-menu. This seems to make sense for a package
> that install pre-compiled binaries, like nvidia-driver does.

If that's workable, that would address my concern.


More information about the buildroot mailing list