Discussion:
[Buildroot] Kernel patches in Buildroot
Joao Pinto
2015-11-11 11:35:37 UTC
Permalink
Hi,
We are designing the procedure to release our software stack based on buildroot.
Could you please tell what is the advised method for including a kernel patch
set in buildroot? I typically use BR2_LINUX_KERNEL_PATCH where I indicate each
patch file. Is there a easier way like using BR2_GLOBAL_PATCH_DIR for example?

Thanks for your help!

Joao
Arnout Vandecappelle
2015-11-11 12:04:35 UTC
Permalink
Post by Joao Pinto
Hi,
We are designing the procedure to release our software stack based on buildroot.
Could you please tell what is the advised method for including a kernel patch
set in buildroot? I typically use BR2_LINUX_KERNEL_PATCH where I indicate each
patch file. Is there a easier way like using BR2_GLOBAL_PATCH_DIR for example?
I personally prefer to use a git repository that includes the patches. During
development, I make a local checkout specified with LINUX_OVERRIDE_SRCDIR; for
release, I point to the repository (often on gitlab) and specify a tag.

BR2_GLOBAL_PATCH_DIR and BR2_LINUX_KERNEL_PATCH are basically equivalent, you
can specify a directory with the latter as well.


Regards,
Arnout
Post by Joao Pinto
Thanks for your help!
Joao
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
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: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Yegor Yefremov
2015-11-11 13:13:16 UTC
Permalink
Post by Arnout Vandecappelle
Post by Joao Pinto
Hi,
We are designing the procedure to release our software stack based on buildroot.
Could you please tell what is the advised method for including a kernel patch
set in buildroot? I typically use BR2_LINUX_KERNEL_PATCH where I indicate each
patch file. Is there a easier way like using BR2_GLOBAL_PATCH_DIR for example?
I personally prefer to use a git repository that includes the patches. During
development, I make a local checkout specified with LINUX_OVERRIDE_SRCDIR; for
release, I point to the repository (often on gitlab) and specify a tag.
BR2_GLOBAL_PATCH_DIR and BR2_LINUX_KERNEL_PATCH are basically equivalent, you
can specify a directory with the latter as well.
You can also create a BSP repository containing patches, configs and
so on and just instruct customers to use BR2_EXTERNAL feature
(http://nightly.buildroot.org/manual.html#outside-br-custom).

Yegor
Joao Pinto
2015-11-17 11:13:02 UTC
Permalink
Thanks for your help!
Post by Arnout Vandecappelle
Post by Joao Pinto
Hi,
We are designing the procedure to release our software stack based on buildroot.
Could you please tell what is the advised method for including a kernel patch
set in buildroot? I typically use BR2_LINUX_KERNEL_PATCH where I indicate each
patch file. Is there a easier way like using BR2_GLOBAL_PATCH_DIR for example?
I personally prefer to use a git repository that includes the patches. During
development, I make a local checkout specified with LINUX_OVERRIDE_SRCDIR; for
release, I point to the repository (often on gitlab) and specify a tag.
BR2_GLOBAL_PATCH_DIR and BR2_LINUX_KERNEL_PATCH are basically equivalent, you
can specify a directory with the latter as well.
Regards,
Arnout
Post by Joao Pinto
Thanks for your help!
Joao
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
Joao Pinto
2015-11-17 17:13:31 UTC
Permalink
Hi!
I am trying to use BR2_GLOBAL_PATCH_DIR to indicate the global patch directory,
which has the following value:

BR2_GLOBAL_PATCH_DIR="snps-custom/packages"

I have a "snps-custom" folder which has a "packages" folder inside. Inside the
"packages" folder we have a folder for each package we need to patch, in this
example mplayer and the linux kernel.

--snps-custom
--packages
--linux-arc-axs101-20141021-3.13
0001-XXXX.patch
0002-YYYY.patch
--mplayer
0001-mplayer.patch
--<packagename>
000x-xxxxx.patch

The linux kernel patching system does not recognizes the
packages/linux-arc-axs101-20141021-3.13 patch folder. Could you give me a help
on this?

Thanks!

BR,
Joao Pinto
Post by Joao Pinto
Thanks for your help!
Post by Arnout Vandecappelle
Post by Joao Pinto
Hi,
We are designing the procedure to release our software stack based on buildroot.
Could you please tell what is the advised method for including a kernel patch
set in buildroot? I typically use BR2_LINUX_KERNEL_PATCH where I indicate each
patch file. Is there a easier way like using BR2_GLOBAL_PATCH_DIR for example?
I personally prefer to use a git repository that includes the patches. During
development, I make a local checkout specified with LINUX_OVERRIDE_SRCDIR; for
release, I point to the repository (often on gitlab) and specify a tag.
BR2_GLOBAL_PATCH_DIR and BR2_LINUX_KERNEL_PATCH are basically equivalent, you
can specify a directory with the latter as well.
Regards,
Arnout
Post by Joao Pinto
Thanks for your help!
Joao
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
David Van Arnem
2015-11-17 18:30:13 UTC
Permalink
Post by Joao Pinto
Hi!
I am trying to use BR2_GLOBAL_PATCH_DIR to indicate the global patch directory,
BR2_GLOBAL_PATCH_DIR="snps-custom/packages"
I have a "snps-custom" folder which has a "packages" folder inside. Inside the
"packages" folder we have a folder for each package we need to patch, in this
example mplayer and the linux kernel.
--snps-custom
--packages
--linux-arc-axs101-20141021-3.13
0001-XXXX.patch
0002-YYYY.patch
--mplayer
0001-mplayer.patch
--<packagename>
000x-xxxxx.patch
The linux kernel patching system does not recognizes the
packages/linux-arc-axs101-20141021-3.13 patch folder. Could you give me a help
on this?
I haven't done this myself, so I'm not completely sure if this is
correct, but there's an option to add custom kernel patches under
menuconfig -> Kernel -> Custom kernel patches. I think to patch the
kernel you would need to set that value to the
snps-custom/packages/linux-arc-axs... path.

David
Post by Joao Pinto
Thanks!
BR,
Joao Pinto
Post by Joao Pinto
Thanks for your help!
Post by Arnout Vandecappelle
Post by Joao Pinto
Hi,
We are designing the procedure to release our software stack based on buildroot.
Could you please tell what is the advised method for including a kernel patch
set in buildroot? I typically use BR2_LINUX_KERNEL_PATCH where I indicate each
patch file. Is there a easier way like using BR2_GLOBAL_PATCH_DIR for example?
I personally prefer to use a git repository that includes the patches. During
development, I make a local checkout specified with LINUX_OVERRIDE_SRCDIR; for
release, I point to the repository (often on gitlab) and specify a tag.
BR2_GLOBAL_PATCH_DIR and BR2_LINUX_KERNEL_PATCH are basically equivalent, you
can specify a directory with the latter as well.
Regards,
Arnout
Post by Joao Pinto
Thanks for your help!
Joao
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
--
Thanks,
David
Thomas Petazzoni
2015-11-17 20:09:51 UTC
Permalink
Dear David Van Arnem,
Post by David Van Arnem
Post by Joao Pinto
The linux kernel patching system does not recognizes the
packages/linux-arc-axs101-20141021-3.13 patch folder. Could you give me a help
on this?
I haven't done this myself, so I'm not completely sure if this is
correct, but there's an option to add custom kernel patches under
menuconfig -> Kernel -> Custom kernel patches. I think to patch the
kernel you would need to set that value to the
snps-custom/packages/linux-arc-axs... path.
This is indeed another solution. But Joao was trying to use the
BR2_GLOBAL_PATCH_DIR mechanism, which allows to provide custom patches
for *any* package, and not only specifically for the Linux kernel.

Essentially, the "Custom kernel patches" mechanism you points to
predates the BR2_GLOBAL_PATCH_DIR mechanism. We keep it for
compatibility reasons, but generally consider BR2_GLOBAL_PATCH_DIR to
be the "better way".

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
David Van Arnem
2015-11-17 20:18:05 UTC
Permalink
Post by Thomas Petazzoni
Dear David Van Arnem,
Post by David Van Arnem
Post by Joao Pinto
The linux kernel patching system does not recognizes the
packages/linux-arc-axs101-20141021-3.13 patch folder. Could you give me a help
on this?
I haven't done this myself, so I'm not completely sure if this is
correct, but there's an option to add custom kernel patches under
menuconfig -> Kernel -> Custom kernel patches. I think to patch the
kernel you would need to set that value to the
snps-custom/packages/linux-arc-axs... path.
This is indeed another solution. But Joao was trying to use the
BR2_GLOBAL_PATCH_DIR mechanism, which allows to provide custom patches
for *any* package, and not only specifically for the Linux kernel.
Essentially, the "Custom kernel patches" mechanism you points to
predates the BR2_GLOBAL_PATCH_DIR mechanism. We keep it for
compatibility reasons, but generally consider BR2_GLOBAL_PATCH_DIR to
be the "better way".
Good to know, thank you!

David
Post by Thomas Petazzoni
Best regards,
Thomas
--
Thanks,
David
Thomas Petazzoni
2015-11-17 20:08:17 UTC
Permalink
Dear Joao Pinto,
Post by Joao Pinto
BR2_GLOBAL_PATCH_DIR="snps-custom/packages"
I have a "snps-custom" folder which has a "packages" folder inside. Inside the
"packages" folder we have a folder for each package we need to patch, in this
example mplayer and the linux kernel.
--snps-custom
--packages
--linux-arc-axs101-20141021-3.13
Call this folder just "linux". The folder must be named after the
package name, and not contains some additional version information. If
you want to store patches for several versions of the same package, you
must use the same organization as in Buildroot itself:

<package-name>/<package-version>/*.patch

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Joao Pinto
2015-11-18 09:30:21 UTC
Permalink
Dear Thomas,
Thanks, worked fine!

BR
Joao Pinto
Post by Thomas Petazzoni
Dear Joao Pinto,
Post by Joao Pinto
BR2_GLOBAL_PATCH_DIR="snps-custom/packages"
I have a "snps-custom" folder which has a "packages" folder inside. Inside the
"packages" folder we have a folder for each package we need to patch, in this
example mplayer and the linux kernel.
--snps-custom
--packages
--linux-arc-axs101-20141021-3.13
Call this folder just "linux". The folder must be named after the
package name, and not contains some additional version information. If
you want to store patches for several versions of the same package, you
<package-name>/<package-version>/*.patch
Best regards,
Thomas
Loading...