public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* About rebuild 2.4.x kernel to support SMP.
@ 2001-04-26 14:59 Yiping Chen
  2001-04-26 15:20 ` Vivek Dasmohapatra
  2001-04-26 20:16 ` Josh McKinney
  0 siblings, 2 replies; 13+ messages in thread
From: Yiping Chen @ 2001-04-26 14:59 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'


I know it's not proper ask such question here. But I don't know where can I
post this question.
I download RedHat 7.1 last week, and install it in my dual-CPU enviroment.
I try to rebuild kernel that support SMP in kernel 2.4.2 today , but it
failed.
The following is what I did.
========================================
1. Install Red Hat 7.1 in my dual-CPU environment
2. type 'uname -a' , the following is the result:
    Linux lab5-1 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
3. cd /usr/src/linux-2.4 (becuase Red Hat link the 2.4.2 kernel source to
linux-2.4)
4. make mrproper
5. make menuconfig (set SMP and RTC)
6. make dep
7. make clean
8. make bzImage
9. make modules
10. make modules_install
11. edit /etc/lilo.conf
12. run lilo
13. reboot, choose new kernel to boot the system, type 'uname -a'
     Linux lab5-1 2.4.2-2 #1 SMP Wed Apr 25 18:56:05 CST 2001 i686 unknown

My question is why the result of 'uname -r' is not "2.4.2-2smp" , but
"2.4.2-2"
Whether I forgot to do something?
It seems that when we compile the 2.4.2 kernel, it will not use -D__SMP__
argument now.
(because I didn't see it in /usr/src/linux-2.4/Makefile, and I didn't see it
when I did 'make bzImage')
If someone ever build 2.4.x kernel which support SMP, please teach me how to
do it.
Thanks!!

--------------------------------------------------
Yiping Chen
VIA Technologies, Inc.
LAN Software
533 Chung Cheng Road 8F
Hsin Tien, Taipei
Taiwan
TEL : 886-2-22185452  EXT.7512
FAX : 886-2-22187527
E-mail : YipingChen@via.com.tw



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 14:59 Yiping Chen
@ 2001-04-26 15:20 ` Vivek Dasmohapatra
  2001-04-26 20:16 ` Josh McKinney
  1 sibling, 0 replies; 13+ messages in thread
From: Vivek Dasmohapatra @ 2001-04-26 15:20 UTC (permalink / raw)
  To: Yiping Chen; +Cc: 'linux-kernel@vger.kernel.org'

On Thu, 26 Apr 2001, Yiping Chen wrote:

> My question is why the result of 'uname -r' is not "2.4.2-2smp" , but
> "2.4.2-2"

This is just the label as defined by the entries in the top-level
Makefile, eg:

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 3
EXTRAVERSION = -ac5

> Whether I forgot to do something?

You can edit the extraversion value if you want to label your smp kernels
differently, but you don't have to.

You'll probably find you _have_ compiled an SMP kernel - see what
/proc/cpuinfo says, for example.

-- 
I am worthless. I struggle with the simple things. It seems so easy for 
everyone else. One armed blind people climb mountains and teenagers get
Ph.D's. I have trouble getting out of bed.
                                          -TMCM


^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: About rebuild 2.4.x kernel to support SMP.
@ 2001-04-26 15:36 Yiping Chen
  2001-04-26 15:48 ` Vivek Dasmohapatra
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Yiping Chen @ 2001-04-26 15:36 UTC (permalink / raw)
  To: 'Vivek Dasmohapatra', Yiping Chen
  Cc: 'linux-kernel@vger.kernel.org'

So, I have two question now, 
1. how to determine whether your kernel support SMP?
    Somebody taugh me that you can type  "uname -r", but it seems not
correct.
2. I remember in 2.2.x, when I rebuild the kernel which support SMP, the
compile
    argument will include -D__SMP__ , but this time, when I rebuild kernel
2.4.2-2 , it didn't  appear.
    Why? 

Anyway, thanks for  Vivek's answer.
-----Original Message-----
From: Vivek Dasmohapatra [mailto:vivek@etla.org]
Sent: Thursday, April 26, 2001 11:20 PM
To: Yiping Chen
Cc: 'linux-kernel@vger.kernel.org'
Subject: Re: About rebuild 2.4.x kernel to support SMP.


On Thu, 26 Apr 2001, Yiping Chen wrote:

> My question is why the result of 'uname -r' is not "2.4.2-2smp" , but
> "2.4.2-2"

This is just the label as defined by the entries in the top-level
Makefile, eg:

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 3
EXTRAVERSION = -ac5

> Whether I forgot to do something?

You can edit the extraversion value if you want to label your smp kernels
differently, but you don't have to.

You'll probably find you _have_ compiled an SMP kernel - see what
/proc/cpuinfo says, for example.

-- 
I am worthless. I struggle with the simple things. It seems so easy for 
everyone else. One armed blind people climb mountains and teenagers get
Ph.D's. I have trouble getting out of bed.
                                          -TMCM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 15:36 About rebuild 2.4.x kernel to support SMP Yiping Chen
@ 2001-04-26 15:48 ` Vivek Dasmohapatra
  2001-04-26 16:11   ` Alan Shutko
  2001-04-26 16:03 ` kernel
  2001-04-27  6:02 ` Kevin Buhr
  2 siblings, 1 reply; 13+ messages in thread
From: Vivek Dasmohapatra @ 2001-04-26 15:48 UTC (permalink / raw)
  To: Yiping Chen; +Cc: 'linux-kernel@vger.kernel.org'

On Thu, 26 Apr 2001, Yiping Chen wrote:

> So, I have two question now, 
> 1. how to determine whether your kernel support SMP?
>     Somebody taugh me that you can type  "uname -r", but it seems not
> correct.

Try:

cat /proc/stat

or

cat  /proc/cpuinfo

/proc/cpuinfo should contain 1 

processor       : N

line per processor.

/proc/stat will contain n cpuN lines, where n is the number of processors 
in your box, I think, or no such lines [just a cpu line] on a UP box.

-- 
There's an old proverb that says just about whatever you want it to.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 15:36 About rebuild 2.4.x kernel to support SMP Yiping Chen
  2001-04-26 15:48 ` Vivek Dasmohapatra
@ 2001-04-26 16:03 ` kernel
  2001-04-27 11:27   ` Johan Kullstam
  2001-04-27  6:02 ` Kevin Buhr
  2 siblings, 1 reply; 13+ messages in thread
From: kernel @ 2001-04-26 16:03 UTC (permalink / raw)
  To: Yiping Chen
  Cc: 'Vivek Dasmohapatra',
	'linux-kernel@vger.kernel.org'

On Thu, 26 Apr 2001, Yiping Chen wrote:

> So, I have two question now, 
> 1. how to determine whether your kernel support SMP?
>     Somebody taugh me that you can type  "uname -r", but it seems not
> correct.

No, it's correct: the Red Hat RPM is build from the kernel.spec file which
adds the smp string to the version.

> 2. I remember in 2.2.x, when I rebuild the kernel which support SMP, the
> compile
>     argument will include -D__SMP__ , but this time, when I rebuild kernel
> 2.4.2-2 , it didn't  appear.
>     Why? 

Because you've made an assumption that holds no value.  2.4 kernels rely
on CONFIG_SMP instead of __SMP__.

		-ben


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 15:48 ` Vivek Dasmohapatra
@ 2001-04-26 16:11   ` Alan Shutko
  0 siblings, 0 replies; 13+ messages in thread
From: Alan Shutko @ 2001-04-26 16:11 UTC (permalink / raw)
  To: Vivek Dasmohapatra; +Cc: Yiping Chen, 'linux-kernel@vger.kernel.org'

Vivek Dasmohapatra <vivek@etla.org> writes:

> /proc/stat will contain n cpuN lines, where n is the number of processors 
> in your box, I think, or no such lines [just a cpu line] on a UP box.

No, I see 

cpu  830711 916 708342 3323709
cpu0 830711 916 708342 3323709

and

# CONFIG_SMP is not set

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
The more control, the more that requires control.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: About rebuild 2.4.x kernel to support SMP.
@ 2001-04-26 16:24 Yiping Chen
  2001-04-26 16:41 ` Vivek Dasmohapatra
  0 siblings, 1 reply; 13+ messages in thread
From: Yiping Chen @ 2001-04-26 16:24 UTC (permalink / raw)
  To: 'kernel@kvack.org', Yiping Chen
  Cc: 'Vivek Dasmohapatra',
	'linux-kernel@vger.kernel.org'

Thanks for your reply.
I am interested in where can find the linux kernel spec. file, and where Red
Hat add the smp string?
Where the uname command extract the kernel version information(eg:
2.4.2-2smp or 2.2.16)?
I means from which file, or use which system call?

I am a linux driver writer, and I am writing Makefile now. I hope the
Makefile can install driver 
to the correct directory automatically (user run 'make install').
The linux driver modules always put  in /lib/modules/<kernel_version>/...
before (in kernel 2.2.16),
but in kernel 2.4.x, the path change to
/lib/modules/<kernel_version>/kernel/drivers/...
I don't know where to get the kernel_version information. I need some help.
Thanks!!
may I use uname? I worry that the driver will install to incorrect path, and
user will complain it.
thanks!!


-----Original Message-----
From: kernel@kvack.org [mailto:kernel@kvack.org]
Sent: Friday, April 27, 2001 12:03 AM
To: Yiping Chen
Cc: 'Vivek Dasmohapatra'; 'linux-kernel@vger.kernel.org'
Subject: RE: About rebuild 2.4.x kernel to support SMP.


On Thu, 26 Apr 2001, Yiping Chen wrote:

> So, I have two question now, 
> 1. how to determine whether your kernel support SMP?
>     Somebody taugh me that you can type  "uname -r", but it seems not
> correct.

No, it's correct: the Red Hat RPM is build from the kernel.spec file which
adds the smp string to the version.

> 2. I remember in 2.2.x, when I rebuild the kernel which support SMP, the
> compile
>     argument will include -D__SMP__ , but this time, when I rebuild kernel
> 2.4.2-2 , it didn't  appear.
>     Why? 

Because you've made an assumption that holds no value.  2.4 kernels rely
on CONFIG_SMP instead of __SMP__.

		-ben

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 16:24 Yiping Chen
@ 2001-04-26 16:41 ` Vivek Dasmohapatra
  0 siblings, 0 replies; 13+ messages in thread
From: Vivek Dasmohapatra @ 2001-04-26 16:41 UTC (permalink / raw)
  To: Yiping Chen; +Cc: 'linux-kernel@vger.kernel.org'

On Fri, 27 Apr 2001, Yiping Chen wrote:

> Where the uname command extract the kernel version information(eg:
> 2.4.2-2smp or 2.2.16)?

uname [the shell command] is a wrapper around the uname  system call:

man 1 uname
man 2 uname

> I means from which file, or use which system call?

>From a strace -v of uname:

uname({sysname="Linux", 
       nodename="arachne", 
       release="2.2.18-00",
       version="#9 Wed Jan 3 13:48:37 GMT 2001", 
       machine="i686"}) = 0

> I don't know where to get the kernel_version information. I need some help.
> Thanks!!
> may I use uname? I worry that the driver will install to incorrect path, and
> user will complain it.

You can [and may] use uname to get the kernel version string. I am less
certain about the exact layout of the module tree under 2.4.3.

-- 
I dunno about the Big Bang. The Big Kludge I can believe in.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 14:59 Yiping Chen
  2001-04-26 15:20 ` Vivek Dasmohapatra
@ 2001-04-26 20:16 ` Josh McKinney
  1 sibling, 0 replies; 13+ messages in thread
From: Josh McKinney @ 2001-04-26 20:16 UTC (permalink / raw)
  To: linux-kernel

It seems to me that you never installed the new kernel.  Try 'make install'
or manually cp'ing the vmlinuz and system.map yourself.

On approximately Thu, Apr 26, 2001 at 10:59:44PM +0800, Yiping Chen wrote:
> 
> I know it's not proper ask such question here. But I don't know where can I
> post this question.
> I download RedHat 7.1 last week, and install it in my dual-CPU enviroment.
> I try to rebuild kernel that support SMP in kernel 2.4.2 today , but it
> failed.
> The following is what I did.
> ========================================
> 1. Install Red Hat 7.1 in my dual-CPU environment
> 2. type 'uname -a' , the following is the result:
>     Linux lab5-1 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
> 3. cd /usr/src/linux-2.4 (becuase Red Hat link the 2.4.2 kernel source to
> linux-2.4)
> 4. make mrproper
> 5. make menuconfig (set SMP and RTC)
> 6. make dep
> 7. make clean
> 8. make bzImage
> 9. make modules
> 10. make modules_install
> 11. edit /etc/lilo.conf
> 12. run lilo
> 13. reboot, choose new kernel to boot the system, type 'uname -a'
>      Linux lab5-1 2.4.2-2 #1 SMP Wed Apr 25 18:56:05 CST 2001 i686 unknown
> 
> My question is why the result of 'uname -r' is not "2.4.2-2smp" , but
> "2.4.2-2"
> Whether I forgot to do something?
> It seems that when we compile the 2.4.2 kernel, it will not use -D__SMP__
> argument now.
> (because I didn't see it in /usr/src/linux-2.4/Makefile, and I didn't see it
> when I did 'make bzImage')
> If someone ever build 2.4.x kernel which support SMP, please teach me how to
> do it.
> Thanks!!
> 
> --------------------------------------------------
> Yiping Chen
> VIA Technologies, Inc.
> LAN Software
> 533 Chung Cheng Road 8F
> Hsin Tien, Taipei
> Taiwan
> TEL : 886-2-22185452  EXT.7512
> FAX : 886-2-22187527
> E-mail : YipingChen@via.com.tw
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Linux, the choice          | There was a young man from Stamboul Who
of a GNU generation   -o)  | boasted so torrid a tool  That each female 
Kernel 2.4.3-ac1       /\  | crater  Explored by this satyr Seemed
on a i586             _\_v | almost unpleasantly cool. 
                           | 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 15:36 About rebuild 2.4.x kernel to support SMP Yiping Chen
  2001-04-26 15:48 ` Vivek Dasmohapatra
  2001-04-26 16:03 ` kernel
@ 2001-04-27  6:02 ` Kevin Buhr
  2 siblings, 0 replies; 13+ messages in thread
From: Kevin Buhr @ 2001-04-27  6:02 UTC (permalink / raw)
  To: Yiping Chen; +Cc: linux-kernel

Yiping Chen <YipingChen@via.com.tw> writes:
> 
> So, I have two question now, 
> 1. how to determine whether your kernel support SMP?

Type "uname -a", as you did before:

>      Linux lab5-1 2.4.2-2 #1 SMP Wed Apr 25 18:56:05 CST 2001 i686 unknown
                               ^^^
SMP appears here if and only if your kernel was compiled as an SMP
kernel (i.e., with CONFIG_SMP set).  Programmatically, you can get
this same information from the "uname" system call.  The "version"
member for the "utsname" structure will be the complete string:

        #1 SMP Wed Apr 25 18:56:05 CST 2001

That is, you should be able to reliably determine whether or not the
kernel is SMP by simply "strstr"ing for " SMP " in the version string.

> 2. I remember in 2.2.x, when I rebuild the kernel which support SMP, the
> compile
>     argument will include -D__SMP__ , but this time, when I rebuild kernel
> 2.4.2-2 , it didn't  appear.
>     Why? 

The "__SMP__" preprocessor define has been replaced by the
"CONFIG_SMP" configuration file variable.

Kevin <buhr@stat.wisc.edu>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: About rebuild 2.4.x kernel to support SMP.
  2001-04-26 16:03 ` kernel
@ 2001-04-27 11:27   ` Johan Kullstam
  0 siblings, 0 replies; 13+ messages in thread
From: Johan Kullstam @ 2001-04-27 11:27 UTC (permalink / raw)
  To: linux-kernel

<kernel@kvack.org> writes:

> On Thu, 26 Apr 2001, Yiping Chen wrote:
> 
> > So, I have two question now, 
> > 1. how to determine whether your kernel support SMP?
> >     Somebody taugh me that you can type  "uname -r", but it seems not
> > correct.
> 
> No, it's correct: the Red Hat RPM is build from the kernel.spec file which
> adds the smp string to the version.

"uname -a" will show SMP status.

euler(jk)$ uname -a
Linux euler.axel.nom 2.4.4-pre5 #1 SMP Thu Apr 19 19:20:40 EDT 2001 i686 unknown

this is on a redhat system, but i think it will work on any linux
system.

> > 2. I remember in 2.2.x, when I rebuild the kernel which support SMP, the
> > compile
> >     argument will include -D__SMP__ , but this time, when I rebuild kernel
> > 2.4.2-2 , it didn't  appear.
> >     Why? 
> 
> Because you've made an assumption that holds no value.  2.4 kernels rely
> on CONFIG_SMP instead of __SMP__.

it's probably easiest to download the latest kernel (2.4.3 at the time
of this writing) from ftp.XX.kernel.org (XX being your country code).
then configure using "make xconfig" or "make menuconfig".  choose SMP
in one of the first menus.  there's a kernel-howto which explains this
stuff.  btw there is no problem running your own kernels on a redhat
system bypassing rpm.

in a source tree in which you've compiled SMP and want UP or
vice-versa, i think to do a "make distclean" in between switching.

-- 
J o h a n  K u l l s t a m
[kullstam@ne.mediaone.net]
Don't Fear the Penguin!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: About rebuild 2.4.x kernel to support SMP.
@ 2001-04-27 11:53 Yiping Chen
  2001-04-27 13:01 ` Feng Xian
  0 siblings, 1 reply; 13+ messages in thread
From: Yiping Chen @ 2001-04-27 11:53 UTC (permalink / raw)
  To: 'kernel@kvack.org', Yiping Chen
  Cc: 'Vivek Dasmohapatra',
	'linux-kernel@vger.kernel.org'

I have a important question about compile driver here, sometimes we install
RedHat Linux
When you boot the system , it will not include the kernel source, if we
don't have kernel source ,
whether can we compile the driver (NIC).
I am confused, beacuse we need include many kernel header file, if you don't
have linux kernel 
source (I means that there is no kernel source in /usr/src, whether we can
compile the driver module
successfully?), whether we can just use the header file in /usr/include?
thanks!!
Yiping Chen

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: About rebuild 2.4.x kernel to support SMP.
  2001-04-27 11:53 Yiping Chen
@ 2001-04-27 13:01 ` Feng Xian
  0 siblings, 0 replies; 13+ messages in thread
From: Feng Xian @ 2001-04-27 13:01 UTC (permalink / raw)
  To: Yiping Chen
  Cc: 'kernel@kvack.org', 'Vivek Dasmohapatra',
	'linux-kernel@vger.kernel.org'


when you install redhat linux, you can select to install the
kernel-include and kernel-source
but I think the kernel include files come with redhat7 (i am not sure
about rh6) won't let you to compile a kernel module by using
/usr/include/linux (they ask you to use /usr/src/linux-xxx)

you can dnload the kernel source from ftp://ftp.kernel.org and build you
own kernel/NIC driver.

Alex

On Fri, 27 Apr 2001, Yiping Chen wrote:

> I have a important question about compile driver here, sometimes we install
> RedHat Linux
> When you boot the system , it will not include the kernel source, if we
> don't have kernel source ,
> whether can we compile the driver (NIC).
> I am confused, beacuse we need include many kernel header file, if you don't
> have linux kernel
> source (I means that there is no kernel source in /usr/src, whether we can
> compile the driver module
> successfully?), whether we can just use the header file in /usr/include?
> thanks!!
> Yiping Chen
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

-- 
| Feng Xian *
|    (o_    *
|    //\    *
|    V_/_   *


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2001-04-27 13:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-26 15:36 About rebuild 2.4.x kernel to support SMP Yiping Chen
2001-04-26 15:48 ` Vivek Dasmohapatra
2001-04-26 16:11   ` Alan Shutko
2001-04-26 16:03 ` kernel
2001-04-27 11:27   ` Johan Kullstam
2001-04-27  6:02 ` Kevin Buhr
  -- strict thread matches above, loose matches on Subject: below --
2001-04-27 11:53 Yiping Chen
2001-04-27 13:01 ` Feng Xian
2001-04-26 16:24 Yiping Chen
2001-04-26 16:41 ` Vivek Dasmohapatra
2001-04-26 14:59 Yiping Chen
2001-04-26 15:20 ` Vivek Dasmohapatra
2001-04-26 20:16 ` Josh McKinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox