LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   kernel 2.6.17 make problem... (http://www.linuxquestions.org/questions/linux-kernel-70/kernel-2-6-17-make-problem-478209/)

Trey395 08-28-2006 04:33 PM

kernel 2.6.17 make problem...
 
I'm trying to compile my 2.6.17 kernel by running 'make bzImage' and run into the following error...

Code:

CHK    include/linux/version.h
make[1]: *** No rule to make target `init/main.o', needed by `init/built-in.o'.  Stop.
make: *** [init] Error 2

tring 'make clean' also results in the following error (which i think is what the real issue is)...

Code:

scripts/Makefile.clean:17: /usr/src/kernels/2.6.17-1.2174_FC5-i686/drivers/infiniband/ulp/srp/Makefile: No such file or directory
make[3]: *** No rule to make target `/usr/src/kernels/2.6.17-1.2174_FC5-i686/drivers/infiniband/ulp/srp/Makefile'.  Stop.
make[2]: *** [drivers/infiniband/ulp/srp] Error 2
make[1]: *** [drivers/infiniband] Error 2
make: *** [_clean_drivers] Error 2

There is no Makefile in the infiniband/ulp/srp directory?

I have tried everything I can think of (de-selecting the driver in the config menu does not help) and googled extensively, it looks like other people are having the same issue, but nobody has an answer.

Can someone please HELP!!!

Lenard 08-28-2006 04:47 PM

Please see my first reply here;

http://www.linuxquestions.org/questi...d.php?t=478012

Notice the order and the make commands listed, these are the correct steps in order to use to build a new kernel. The 'make bzImage' and 'make modules' commands is not used with the 2.6 kernel series they have been replaced by the single 'make' command. Notice that no 'make clean' command is used in the process.

Brian1 08-28-2006 04:47 PM

You don't use the ' make bzImage ' in 2.6 kernels. That was the way in 2.4 kernels. Follow this link.
http://www.linuxquestions.org/questi...36#post1401136

Brian1

Trey395 08-28-2006 05:04 PM

I followed the directions to copy my current config to a .config file in the /usr/src directory and then typed 'make' to get the following error...

Code:

CHK    include/linux/version.h
scripts/kconfig/conf -s arch/i386/Kconfig
#
# using defaults found in .config
#
  SPLIT  include/linux/autoconf.h -> include/config/*
make[1]: *** No rule to make target `init/main.o', needed by `init/built-in.o'.  Stop.
make: *** [init] Error 2


Brian1 08-28-2006 05:14 PM

Do you have the kernel source installed and where is it located?

Brian1

Lenard 08-28-2006 06:43 PM

Extracting or installing the kernel source;

rpm -ivh kernel-<version>.src.rpm

After extracting and before building (this is required);

cd /usr/src/redhat/SPECS
rpmbuild -bp --target $(arch) kernel-2.6.spec

Trey395 08-29-2006 12:46 PM

Brian1 - I installed the kernel-devel package off yum for the version of the kernel I am running. (kernel-devel-2.6.17-1.2174_FC5) It installed to the /usr/src/kernels/2.6.17-1.2174_FC5-i686 directory.

Lenard - I didn't understand in your response what the rpmbuild command would have to do with compiling a new kernel?

Lenard 08-29-2006 02:49 PM

The kernel source is not ready for building all the patches have to be applied.

From man rpmbuild;

Code:

      -bp    Executes  the  "%prep"  stage from the spec file. Normally this
              involves unpacking the sources and applying any patches.


And from the FC5 release notes;

http://fedora.redhat.com/docs/releas...ISO/#id3126937


All times are GMT -5. The time now is 08:01 PM.