From a37d1b117e51e772ebeec182322a58509f8fbdf8 Mon Sep 17 00:00:00 2001 From: John Voltz Date: Thu, 13 Mar 2008 17:16:30 +0000 Subject: add some documentation about buildroot's patch system --- docs/patches.html | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 docs/patches.html (limited to 'docs') diff --git a/docs/patches.html b/docs/patches.html new file mode 100644 index 000000000..2d886e557 --- /dev/null +++ b/docs/patches.html @@ -0,0 +1,43 @@ + + +

Buildroot patch structure

+ +

+

Keeping track of applied patches

+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. +This file contains a list of all the patch filenames that were applied to that source code, just for reference. +

+ +

+

Linux kernel patches

+The Linux kernel has several patch levels available for it in the buildroot patch system. +Buildroot first downloads the chosen kernel source from the mirror site, followed by any selected minor patch. +Buildroot then extracts the kernel source from the compressed file and applies the minor patch, if one was chosen. +After extracting the source and applying the official minor patch, buildroot looks for more patches in the following locations and in the order shown: + +
    +
  1. a custom, user downloaded kernel patch can be located in $(DL_DIR) and the filename is stored as $(LINUX26_BSP_PATCH)
  2. +
  3. Atmel keeps their official kernel patches in target/device/Atmel/Linux/kernel-patches with subdirectories for each kernel release. +They also keep any board-specific patches in $(BR2_BOARD_PATH)
  4. +
  5. globally available patches are kept in toolchain/kernel-headers
  6. +
  7. IPMI (Intelligent Platform Management Interface) +kernel patches are kept in toolchain/kernel-headers/ipmi
  8. +
  9. LZMA kernel compression support patches are kept in toolchain/kernel-headers/lzma
  10. +
  11. Real-time Linux kernel patches are kept in $(LINUX_RT_SOURCE)
  12. +
  13. Openswan kernel patches are kept in package/openswan
  14. +
+

+ +

+

Package source patches

+ Any patches for the Linux programs supported by buildroot are kept in that program's corresponding package/ directory. +

+ +

+

How the patching is done

+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 +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 +to match when looking in the patch directory. The third argument can include wildcards to select multiple patch files. +

+ + -- cgit v1.2.3