I tried to compile my kernel with the
badmem-5.0ns-kernel-2.6.4 patch and badmem-utils-v1.6.
Patching the kernel and compiling and installing the
badmem-utils worked without any problems.
But when I try to compile the kernel it fails.
Output:
gcc -DKERNELLIB_TEST -o mm/badmemkernellib_version -I
/usr/src/badmem/badmemlib/include
mm/badmemlib_version.c -lbadmem -lm
BadMEMlib version 1.6.0
$Id: lib.c,v 1.21 2004/03/16 16:20:59 eagle2 Exp $
$Id: hash.c,v 1.7 2004/03/16 13:58:54 eagle2 Exp $
$Id: mdf.c,v 1.15 2004/03/16 13:58:55 eagle2 Exp $
$Id: patn.c,v 1.21 2004/03/16 13:58:55 eagle2 Exp $
$Id: type.c,v 1.6 2001/08/14 15:02:53 eagle2 Exp $
rm -f mm/badmemkernellib_version # This file is not
used any more, so we can delete it
if [ -e /usr/src/badmem/configure -a ! -e
/usr/src/badmem/Makefile ]; then cd /usr/src/badmem;
export CFLAGS=""; export LDFLAGS=""; ./configure ; fi
make -C /usr/src/badmem/badmemlib IN_KERNEL_MODE=1
clean links
rm -f *.o *~ libbadmem.so.? include/*~ libbadmem.a
memtest_badmemlib.o
ln -sf lib.c kernel_lib.c; ln -sf patn.c
kernel_patn.c; ln -sf mdf.c kernel_mdf.c; ln -sf
hash.c kernel_hash.c;
ln -sf lib.c memtest_lib.c; ln -sf patn.c
memtest_patn.c; ln -sf mdf.c memtest_mdf.c; ln -sf
hash.c memtest_hash.c; ln -sf string.c
memtest_string.c; ln -sf vsprintf.c memtest_vsprintf.c;
make -C /usr/src/badmem/badmemlib IN_KERNEL_MODE=1
kernel_badmemlib.o
gcc -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -funit-at-a-time
-march=pentium3 -Iinclude/asm-i386/mach-default -O2
-fomit-frame-pointer
-I/usr/src/badmem/badmemlib/include -I./include -c -o
kernel_lib.o kernel_lib.c
In file included from /usr/include/linux/prefetch.h:13,
from /usr/include/linux/list.h:6,
from /usr/include/linux/wait.h:14,
from /usr/include/linux/fs.h:11,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:8,
from /usr/include/linux/mm.h:4,
from /usr/include/linux/slab.h:14,
from kernel_lib.c:6:
/usr/include/asm/processor.h:55: error:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/include/asm/processor.h:55: error: requested
alignment is not a constant
In file included from /usr/include/linux/mm.h:12,
from /usr/include/linux/slab.h:14,
from kernel_lib.c:6:
/usr/include/linux/mmzone.h:44: error:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/include/linux/mmzone.h:44: error: requested
alignment is not a constant
make[2]: *** [kernel_lib.o] Fehler 1
make[1]: *** [mm/kernel_badmemlib.o] Fehler 2
make: *** [mm] Fehler 2
After running 'make mrproper' I get the error:
CC mm/page_alloc.o
mm/page_alloc.c:40:24: badmemlib.h: No such file or
directory
mm/page_alloc.c: In function `badmem_markpages':
mm/page_alloc.c:1710: error: `badmem_pattern'
undeclared (first use in this function)
mm/page_alloc.c:1710: error: (Each undeclared
identifier is reported only once
mm/page_alloc.c:1710: error: for each function it
appears in.)
mm/page_alloc.c:1710: error: parse error before "p"
mm/page_alloc.c:1718: error: `p' undeclared (first use
in this function)
mm/page_alloc.c:1732: warning: implicit declaration of
function `badmem_nextaddress'
make[1]: *** [mm/page_alloc.o] Fehler 1
make: *** [mm] Fehler 2
Henrik