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 [2024/03/29 14:42] – [Including the first patch into the package] jiashuo_lindocs:guide-developer:helloworld:chapter7 [2024/12/16 21:28] (current) – [Including the first patch into the package] syntax highlighting stokito
Line 98: Line 98:
  
 In the OpenWrt build system, patches are created and modified in the source code directory, and then migrated over to the package that they belong to. In order for us to migrate the patch data that we just created into the package proper, we issue the following commands: In the OpenWrt build system, patches are created and modified in the source code directory, and then migrated over to the package that they belong to. In order for us to migrate the patch data that we just created into the package proper, we issue the following commands:
-<code>+<code bash>
 cd /home/buildbot/source cd /home/buildbot/source
 make package/helloworld/update make package/helloworld/update
Line 104: Line 104:
  
 At this point, we can review our handiwork by checking the content of our package feed folder, and the content of our original source code folder: At this point, we can review our handiwork by checking the content of our package feed folder, and the content of our original source code folder:
-<code>+<code bash>
 ls -la /home/buildbot/mypackages/examples/helloworld ls -la /home/buildbot/mypackages/examples/helloworld
 ls -la /home/buildbot/helloworld ls -la /home/buildbot/helloworld
Line 112: Line 112:
  
 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. 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>+<code make Makefile>
 define Build/Prepare define Build/Prepare
  mkdir -p $(PKG_BUILD_DIR)  mkdir -p $(PKG_BUILD_DIR)
Line 121: Line 121:
  
 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:
-<code>+<code bash>
 cd /home/buildbot/source cd /home/buildbot/source
 make package/helloworld/{clean,prepare} make package/helloworld/{clean,prepare}
  • Last modified: 2024/12/16 21:28
  • by stokito