2014-02-17 0:11 GMT-08:00 Nils Rennebarth <nils.renneba...@bintec-elmeg.com>: > Hello, > > I use a custom kernel and module loading failed because the kernel expected > the modules in a different place. openwrt uses the following code, to > compute LINUX_UNAME_VERSION which is later used to compute MODULES_SUBDIR, > i.e. the location where openwrt installs modules to: > > LINUX_UNAME_VERSION:=$(if $(word 3,$(subst ., > ,$(KERNEL_BASE))),$(KERNEL_BASE),$(KERNEL_BASE).0) > > When I use > > LINUX_UNAME_VERSION:=$(shell cat > $(LINUX_DIR)/include/config/kernel.release 2>/dev/null) > > instead, everything works as expected. What is the rationale for the above > code?
There are multiple reasons: - LINUX_UNAME_VERSION is determined way before the actual kernel is built, using $(LINUX_VERSION) which is set by platforms - back in the days when trunk supported 2.4 kernels, that file was not present - as the comment states in top-level Linux sources, this file might not be present, and cannot always be relied on > (This is for the current openwrt trunk). > > Best regards, Nils > > -- > 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 -- Florian _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel