Closed Decipher closed 9 years ago
If you look at the Makefile of the kernel (spksrc/kernel/syno-$ARCH-$TC/work/source/linux/Makefile
), the kernel version is mentioned in the top three lines:
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 32
EXTRAVERSION = .12
Hardcoding that in the kernel Makefiles in spksrc/kernel/syno-$ARCH-$TC/Makefile
would probably work, so that way, you can export the value to tc_vars.mk
.
But there might not be a need for doing all that ;) Take a look at spksrc/kernel/syno-$ARCH-$TC/work/source/linux/drivers/usb/serial/cp210x.c
, see if that's what you're looking for.
And that's what I get for looking through the spksrc repo instead of my working repo. Thanks heaps, that's exactly what I was hoping for.
And yes, that file is exactly what I was after, so again, thanks heaps :)
Np. By the way, you might want to have a look at the LIRC package (currently, the only package using kernel modules): there might be some code to reuse in there.
Yup, the LIRC package is what I've been looking at, although it does the Kernel module within the source of main codebase, whereas I'm doing cp210x on it's own, so potentially other packages could add it as a dependency.
Hopefully I'll have it sorted soon, just working out the kinks at the moment.
I'm currently in the process of wrapping up the last part of #1478, which is cross-compile the cp210x kernel module, but part of the compilation process is the download of a file using the MAJOR.MINOR of the target linux build, for example, for Qoriq 5.1 I download the following file: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/drivers/usb/serial/cp210x.c?h=linux-2.6.32.y (2.6.32)
The problem is, while some of those numbers are potentially available in the kernel makefiles in the PKG_EXTRACT variable, they aren't all exactly what is needed. For instance, the file for Bromolow-5.1 uses the tag '3.4.y' (IIRC), yet the PKG_EXTRACT variable contains "3.x", which isn't explicit enough.
A variable somewhere like TC_LINUX_VER would be extremely helpful. I would be happy to try and do as much towards this as I can, but I don't have access to all the various architectures to know what versions they have,