On 11.03.2014 10:41, Felix Fietkau wrote:
It may be better to send a patch to make the build fail early with a descriptive error message.
You mean something like this? It is not pretty but appears to work.
Kernels with CONFIG_MODVERSIONS set are not supported by openwrt, because the kernel is build after the modules. Instead of producing a running kernel with unloadable modules, better fail immediately with an error message. Signed-off-by: Nils Rennebarth <nils.renneba...@bintec-elmeg.com> --- include/kernel-defaults.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 96f2b2c..114c017 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -106,6 +106,11 @@ define Kernel/Configure/Default rm -rf $(KERNEL_BUILD_DIR)/modules [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install $(SH_FUNC) grep '=[ym]' $(LINUX_DIR)/.config | LC_ALL=C sort | md5s > $(LINUX_DIR)/.vermagic + if grep -q "^CONFIG_MODVERSIONS=y" $(LINUX_DIR)/.config; then \ + printf "\nERROR: Module versioning not supported for openwrt kernels\n" ; \ + printf "Please change your kernel config so that CONFIG_MODVERSIONS is not set\n\n" ; \ + exit 1; \ + fi endef define Kernel/Configure/Initramfs -- 1.8.1.1 Having said that, I agree that openwrt itself does not need CONFIG_MODVERSIONS. However, when developing kernel modules (hardware in particular), with the common workflow: do { hack the driver sources inside a kernel checkout make transfer module to target, rmmod, insmod } while (!module works) CONFIG_MODVERSIONS is still useful imho, so I would still like to support it. Can't we simply remove vmlinux only once per openwrt make run, as part of the overall preparation of the kernel tree, e.g. in the compile: target of BuildKernel in kernel-build.mk, and then of course calling make vmlinux modules ? We could even encapsulate the whole thing into a new developer option "support versioned modules in kernel", so that "normal" users still see the error above. Has such a patch a chance to be accepted? -- Nils Rennebarth Software developer bintec elmeg security GmbH Mönchhaldenstraße 28 D-70191 Stuttgart Germany Tel: +49-711-900600-64 Email: nils.renneba...@bintec-elmeg.com www: www.bintec-elmeg.com Location: Nuremberg, Local Court Nuremberg, HRB 25481<br> Managing Director: Bernd Büttner -------------------------------- The information contained in this e-mail has been carefully researched, but the possibility of it being inapplicable in individual cases cannot be ruled out. We therefore regret that we cannot accept responsibility or liability of any kind whatsoever for the correctness of the information given. Please notify us if you discover that information is inapplicable. _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel