Error during "make bzImage"
RedHat 9 is installed on a multiprocessor machine. The kernel version is 2.4.20-30.9smp. For debugging purpose I have to compile this kernel. I performed the following steps:
- Downloaded kernel-source-2.4.20-30.9.i386.rpm and installed them.
- Instead of "make config" I copied the configuration file /boot/config-2.4.20-30.9smp to /usr/src/linux-2.4.20-30.9/.config
- make dep
It gave the following error "md5sum: WARNING: 1 of 13 computed checksums did NOT match" but the exit code was 0.
- make clean
- make bzImage
This was unsuccesfull with exit code 2. There were large number of errors and warnings. Some of the errors are as follows:
-------------------------------------------------------------------------
arch/i386/kernel/kernel.o(.text+0x1d3): In function `machine_restart':
: undefined reference to `phys_cpu_present_map'
arch/i386/kernel/kernel.o(.text+0x1db): In function `machine_restart':
: undefined reference to `boot_cpu_physical_apicid'
arch/i386/kernel/kernel.o(.text+0x26ff): In function `device_not_available_emulate':
: undefined reference to `math_emulate'
arch/i386/kernel/kernel.o(.text+0x2f7e): In function `default_do_nmi':
: undefined reference to `nmi_watchdog'
arch/i386/kernel/kernel.o(.text+0x2f99): In function `default_do_nmi':
: undefined reference to `nmi_watchdog_tick'
arch/i386/kernel/kernel.o(.text+0x7569): In function `call_apic_timer_interrupt':
: undefined reference to `smp_apic_timer_interrupt'
arch/i386/kernel/kernel.o(.text+0x758e): In function `call_error_interrupt':
: undefined reference to `smp_error_interrupt'
arch/i386/kernel/kernel.o(.text+0x75ae): In function `call_spurious_interrupt':
: undefined reference to `smp_spurious_interrupt'
arch/i386/kernel/kernel.o(.text+0x8ced): In function `timer_interrupt':
: undefined reference to `using_apic_timer'
arch/i386/kernel/kernel.o(.text+0x8d67): In function `timer_interrupt':
: undefined reference to `smp_local_timer_interrupt'
arch/i386/kernel/kernel.o(.text+0x90b9): In function `sys_mmap2':
: undefined reference to `__down_write'
arch/i386/kernel/kernel.o(.text+0x90e4): In function `sys_mmap2':
: undefined reference to `__up_write'
arch/i386/kernel/kernel.o(.text+0x9192): In function `old_mmap':
: undefined reference to `__down_write'
arch/i386/kernel/kernel.o(.text+0x91ba): In function `old_mmap':
: undefined reference to `__up_write'
arch/i386/kernel/kernel.o(.text+0x9424): In function `sys_uname':
: undefined reference to `__down_read'
and so on...
make[1]: *** [kallsyms] Error 1
make: *** [vmlinux] Error 2
-------------------------------------------------------------------------
Can anyone guide on this? I also did "make checkconfig" which gave many such lines:
arch/alpha/kernel/irq_smp.c: 127: need CONFIG_DEBUG_SPINLOCK.
arch/alpha/kernel/osf_sys.c: 1388: need CONFIG_OSF4_COMPAT.
arch/alpha/kernel/semaphore.c: 60: need CONFIG_DEBUG_SEMAPHORE.
arch/alpha/kernel/smp.c: 1050: need CONFIG_DEBUG_SPINLOCK.
arch/alpha/kernel/smp.c: 1142: need CONFIG_DEBUG_RWLOCK.
Thanks,
Vibha
Error during "make modules"
Thanks for your help. I succesfully compiled the kernel and even rebooted into it. My mistake was I had not done make oldconfig.
Now I have another problem. I installed a wrong patch for kdb (kdb-v4.4-2.6.6, instead of kdb-v4.3-2.4.20). The patch did not install properly there were .rej files. But I still compiled the kernel succesfully. Now since kdb did not work I reinstalled the kernel source (even deleted directory linux-2.4.20-30.9 in /usr/src). But now the "make modules" exits with errors like below:
--------------------------------------------------------------------
many such error before this......
/usr/src/linux-2.4.20-30.9/include/net/dst.h: In function `dst_set_expires':
/usr/src/linux-2.4.20-30.9/include/net/dst.h:149: `jiffies_Rsmp_0da02d67' undeclared (first use in this function)
In file included from cipe.h:69,
from module.c:15:
/usr/src/linux-2.4.20-30.9/include/net/sock.h: In function `sk_filter_release':
/usr/src/linux-2.4.20-30.9/include/net/sock.h:959: warning: implicit declaration of function `kfree_Rsmp_037a0cba'
/usr/src/linux-2.4.20-30.9/include/net/sock.h: In function `sock_orphan':
/usr/src/linux-2.4.20-30.9/include/net/sock.h:1041: `do_softirq_Rsmp_f0a529b7' undeclared (first use in this function)
/usr/src/linux-2.4.20-30.9/include/net/sock.h: In function `sock_graft':
/usr/src/linux-2.4.20-30.9/include/net/sock.h:1050: `do_softirq_Rsmp_f0a529b7' undeclared (first use in this function)
/usr/src/linux-2.4.20-30.9/include/net/sock.h: In function `sock_recv_timestamp':
/usr/src/linux-2.4.20-30.9/include/net/sock.h:1293: warning: implicit declaration of function `put_cmsg_Rsmp_f39bf4d9'
module.c: In function `cipe_check_kernel':
module.c:73: warning: implicit declaration of function `printk_Rsmp_1b7d4074'
make[3]: *** [module.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-30.9/drivers/addon/cipe'
make[2]: *** [_modsubdir_cipe] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-30.9/drivers/addon'
make[1]: *** [_modsubdir_addon] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-30.9/drivers'
make: *** [_mod_drivers] Error 2
-------------------------------------------------------------
As far as I know (from strace patch -p1 kdb.....)the kdb patch has only modified file in the linux source tree which I have installed fresh now. I have no idea why the same steps of compilation taht passed before are failing now. Is there any way that I can restore the initial state?
thanks,
Vibha