LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem in making Linux kernel (https://www.linuxquestions.org/questions/linux-newbie-8/problem-in-making-linux-kernel-769382/)

viswa_4 11-16-2009 12:39 AM

problem in making Linux kernel
 
[root@localhost linux-2.6.10-mvl40_fp]# make vmlinux
CHK include/linux/version.h
CC scripts/mod/empty.o
mv: cannot stat `scripts/mod/.tmp_empty.o': No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
.................
i am new to linux..i think path settings are right.can u suggest wat might be the error .thanks in advance.

vishesh 11-16-2009 02:01 AM

I don't able to get your problem exactly, but i think you should follow following steps

step1. Move into kernel source directory like 'cd /usr/local/src/<kernel source director>'
step2. execute 'make menuconfig' command to select your options.
step3. execute 'make' to compile the kernel
step4. execute 'make modules_install' to install modules in /lib/modules
step5. execute 'make install ' to transfer compiled kernel to /boot pertition

thanks

viswa_4 11-16-2009 02:57 AM

my problem is
i am building linux kernel (VMLINUX)
so i have been cd to source dir
$make clean (i have done)
$make vmlinux
i get the following error.

CHK include/linux/version.h
CC scripts/mod/empty.o
mv: cannot stat `scripts/mod/.tmp_empty.o': No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

what does the error mean mv:cannot stat
my gcc version is 4.3.0 and there is a file called empty.c

vishesh 11-16-2009 03:11 AM

why 'make vmlinux'?

Once, try my given steps and let me know the result.
Also remember to do this with root login.

Thanks

viswa_4 11-16-2009 03:44 AM

i am in root login only.
1.done make menuconfig and changed my settings.saved the configuration.
2.make.giving the following error.
[root@localhost linux-2.6.10-mvl40_fp]# make
CHK include/linux/version.h
CC scripts/mod/empty.o
mv: cannot stat `scripts/mod/.tmp_empty.o': No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
.
3.make,make modules all give the above error.
Plz suggest.

viswa_4 11-16-2009 06:21 AM

problem with dependencies.not able to figure out.

[root@localhost linux-2.6.10-mvl40_fp]# make
CHK include/linux/version.h
CC scripts/mod/empty.o
fixdep: scripts/mod/.empty.o.d: No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

JohnGraham 11-16-2009 07:10 AM

Did you run 'make mrproper' before you built the kernel? (even if you've just downloaded it)

This will remove your .config file though, so make sure you move it out of the kernel source tree first if you want to save it.

John G

mudangel 11-16-2009 07:16 AM

Try: 'make (old,x,menu)config, make, make modules, make modules_install'...where are you getting 'make vmlinux'?

viswa_4 11-17-2009 01:04 AM

these normal steps are ok.i am clear with that.
but i am doing for MIPS board.
if u have normal kernel code u can browse through /linux/scripts/mod
please open the Makefile in that folder.
even for normal make error is coming.

CHK include/linux/version.h
CC scripts/mod/empty.o
mv: cannot stat `scripts/mod/.tmp_empty.o': No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

gauravholey 11-17-2009 02:01 AM

hi dear,

In my opinion you should try and go through this link http://www.howtoforge.net/kernel_compilation_fedora_p2 ,really helpful in many ways...kudos to these people..try it....

njoy,
gaurav holey


All times are GMT -5. The time now is 04:56 AM.