LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Kernel make error (https://www.linuxquestions.org/questions/linux-software-2/kernel-make-error-602248/)

madoc.seren 11-25-2007 09:42 AM

Kernel make error
 
i am using the 2.6.23.8 source, fedora 7, trying to compile a custom kernel..

[root@75-106-169-140 linux-2.6.23.8]# make
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/i386/Kconfig
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CC arch/i386/kernel/asm-offsets.s
GEN include/asm-i386/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.o
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
CC init/do_mounts_md.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/i386/kernel/process.o
CC arch/i386/kernel/signal.o
AS arch/i386/kernel/entry.o
CC arch/i386/kernel/traps.o
CC arch/i386/kernel/irq.o
CC arch/i386/kernel/ptrace.o
CC arch/i386/kernel/time.o
CC arch/i386/kernel/ioport.o
CC arch/i386/kernel/ldt.o
CC arch/i386/kernel/setup.o
arch/i386/kernel/setup.c: In function ‘setup_arch’:
arch/i386/kernel/setup.c:665: error: ‘c’ undeclared (first use in this function)
arch/i386/kernel/setup.c:665: error: (Each undeclared identifier is reported only once
arch/i386/kernel/setup.c:665: error: for each function it appears in.)
arch/i386/kernel/setup.c:501:1: error: unterminated #ifndef
make[1]: *** [arch/i386/kernel/setup.o] Error 1
make: *** [arch/i386/kernel] Error 2

i cannot narrow down what this error means, any help would be great!

Lenard 11-25-2007 11:18 AM

You should read The Linux kernel in a nutshell, here is a direct link to a compressed version;

http://www.kernel.org/pub/linux/kern...kn_pdf.tar.bz2

One need to create a configuration for the kernel, you seem to have missed this step. For the Red Hat family the steps in order are;

make mrproper
make oldconfig
make menuconfig
make
make modules_install
make install

The make oldconfig will create a configuration based on your hardware. The make menuconfig step is where one can check and make additional tweaks and/or changes before building.

After one is done and are happy with the new kernel then one can go back and run make rpm. One can then install this kernel rpm package only to the rpm database if desired. No need to install what is already installed.

rpm -ivh --justdb kernel*.rpm

.

madoc.seren 11-25-2007 02:38 PM

thanks man i will give that a shot!


All times are GMT -5. The time now is 10:38 PM.