Hello everyone, I'm having such a hard time about how to perform a patch on a package and understanding general details about it, I'm sorry if these questions are silly I'm such a beginner. So it is not the usual case where I have a code and simply create a package out of it. I need to apply a patch on a kernel module called "kmod-usb-net-smsc95xx". I have only the .ipk file of this and several questions;
Firstly I couldn't find a way how to feed it to OpenWrt SDK 19.07.7 as a package, I know normally I need a Makefile, sources and compiled output so is there a way that I can get these out of .ipk file?
Secondly, can I use "quilt" on it and simply patch it without performing a ground zero packaging?
Not even sure should I use SDK or the ImageBuilder for this..
It'd be great If I can get some clarification or a solution.
kernel modules are special packages, they are not "real" packages.
They are build settings for kernel compile. The kernel module code is actually part of Linux kernel package.
See this place is where the kernel config is enabled for that package
If you want to change it, you are making a kernel patch, not editing package configuration. You are changing the kernel source code.
I do not know if SDK can work with kernel patches, I have little experience with SDK, I think it only works with normal packages.
Image Builder surely cannot do that (it just works with packages).
Ok, I'm able to patch this "kmod" module with full buildsystem. But when I try this with SDK, I can't find this module on menuconfig GUI even though SDK has the same usb.mk file and "usb-net-smsc95xx" definiton. I don't get it. Is it certain that SDK has not the ability to patch kernel modules, because there are some other kernel modules modularized on that menuconfig.
I can perform patching on full buildsystem but I need to know how to do it on SDK or is it possible, I can see this module has definiton in usb.mk on SDK as well but doesn't appear on menuconfig. Anyone has an idea?
Afaik, the SDK package is a cut-down toolchain designed to compile userspace packages only without having to use the full build system if you just need to add a few custom packages to your devices.
It cannot build firmware images or kernel, because kernel in OpenWrt is not handled like a package like in most Linux distros. It is seen as "part of the firmware image". So for example you do not update the kernel alone. If you want to update the kernel you must run a sysupgrade, a full firmware upgrade procedure.