Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Adding a patch in a different directory
@ 2013-03-15  0:50 Charles Manning
  2013-03-15  7:30 ` Simon Dawson
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Manning @ 2013-03-15  0:50 UTC (permalink / raw)
  To: buildroot

Hello buildrooters

I have a situation where I am adding a patch to bluez_utils to modify
its behaviour.

If I just add the patch to package/bluez_utils/ then everything works
fine. However, we're trying to keep all our mods separate to make it
easier to track buildroot changes.

I already have a directory foo where I keep a custom skeleton, custom
packages, etc.

What I would like to do is get buildroot to use the patch in foo/patches.

Any ideas how to achieve this?

Thanks

Charles

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

* [Buildroot] Adding a patch in a different directory
  2013-03-15  0:50 [Buildroot] Adding a patch in a different directory Charles Manning
@ 2013-03-15  7:30 ` Simon Dawson
  2013-03-15 10:01   ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Dawson @ 2013-03-15  7:30 UTC (permalink / raw)
  To: buildroot

On 15 March 2013 00:50, Charles Manning <cdhmanning@gmail.com> wrote:
> What I would like to do is get buildroot to use the patch in foo/patches.
>
> Any ideas how to achieve this?

I submitted a patch a while ago to add support for custom package patches:

http://patchwork.ozlabs.org/patch/222260/

The patch has not been accepted as of this writing, but you can
achieve your goal by adding something like the following to your
local.mk

# Base directory for patches.
MY_PATCH_DIR = foo/patches

# List of packages to have extra patches applied.
MY_EXTRA_PACKAGE_PATCHES = bluez_utils lcdproc cairo

#-----------------------------------------------------------------------------
# Extra patches for specified package
define my-extra-package-patch

$(info Setting up extra patching for package $(1))

define MY_$(call UPPERCASE,$(1))_POST_PATCH_FIXUP
  support/scripts/apply-patches.sh $$($(call UPPERCASE,$(1))_DIR)
$(MY_PATCH_DIR)/$(1) '*.patch*'
endef
$(call UPPERCASE,$(1))_POST_PATCH_HOOKS += \
  MY_$(call UPPERCASE,$(1))_POST_PATCH_FIXUP

endef

$(foreach pkg,$(MY_EXTRA_PACKAGE_PATCHES),$(eval $(call
my-extra-package-patch,$(pkg))))

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

* [Buildroot] Adding a patch in a different directory
  2013-03-15  7:30 ` Simon Dawson
@ 2013-03-15 10:01   ` Thomas Petazzoni
  2013-03-15 10:15     ` Simon Dawson
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2013-03-15 10:01 UTC (permalink / raw)
  To: buildroot

Dear Simon Dawson,

On Fri, 15 Mar 2013 07:30:56 +0000, Simon Dawson wrote:
> On 15 March 2013 00:50, Charles Manning <cdhmanning@gmail.com> wrote:
> > What I would like to do is get buildroot to use the patch in foo/patches.
> >
> > Any ideas how to achieve this?
> 
> I submitted a patch a while ago to add support for custom package patches:
> 
> http://patchwork.ozlabs.org/patch/222260/
> 
> The patch has not been accepted as of this writing, but you can
> achieve your goal by adding something like the following to your
> local.mk

We discussed this at the Buildroot Developers Meeting, and we agreed on
a model for patches, that would apply to both "internal" patches and
"external" patches.

The report of the meeting contains:

"""

Change of the patch logic

 * For the patches stored in the package directory, if
   package/<pkg>/<version>/ does exist, apply
   package/<pkg>/<version>/*.patch, otherwise, apply
   package/<pkg>/*.patch

 * For the patches stored in the global patches directory, if
   $(GLOBAL_PATCH_DIR)/<pkg>/<version>/ does exist, apply
   $(GLOBAL_PATCH_DIR)/<pkg>/<version>/*.patch, otherwise, apply
   $(GLOBAL_PATCH_DIR)/<pkg>/*.patch 

"""

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] Adding a patch in a different directory
  2013-03-15 10:01   ` Thomas Petazzoni
@ 2013-03-15 10:15     ` Simon Dawson
  2013-03-15 10:54       ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Dawson @ 2013-03-15 10:15 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 15 March 2013 10:01, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> We discussed this at the Buildroot Developers Meeting, and we agreed on
> a model for patches, that would apply to both "internal" patches and
> "external" patches.

That sounds like a very good plan. Do you know if anyone is working on
this at the moment? I'm happy to pick it up, but don't want to step on
anyone's toes.

Simon.

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

* [Buildroot] Adding a patch in a different directory
  2013-03-15 10:15     ` Simon Dawson
@ 2013-03-15 10:54       ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2013-03-15 10:54 UTC (permalink / raw)
  To: buildroot

Dear Simon Dawson,

On Fri, 15 Mar 2013 10:15:26 +0000, Simon Dawson wrote:

> That sounds like a very good plan. Do you know if anyone is working on
> this at the moment? I'm happy to pick it up, but don't want to step on
> anyone's toes.

I am not aware of anyone working on this at the moment, and having
someone look at this would definitely be very good.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2013-03-15 10:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-15  0:50 [Buildroot] Adding a patch in a different directory Charles Manning
2013-03-15  7:30 ` Simon Dawson
2013-03-15 10:01   ` Thomas Petazzoni
2013-03-15 10:15     ` Simon Dawson
2013-03-15 10:54       ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox