How to apply patches to a package in Buildroot?

pradeepchhetri picture pradeepchhetri · Jun 17, 2011 · Viewed 19.2k times · Source

I am working on an embedded system that uses buildroot as a tool for building the kernel and the root filesystem. I want to apply some patches to this kernel source tree, Can somebody tell me how buildroot apply patches?

Answer

To expand on @pradeepchhentri's answer. Quilt will look for a file located in the same folder as the *.mk file. To construct the appropriate file:

  1. diff your source package from the original into a file called

    packagename-number-description.patch

    where

    packagename - has to be identical to the package name

    number - is the order in which the patches should be applied if you have more than one patch to apply (otherwise it will be applied alphabetically)

    description - can be any free text

  2. Place this file into the package at the same level as the [packagename].mk file and the package/Config.in file.

Don't forget to blow away your build files or do a [package]-rebuild if you do this. You should see a "Patching..." message if this is done correctly.