LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2010, 07:07 PM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
First Slackware Kernel compile from source 2.6.29.6, am I doing this right?


OK

so, I've never compiled a kernel before or whatevet and so I thought
I should try to just compile it for my PC

Doing cat /proc/cpuinfo I get

Code:
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 6
model		: 8
model name	: AMD Athlon(tm) XP 2400+
stepping	: 1
cpu MHz		: 1996.610
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up
bogomips	: 3993.22
clflush size	: 32
power management: ts
so, when doing make menuconfig
do I choose Athlon, or what is it?

How exactly do i optimize/build the kernel for this PC?
thanks
 
Old 01-31-2010, 07:17 PM   #2
amiga32
Member
 
Registered: Mar 2009
Location: Illinois
Distribution: slackware bro
Posts: 161

Rep: Reputation: 38
K7 I would guess
 
Old 01-31-2010, 07:22 PM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
K7?

What other commands can I use to determine PC's internals?

I know the mother board and card are Nvidia

I noticed when looking at menuconfig the Athlon/AMD stuff wasn't enabled

Am I gonna notice any difference?

I'm going by this guide
http://muaythaimaster74.blogspot.com...re-kernel.html
 
Old 01-31-2010, 07:31 PM   #4
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
You might notice a little difference depending on what you are doing. Anything too specific to your hardware won't be enabled if it's an either/or setting because the stock kernels need to be compatible across the majority of platforms.

Be careful trying to optimize for nvidia video if you normally use the proprietary drivers. My first kernel I compiled the oss nvidia drivers INTO the kernel and then had a serious issue when I then tried to install the proprietary drivers.

If you haven't read Alien BOB's slack kernel how-to it's a good beginning. http://alien.slackbook.org/dokuwiki/...kernelbuilding

Preemption, timers, specific cpu, filesystems, any particular drivers you might need, removing things you don't need if you are inclined towards a smaller kernel because you can, even the boot logo (I like a custom boot logo).

These are the things I change.
 
1 members found this post helpful.
Old 01-31-2010, 07:35 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Thanks Damgar

I just want a reg kernel built for my cpu

I installed the Nvidia stuff in my Ubuntu setup and the screen res is always 1024x768 when it should be 1280x1024
so, I wont be doing anything in that way
as the default Slack vesa thing gives me the correct res
 
Old 01-31-2010, 07:37 PM   #6
amiga32
Member
 
Registered: Mar 2009
Location: Illinois
Distribution: slackware bro
Posts: 161

Rep: Reputation: 38
Athlon XPs were seventh generation AMD cpus. Line #199 has CONFIG_MK7 you can set to Y.

It's all up to you if you want to change this.
 
Old 01-31-2010, 07:39 PM   #7
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I really want to make my install into a livecd but have gottn nowhere
with Linux Live Scripts

I have no idea how to compile aufs and squashfs into a kernel so am stuck

But, at least I can compile a reg kernel for my setup I guess

I even tried using the kernel 2.6.27.? from linux live and
it made the livecd and what not but I noticed in the Linux Live log
it said

FATAL: Module loop

whatever does that mean?
anyway it wouldn't boot cause it couldn't find itself?

So, I'm kinda bummed out on that
 
Old 01-31-2010, 07:40 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
If I do it wrong
How do I reinstall the kernel that came in the iso?
I dont even know which kernel it installed as there are many in /boot?
smp, huges?
 
Old 01-31-2010, 07:47 PM   #9
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
One more word of caution:

I just skimmed the tutorial you are following and I saw that it has you doing
PHP Code:
rm vmlinuz 
which I'm sure you are aware is going to remove the default link from /boot which will in turn affect lilo.conf
I would suggest leaving vmlinuz in tact and just creating a lilo.conf entry for the new kernel, rather than deleting and reassigning vmlinuz.

Once you are sure everything works to your satisfaction (I've been surprised a week later with things like usb thumb drives not working) then do what you want. But I've found it best to just add a new kernel rather than deleting anything prematurely.

edit: you can revert using installpkg or slackpkg from the dvd or a mirror. And anything file system related is going to be under "file systems" towards the bottom of gconfig/menuconfig. Selecting Y puts them INTO the kernel where as M makes them modules. N removes them completely.

Last edited by damgar; 01-31-2010 at 07:49 PM.
 
Old 01-31-2010, 07:48 PM   #10
amiga32
Member
 
Registered: Mar 2009
Location: Illinois
Distribution: slackware bro
Posts: 161

Rep: Reputation: 38
Quote:
Originally Posted by linus72 View Post
If I do it wrong
How do I reinstall the kernel that came in the iso?
I dont even know which kernel it installed as there are many in /boot?
smp, huges?
You can still keep your old kernel.

Most people use the generic config to rebuild with as it's more modular.

Please read Alien Bob's guide that damgar linked to that will probably answer most of your questions.
 
Old 01-31-2010, 07:58 PM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Why does this seem so complicated?

Reading thru alien's stuff it says
Quote:
Most certainly you will have installed one or more packages containing kernel modules that are not part of the default kernel. Slackware installs the “svgalib-helper” package for instance, and if you installed any wireless driver, these are basically kernel modules too.
Be aware that by installing and booting into your new kernel, you will no longer have these out-of-kernel modules available. You have to recompile their sources so that the resulting kernel modules match the version of your new kernel.
uh...?
I just want the same kernel slackware installed(which is?)
thats optimized for my cpu

I really dont want this to be like installing SourceMage!
That was a whole wasted day and nothing even got installed?!
 
Old 01-31-2010, 08:04 PM   #12
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
If I was you I would follow BOB's method. This will leave the current kernels and their modules installed. Edit lilo.conf for your new kernel.
Run lilo. Reboot and choose your new kernel. Put it through it's paces. If something isn't right then reboot into the old kernel and try again.

edit: What BOB is saying is that if you've installed drivers outside of what is included in the kernel they will have to be rebuilt. For isntance the proprietary NVIDIA drivers require me to run the installer with the -K option to build/install a kernel module for the driver.

Last edited by damgar; 01-31-2010 at 08:06 PM.
 
Old 01-31-2010, 08:10 PM   #13
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
OK

so my initial kernel make just finished
and I booted off it and I looked at the config in /boot and at line 199 it says

Quote:
CONFIG_MK7=y
it made a 2.6.29.6-smp kernel
is that correct?
 
Old 01-31-2010, 08:12 PM   #14
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Yes. SMP will run on a single core/processor. I'm on an old celeron D and it's running a default SMP kernel.
 
Old 01-31-2010, 08:13 PM   #15
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
LOL

ls from my /boot folder
Code:
README.initrd			     config-huge-2.6.29.6
System.map			     config-huge-smp-2.6.29.6-smp
System.map-2.6.29.6-smp		     diag1.img
System.map-generic-2.6.29.6	     map
System.map-generic-smp-2.6.29.6-smp  slack.bmp
System.map-huge-2.6.29.6	     vmlinuz
System.map-huge-smp-2.6.29.6-smp     vmlinuz-2.6.29.6-smp
boot.0309			     vmlinuz-2.6.29.6-smp-live
boot_message.txt		     vmlinuz-generic-2.6.29.6
config				     vmlinuz-generic-smp-2.6.29.6-smp
config-2.6.29.6-smp		     vmlinuz-huge-2.6.29.6
config-generic-2.6.29.6		     vmlinuz-huge-smp-2.6.29.6-smp
config-generic-smp-2.6.29.6-smp

?
Good thing this is a test bed err...

vmlinuz-2.6.29.6-smp-live

thats from salixos livecd
it boots too
 
  


Reply



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
compile a kernel from source??? vbtalent Fedora 5 11-22-2005 03:29 PM
Kernel-source, alsa-driver and kernel compile jasone Linux - General 13 05-26-2005 12:15 AM
Compile kernel source andy18 Linux - Newbie 4 02-14-2004 08:47 AM
Slackware 9.0 Kernel Source and Compile PrimaryDataLoop Slackware 7 05-19-2003 09:32 PM
Can't compile source code in Slackware 9.0 kernel 2.4.20) GrandTheft Slackware 2 04-29-2003 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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