Differences

This shows you the differences between two versions of the page.

doc:devel:patches [2013/02/19 20:39]
written_direcon
doc:devel:patches [2014/06/27 10:59] (current)
jow tools != host builds of packages
Line 25: Line 25:
| ''make package///example///{clean,prepare} V=s **QUILT=1**'' | | ''make package///example///{clean,prepare} V=s **QUILT=1**'' |
 +
 +For host-side packages, you may want to detail the make target:
 +
 +| ''make package///example///host/{clean,prepare} V=s **QUILT=1**'' |
This unpacks the source tarball and prepares existing patches as //quilt patch series// (if any). This unpacks the source tarball and prepares existing patches as //quilt patch series// (if any).
Line 88: Line 92:
If problems occur, the patch needs to be edited again to solve the issues. If problems occur, the patch needs to be edited again to solve the issues.
Refer to the section below to learn how to edit existing patches. Refer to the section below to learn how to edit existing patches.
- 
===== Edit an existing patch ===== ===== Edit an existing patch =====
Line 145: Line 148:
| ''make package///example///{clean,compile} package/index V=s'' | | ''make package///example///{clean,compile} package/index V=s'' |
 +
Line 150: Line 154:
The process for modifying kernel patches is the same as for packages, only the make targets and directories differ.\\ The process for modifying kernel patches is the same as for packages, only the make targets and directories differ.\\
-:!: For the kernel, an additional subdirectory for patches is used, ''generic/'' contains patches common to all architectures and ''target/'' contains patches specific to the current target.+:!: For the kernel, an additional subdirectory for patches is used, ''generic/'' contains patches common to all architectures and ''platform/'' contains patches specific to the current target.
To prepare the kernel tree, use: To prepare the kernel tree, use:
| ''make target/linux/{clean,prepare} V=s **QUILT=1**'' | | ''make target/linux/{clean,prepare} V=s **QUILT=1**'' |
-The source tree is in the linux-//architecture// subdirectory:+For Attitude Adjustment, the source tree is in the linux-//architecture// subdirectory:
| ''cd build_dir/linux-*/linux-3.*'' | | ''cd build_dir/linux-*/linux-3.*'' |
 +
 +For Barrier Breaker (trunk), the source tree is in the target-//architecture// subdirectory (potentially with a subarch):
 +| ''cd build_dir/target-*/linux-*/linux-3.*'' |
Moving the changes back over to the buildroot tree from the build tree is done with: Moving the changes back over to the buildroot tree from the build tree is done with:
| ''make target/linux/update package/index V=s'' | | ''make target/linux/update package/index V=s'' |
 +
 +(:!: Patches should be named with the correct prefix, platform/000-abc.patch or generic/000-abc.patch. If not the update may not work correctly.)
 +
 +Afterwards, if we want to verify whether our patch is applied or not, we can go to the top level directory with
 +| ''cd ../../../../'' |
 +and preparing again the //linux// folder for some modification with
 +
 +| ''make target/linux/{clean,prepare} V=s QUILT=1'' |
 +
 +During this process all the applied patched will be shown, ours being among them, preceeded by //generic/// or // platform/// depending on what directory we placed the patch. Another way of retrieving the applied patches is through
 +
 +| ''quilt series'' |
 +
 +as explained on the previous sections, after having made //make target/linux/{clean,prepare} ...//
===== Adding or editing toolchain patches ===== ===== Adding or editing toolchain patches =====
Line 209: Line 230:
  * [[http://linux.die.net/man/1/quilt|Official quilt man page]]   * [[http://linux.die.net/man/1/quilt|Official quilt man page]]
  * [[http://git.savannah.gnu.org/cgit/quilt.git/plain/doc/quilt.pdf|How To Survive With Many Patches - Introduction to Quilt]] (PDF) (read online [[https://docs.google.com/viewer?url=http%3A%2F%2Fgit.savannah.gnu.org%2Fcgit%2Fquilt.git%2Fplain%2Fdoc%2Fquilt.pdf|here]])   * [[http://git.savannah.gnu.org/cgit/quilt.git/plain/doc/quilt.pdf|How To Survive With Many Patches - Introduction to Quilt]] (PDF) (read online [[https://docs.google.com/viewer?url=http%3A%2F%2Fgit.savannah.gnu.org%2Fcgit%2Fquilt.git%2Fplain%2Fdoc%2Fquilt.pdf|here]])
 +  * [[https://forum.openwrt.org/viewtopic.php?id=43039|Applying patches newbie doubt]]
 +

Back to top

doc/devel/patches.1361302790.txt.bz2 · Last modified: 2013/02/19 20:39 by written_direcon