Really basic question on kernel development

So I have an issue with my router: Intermittent (wired) Ethernet issue on Linksys EA8500 with 18.06.1

I have a good handle on the kernel debug patch I'd like to add, and I'm very comfortable with Linux kernel development in general. However I have no experience with openwrt development. What is the easiest and fastest way for me to build an image that is basically 18.06.1 with a single kernel patch added? Do I need to build the whole image over again locally?

Also is there a quick way to generate the base kernel tree that openwrt would use for my target, and then add a patch to that?


No easy way. You need to use the Openwrt buildroot to compile the kernel and then the whole firmware image. Kernel can't be updated separately.

Note that you can't install 18.06.1 kernel kmods from the download site to your router (as it runs a private kernel version and there is strict checksumming). So, it makes sense to include all needed packages in the image at the same time.

wiki also contains rather complex instructions for handling patches (with quilt).
but that is largely unnecessary.

In nutshell, the easy way is to add your patch to the end of either generic Linux "hack" patch series, or to the end of target patch series...

make target/linux/{clean,prepare} V=s
can be used for expanding Linux sources and applying the patch series, so that you see the full Linux sources in build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x

It isn't that complicated, but requires understanding of the Openwrt build system logic, and basic knowledge about patches.

I don’t know about Linux or openwrt but I think that the wiki stresses the importance of naming patches in a standard way especially kernel ones, there should an important how to name patches section in the wiki given the huge amount of them.

Patch name/number is important if you send the patch to the main source repo, but in a private patch only in your own repo the name is insignificant.