LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-06-2014, 08:45 AM   #1
Bharat mistry
Member
 
Registered: Jul 2014
Posts: 34

Rep: Reputation: Disabled
make config problem


hello,
I downloaded source code of linux kernel and past it into usr/src directory. then i want to compile source code then terminal gives me error that "NO rule to make target". so what i have to do....
 
Old 08-06-2014, 09:31 AM   #2
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
first, you have to configure the kernel: 'make config' (terminal version), 'make menuconfig' (ncurses version) or 'make xconfig' (windowed version) is the first step to do

but, if your you've never done it, you'd better start with an existent kernel config; your distro may ship this in the kernel package, usually a file named config or similar in the /boot directory, just copy it in the kernel source directory and rename it in .config (the prefix dot is essential)
 
Old 08-06-2014, 10:17 AM   #3
Bharat mistry
Member
 
Registered: Jul 2014
Posts: 34

Original Poster
Rep: Reputation: Disabled
sorry sir , i didn't get you, but i tried make menuconfig, make oldconfig and all command but everytime i'm facing same error.

Last edited by Bharat mistry; 08-06-2014 at 10:19 AM.
 
Old 08-06-2014, 10:34 AM   #4
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
did you extracted the kernel? 'tar xf name_of_the_file'
 
Old 08-06-2014, 01:03 PM   #5
Bharat mistry
Member
 
Registered: Jul 2014
Posts: 34

Original Poster
Rep: Reputation: Disabled
Yes sir, i extracted source code and put that into usr/src and change terminal on usr/src/"extracted linux src code directory" but still i am getting error that "No rule to make target menu config". please help me...Error is :

root@bharat-Inspiron-N5110:/usr/src/linux-kernel 3.14# make menuconfig
Makefile:331: warning: overriding commands for target `/usr/src/linux-kernel'
Makefile:117: warning: ignoring old commands for target `/usr/src/linux-kernel'
Makefile:332: /usr/src/linux-kernel: No such file or directory
Makefile:332: 3.14/scripts/Kbuild.include: No such file or directory
Makefile:504: /usr/src/linux-kernel: No such file or directory
Makefile:504: 3.14/arch/x86/Makefile: No such file or directory
make: *** No rule to make target `3.14/arch/x86/Makefile'. Stop.
root@bharat-Inspiron-N5110:/usr/src/linux-kernel 3.14#

Last edited by Bharat mistry; 08-06-2014 at 01:12 PM.
 
Old 08-06-2014, 04:41 PM   #6
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
change the dir name from 'linux-kernel 3.14' to linux-kernel-3.14', spaces are not good in linux
 
Old 08-06-2014, 06:38 PM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
If this is your first kernel to build I recommend doing the following:

Code:
make defconfig
This will create a general system architecture config for the kernel, but it's still fairly basic.

Code:
make menuconfig
This will open the ncurses configuration screen. Use this and follow the LFS kernel building hints to add any appropriate modules and embedded drivers to the system. I recommend you enable file systems as internally compiled rather than as modules.

If all else fails, you can import another distributions config file and try it. We recommend the Slackware Huge kernel as a good place to start.
 
1 members found this post helpful.
Old 08-07-2014, 11:52 AM   #8
Bharat mistry
Member
 
Registered: Jul 2014
Posts: 34

Original Poster
Rep: Reputation: Disabled
yes i got it. Thanks a lot sir....
 
Old 08-07-2014, 11:57 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
hey guy, you must not use user root to make a new kernel, but a normal user. Also do not put the kernel sources directly into /usr!
So do it as yourself. unpack it into your home, or into a subdir in your home (or into /tmp, or whatever, but not into the living system). And then comes make defconfig, make menuconfig or whatever you want (to config). You only need to do the last steps as root (make install and similar tasks)
 
Old 08-07-2014, 01:16 PM   #10
Bharat mistry
Member
 
Registered: Jul 2014
Posts: 34

Original Poster
Rep: Reputation: Disabled
Ok thanks....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
make config problem Golzari-Ali Linux - General 5 09-05-2006 07:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration