empty autoconf.h = module compile errors
mbartley2 at cox.NOSPAM.net
Fri Feb 28 17:15:02 PST 2003
Now that I have a nicely operating LFS partition (built from the
pure-lfs hint, followed by some goodies from BLFS), I've been
experimenting with compiling device driver modules.
My system is a 300 MHZ K6-2, now with glibc-2.3.1, gcc-3.2.2,
and kernel 2.4.20.
I'm following along with the O'Reily Linux Device Drivers book.
(The bucking horse book.)
I quickly found that even simple programs would bomb during compile:
In file included from /usr/include/linux/prefetch.h:13,
/usr/include/asm/processor.h:56: `CONFIG_X86_L1_CACHE_SHIFT' undeclared
here (not in a function)
/usr/include/asm/processor.h:56: requested alignment is not a constant
After much tracing through the include files, I discovered the problem
,or at least *a* problem.
The include files are looking at /usr/include/linux/autoconf.h for the
definition of CONFIG_X86_L1_CACHE_SHIFT. The LFS book, as well as the
pure_lfs hint, mention creating an empty /usr/include/linux/autoconf.h
file after installing the kernel headers.
I cd into /usr/src/linux and ran make oldconfig (I saved the .config
file from my previous kernel compile), then copied the newly-created
/usr/src/linux/include/linux/autoconf.h over to
Now /usr/include/linux/autoconf.h contains
#define CONFIG_X86_L1_CACHE_SHIFT (5)
Problem apparently solved.
This may be an obscure case, but /usr/include/linux/autoconf.h ought to
not be left blank after the LFS install. What would be appropriate?
Perhaps the include/linux/autoconf.h file resulting from compiling the
kernel in Chapter 8 : Installing Linux 2.4.20?
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message
More information about the lfs-dev