What change do you want to make to the kernel module code?
Rebuilding a single in tree module, requires it to match the current kernel, which can be done. With the files from the source directory.
But let’s start with what you want to change?
It's definitely a gamble,
But my 1st idea would be:
- replace drivers/usb/serial/usb-serial.c from TC17 by the TC15 version
- recompile/rebuilt usb-serial-6.18.2-tinycore.tcz
Rationale:
- under TC15 my application was running multiple month without crash
- under TC17 it consistently crashes within 24h, mostly around 15hr
- when I replaced the blocking read() from data from 'serial-over-usb' port by a nonblocking read() it ran for 7days after which I manually stopped it for further investigation.
It is surely a kernel issue. System crashes and freezes completely. Not just the application,.... everything. Nothing graceful, no kernel debug-level syslog.
I would expect it to be a mishandled exception or race condition.
diff on usb-serial.c from TC15 to TC17 shows 2 suspicious changes:
- a port-closure that was protected by a "port-exist test" in TC15 towards a port-closure without that test in TC17.
- a change form spin_lock() in TC15 to guard(mutex)() in TC17 but 2x spin_unlock() in TC15 that disappear without clear TC17 alternative.