Discussion:
[Buildroot] Best-Practice Suggestions for developing package patches in buildroot
Bryce Schober
2015-01-29 00:04:19 UTC
Permalink
Buildroot devs,

It would be helpful to get ideas for how best to develop a set of patches
against a package's upstream source inside of the buildroot context
(cross-compiler, libraries, etc.).

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?

For package problems that can be reproduced & fixed outside of the full
buildroot sysroot it's much less of a problem. I'm interested specifically
in development workflows that would be helpful for packages that have
problems that require the buildroot sysroot to reproduce and fix.

Thanks,
Bryce Schober
Yegor Yefremov
2015-01-29 07:46:22 UTC
Permalink
Hi Bryce,
Post by Bryce Schober
Buildroot devs,
It would be helpful to get ideas for how best to develop a set of patches
against a package's upstream source inside of the buildroot context
(cross-compiler, libraries, etc.).
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?
For package problems that can be reproduced & fixed outside of the full
buildroot sysroot it's much less of a problem. I'm interested specifically
in development workflows that would be helpful for packages that have
problems that require the buildroot sysroot to reproduce and fix.
Please read Section 8.6.11 "Using Buildroot during development"
(http://nightly.buildroot.org/manual.html#_advanced_usage). It will
give you a good idea, how to work on upstream code.
<pkg1>_OVERRIDE_SRCDIR is the keyword.

Yegor
Jeremy Rosen
2015-01-29 08:16:47 UTC
Permalink
Post by Yegor Yefremov
Please read Section 8.6.11 "Using Buildroot during development"
(http://nightly.buildroot.org/manual.html#_advanced_usage). It will
give you a good idea, how to work on upstream code.
<pkg1>_OVERRIDE_SRCDIR is the keyword.
Yegor
_______________________________________________
To develop a little bit on that, we are in the case of
* a package that is already part of buildroot
* to whom you want to develop a new patch (not apply an existing one)

I usually do a git clone of the package at whatever version BR uses
then use OVERRIDE_SRCDIR to force BR to use my clone as source.
I modify the source that way, using the power of git to modify
the sources locally and save different patches into a chain of commits
once I'm done I use git format-patch to do a patch serie that I can
add to buildroot/upstream

I keep my git clone around because it makes respinning the patches much
easier than if I had to work directly with the patches themselves.

I used quilt a long time ago, but now that I understand git rebase -i
it's much more handy than quilt...


Regards

Jeremy
Bryce Schober
2015-01-29 18:09:55 UTC
Permalink
Buildroot devs,

It would be helpful to get ideas for how best to develop a set of patches
against a package's upstream source inside of the buildroot context
(cross-compiler, libraries, etc.).

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?

For package problems that can be reproduced & fixed outside of the full
buildroot sysroot it's much less of a problem. I'm interested specifically
in development workflows that would be helpful for packages that have
problems that require the buildroot sysroot to reproduce and fix.

Thanks,
Bryce Schober
Thomas Petazzoni
2015-01-31 22:06:20 UTC
Permalink
Dear Bryce Schober,
Post by Bryce Schober
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
Jeremy Rosen
2015-02-02 08:44:12 UTC
Permalink
Post by Thomas Petazzoni
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.
That's a great way of handling buildroot-provided patches, I hadn't
thought of that...

I'll add that to the buildroot-submodule documentation, that's a good
practice...
Post by Thomas Petazzoni
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
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
Loading...