From 5538e4766201aa0c1c23721cfc99cbbde595964b Mon Sep 17 00:00:00 2001 From: Simon Dawson Date: Sun, 17 Mar 2013 23:13:47 +0000 Subject: rework patch model At the Buildroot Developers Meeting (4-5 February 2013, in Brussels) a change to the patch logic was discussed. See http://elinux.org/Buildroot:DeveloperDaysFOSDEM2013 for details. In summary: * For patches stored in the package directory, if package/// does exist, apply package///*.patch, otherwise, apply package//*.patch * For patches stored in the global patches directory, if $(GLOBAL_PATCH_DIR)/// does exist, apply $(GLOBAL_PATCH_DIR)///*.patch, otherwise, apply $(GLOBAL_PATCH_DIR)//*.patch This patch adds the new BR2_GLOBAL_PATCH_DIR configuration item, and reworks the generic package infrastructure to implement the new patch logic. [Peter: fixup doc nits as pointed out by Thomas] Signed-off-by: Simon Dawson Acked-by: Thomas Petazzoni Tested-by: Thomas Petazzoni Acked-by: Samuel Martin Signed-off-by: Peter Korsgaard --- docs/manual/customize-packages.txt | 23 +++++++++++++++++++++++ docs/manual/customize.txt | 2 ++ docs/manual/patch-policy.txt | 14 +++++++++++--- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 docs/manual/customize-packages.txt (limited to 'docs') diff --git a/docs/manual/customize-packages.txt b/docs/manual/customize-packages.txt new file mode 100644 index 000000000..1820c544e --- /dev/null +++ b/docs/manual/customize-packages.txt @@ -0,0 +1,23 @@ +// -*- mode:doc -*- ; + +[[packages-custom]] +Customizing packages +~~~~~~~~~~~~~~~~~~~~ + +It is sometimes useful to apply 'extra' patches to packages - over and +above those provided in Buildroot. This might be used to support custom +features in a project, for example, or when working on a new architecture. + +The +BR2_GLOBAL_PATCH_DIR+ configuration file option can be +used to specify a directory containing global package patches. + +For a specific version of a specific package , +patches are applied as follows. + +First, the default Buildroot patch set for the package is applied. + +If the directory +$(BR2_GLOBAL_PATCH_DIR)//+ +exists, then all +*.patch+ files in the directory will be applied. + +Otherwise, if the directory +$(BR2_GLOBAL_PATCH_DIR)/+ +exists, then all +*.patch+ files in the directory will be applied. diff --git a/docs/manual/customize.txt b/docs/manual/customize.txt index 3b1a5a734..0456ef16f 100644 --- a/docs/manual/customize.txt +++ b/docs/manual/customize.txt @@ -15,3 +15,5 @@ include::customize-kernel-config.txt[] include::customize-toolchain.txt[] include::customize-store.txt[] + +include::customize-packages.txt[] diff --git a/docs/manual/patch-policy.txt b/docs/manual/patch-policy.txt index 0f55b26dc..d2250ad0c 100644 --- a/docs/manual/patch-policy.txt +++ b/docs/manual/patch-policy.txt @@ -11,8 +11,9 @@ necessary to patch the source of the software to get it cross-built within Buildroot. Buildroot offers an infrastructure to automatically handle this during -the builds. It supports two ways of applying patch sets: downloaded patches -and patches supplied within buildroot. +the builds. It supports three ways of applying patch sets: downloaded patches, +patches supplied within buildroot and patches located in a user-defined +global patch directory. Providing patches ~~~~~~~~~~~~~~~~~ @@ -45,6 +46,13 @@ application order. reference in their filename. - The field ++ in the patch file name refers to the 'apply order'. +Global patch directory +^^^^^^^^^^^^^^^^^^^^^^ + +The +BR2_GLOBAL_PATCH_DIR+ configuration file option can be +used to specify a directory containing global package patches. See +xref:packages-custom[] for details. + How patches are applied ~~~~~~~~~~~~~~~~~~~~~~~ @@ -57,7 +65,7 @@ How patches are applied tarballs are applied; . If there are some +*.patch+ files in the package directory or in the - a package subdirectory named +-+, then: + a package subdirectory named ++, then: + * If a +series+ file exists in the package directory, then patches are applied according to the +series+ file; -- cgit v1.2.3