Differences

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

Link to this comparison view

Both sides previous revision Previous revision
docs:guide-developer:helloworld:chapter7 [2021/10/15 08:32] – ↷ Links adapted because of a move operation bobafetthotmaildocs:guide-developer:helloworld:chapter7 [2024/03/29 14:42] (current) – [Including the first patch into the package] jiashuo_lin
Line 110: Line 110:
  
 As we can see, the OpenWrt build system migrated our newly-created patch file into the folder where the package manifest is. The original source code folder remains completely unaware of our changes. As we can see, the OpenWrt build system migrated our newly-created patch file into the folder where the package manifest is. The original source code folder remains completely unaware of our changes.
 +
 +Now, we need to modify ''mypackages/examples/helloworld/Makefile'' to copy the patch to the build directory. The earlier version used the ''cp'' command without the ''-r'' option. We need to add the ''-r'' option to copy directories.
 +<code>
 +define Build/Prepare
 + mkdir -p $(PKG_BUILD_DIR)
 + cp $(SOURCE_DIR)/* $(PKG_BUILD_DIR) -r
 + $(Build/Patch)
 +endef
 +</code>
  
 We can ensure that our new patch is applied correctly during the build process: We can ensure that our new patch is applied correctly during the build process:
  • Last modified: 2021/10/15 08:32
  • by bobafetthotmail