[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Suggestions for module-assistant improvement



Hi Eduard,

Since we are planning to use module-assistant as a recommended tool for building OOT modules, I went through the code and found a few things which can be done better, in my opinion. The list is below and comments are welcome. I'm willing to produce the patches for these issues, if there are no strong objections.

1. Default path to kernel modules set by m-a (KSRC) is /usr/src/linux. I think that if it is not set externally, it makes more sense to look for the configured source in /lib/modules/$(uname -r)/{build, source} and use /usr/src/linux as a fallback if those don't exist. In the official kernels the build symlink will point to the correct linux-headers dir in /usr/src.

2. If not set, KVERS is determined by parsing the header files in the source. This is not very robust. I strongly suggest to invoke 'make kernelrelease' in the kernel source tree to determine the version for which it was configured. 2.6.16 also has the kernelversion
target which return only the version triplet, without the extra stuff.
The failure of this command will also indicate the the source tree we are using is broken/unconfigured.

3. There is some ad hoc magic present to map the Debian arch to the kernel arch (which is currently implemented only for sparc). I think a more scalable way is to make a helper script, which would do it correctly for all arches.

4. DEB_DEST_DIR (the place where the generated debs are placed) should probably always be $(CURDIR)/.. .

Best regards,

Jurij Smakov                                        jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC



Reply to: