I'm learning to use the build system and I want to add a new driver for some hardware I designed. I can build my firmware correctly no problems, but since when I run make it downloads the source code for all the drivers from github/openwrt it just overwrites my changes.
When I run make clean all the packages and drivers etc are deleted of course, then i run make -j 8 V=s and all the driver code is downloaded. This overwrites my changes to the current driver I am using as my base for my own driver. I could make a patch file, but where would I put it? If I fork the openwrt git the source for the drivers do not exist there.
I'm puzzled and not great with git, but some pointers as to the best approach would be greatly appreciated.
@winglok I think your sequence is correct, however my approach would be to first clone the existing driver's git, make your changes there, then create your patch. Next add your new code and add that as a separate repo.
Since we don't know the specifics of your requirements, I take the approach to break things up into 2 parts which may be more manageable to troubleshoot.
Thanks @crispyoz. Since @frollic showed me how to make a patch I like your idea to divide my work into two parts, much easier to find any errors. I always have so many errors, if I can divide by two it is much easier for me