Re: cross-depmod?

From: Sam Ravnborg
Date: Fri Aug 06 2004 - 11:24:06 EST


On Thu, Aug 05, 2004 at 04:51:56PM -0500, Hollis Blanchard wrote:
> Hi Sam, would you take a patch like this:
>
> --- 1.509/Makefile Tue Aug 3 16:11:35 2004
> +++ edited/Makefile Thu Aug 5 17:12:07 2004
> @@ -790,7 +790,11 @@
> endif
> .PHONY: _modinst_post
> _modinst_post: _modinst_
> - if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
> + if [ -z "$(CROSS_COMPILE)" -o "$(DEPMOD)" != "/sbin/depmod" ] ; then \
> + if [ -r System.map ]; then \
> + $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); \
> + fi \
> + fi
>
> else # CONFIG_MODULES
>
> (I don't like hardcoding /sbin/depmod; this is just for conversation.)
>
> My problem is that I cross-build my kernels, and 'make rpm' is very
> unhappy when it can't use depmod. I know that I can do 'make
> DEPMOD=/bin/true rpm', but can't we figure that out automatically?

I assume the problem arises from the fact that depmod are only capable of
reading elf files for the host it is compiled for.
OK, took a look at depmod.
It handles both 32 and 64 bit but assumes same endian.

Rusty: Would it make sense to extend module-init-tools to support
endian as specified in elf file?

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/