[Buildroot] Best-Practice Suggestions for developing package patches in buildroot

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Jan 31 22:06:20 UTC 2015


Dear Bryce Schober,

On Thu, 29 Jan 2015 10:09:55 -0800, Bryce Schober wrote:

> Do you use something like quilt to manage patches while developing them?
> 
> Do you fork the upstream repository a switch the package to use the fork,
> then back out your modifications into patches?
> 
> Do you just copy the full commands generated by buildroot and use re-use
> them outside of buildroot's high-level make commands?

Either quilt or git, but more and more I use git. I generally clone the
upstream repository somewhere completely separate from Buildroot, then
create a branch called 'buildroot' with the starting point being the
tag indicating the release of the software currently in use by
Buildroot. Then, I import as separate Git commits each of the
individual patches that Buildroot has for this package (if any). I do
my work, and then use 'git format-patch' to format the patches and copy
them back in Buildroot.

Quite ironically, I never use <pkg>_OVERRIDE_SRCDIR: I simply copy the
patches back to the Buildroot package directory, and restart the
package build process from scratch. Yes, this is inefficient, but one
could pretend that it forces you to think twice before testing a stupid
change :-)

Also, I tend to very often start by hacking directly in
output/build/<pkg>-<version>/, and once I have a good idea of the
change that needs to be done, I do the Git work flow described above.

Hope this helps,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list