Re: [Patch] Kernel configuration in kernel, kernel 2.5.53

Sam Ravnborg (sam@ravnborg.org)
Sun, 29 Dec 2002 21:07:51 +0100


On Sun, Dec 29, 2002 at 06:37:09PM +0100, Paul Rolland wrote:
> Hello,
>
> Here is the 2.5.53 version of the patch I just sent to the list for 2.4.20
> Main differences are in the Makefile and Kconfig.

Some comments to the Makefile + a little more.

Sam

> +MODULE_AUTHOR("Paul Rolland");
> +MODULE_DESCRIPTION("Driver for accessing kernel configuration");
> +MODULE_LICENSE("GPL");
> +
> +EXPORT_NO_SYMBOLS;
EXPORT_NO_SYMBOLS in a noop in 2.5. Please remove

> + printf("\n");
> + printf("#define CONFIG_SIZE %d\n\n", size);
The CONFIG_ prefix indicates a value from kconfig, which CONFIG_SIZE is not.

> +++ linux-2.5.53/drivers/char/Makefile 2002-12-29 17:43:53.000000000 +0100
> +$(obj)/config.h: $(obj)/config.txt.gz
> + cc -o $(obj)/dotHmaker $(obj)/dotHmaker.c
> + $(obj)/./dotHmaker < $(obj)/config.txt.gz > $(obj)/config.h
> +
> +$(obj)/config.txt.gz::
> + cp .config $(obj)/config.txt
> + gzip -f $(obj)/config.txt
> +
Replace the above with something like this:

host-progs := dotHmaker
EXTRA_TARGETS := config.txt.gz

$(obj)/config.h: $(obj)/config.txt.gz $(obj)/dotHmaker
$(obj)/dotHmaker < $< > $@

$(obj)/config.txt.gz: .config
$(call if_changed,gzip)

That is more in line with general kbuild practice.
Please note that gzip will be called with -9 in the above case.
I do not expect it to have any influence.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/