I want to make some revisions to the code of package/kernel/mac80211.
I am new to OpenWrt and after some research, I think I should change the PKG_SOURCE_URL to my own GitHub repository, which is my own copy of /linux/kernel/projects/backports/stable/v4.19.120.
So I change package/kernel/mac80211/Makefile like following:
My question is: am I in the right direction? What is the right/proper way to revise an existing kernel package?
You could add your own patches locally, using something like this:
So, for this package:
make package/kernel/mac80211/update V=s QUILT=1
## See the verbose output from above, to find where this got unpacked
quilt push -a
## Start working on a new patch
quilt new build/my-modifications.patch
quilt add <file(s) you want to modify>
... perform edits ...
## Move back to $(TOPDIR)
## Move your patch into the buildroot
make package/kernel/mac80211/update V=s
## New patch at: package/kernel/mac80211/patches/build/my-modifications.patch
I'm a bit new at this, so I might be missing some details. When in doubt, trust the documentation over me!
I think using patch is the right way when I finish the development and want to release the revised code. But it seems not very convenient during development since I will make revisions frequently.
At present, I copy the source files to package/kernel/mac80211/src directory (create the directory first), and then revise Makefile to use local source files instead of downloading and unpack from the official uri.
The revisions in Makefile is as following:
# comment out the configurations to download the tarbar.
rm -rf $(PKG_BUILD_DIR)
mkdir -p $(PKG_BUILD_DIR)
# do not unpack the downloaded tarbar.
# instead, copy files under src to the build directory.
$(CP) ./src/* $(PKG_BUILD_DIR)/
When I want to release the code, I think I should use the patch method you posted.