All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Best-Practice Suggestions for developing package patches in buildroot
@ 2015-01-29  0:04 Bryce Schober
  2015-01-29  7:46 ` Yegor Yefremov
  0 siblings, 1 reply; 6+ messages in thread
From: Bryce Schober @ 2015-01-29  0:04 UTC (permalink / raw)
  To: buildroot

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150128/2763f24d/attachment.html>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Best-Practice Suggestions for developing package patches in buildroot
  2015-01-29  0:04 [Buildroot] Best-Practice Suggestions for developing package patches in buildroot Bryce Schober
@ 2015-01-29  7:46 ` Yegor Yefremov
  2015-01-29  8:16   ` Jeremy Rosen
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2015-01-29  7:46 UTC (permalink / raw)
  To: buildroot

Hi Bryce,

On Thu, Jan 29, 2015 at 1:04 AM, Bryce Schober <bryce.schober@gmail.com> wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Best-Practice Suggestions for developing package patches in buildroot
  2015-01-29  7:46 ` Yegor Yefremov
@ 2015-01-29  8:16   ` Jeremy Rosen
  0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Rosen @ 2015-01-29  8:16 UTC (permalink / raw)
  To: buildroot



> 
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Best-Practice Suggestions for developing package patches in buildroot
  2015-01-31 22:06 ` Thomas Petazzoni
@ 2015-02-02  8:44   ` Jeremy Rosen
  0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Rosen @ 2015-02-02  8:44 UTC (permalink / raw)
  To: buildroot


> 
> 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...

> 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
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Best-Practice Suggestions for developing package patches in buildroot
  2015-01-29 18:09 Bryce Schober
@ 2015-01-31 22:06 ` Thomas Petazzoni
  2015-02-02  8:44   ` Jeremy Rosen
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-01-31 22:06 UTC (permalink / raw)
  To: buildroot

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Best-Practice Suggestions for developing package patches in buildroot
@ 2015-01-29 18:09 Bryce Schober
  2015-01-31 22:06 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Bryce Schober @ 2015-01-29 18:09 UTC (permalink / raw)
  To: buildroot

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150129/eb073879/attachment.html>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-02  8:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  0:04 [Buildroot] Best-Practice Suggestions for developing package patches in buildroot Bryce Schober
2015-01-29  7:46 ` Yegor Yefremov
2015-01-29  8:16   ` Jeremy Rosen
2015-01-29 18:09 Bryce Schober
2015-01-31 22:06 ` Thomas Petazzoni
2015-02-02  8:44   ` Jeremy Rosen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.