On 2014-03-11 02:48, Nils Rennebarth wrote:
> Hello,
> 
> We use our own kernel source (official linux 3.8.13 plus a drivers) and build 
> openwrt for x86 and powerpc 85xx.
> Now the modules generated for powerpc don't load. When trying to insmod, then 
> the kernel message (e.g.)
>    xt_LOG: no symbol version for module_layout
> is issued on the console.
> 
> I tracked that down to the generation of the *.mod.c files: When I am at the 
> top level of the kernel which
> was just fully built (make vmlinux), and do the following:
>     rm vmlinux System.map
>     make modules
> the *.mod.c files that are generated are invalid: their
>     static const struct modversion_info ____versions[]
> is empty. However
>     rm vmlinux System.map
>     make
> generates valid *.mod.c files, and the modules *do* load later.
> 
> The removal of vmlinux and System.map comes from openwrt commit d6ce92de580 
> of Wed Apr 25 22:26:40 2007,
> where the commit message says:
>    add workaround for occasional kernel module build failures related to 
> kernel
>    config changes
> 
> Can anyone shed some light on this? Why is that apparently no problem with 
> x86? Do we need special openwrt kernel patches so 
> that make modules produces correct modules even in the absence of vmlinux?
My guess is that you have module symbol versioning turned on in your
kernel config for ppc. This is incompatible with OpenWrt builds, because
OpenWrt always builds the kernel modules before the image.

The removal of vmlinux and System.map was added, because otherwise the
build would always pick up the image from the *previous* build, which
was causing all kinds of issues.

Try turning off symbol versioning and see if it works better afterwards.

- Felix
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to