* [Buildroot] Understanding More about applying patches
@ 2012-07-28 16:07 Charles Krinke
2012-07-28 16:55 ` Charles Krinke
0 siblings, 1 reply; 6+ messages in thread
From: Charles Krinke @ 2012-07-28 16:07 UTC (permalink / raw)
To: buildroot
First of all, this is my day to be a "noob" again along with the funny
hat and the pocket protector.
I am trying to understand a bit more about buildroot as I try to
figure out how opengl and Qt fit together for the TI AM3517EVM. I have
gotten to the point where I can compile Qt and the "TI Graphics SDK"
which builds the opengl libraries outside a buildroot tree but using a
buildroot toolchain. At this point, I need to understand a bit about
how patching works and I am coming up without understanding in going
through the documentation.
I can see in a few buildroot/package directories some patches and
there are three in package/qt and they are applied. I need to add 3
more. What I cannot see is how the existing three are applied.
I look through the .mk files for directories with patches and see no
mention of applying the patches.
Can someone help me understand please how one goes about adding a new
patch to a buildroot/package directory after unzipping the package
tarball but before the configure step. Perhaps if I understood how to
add a patch to an existing package, I can extrapolate a bit to move
forward.
I see mention of PRE_CONFIGURE_HOOKS & POST_CONFIGURE_HOOKS, but how
to use these and if these are the method doesnt quite fit in my
Saturday morning noobie mind today.
--
Charles Krinke
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Understanding More about applying patches
2012-07-28 16:07 [Buildroot] Understanding More about applying patches Charles Krinke
@ 2012-07-28 16:55 ` Charles Krinke
2012-07-28 16:59 ` Charles Krinke
0 siblings, 1 reply; 6+ messages in thread
From: Charles Krinke @ 2012-07-28 16:55 UTC (permalink / raw)
To: buildroot
Doing a bit of research and trying to answer at least part of my own
question, I can see in pkg-gentargets.mk a statement applying patches
and it looks like if I prefix the patches with the name of the
package, "qt-" in this case, then buildroot should automagically
apply the patches I am trying to add. Is this correct?
On Sat, Jul 28, 2012 at 9:07 AM, Charles Krinke
<charles.krinke@gmail.com> wrote:
> First of all, this is my day to be a "noob" again along with the funny
> hat and the pocket protector.
>
> I am trying to understand a bit more about buildroot as I try to
> figure out how opengl and Qt fit together for the TI AM3517EVM. I have
> gotten to the point where I can compile Qt and the "TI Graphics SDK"
> which builds the opengl libraries outside a buildroot tree but using a
> buildroot toolchain. At this point, I need to understand a bit about
> how patching works and I am coming up without understanding in going
> through the documentation.
>
> I can see in a few buildroot/package directories some patches and
> there are three in package/qt and they are applied. I need to add 3
> more. What I cannot see is how the existing three are applied.
>
> I look through the .mk files for directories with patches and see no
> mention of applying the patches.
>
> Can someone help me understand please how one goes about adding a new
> patch to a buildroot/package directory after unzipping the package
> tarball but before the configure step. Perhaps if I understood how to
> add a patch to an existing package, I can extrapolate a bit to move
> forward.
>
> I see mention of PRE_CONFIGURE_HOOKS & POST_CONFIGURE_HOOKS, but how
> to use these and if these are the method doesnt quite fit in my
> Saturday morning noobie mind today.
>
> --
> Charles Krinke
--
Charles Krinke
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Understanding More about applying patches
2012-07-28 16:55 ` Charles Krinke
@ 2012-07-28 16:59 ` Charles Krinke
2012-07-28 17:31 ` Samuel Martin
2012-07-29 15:10 ` Arnout Vandecappelle
0 siblings, 2 replies; 6+ messages in thread
From: Charles Krinke @ 2012-07-28 16:59 UTC (permalink / raw)
To: buildroot
Assuming I have the last part correct, the next step is to add a patch
after the configure step but before the build step.
To do this, I need to add the patch to output/build/qt* somehow. So, I
guess my patching question is extending a bit.
Charles
On Sat, Jul 28, 2012 at 9:55 AM, Charles Krinke
<charles.krinke@gmail.com> wrote:
> Doing a bit of research and trying to answer at least part of my own
> question, I can see in pkg-gentargets.mk a statement applying patches
> and it looks like if I prefix the patches with the name of the
> package, "qt-" in this case, then buildroot should automagically
> apply the patches I am trying to add. Is this correct?
>
> On Sat, Jul 28, 2012 at 9:07 AM, Charles Krinke
> <charles.krinke@gmail.com> wrote:
>> First of all, this is my day to be a "noob" again along with the funny
>> hat and the pocket protector.
>>
>> I am trying to understand a bit more about buildroot as I try to
>> figure out how opengl and Qt fit together for the TI AM3517EVM. I have
>> gotten to the point where I can compile Qt and the "TI Graphics SDK"
>> which builds the opengl libraries outside a buildroot tree but using a
>> buildroot toolchain. At this point, I need to understand a bit about
>> how patching works and I am coming up without understanding in going
>> through the documentation.
>>
>> I can see in a few buildroot/package directories some patches and
>> there are three in package/qt and they are applied. I need to add 3
>> more. What I cannot see is how the existing three are applied.
>>
>> I look through the .mk files for directories with patches and see no
>> mention of applying the patches.
>>
>> Can someone help me understand please how one goes about adding a new
>> patch to a buildroot/package directory after unzipping the package
>> tarball but before the configure step. Perhaps if I understood how to
>> add a patch to an existing package, I can extrapolate a bit to move
>> forward.
>>
>> I see mention of PRE_CONFIGURE_HOOKS & POST_CONFIGURE_HOOKS, but how
>> to use these and if these are the method doesnt quite fit in my
>> Saturday morning noobie mind today.
>>
>> --
>> Charles Krinke
>
>
>
> --
> Charles Krinke
--
Charles Krinke
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Understanding More about applying patches
2012-07-28 16:59 ` Charles Krinke
@ 2012-07-28 17:31 ` Samuel Martin
2012-07-28 18:27 ` Charles Krinke
2012-07-29 15:10 ` Arnout Vandecappelle
1 sibling, 1 reply; 6+ messages in thread
From: Samuel Martin @ 2012-07-28 17:31 UTC (permalink / raw)
To: buildroot
Hi Charles,
2012/7/28 Charles Krinke <charles.krinke@gmail.com>:
> Assuming I have the last part correct, the next step is to add a patch
> after the configure step but before the build step.
You have nothing to do here, this is automatically handled by the
package infrastructure,
unless the package uses handwritten *.mk file.
>
> To do this, I need to add the patch to output/build/qt* somehow. So, I
> guess my patching question is extending a bit.
The only thing to do is put the patch in the package directory:
package/<packagename>/<packagename>-<some_description>.patch
>
> On Sat, Jul 28, 2012 at 9:55 AM, Charles Krinke
> <charles.krinke@gmail.com> wrote:
>> Doing a bit of research and trying to answer at least part of my own
>> question, I can see in pkg-gentargets.mk a statement applying patches
>> and it looks like if I prefix the patches with the name of the
>> package, "qt-" in this case, then buildroot should automagically
>> apply the patches I am trying to add. Is this correct?
Yes, it is.
BTW, here is a bunch of the doc refactoring (still in progress)
talking about patch integration:
https://github.com/tSed/buildroot/blob/sma/docs/docs/manual/patch-policy.txt
Any feedback is welcome.
Cheers,
--
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Understanding More about applying patches
2012-07-28 17:31 ` Samuel Martin
@ 2012-07-28 18:27 ` Charles Krinke
0 siblings, 0 replies; 6+ messages in thread
From: Charles Krinke @ 2012-07-28 18:27 UTC (permalink / raw)
To: buildroot
Thank you both. I think I get enough to move forward.
Charles
On Jul 28, 2012 10:32 AM, "Samuel Martin" <s.martin49@gmail.com> wrote:
> Hi Charles,
>
> 2012/7/28 Charles Krinke <charles.krinke@gmail.com>:
> > Assuming I have the last part correct, the next step is to add a patch
> > after the configure step but before the build step.
> You have nothing to do here, this is automatically handled by the
> package infrastructure,
> unless the package uses handwritten *.mk file.
>
> >
> > To do this, I need to add the patch to output/build/qt* somehow. So, I
> > guess my patching question is extending a bit.
> The only thing to do is put the patch in the package directory:
> package/<packagename>/<packagename>-<some_description>.patch
>
> >
> > On Sat, Jul 28, 2012 at 9:55 AM, Charles Krinke
> > <charles.krinke@gmail.com> wrote:
> >> Doing a bit of research and trying to answer at least part of my own
> >> question, I can see in pkg-gentargets.mk a statement applying patches
> >> and it looks like if I prefix the patches with the name of the
> >> package, "qt-" in this case, then buildroot should automagically
> >> apply the patches I am trying to add. Is this correct?
> Yes, it is.
>
>
> BTW, here is a bunch of the doc refactoring (still in progress)
> talking about patch integration:
>
> https://github.com/tSed/buildroot/blob/sma/docs/docs/manual/patch-policy.txt
>
> Any feedback is welcome.
>
>
> Cheers,
>
> --
> Sam
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120728/fb1cc506/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Understanding More about applying patches
2012-07-28 16:59 ` Charles Krinke
2012-07-28 17:31 ` Samuel Martin
@ 2012-07-29 15:10 ` Arnout Vandecappelle
1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2012-07-29 15:10 UTC (permalink / raw)
To: buildroot
On 07/28/12 18:59, Charles Krinke wrote:
> Assuming I have the last part correct, the next step is to add a patch
> after the configure step but before the build step.
The patch step is the step after the extract step and before the configure
step. It's not a good idea to add patches after the configure step: if it
doesn't depend on the configuration, then there's no point doing it after
the configure step, but if it does depend on the configuration, than there's
a big risk that the patch won't work.
It may be possible/necessary to update the configuration after the configure
step, e.g. updating the config.h. Again, this should be avoided because it's
not very robust, but if there is no other way, you can do it in the
POST_CONFIGURE_HOOKS with a $(SED) statement.
Fortunately, your other e-mails indicate that this won't be necessary.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-29 15:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-28 16:07 [Buildroot] Understanding More about applying patches Charles Krinke
2012-07-28 16:55 ` Charles Krinke
2012-07-28 16:59 ` Charles Krinke
2012-07-28 17:31 ` Samuel Martin
2012-07-28 18:27 ` Charles Krinke
2012-07-29 15:10 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox