Merge branch 'qtopia-fixes' of git://git.busybox.net/~tpetazzoni/git/buildroot
[avatt.git] / docs / patches.html
blob2d886e557e97ba382a6d32db45c7e93a72bdc566
1 <!--#include file="header.html" -->
3 <h2>Buildroot patch structure</h2>
5 <p>
6 <h4>Keeping track of applied patches</h4>
7 Whenever a patch is applied to a source code directory in buildroot, a text file named .applied_patches_list is created inside that source directory.
8 This file contains a list of all the patch filenames that were applied to that source code, just for reference.
9 </p>
11 <p>
12 <h4>Linux kernel patches</h4>
13 The Linux kernel has several patch levels available for it in the buildroot patch system.
14 Buildroot first downloads the chosen kernel source from the mirror site, followed by any selected minor patch.
15 Buildroot then extracts the kernel source from the compressed file and applies the minor patch, if one was chosen.
16 After extracting the source and applying the official minor patch, buildroot looks for more patches in the following locations and in the order shown:
18 <ol>
19 <li> a custom, user downloaded kernel patch can be located in $(DL_DIR) and the filename is stored as $(LINUX26_BSP_PATCH) </li>
20 <li> Atmel keeps their official kernel patches in target/device/Atmel/Linux/kernel-patches with subdirectories for each kernel release.
21 They also keep any board-specific patches in $(BR2_BOARD_PATH) </li>
22 <li> globally available patches are kept in toolchain/kernel-headers </li>
23 <li> IPMI (<a href="http://www.intel.com/design/servers/ipmi/ipmi.htm">Intelligent Platform Management Interface</a>)
24 kernel patches are kept in toolchain/kernel-headers/ipmi </li>
25 <li> LZMA kernel compression support patches are kept in toolchain/kernel-headers/lzma </li>
26 <li> <a href="http://www.realtimelinuxfoundation.org/downloads/downloads.html">Real-time Linux kernel</a> patches are kept in $(LINUX_RT_SOURCE) </li>
27 <li> <a href="http://www.openswan.org/">Openswan</a> kernel patches are kept in package/openswan </li>
28 </ol>
29 </p>
31 <p>
32 <h4>Package source patches</h4>
33 Any patches for the Linux programs supported by buildroot are kept in that program's corresponding package/ directory.
34 </p>
36 <p>
37 <h4>How the patching is done</h4>
38 Patches are applied in buildroot by running a shell script called toolchain/patch-kernel.sh with three arguments. The first argument is the target directory
39 where the source code to be patched is saved. The second argument is the directory where the patch is saved. The third argument is the filename pattern
40 to match when looking in the patch directory. The third argument can include wildcards to select multiple patch files.
41 </p>
43 <!--#include file="footer.html" -->