linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* System.map
@ 2004-12-06 17:34 Anoop T
  2004-12-07 11:43 ` System.map Jan Engelhardt
  0 siblings, 1 reply; 43+ messages in thread
From: Anoop T @ 2004-12-06 17:34 UTC (permalink / raw)
  To: linux-kernel


	In one of the kernel build tutorials I found that I have to link the 
System.map file in /boot to the newly built System.map. But I find that it 
is automatically done at start up depending on which kernel version I chose 
to boot. Could anyone please tell who actually does it. I mean is it done by 
the kernel itself or by some start up scripts ?

_________________________________________________________________
Searching for your soulmate? Zero in on the perfect choice. 
http://www.astroyogi.com/newmsn/astrodate/ Try MSN Astrodate now!


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

* Re: System.map
  2004-12-06 17:34 System.map Anoop T
@ 2004-12-07 11:43 ` Jan Engelhardt
  0 siblings, 0 replies; 43+ messages in thread
From: Jan Engelhardt @ 2004-12-07 11:43 UTC (permalink / raw)
  To: Anoop T; +Cc: linux-kernel

>	In one of the kernel build tutorials I found that I have to link the
>System.map file in /boot to the newly built System.map. But I find that it

It suffices if you copy <path_to_your_tree>/System.map to, say,
/boot/System.map-2.6.9

>is automatically done at start up depending on which kernel version I chose
>to boot. Could anyone please tell who actually does it. I mean is it done by
>the kernel itself or by some start up scripts ?

Well, check your scripts if they do so.



Jan Engelhardt
-- 
ENOSPC

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

* Re: System.map
  2007-10-14 17:07 System.map Philip
@ 2007-10-14 18:45 ` Jan Engelhardt
  0 siblings, 0 replies; 43+ messages in thread
From: Jan Engelhardt @ 2007-10-14 18:45 UTC (permalink / raw)
  To: Philip; +Cc: linux-kernel


On Oct 14 2007 19:07, Philip wrote:
>
>I want to write a script, which shows the name of the relevant
>kernel module for each listed pci device shown by 'lspci -m'. It's
>easy to find out the name of the corresponding module, if the driver
>has been compiled as a loadable kernel module: The file
>/lib/modules/$(uname -r)/modules.pcimap lists module names based on
>pci device's vendor -and device id (shown by 'lspci -n'). But how
>can I find out the name of the corresponding kernel module if the
>module has been compiled directly into the kernel ?

Well if it is compiled in, it is not a module, so you cannot find it
the usual way.

>I thought that I
>can find them in the kernel's machting System.map based on vendor
>-and device id as well. But I can't find those id's there. Where do
>I have to look for it ? I want to be informed by my script, if the
>driver (module) for a specific pci device is available as a loadable
>module, in-kernel module or not available at all.

That does not work reliably either. There might be PCI devices
which have the same PID:VID, but need a readb() or so for further
finding out whether the actual piece of hardware has a driver.

And then there is that sort of modules which do not have typical IDs
(i.e. udev cannot/won't autoload them) at all, like pcspkr.ko/psmouse.ko

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

* System.map
@ 2007-10-14 17:07 Philip
  2007-10-14 18:45 ` System.map Jan Engelhardt
  0 siblings, 1 reply; 43+ messages in thread
From: Philip @ 2007-10-14 17:07 UTC (permalink / raw)
  To: linux-kernel

Hello 

I want to write a script, which shows the name of the relevant kernel module for each listed pci device shown by 'lspci -m'. It's easy to find out the name of the corresponding module, if the driver has been compiled as a loadable kernel module: The file /lib/modules/$(uname -r)/modules.pcimap lists module names based on pci device's vendor -and device id (shown by 'lspci -n'). But how can I find out the name of the corresponding kernel module if the module has been compiled directly into the kernel ? I thought that I can find them in the kernel's machting System.map based on vendor -and device id as well. But I can't find those id's there. Where do I have to look for it ? I want to be informed by my script, if the driver (module) for a specific pci device is available as a loadable module, in-kernel module or not available at all.

Many thanks in advance for your answers and I hope, my question is not too annoying for you developer guys :-)


Cheers,
Phibo  

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

* Re: system.map
  2005-07-13 11:04     ` system.map Jan Engelhardt
  2005-07-13 11:27       ` system.map Russell King
@ 2005-07-13 11:33       ` Arjan van de Ven
  1 sibling, 0 replies; 43+ messages in thread
From: Arjan van de Ven @ 2005-07-13 11:33 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: vacant2005, linux-kernel

On Wed, 2005-07-13 at 13:04 +0200, Jan Engelhardt wrote:
> >> >Jul 11 12:18:48 localhost kernel: Inspecting /boot/System.map
> >> >Jul 11 12:18:48 localhost kernel: Loaded 28063 symbols from /boot/System.map.
> >> >Jul 11 12:18:48 localhost kernel: Symbols match kernel version 2.6.12.
> >> >Jul 11 12:18:48 localhost kernel: No module symbols loaded - kernel modules 
> >> >notenabled.
> >
> >so whatever is spewing that is something else, but not the kernel.
> 
> These four messages are the first four ones that appear after the boot loader 
> set EIP to the kernel entry point. The first four printks, if you want so. And 
> apparently, the first four appearing in dmesg, obviously.

do they actually appear in dmesg?
> 
> Maybe some more info helps (from /var/log/boot.msg, a copy of dmesg):

or... is syslog itself printing this into the log at startup?
> 
> 	Inspecting /boot/System.map-2.6.13-TP1


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

* Re: system.map
  2005-07-13 11:04     ` system.map Jan Engelhardt
@ 2005-07-13 11:27       ` Russell King
  2005-07-13 11:33       ` system.map Arjan van de Ven
  1 sibling, 0 replies; 43+ messages in thread
From: Russell King @ 2005-07-13 11:27 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Arjan van de Ven, vacant2005, linux-kernel

On Wed, Jul 13, 2005 at 01:04:38PM +0200, Jan Engelhardt wrote:
> >> >Jul 11 12:18:48 localhost kernel: Inspecting /boot/System.map
> >> >Jul 11 12:18:48 localhost kernel: Loaded 28063 symbols from /boot/System.map.
> >> >Jul 11 12:18:48 localhost kernel: Symbols match kernel version 2.6.12.
> >> >Jul 11 12:18:48 localhost kernel: No module symbols loaded - kernel modules 
> >> >notenabled.
> >
> >so whatever is spewing that is something else, but not the kernel.
> 
> These four messages are the first four ones that appear after the boot loader 
> set EIP to the kernel entry point. The first four printks, if you want so. And 
> apparently, the first four appearing in dmesg, obviously.

They have absolutely nothing to do with the kernel, nor printk.
They're to do with klogd, the process which reads kernel messages and
writes them via a socket to syslogd.

If klogd is started with out -x, it will want to read the System.map
file and do the broken lookup of things it thinks are addresses in
kernel messages.  This is not recommended practice.  For kernels with
kallsyms enabled, klogd should be started with -x.

After your kernel has booted, login and run dmesg.  You'll notice that
the first 4 lines are not as you expect.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

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

* Re: system.map
  2005-07-13 10:56   ` system.map Arjan van de Ven
@ 2005-07-13 11:04     ` Jan Engelhardt
  2005-07-13 11:27       ` system.map Russell King
  2005-07-13 11:33       ` system.map Arjan van de Ven
  0 siblings, 2 replies; 43+ messages in thread
From: Jan Engelhardt @ 2005-07-13 11:04 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: vacant2005, linux-kernel

>> >Jul 11 12:18:48 localhost kernel: Inspecting /boot/System.map
>> >Jul 11 12:18:48 localhost kernel: Loaded 28063 symbols from /boot/System.map.
>> >Jul 11 12:18:48 localhost kernel: Symbols match kernel version 2.6.12.
>> >Jul 11 12:18:48 localhost kernel: No module symbols loaded - kernel modules 
>> >notenabled.
>
>so whatever is spewing that is something else, but not the kernel.

These four messages are the first four ones that appear after the boot loader 
set EIP to the kernel entry point. The first four printks, if you want so. And 
apparently, the first four appearing in dmesg, obviously.

Maybe some more info helps (from /var/log/boot.msg, a copy of dmesg):

	Inspecting /boot/System.map-2.6.13-TP1
	Loaded 24854 symbols from /boot/System.map-2.6.13-TP1.
	Symbols match kernel version 2.6.13.
	No module symbols loaded - kernel modules not enabled.

	klogd 1.4.1, log source = ksyslog started.
	20: 00000000000e8000 - 00000000000ea000 (reserved)
	<4> BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
	.... BIOS-lots of more
	<5>255MB LOWMEM available.
	<7>On node 0 totalpages: 65520
	<7>  DMA zone: 4096 pages, LIFO batch:1
	...

klogd.


Jan Engelhardt
-- 

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

* Re: system.map
  2005-07-13 10:21 ` system.map Jan Engelhardt
       [not found]   ` <200507131244.08336.vacant2005@o2.pl>
@ 2005-07-13 10:56   ` Arjan van de Ven
  2005-07-13 11:04     ` system.map Jan Engelhardt
  1 sibling, 1 reply; 43+ messages in thread
From: Arjan van de Ven @ 2005-07-13 10:56 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: vacant2005, linux-kernel

On Wed, 2005-07-13 at 12:21 +0200, Jan Engelhardt wrote:
> >After compiling new kernel, it doesn`t load System.map file. In kernel 
> >messages I can find:
> >
> >Jul 11 12:18:48 localhost kernel: Inspecting /boot/System.map
> >Jul 11 12:18:48 localhost kernel: Loaded 28063 symbols from /boot/System.map.
> >Jul 11 12:18:48 localhost kernel: Symbols match kernel version 2.6.12.
> >Jul 11 12:18:48 localhost kernel: No module symbols loaded - kernel modules 
> >notenabled.
> 
> I get the same, but somehow, my symbols are loaded. (When it oopses, derefs 
> a NULL pointer, etc. for example.)

the kernel does not read or use system.map.

so whatever is spewing that is something else, but not the kernel.



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

* Re: system.map
       [not found]   ` <200507131244.08336.vacant2005@o2.pl>
@ 2005-07-13 10:45     ` Jacek Jabłoński
  0 siblings, 0 replies; 43+ messages in thread
From: Jacek Jabłoński @ 2005-07-13 10:45 UTC (permalink / raw)
  To: linux-kernel

Dnia środa, 13 lipca 2005 12:44, napisałeś:
> In standard distribution kernel (2.4), it loaded some symblos:
> Inspecting /boot/System.map-2.4.27-2-k7
> Jul  6 09:32:37 localhost kernel: Loaded 17895 symbols
> from /boot/System.map-2.4
> .27-2-k7.
> Jul  6 09:32:37 localhost kernel: Symbols match kernel version 2.4.27.
> Jul  6 09:32:37 localhost kernel: Loaded 618 symbols from 21 modules.
>
> Maybe the link will help:
> http://www.linuxsa.org.au/pipermail/linuxsa/2003-December/063669.html
>
> > >After compiling new kernel, it doesn`t load System.map file. In kernel
> > >messages I can find:
> > >
> > >Jul 11 12:18:48 localhost kernel: Inspecting /boot/System.map
> > >Jul 11 12:18:48 localhost kernel: Loaded 28063 symbols from
> > > /boot/System.map. Jul 11 12:18:48 localhost kernel: Symbols match
> > > kernel version 2.6.12. Jul 11 12:18:48 localhost kernel: No module
> > > symbols loaded - kernel modules notenabled.
> >
> > I get the same, but somehow, my symbols are loaded. (When it oopses,
> > derefs a NULL pointer, etc. for example.)
> >
> > (My syms file is at /boot/System.map-`uname -r` and "works" equally well
> > to yours.)
> >
> >
> > Jan Engelhardt

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

* Re: system.map
  2005-07-12 16:34 system.map vacant2005
@ 2005-07-13 10:21 ` Jan Engelhardt
       [not found]   ` <200507131244.08336.vacant2005@o2.pl>
  2005-07-13 10:56   ` system.map Arjan van de Ven
  0 siblings, 2 replies; 43+ messages in thread
From: Jan Engelhardt @ 2005-07-13 10:21 UTC (permalink / raw)
  To: vacant2005; +Cc: linux-kernel


>After compiling new kernel, it doesn`t load System.map file. In kernel 
>messages I can find:
>
>Jul 11 12:18:48 localhost kernel: Inspecting /boot/System.map
>Jul 11 12:18:48 localhost kernel: Loaded 28063 symbols from /boot/System.map.
>Jul 11 12:18:48 localhost kernel: Symbols match kernel version 2.6.12.
>Jul 11 12:18:48 localhost kernel: No module symbols loaded - kernel modules 
>notenabled.

I get the same, but somehow, my symbols are loaded. (When it oopses, derefs 
a NULL pointer, etc. for example.)

(My syms file is at /boot/System.map-`uname -r` and "works" equally well to 
yours.)


Jan Engelhardt
-- 


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

* system.map
@ 2005-07-12 16:34 vacant2005
  2005-07-13 10:21 ` system.map Jan Engelhardt
  0 siblings, 1 reply; 43+ messages in thread
From: vacant2005 @ 2005-07-12 16:34 UTC (permalink / raw)
  To: linux-kernel

After compiling new kernel, it doesn`t load System.map file. In kernel 
messages I can find:

Jul 11 12:18:48 localhost kernel: Inspecting /boot/System.map
Jul 11 12:18:48 localhost kernel: Loaded 28063 symbols from /boot/System.map.
Jul 11 12:18:48 localhost kernel: Symbols match kernel version 2.6.12.
Jul 11 12:18:48 localhost kernel: No module symbols loaded - kernel modules 
notenabled.

I have support for modules compiled.
I add config file of my kenrel.
http://sniffergg.port5.com/config.txt

uname -a shows

conexion1:~# uname -a
Linux conexion1 2.6.12-cko2nexus #1 Fri Jul 8 18:24:04 CEST 2005 i686 
GNU/Linux

I installed kernel using command installkernel

conexion1:~# installkernel
Usage: installkernel <version> <zImage> <System.map> <directory>


to make sure that System.map file will match the kernel version. 

Please help me,
Jacek Jablonski

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

* Re: system.map
  2002-01-02 22:09         ` system.map Nicholas Knight
@ 2002-03-09  0:21           ` H. Peter Anvin
  0 siblings, 0 replies; 43+ messages in thread
From: H. Peter Anvin @ 2002-03-09  0:21 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <WHITEAiPyTxQplr0tEj00000aaa@white.pocketinet.com>
By author:    Nicholas Knight <nknight@pocketinet.com>
In newsgroup: linux.dev.kernel
> 
> For what reasons? I see no valid reason for it being the "Wrong" thing 
> to do. I wouldn't even call it QUESTIONABLE. Nor is it simply a 
> "holdover". There are still systems in use whos BIOS simply *does not 
> support* booting past the 1024th cyl.
> 
> 1. Putting stuff in /boot is generaly the "standard" thing to do, 
> generaly won't cause confusion among experienced users, and will make 
> sense to new users; /lib/modules/* will make no sense whatsoever.
> 

Now, you're on a system on which /boot is actually a flash ROM (yes,
such systems exist) or for other reasons very small.

Gunk in /boot is not appreciated.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

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

* Re: system.map
  2002-01-03  2:14     ` system.map Daniel Phillips
@ 2002-01-03 15:54       ` Albert D. Cahalan
  0 siblings, 0 replies; 43+ messages in thread
From: Albert D. Cahalan @ 2002-01-03 15:54 UTC (permalink / raw)
  To: Daniel Phillips; +Cc: Tony Hoyle, timothy.covell, adrian kok, linux-kernel

Daniel Phillips writes:

>    cp arch/i386/boot/bzImage /boot/bzImage-$kernel
>    cp System.map /boot/System.map-$kernel
>    cp .config /boot/config-$kernel

Gee, exactly the names I use. Surely then, this is correct.
You even take the '.' off of .config like I do. The only
difference is that you don't keep a copy of vmlinuz as well.

For a Mac, the only difference is that you need vmlinuz and
there isn't any bzImage at all. Stuff still goes in /boot.
(plus ybin and yaboot.conf instead of lilo and lilo.conf)

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

* Re: system.map
  2002-01-02 20:35         ` system.map Timothy Covell
  2002-01-02 21:14           ` system.map Eric S. Johnson
@ 2002-01-03  9:43           ` Miquel van Smoorenburg
  1 sibling, 0 replies; 43+ messages in thread
From: Miquel van Smoorenburg @ 2002-01-03  9:43 UTC (permalink / raw)
  To: linux-kernel

In article <200201022039.g02KdPSr022018@svr3.applink.net>,
Timothy Covell  <timothy.covell@ashavan.org> wrote:
>On Wednesday 02 January 2002 14:19, Kilobug wrote:
>> > 5. sync;sync;shutdown -r now
>>
>> Is there any particular reason for this double sync ? One isn't enough ?
>> (And is sync even needed with shutdown, all should be synced when
>> filesystems are unmounted or remounted read-only, am I wrong ? )
>
>The double sync is tradition.

The double sync is because traditionally, sync was asyncronous-
it told the kernel 'flush write cache to disk' but it returned
immidiately. That is why people were told to sync 3 times - by
the time you had typed 'sync' for the third time on your 300 baud
lineprinter console the system was done flushing.

sync;sync;sync;reboot is NOT what was used, it was:

# sync
# sync
# sync
# reboot

Anyway, Linux sync is different. It *is* synchronous. However syncing
and then doing a hard reboot is not recommended, you really need to
unmount all filesystems first, and remount root read-only. The
standard shutdown sequence does all of this for you and typing sync
before shutdown -r now is completely useless.

>SysV init scripts should sync things,
>but "sync;sync;reboot" or "sync;sync;halt" are not so nice in how
>they go down; so it's a case of being extra careful.  I don't use
>linux all the time, and some of the other unices are less tolerant.
>(For example, on a sun box, I would prefer a double sync before I
>"<stop>-a".)

If you're going to halt or reboot a system *hard* by using the reset
button or <stop>-a without calling shutdown you better sync before
you do that yes, and then you're still not guaranteed free of fs
corruption - at least kill all processes first to prevent some
process writing to disk in between the sync and the halt/reset.

Mike.


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

* Re: system.map
  2002-01-02 19:39   ` system.map Tony Hoyle
  2002-01-02 20:03     ` system.map Timothy Covell
@ 2002-01-03  2:14     ` Daniel Phillips
  2002-01-03 15:54       ` system.map Albert D. Cahalan
  1 sibling, 1 reply; 43+ messages in thread
From: Daniel Phillips @ 2002-01-03  2:14 UTC (permalink / raw)
  To: Tony Hoyle, timothy.covell; +Cc: adrian kok, linux-kernel

On January 2, 2002 08:39 pm, Tony Hoyle wrote:
> Timothy Covell wrote:
> > 	Of course, you can copy over the new System.map
> > file to /boot,  but their is no (easy) way of having more than
> > one active version via "lilo" or "grub".   And that could be 
> > considered a deficiency of the Linux OS.
> 
> ????  Just call it System.map-2.2.17, System.map-2.5.1, etc.  Sounds
> pretty 'easy' to me.

It is if you know the magic incantation for System.map.

> 'make install' does all this for you, btw.

I've never been sure what 'make install' does, or what it might do in the 
future.  I've always just installed according to the README.  After doing 
this by hand way too many times, and having ferretted out the truth about 
System.map, I wrote the following bash script:

   here=`pwd`
   kernel=`basename $here`
   make modules_install >/dev/null
   cp arch/i386/boot/bzImage /boot/bzImage-$kernel
   cp System.map /boot/System.map-$kernel
   cp .config /boot/config-$kernel
   lilo

I put it in /usr/src and use it as follows:

  cd /usr/src/linux-xx.xx.xx
  sudo ../install

This does everything you need, with the exception of editing lilo.conf.  Note 
that the name of the top level directory is the name of the install, so you 
would probably not want to do 'cd /usr/src/linux' where linux is a symlink.

This is x86-specific, obviously.

--
Daniel

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

* Re: system.map
  2002-01-02 22:23         ` system.map Albert D. Cahalan
@ 2002-01-02 23:38           ` Marcel J.E. Mol
  0 siblings, 0 replies; 43+ messages in thread
From: Marcel J.E. Mol @ 2002-01-02 23:38 UTC (permalink / raw)
  To: Albert D. Cahalan; +Cc: Keith Owens, timothy.covell, adrian kok, linux-kernel

On Wed, Jan 02, 2002 at 05:23:53PM -0500, Albert D. Cahalan wrote:
> Keith Owens writes:
> 
> > System.map is not required for booting, it is only used after init
> > starts, therefore it does not belong in /boot anyway.
> 
> It's not about modules either. :-) If you can ignore the
> name, I can too. So "/boot" means "kernel stuff".
 
So I moved /lib/modules in /boot and symlinked /lib/modules -> /boot/modules.
Everything about kernels is then in /boot (partition). This allow me
to share /boot over all the distros I installed and enjoy one kernel
compilation on all distros...

-Marcel


-- 
     ======--------         Marcel J.E. Mol                MESA Consulting B.V.
    =======---------        ph. +31-(0)6-54724868          P.O. Box 112
    =======---------        marcel@mesa.nl                 2630 AC  Nootdorp
__==== www.mesa.nl ---____U_n_i_x______I_n_t_e_r_n_e_t____ The Netherlands ____
 They couldn't think of a number,           Linux user 1148  --  counter.li.org
    so they gave me a name!  -- Rupert Hine  --  www.ruperthine.com

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

* Re: system.map
  2002-01-02 23:01       ` system.map skidley
@ 2002-01-02 23:14         ` Timothy Covell
  0 siblings, 0 replies; 43+ messages in thread
From: Timothy Covell @ 2002-01-02 23:14 UTC (permalink / raw)
  To: skidley, Timothy Covell; +Cc: Keith Owens, adrian kok, linux-kernel

On Wednesday 02 January 2002 17:01, skidley wrote:
> On Wed, 2 Jan 2002, Timothy Covell wrote:
> > However, I'm concerned about searching in "/usr/src/linux" for it.
> > Linus has taken great pains to point out that we shouldn't be building
> > our kernels in /usr/src/linux, it would seem that this is reenforcing a
> > mistake.
>
> I'm curious as to why kernels shouldn't be built in /usr/src/linux. Also
> this may be a dumb question but if I have built my kernels in /usr/src and
> want to move them to /home for eg. will that screw up things? Installing
> some apps from source sometimes they search for the kernel source during
> configure. If a kernel was compiled and moved to a different dir will this
> matter?

The issue was that libc include files could step on kernel include
files due to symlinks in /usr/include/linux to /usr/src/linux/include.
IIRC the issue is that include files must point to those with which
the libc was compiled for proper userland compilations.   

The latest File Hierarchy Standard states that for glibc based systems,
/usr/src can be whatever it wants but that for libc5 based systems,

6.1.7 /usr/include :
Header files included by C programs These symbolic links are required if a C 
or C++ compiler is installed and only for systems not based on glibc. 
/usr/include/asm -> /usr/src/linux/include/asm-<arch> 
/usr/include/linux -> /usr/src/linux/include/linux

Thus, practice dictated that it was safer to build the linux kernel somewhere 
other than /usr/src/linux.   Since the kernel is shipped with it's own 
include files, it works just fine building the kernel anywhere else; I am 
building under /home/kernel/linux-x.y.z.


-- 
timothy.covell@ashavan.org.

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

* Re: system.map
  2002-01-02 20:03     ` system.map Timothy Covell
  2002-01-02 20:19       ` system.map Kilobug
  2002-01-02 20:25       ` system.map Tony Hoyle
@ 2002-01-02 23:07       ` Nicholas Harring
  2 siblings, 0 replies; 43+ messages in thread
From: Nicholas Harring @ 2002-01-02 23:07 UTC (permalink / raw)
  To: timothy.covell; +Cc: Tony Hoyle, adrian kok, linux-kernel

Timothy Covell wrote:

>On Wednesday 02 January 2002 13:39, Tony Hoyle wrote:
>
>>Timothy Covell wrote:
>>
>>>	Of course, you can copy over the new System.map
>>>file to /boot,  but their is no (easy) way of having more than
>>>one active version via "lilo" or "grub".   And that could be
>>>considered a deficiency of the Linux OS.
>>>
>>????  Just call it System.map-2.2.17, System.map-2.5.1, etc.  Sounds
>>pretty 'easy' to me.
>>
>>'make install' does all this for you, btw.
>>
>>Tony
>>
>
>Not on grub.  I quote:
>	It is also possible to do "make install" if you have lilo 
>	installed to suit the kernel makefiles,
>  	but you may want to check your particular lilo setup first.
>
>But, on my grub based system, I have to:
>
>1.  "make bzlilo"  which creates vmlinuz and System.map 
>and puts them in / and not in /boot.  (make bzlilo is easier to use
>than bzimage)
>
>2. cp /vmlinuz /boot/vmlinuz-x.y.x  ;  cp /System.map /boot/System.map-x.y.z
>
>3. rm /boot/System.map ; ln -s /boot/System.map-x.y.z /boot/System.map
>
>4. vi /boot/grub.conf (or /etc/grub.conf) and put in new kernel boot entry.
>
>5. sync;sync;shutdown -r now
>
>
If you export INSTALL_PATH=/boot then the copying and removing and 
relinking will be unnecessary.

Nick Harring
Webley Systems, Inc.



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

* Re: system.map
  2002-01-02 21:13     ` system.map Timothy Covell
@ 2002-01-02 23:01       ` skidley
  2002-01-02 23:14         ` system.map Timothy Covell
  0 siblings, 1 reply; 43+ messages in thread
From: skidley @ 2002-01-02 23:01 UTC (permalink / raw)
  To: Timothy Covell; +Cc: Keith Owens, adrian kok, linux-kernel

On Wed, 2 Jan 2002, Timothy Covell wrote:
 
> However, I'm concerned about searching in "/usr/src/linux" for it.
> Linus has taken great pains to point out that we shouldn't be building
> our kernels in /usr/src/linux, it would seem that this is reenforcing a
> mistake.
> 
I'm curious as to why kernels shouldn't be built in /usr/src/linux. Also
this may be a dumb question but if I have built my kernels in /usr/src and want to move them to /home for eg. will that screw up things? Installing some apps from source sometimes they search for the kernel source during configure. If a kernel was compiled and moved to a different dir will this matter? 

-- 
  . ---                                   .----.
  |o_o |                                 /_ 0  |      
  |:_/ |   Give Micro$oft the Bird!!!!   \_    |
 //   \ \  Use Linux!!!!                 /      \
(|     | )                              | )  | | | 
/'\_   _/`\                             | )  | | |   
\___)=(___/                             |_)  (_) |  
Chad Young                               \______/
Registered Linux User #195191           (_______|
@ http://counter.li.org
-----------------------------------------------------------------------
Linux localhost 2.4.18pre1 #2 Fri Dec 28 14:41:58 AST 2001 i686 unknown
  6:50pm  up  4:35,  4 users,  load average: 0.01, 0.00, 0.00


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

* Re: system.map
  2002-01-02 22:15     ` system.map David Golden
  2002-01-02 22:21       ` system.map Nick LeRoy
@ 2002-01-02 22:29       ` Lionel Bouton
  1 sibling, 0 replies; 43+ messages in thread
From: Lionel Bouton @ 2002-01-02 22:29 UTC (permalink / raw)
  To: David Golden; +Cc: linux-kernel

David Golden wrote:

> On Wednesday 02 January 2002 21:25, Lionel Bouton wrote:
> it and
> 
>>search it in numerous places : with or without `-uname -r` appended (at
>>least in / /boot /usr/src/linux).
>>
>>
> 
> :-( Pity it apparently doesn't search
> 
> /boot/`uname -r`/System.map
> 
> That way the /boot/kernelver/* scheme (see previous post) would work...
> 
> 


As these utilities already look in several locations (most `uname -r` 
dependent), a patch to make them look in /boot/`uname -r` too would 
probably be trivial.

rgrep -r "/usr/src/linux" utility-src
vi files_found
diff -r -u old-src new-src \
	| mail -s "Small cool patch" utility-maintainer

LB.


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

* Re: system.map
  2002-01-02 21:31       ` system.map Keith Owens
  2002-01-02 22:09         ` system.map Nicholas Knight
@ 2002-01-02 22:23         ` Albert D. Cahalan
  2002-01-02 23:38           ` system.map Marcel J.E. Mol
  1 sibling, 1 reply; 43+ messages in thread
From: Albert D. Cahalan @ 2002-01-02 22:23 UTC (permalink / raw)
  To: Keith Owens; +Cc: Albert D. Cahalan, timothy.covell, adrian kok, linux-kernel

Keith Owens writes:
> "Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:

>> That's not a nice place. Besides the fact that System.map is
>> neither library nor module, /lib/modules is less likely to
>> exist than /boot is. It's a wee bit slower too.
>
> /boot is a hangover from old i386 systems that could not boot past
> cylinder 1024 so you needed a special partition to hold the boot
> images.  That restriction does not exist on any system less than 5
> years old nor on most non-i386 machines, the requirement for a special
> /boot is obsolete on most machines.

Who said anything about being special? I have a Mac with kernels
in /boot. It boots via OpenFirmware loading yaboot from an HFS
partition, then yaboot reading the ext2 root partition.

I suppose a separate boot partition would be good if I were to
use a Reiserfs root partition. I might as well mount this boot
partition on /boot and put all my kernels there, instead of
mounting it on /lib/modules.

> System.map is not required for booting, it is only used after init
> starts, therefore it does not belong in /boot anyway.

It's not about modules either. :-) If you can ignore the
name, I can too. So "/boot" means "kernel stuff".

> IA64 requires boot files to be in /boot/efi which must be a VFAT style
> partition.  Trust me, you don't want anything in /boot/efi unless you
> have to.

VFAT isn't the fastest, and isn't multi-user, but who cares?
It works perfectly fine for System.map files.

Eh, what goes in /boot that couldn't be on the VFAT partition?
I'm thinking the VFAT partition ought to be mounted at /boot.

> If it makes you feel happier, think of /lib/modules as 'kernel specific
> data'.  Pity about the name but it is hard coded into too many programs
> to change it to /lib/kernel or /kernel.

I could agree to use /kernel/2.4.18-pre1/* for all the misc. stuff
and /kernel/2.4.18-pre1/modules/* for the modules. So you add this
to the search path for your stuff, and make the 2.5 install prefer
this location if it exists. Who else would care? Then after all the
distributions have 2.6.xx kernels, drop /lib/modules from the tools.
Killing /boot could wait a bit longer perhaps, or maybe not.

>>It's a wee bit slower too.
>
> ????

2 dirs:  / /boot
4 dirs:  / /lib /lib/modules /lib/modules/2.4.18-pre1

So an inode and at least one block for each. You lose even
if you figure that / and /lib would be cached already.

Plus /boot comes earlier in the "ps" search path, so you pay
the cost of looking in /boot anyway.

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

* Re: system.map
  2002-01-02 22:15     ` system.map David Golden
@ 2002-01-02 22:21       ` Nick LeRoy
  2002-01-02 22:29       ` system.map Lionel Bouton
  1 sibling, 0 replies; 43+ messages in thread
From: Nick LeRoy @ 2002-01-02 22:21 UTC (permalink / raw)
  To: David Golden, linux-kernel

On Wednesday 02 January 2002 16:15, David Golden wrote:
> On Wednesday 02 January 2002 21:25, Lionel Bouton wrote:
> it and
>
> > search it in numerous places : with or without `-uname -r` appended (at
> > least in / /boot /usr/src/linux).
> >
> :-( Pity it apparently doesn't search
>
> /boot/`uname -r`/System.map
>
> That way the /boot/kernelver/* scheme (see previous post) would work...

That would be nice.  I used to have my own personal system and hacked version 
of klogd that had a /boot/kernels directory, but in it I still maintained the 
old (cumbersum) naming convention.  I *like* this idea.  A lot.

/boot/`uname -r`/{System.map,bzImage,.config}

So, what's it take to make it a "standard"?

-Nick

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

* Re: system.map
  2002-01-02 21:25   ` system.map Lionel Bouton
@ 2002-01-02 22:15     ` David Golden
  2002-01-02 22:21       ` system.map Nick LeRoy
  2002-01-02 22:29       ` system.map Lionel Bouton
  0 siblings, 2 replies; 43+ messages in thread
From: David Golden @ 2002-01-02 22:15 UTC (permalink / raw)
  To: linux-kernel

On Wednesday 02 January 2002 21:25, Lionel Bouton wrote:
it and
> search it in numerous places : with or without `-uname -r` appended (at
> least in / /boot /usr/src/linux).
>

:-( Pity it apparently doesn't search

/boot/`uname -r`/System.map

That way the /boot/kernelver/* scheme (see previous post) would work...




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

* Re: system.map
  2002-01-02 21:31       ` system.map Keith Owens
@ 2002-01-02 22:09         ` Nicholas Knight
  2002-03-09  0:21           ` system.map H. Peter Anvin
  2002-01-02 22:23         ` system.map Albert D. Cahalan
  1 sibling, 1 reply; 43+ messages in thread
From: Nicholas Knight @ 2002-01-02 22:09 UTC (permalink / raw)
  To: Keith Owens, Albert D. Cahalan; +Cc: timothy.covell, adrian kok, linux-kernel

On Wednesday 02 January 2002 01:31 pm, Keith Owens wrote:
> On Wed, 2 Jan 2002 16:17:30 -0500 (EST),
>
> "Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:
> >That's not a nice place. Besides the fact that System.map is
> >neither library nor module, /lib/modules is less likely to
> >exist than /boot is. It's a wee bit slower too.
>
> /boot is a hangover from old i386 systems that could not boot past
> cylinder 1024 so you needed a special partition to hold the boot
> images.  That restriction does not exist on any system less than 5
> years old nor on most non-i386 machines, the requirement for a
> special /boot is obsolete on most machines.
>
> System.map is not required for booting, it is only used after init
> starts, therefore it does not belong in /boot anyway.
>
> IA64 requires boot files to be in /boot/efi which must be a VFAT
> style partition.  Trust me, you don't want anything in /boot/efi
> unless you have to.
>
> For all those reasons, putting System.map and .config in /boot is the
> wrong thing to do.  There is no point in creating yet another

For what reasons? I see no valid reason for it being the "Wrong" thing 
to do. I wouldn't even call it QUESTIONABLE. Nor is it simply a 
"holdover". There are still systems in use whos BIOS simply *does not 
support* booting past the 1024th cyl.
1. Putting stuff in /boot is generaly the "standard" thing to do, 
generaly won't cause confusion among experienced users, and will make 
sense to new users; /lib/modules/* will make no sense whatsoever.

2. /boot is shorter than /lib/modules/`uname -r`, and no I'm not 
kidding. I like short pathnames, it's for this reason I prefer to 
deposit stuff in /usr instead of /usr/local when it's on my personal 
desktop system. I'll sometimes spend hours copying kernels around or 
troubleshooting. The last thing I want to do is type 
/lib/mod<tab>/2.4<tab><damn forgot, more than one 2..4 
kernel>.18<tab><damn forgot more than one -pre <pre-1>/bz<tab> when I 
could instead type /bo<tab>/kern<tab>2.4.18....
This of course assumes I'm using a shell with filename completion! That 
in itself is not always possible on an extremely broken system.

3. Given that neither system is inherently bad, what makes you 
qualified to say it's "wrong" ?

> directory to hold these files when /lib/modules/`uname -r` will do
> the job.  Even on systems with no modules, /lib/modules can be
> created to hold the kernel specific files.  I put my bootable kernels
> in /lib/modules as well, then I have exactly one place to remove to
> get rid of an old kernel.
>
> If it makes you feel happier, think of /lib/modules as 'kernel
> specific data'.  Pity about the name but it is hard coded into too
> many programs to change it to /lib/kernel or /kernel.
>
> >It's a wee bit slower too.
>
> ????

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

* Re: system.map
  2002-01-02 21:14   ` system.map John Weber
@ 2002-01-02 21:42     ` Keith Owens
  0 siblings, 0 replies; 43+ messages in thread
From: Keith Owens @ 2002-01-02 21:42 UTC (permalink / raw)
  To: John Weber; +Cc: linux-kernel

On Wed, 02 Jan 2002 16:14:58 -0500, 
John Weber <weber@nyc.rr.com> wrote:
>I wrote a little script that does the whole thing for me;
>I can think of a bunch of improvements (like writing a new
>/etc/lilo.conf file) that can be added with minimal effort:
>
>I'm curious to know what the standard approach to this is.
>What other scripts are out there?

It is a lot easier in kbuild 2.5, I added clean support for install
scripts.  kbuild 2.5 does most of the work, the install script can
concentrate on its own work instead of deducing the install information
itself.

Post-install script or command name
CONFIG_INSTALL_SCRIPT_NAME
  If you perform some extra work after installing the kernel and
  modules, specify the name of your script or command here.  It will be
  invoked after copying the kernel and modules to the target locations.
  The CONFIG_INSTALL_* variables will be in the environment of your
  script, as well as all variables exported by the top level Makefile,
  including KERNELRELEASE, VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION,
  USERVERSION, KBUILD_OBJTREE, KBUILD_SRCTREE_nnn.

  If your boot loader needs to be run to pick up the new kernel
  location, you can insert the loader command in this field.  The
  command or script must be executable.  LILO users might find this to
  be useful,
    KBUILD_SRCTREE_000/scripts/lilo_new_kernel
  It adds CONFIG_INSTALL_PREFIX_NAME/CONFIG_INSTALL_KERNEL_NAME to
  /etc/lilo.conf with a label of KERNELRELEASE (truncated to 15
  characters) then runs lilo.

  Any words in the path that start with an upper case letter and
  consist only of upper case letters, '_' and digits are replaced by
  the value of the corresponding variable.  This includes
  KERNELRELEASE, VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION,
  USERVERSION, KBUILD_SRCTREE_nnn.



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

* Re: system.map
  2002-01-02 21:17     ` system.map Albert D. Cahalan
@ 2002-01-02 21:31       ` Keith Owens
  2002-01-02 22:09         ` system.map Nicholas Knight
  2002-01-02 22:23         ` system.map Albert D. Cahalan
  0 siblings, 2 replies; 43+ messages in thread
From: Keith Owens @ 2002-01-02 21:31 UTC (permalink / raw)
  To: Albert D. Cahalan; +Cc: timothy.covell, adrian kok, linux-kernel

On Wed, 2 Jan 2002 16:17:30 -0500 (EST), 
"Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:
>That's not a nice place. Besides the fact that System.map is
>neither library nor module, /lib/modules is less likely to
>exist than /boot is. It's a wee bit slower too.

/boot is a hangover from old i386 systems that could not boot past
cylinder 1024 so you needed a special partition to hold the boot
images.  That restriction does not exist on any system less than 5
years old nor on most non-i386 machines, the requirement for a special
/boot is obsolete on most machines.

System.map is not required for booting, it is only used after init
starts, therefore it does not belong in /boot anyway.

IA64 requires boot files to be in /boot/efi which must be a VFAT style
partition.  Trust me, you don't want anything in /boot/efi unless you
have to.

For all those reasons, putting System.map and .config in /boot is the
wrong thing to do.  There is no point in creating yet another directory
to hold these files when /lib/modules/`uname -r` will do the job.  Even
on systems with no modules, /lib/modules can be created to hold the
kernel specific files.  I put my bootable kernels in /lib/modules as
well, then I have exactly one place to remove to get rid of an old
kernel.

If it makes you feel happier, think of /lib/modules as 'kernel specific
data'.  Pity about the name but it is hard coded into too many programs
to change it to /lib/kernel or /kernel.

>It's a wee bit slower too.

????


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

* Re: system.map
  2002-01-02 19:30 ` system.map Sebastian Roth
@ 2002-01-02 21:25   ` Lionel Bouton
  2002-01-02 22:15     ` system.map David Golden
  0 siblings, 1 reply; 43+ messages in thread
From: Lionel Bouton @ 2002-01-02 21:25 UTC (permalink / raw)
  To: xsebbi, Linux

Sebastian Roth wrote:

>>Hi all
>>
> 
> hello,
> 
> 
>>Why sometimes I don't need to copy the system.map to
>>/boot when I update the kernel
>>and the system also can boot?
>>
> 
>>Is it correct?
>>
> 
> yes, this is correct. I think this System.map contains only some useful 
> information about modules for the kernel.

 > [...]

"man klogd", "man ksymoops".

Short:
System.map is an ordered (by address) list of (kernel address, ?type?, 
and syscall name).
Module syscalls are dynamic by nature so there's a kernel interface for 
exporting symbols to user utilities needing their addresses (see 
/proc/ksyms).

You don't need System.map to boot. But user space apps like ps (can show 
the current syscall used by a process), klogd (for clean GPF reports), 
ksymoops (mainly as a cross-check with vmlinux symbols) use it and 
search it in numerous places : with or without `-uname -r` appended (at 
least in / /boot /usr/src/linux).

LB.


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

* Re: system.map
  2002-01-02 20:54   ` system.map Keith Owens
  2002-01-02 21:13     ` system.map Timothy Covell
@ 2002-01-02 21:17     ` Albert D. Cahalan
  2002-01-02 21:31       ` system.map Keith Owens
  1 sibling, 1 reply; 43+ messages in thread
From: Albert D. Cahalan @ 2002-01-02 21:17 UTC (permalink / raw)
  To: Keith Owens; +Cc: timothy.covell, adrian kok, linux-kernel

Keith Owens writes:

> Current versions of ps look for System.map in
>
>       $PS_SYSTEM_MAP
>       /boot/System.map-`uname -r`
>       /boot/System.map
>       /lib/modules/`uname -r`/System.map
>       /usr/src/linux/System.map
>       /System.map
>
> Copy System.map to /lib/modules/`uname -r`/System.map after make
> modules_install, remove any old map files from /boot and / and you
> don't need any symlink or bootloader tricks.
> 
> The 2.5 kernel build asks if you want to install System.map and
> .config.  If you say yes then the default location for these files in
> 2.5 is /lib/modules/`uname -r`/{System.map,.config}.

That's not a nice place. Besides the fact that System.map is
neither library nor module, /lib/modules is less likely to
exist than /boot is. It's a wee bit slower too.

The System.map file contains info related only to the main kernel
image, and nothing related to modules. So this is better:

/boot/System.map-2.4.18-pre1
/boot/vmlinuz-2.4.18-pre1
/boot/bzImage-2.4.18-pre1
/boot/config-2.4.18-pre1

(losing the foul '.' on the .config file)

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

* Re: system.map
  2002-01-02 20:35         ` system.map Timothy Covell
@ 2002-01-02 21:14           ` Eric S. Johnson
  2002-01-03  9:43           ` system.map Miquel van Smoorenburg
  1 sibling, 0 replies; 43+ messages in thread
From: Eric S. Johnson @ 2002-01-02 21:14 UTC (permalink / raw)
  To: timothy.covell; +Cc: Kilobug, linux-kernel

>The double sync is tradition. 

Actually it is a triple sync that is tradition. Since V7 days.

As in 

"anything I say three times is true" - Lewis Carrol

E


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

* Re: system.map
       [not found] ` <fa.hmqrtsv.13jqup8@ifi.uio.no>
@ 2002-01-02 21:14   ` John Weber
  2002-01-02 21:42     ` system.map Keith Owens
  0 siblings, 1 reply; 43+ messages in thread
From: John Weber @ 2002-01-02 21:14 UTC (permalink / raw)
  To: linux-kernel

Timothy Covell wrote:

> On Wednesday 02 January 2002 13:39, Tony Hoyle wrote:
> 
>>Timothy Covell wrote:
>>
>>>	Of course, you can copy over the new System.map
>>>file to /boot,  but their is no (easy) way of having more than
>>>one active version via "lilo" or "grub".   And that could be
>>>considered a deficiency of the Linux OS.
>>>
>>????  Just call it System.map-2.2.17, System.map-2.5.1, etc.  Sounds
>>pretty 'easy' to me.
>>
>>'make install' does all this for you, btw.
>>
>>Tony
>>
> 
> Not on grub.  I quote:
> 	It is also possible to do "make install" if you have lilo 
> 	installed to suit the kernel makefiles,
>   	but you may want to check your particular lilo setup first.
> 
> But, on my grub based system, I have to:
> 
> 1.  "make bzlilo"  which creates vmlinuz and System.map 
> and puts them in / and not in /boot.  (make bzlilo is easier to use
> than bzimage)
> 
> 2. cp /vmlinuz /boot/vmlinuz-x.y.x  ;  cp /System.map /boot/System.map-x.y.z
> 
> 3. rm /boot/System.map ; ln -s /boot/System.map-x.y.z /boot/System.map
> 
> 4. vi /boot/grub.conf (or /etc/grub.conf) and put in new kernel boot entry.
> 
> 5. sync;sync;shutdown -r now
> 


None of this sounds incredibly complicated, and, in fact, a scripting 
language (e.g. perl) does quite nicely.

I wrote a little script that does the whole thing for me;
I can think of a bunch of improvements (like writing a new
/etc/lilo.conf file) that can be added with minimal effort:

I'm curious to know what the standard approach to this is.
What other scripts are out there?

#!/usr/bin/perl

# ----------------------------------------------------
# Program:     kernel-install
# Description: This script installs a kernel after it
#              has been built, since "make install"
#              doesn't do it the way I like it.
# ----------------------------------------------------

$srcdir = "/usr/src/linux";

# Origin Files
$kernel = "$srcdir/arch/i386/boot/bzImage";
$map    = "$srcdir/System.map";
$header = "$srcdir/include/linux/kernel.h";
# Destination Directory
$destdir= "/boot";

# Make sure all the files exist
if( !((-e $srcdir) && (-e $header) && (-e $kernel)) ) {
     exit(-1);
}

# getversion will return $version
&getversion;

# Start copying stuff
system("cp $kernel $destdir/vmlinuz-$version");
system("cp $header $destdir/kernel.h-$version");
if( -e $map ) {
system("cp $map $destdir/System.map-$version");
}

# Remove existing softlinks
if( -e "$destdir/vmlinuz" ) {
     unlink("$destdir/vmlinuz");
}
if( -e "$destdir/kernel.h" ) {
     unlink("$destdir/kernel.h");
}
if( -e "$destdir/System.map") {
     unlink("$destdir/System.map");
}

# Recreate links
symlink("$destdir/vmlinuz-$version","$destdir/vmlinuz");
symlink("$destdir/kernel.h-$version","$destdir/kernel.h");
if( -e $map ) {

symlink("$destdir/System.map-$version","$destdir/System.map");
}

# Run LILO
system("lilo");

# ----------------------------------------------------
# Subroutine:  get_kernel_version
# Description: The kernel version for the kernel build
#              can be found in the main Makefile.  
# ----------------------------------------------------
sub getversion
{
    $version = "";
    local($makefile) = "$srcdir/Makefile";
    if( !(-e $makefile) ) {
        exit(-1);
    }    

    open(MAKE,$makefile);
    # We only need the first three lines
    $i = 0;
    local($line);
    while( ($line = <MAKE>) && ($i++ < 4) ) {
    # Grab the name value pairs by splitting line by =
        (local($name), local($value)) = split(/=/, $line, 2);
    # RegExp: Remove whitespace from value
        $_ = $value;
        s/^\s*(.*)\s*$/\1/;
    # Add . between version & level, and level & sublevel
        $version .= $1;
        if( ($i==1) || ($i==2) ) {
            $version .= ".";
        }
    }
    close(MAKE);
}



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

* Re: system.map
  2002-01-02 20:54   ` system.map Keith Owens
@ 2002-01-02 21:13     ` Timothy Covell
  2002-01-02 23:01       ` system.map skidley
  2002-01-02 21:17     ` system.map Albert D. Cahalan
  1 sibling, 1 reply; 43+ messages in thread
From: Timothy Covell @ 2002-01-02 21:13 UTC (permalink / raw)
  To: Keith Owens, timothy.covell; +Cc: adrian kok, linux-kernel

On Wednesday 02 January 2002 14:54, Keith Owens wrote:
> On Wed, 2 Jan 2002 13:26:29 -0600,
>
> Timothy Covell <timothy.covell@ashavan.org> wrote:
> >	Of course, you can copy over the new System.map
> >file to /boot,  but their is no (easy) way of having more than
> >one active version via "lilo" or "grub".   And that could be
> >considered a deficiency of the Linux OS.
>
> Current versions of ps look for System.map in
>
>       $PS_SYSTEM_MAP
>       /boot/System.map-`uname -r`
>       /boot/System.map
>       /lib/modules/`uname -r`/System.map
>       /usr/src/linux/System.map
>       /System.map
>
> Copy System.map to /lib/modules/`uname -r`/System.map after make
> modules_install, remove any old map files from /boot and / and you
> don't need any symlink or bootloader tricks.

I saw that in the man page for "ps".  I think that your idea makes sense.

However, I'm concerned about searching in "/usr/src/linux" for it.
Linus has taken great pains to point out that we shouldn't be building
our kernels in /usr/src/linux, it would seem that this is reenforcing a
mistake.


>
> The 2.5 kernel build asks if you want to install System.map and
> .config.  If you say yes then the default location for these files in
> 2.5 is /lib/modules/`uname -r`/{System.map,.config}.


I knew that I was trying to download the 2.5.x series for a good reason. ;-)
My bandwidth hasn't let me get one full download yet, but I've got
all the 2.4.x patches that I could need.

-- 
timothy.covell@ashavan.org.

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

* Re: system.map
  2002-01-02 20:45         ` system.map Timothy Covell
@ 2002-01-02 21:10           ` Alan Cox
  0 siblings, 0 replies; 43+ messages in thread
From: Alan Cox @ 2002-01-02 21:10 UTC (permalink / raw)
  To: timothy.covell; +Cc: Tony Hoyle, adrian kok, linux-kernel

> So, I guess that RedHat 7.2 must be an insane distribution:
> 
> make install
> + exec /sbin/installkernel 2.4.17 bzImage 
> /home/kernel/linux-2.4.17/System.map ''
> /etc/lilo.conf: No such file or directory
> make[1]: *** [install] Error 1

Thats a bug. Please report it to https://bugzilla.redhat.com/bugzilla if its
not already there

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

* Re: system.map
  2002-01-02 19:26 ` system.map Timothy Covell
  2002-01-02 19:39   ` system.map Tony Hoyle
  2002-01-02 19:51   ` system.map Horst von Brand
@ 2002-01-02 20:54   ` Keith Owens
  2002-01-02 21:13     ` system.map Timothy Covell
  2002-01-02 21:17     ` system.map Albert D. Cahalan
  2 siblings, 2 replies; 43+ messages in thread
From: Keith Owens @ 2002-01-02 20:54 UTC (permalink / raw)
  To: timothy.covell; +Cc: adrian kok, linux-kernel

On Wed, 2 Jan 2002 13:26:29 -0600, 
Timothy Covell <timothy.covell@ashavan.org> wrote:
>	Of course, you can copy over the new System.map
>file to /boot,  but their is no (easy) way of having more than
>one active version via "lilo" or "grub".   And that could be 
>considered a deficiency of the Linux OS.

Current versions of ps look for System.map in

      $PS_SYSTEM_MAP
      /boot/System.map-`uname -r`
      /boot/System.map
      /lib/modules/`uname -r`/System.map
      /usr/src/linux/System.map
      /System.map

Copy System.map to /lib/modules/`uname -r`/System.map after make
modules_install, remove any old map files from /boot and / and you
don't need any symlink or bootloader tricks.

The 2.5 kernel build asks if you want to install System.map and
.config.  If you say yes then the default location for these files in
2.5 is /lib/modules/`uname -r`/{System.map,.config}.


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

* Re: system.map
  2002-01-02 20:25       ` system.map Tony Hoyle
@ 2002-01-02 20:45         ` Timothy Covell
  2002-01-02 21:10           ` system.map Alan Cox
  0 siblings, 1 reply; 43+ messages in thread
From: Timothy Covell @ 2002-01-02 20:45 UTC (permalink / raw)
  To: Tony Hoyle, timothy.covell; +Cc: adrian kok, linux-kernel

On Wednesday 02 January 2002 14:25, Tony Hoyle wrote:
> Timothy Covell wrote:
> > Not on grub.  I quote:
>
> It works fine on grub.  I use grub.
>
> make install is completely installation agnostic.  It just calls
> /sbin/installkernel with the paths of the various files.  On any sane
> distribution this will work.  If it doesn't it's only a shell script
> with a few symlink & copy commands in it... just write your own.
>
> Tony

So, I guess that RedHat 7.2 must be an insane distribution:

make install
[snip]
System is 1308 kB
warning: kernel is too big for standalone boot from floppy
sh -x ./install.sh 2.4.17 bzImage /home/kernel/linux-2.4.17/System.map ""
+ '[' -x /root/bin/installkernel ']'
+ '[' -x /sbin/installkernel ']'
+ exec /sbin/installkernel 2.4.17 bzImage 
/home/kernel/linux-2.4.17/System.map ''
/etc/lilo.conf: No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/kernel/linux-2.4.17/arch/i386/boot'
make: *** [install] Error 2


-- 
timothy.covell@ashavan.org.

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

* Re: system.map
  2002-01-02 20:19       ` system.map Kilobug
@ 2002-01-02 20:35         ` Timothy Covell
  2002-01-02 21:14           ` system.map Eric S. Johnson
  2002-01-03  9:43           ` system.map Miquel van Smoorenburg
  0 siblings, 2 replies; 43+ messages in thread
From: Timothy Covell @ 2002-01-02 20:35 UTC (permalink / raw)
  To: Kilobug, timothy.covell; +Cc: linux-kernel

On Wednesday 02 January 2002 14:19, Kilobug wrote:
> > 5. sync;sync;shutdown -r now
>
> Is there any particular reason for this double sync ? One isn't enough ?
> (And is sync even needed with shutdown, all should be synced when
> filesystems are unmounted or remounted read-only, am I wrong ? )

The double sync is tradition.  SysV init scripts should sync things,
but "sync;sync;reboot" or "sync;sync;halt" are not so nice in how
they go down; so it's a case of being extra careful.  I don't use
linux all the time, and some of the other unices are less tolerant.
(For example, on a sun box, I would prefer a double sync before I
"<stop>-a".)

-- 
timothy.covell@ashavan.org.

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

* Re: system.map
  2002-01-02 20:03     ` system.map Timothy Covell
  2002-01-02 20:19       ` system.map Kilobug
@ 2002-01-02 20:25       ` Tony Hoyle
  2002-01-02 20:45         ` system.map Timothy Covell
  2002-01-02 23:07       ` system.map Nicholas Harring
  2 siblings, 1 reply; 43+ messages in thread
From: Tony Hoyle @ 2002-01-02 20:25 UTC (permalink / raw)
  To: timothy.covell; +Cc: adrian kok, linux-kernel

Timothy Covell wrote:


> Not on grub.  I quote:


It works fine on grub.  I use grub.

make install is completely installation agnostic.  It just calls 
/sbin/installkernel with the paths of the various files.  On any sane 
distribution this will work.  If it doesn't it's only a shell script 
with a few symlink & copy commands in it... just write your own.

Tony


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

* Re: system.map
  2002-01-02 20:03     ` system.map Timothy Covell
@ 2002-01-02 20:19       ` Kilobug
  2002-01-02 20:35         ` system.map Timothy Covell
  2002-01-02 20:25       ` system.map Tony Hoyle
  2002-01-02 23:07       ` system.map Nicholas Harring
  2 siblings, 1 reply; 43+ messages in thread
From: Kilobug @ 2002-01-02 20:19 UTC (permalink / raw)
  To: timothy.covell; +Cc: linux-kernel


> 5. sync;sync;shutdown -r now

Is there any particular reason for this double sync ? One isn't enough ?
(And is sync even needed with shutdown, all should be synced when 
filesystems are unmounted or remounted read-only, am I wrong ? )

-- 
** Gael Le Mignot "Kilobug", Ing3 EPITA - http://kilobug.free.fr **
Home Mail   : kilobug@freesurf.fr          Work Mail : le-mig_g@epita.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

"Software is like sex it's better when it's free.", Linus Torvalds


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

* Re: system.map
  2002-01-02 19:39   ` system.map Tony Hoyle
@ 2002-01-02 20:03     ` Timothy Covell
  2002-01-02 20:19       ` system.map Kilobug
                         ` (2 more replies)
  2002-01-03  2:14     ` system.map Daniel Phillips
  1 sibling, 3 replies; 43+ messages in thread
From: Timothy Covell @ 2002-01-02 20:03 UTC (permalink / raw)
  To: Tony Hoyle, timothy.covell; +Cc: adrian kok, linux-kernel

On Wednesday 02 January 2002 13:39, Tony Hoyle wrote:
> Timothy Covell wrote:
> > 	Of course, you can copy over the new System.map
> > file to /boot,  but their is no (easy) way of having more than
> > one active version via "lilo" or "grub".   And that could be
> > considered a deficiency of the Linux OS.
>
> ????  Just call it System.map-2.2.17, System.map-2.5.1, etc.  Sounds
> pretty 'easy' to me.
>
> 'make install' does all this for you, btw.
>
> Tony

Not on grub.  I quote:
	It is also possible to do "make install" if you have lilo 
	installed to suit the kernel makefiles,
  	but you may want to check your particular lilo setup first.

But, on my grub based system, I have to:

1.  "make bzlilo"  which creates vmlinuz and System.map 
and puts them in / and not in /boot.  (make bzlilo is easier to use
than bzimage)

2. cp /vmlinuz /boot/vmlinuz-x.y.x  ;  cp /System.map /boot/System.map-x.y.z

3. rm /boot/System.map ; ln -s /boot/System.map-x.y.z /boot/System.map

4. vi /boot/grub.conf (or /etc/grub.conf) and put in new kernel boot entry.

5. sync;sync;shutdown -r now


-- 
timothy.covell@ashavan.org.

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

* Re: system.map
  2002-01-02 19:26 ` system.map Timothy Covell
  2002-01-02 19:39   ` system.map Tony Hoyle
@ 2002-01-02 19:51   ` Horst von Brand
  2002-01-02 20:54   ` system.map Keith Owens
  2 siblings, 0 replies; 43+ messages in thread
From: Horst von Brand @ 2002-01-02 19:51 UTC (permalink / raw)
  To: timothy.covell; +Cc: linux-kernel

Timothy Covell <timothy.covell@ashavan.org> said:

[...]

> 	Of course, you can copy over the new System.map
> file to /boot,  but their is no (easy) way of having more than
> one active version via "lilo" or "grub".   And that could be 
> considered a deficiency of the Linux OS.

For kernel 2.4.18pre1 call it /boot/System.map-2.4.18pre1. Everything gets
sorted out if your initscripts symlink that to /boot/System.map (uname(1)
gives you the version of the running kernel).
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

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

* Re: system.map
  2002-01-02 19:26 ` system.map Timothy Covell
@ 2002-01-02 19:39   ` Tony Hoyle
  2002-01-02 20:03     ` system.map Timothy Covell
  2002-01-03  2:14     ` system.map Daniel Phillips
  2002-01-02 19:51   ` system.map Horst von Brand
  2002-01-02 20:54   ` system.map Keith Owens
  2 siblings, 2 replies; 43+ messages in thread
From: Tony Hoyle @ 2002-01-02 19:39 UTC (permalink / raw)
  To: timothy.covell; +Cc: adrian kok, linux-kernel

Timothy Covell wrote:


> 	Of course, you can copy over the new System.map
> file to /boot,  but their is no (easy) way of having more than
> one active version via "lilo" or "grub".   And that could be 
> considered a deficiency of the Linux OS.
>

????  Just call it System.map-2.2.17, System.map-2.5.1, etc.  Sounds
pretty 'easy' to me.

'make install' does all this for you, btw.

Tony

 

-
"Wipe Info uses hexadecimal values to wipe files. This provides more 
security than wiping with decimal values." -- Norton SystemWorks 2002 Manual

tmh@nothing-on.tv 
http://www.nothing-on.tv


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

* Re: system.map
  2002-01-02 19:11 system.map adrian kok
  2002-01-02 19:26 ` system.map Timothy Covell
@ 2002-01-02 19:30 ` Sebastian Roth
  2002-01-02 21:25   ` system.map Lionel Bouton
  1 sibling, 1 reply; 43+ messages in thread
From: Sebastian Roth @ 2002-01-02 19:30 UTC (permalink / raw)
  To: adrian kok, linux-kernel

> Hi all

hello,

> Why sometimes I don't need to copy the system.map to
> /boot when I update the kernel
> and the system also can boot?

> Is it correct?

yes, this is correct. I think this System.map contains only some useful 
information about modules for the kernel. At my system works that too. But I 
think it's better when you copy this file to /boot. :-)

> Thank you


Bye,
Sebastian

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

* Re: system.map
  2002-01-02 19:11 system.map adrian kok
@ 2002-01-02 19:26 ` Timothy Covell
  2002-01-02 19:39   ` system.map Tony Hoyle
                     ` (2 more replies)
  2002-01-02 19:30 ` system.map Sebastian Roth
  1 sibling, 3 replies; 43+ messages in thread
From: Timothy Covell @ 2002-01-02 19:26 UTC (permalink / raw)
  To: adrian kok, linux-kernel

On Wednesday 02 January 2002 13:11, adrian kok wrote:
> Hi all
>
> Why sometimes I don't need to copy the system.map to
> /boot when I update the kernel
> and the system also can boot?
>
> Is it correct?
>
> Thank you
>
>
System.map is not required for everyday use of the OS.
It contains symbols which are useful for debugging and
such.   In normal usage, you can ignore the warnings which
as spit out by "ps", and others (?).  

	Of course, you can copy over the new System.map
file to /boot,  but their is no (easy) way of having more than
one active version via "lilo" or "grub".   And that could be 
considered a deficiency of the Linux OS.


-- 
timothy.covell@ashavan.org.

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

* system.map
@ 2002-01-02 19:11 adrian kok
  2002-01-02 19:26 ` system.map Timothy Covell
  2002-01-02 19:30 ` system.map Sebastian Roth
  0 siblings, 2 replies; 43+ messages in thread
From: adrian kok @ 2002-01-02 19:11 UTC (permalink / raw)
  To: linux-kernel

Hi all

Why sometimes I don't need to copy the system.map to
/boot when I update the kernel
and the system also can boot?

Is it correct?

Thank you

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk

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

end of thread, other threads:[~2007-10-14 18:46 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-06 17:34 System.map Anoop T
2004-12-07 11:43 ` System.map Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2007-10-14 17:07 System.map Philip
2007-10-14 18:45 ` System.map Jan Engelhardt
2005-07-12 16:34 system.map vacant2005
2005-07-13 10:21 ` system.map Jan Engelhardt
     [not found]   ` <200507131244.08336.vacant2005@o2.pl>
2005-07-13 10:45     ` system.map Jacek Jabłoński
2005-07-13 10:56   ` system.map Arjan van de Ven
2005-07-13 11:04     ` system.map Jan Engelhardt
2005-07-13 11:27       ` system.map Russell King
2005-07-13 11:33       ` system.map Arjan van de Ven
     [not found] <fa.ephh22v.1ljqarg@ifi.uio.no>
     [not found] ` <fa.hmqrtsv.13jqup8@ifi.uio.no>
2002-01-02 21:14   ` system.map John Weber
2002-01-02 21:42     ` system.map Keith Owens
2002-01-02 19:11 system.map adrian kok
2002-01-02 19:26 ` system.map Timothy Covell
2002-01-02 19:39   ` system.map Tony Hoyle
2002-01-02 20:03     ` system.map Timothy Covell
2002-01-02 20:19       ` system.map Kilobug
2002-01-02 20:35         ` system.map Timothy Covell
2002-01-02 21:14           ` system.map Eric S. Johnson
2002-01-03  9:43           ` system.map Miquel van Smoorenburg
2002-01-02 20:25       ` system.map Tony Hoyle
2002-01-02 20:45         ` system.map Timothy Covell
2002-01-02 21:10           ` system.map Alan Cox
2002-01-02 23:07       ` system.map Nicholas Harring
2002-01-03  2:14     ` system.map Daniel Phillips
2002-01-03 15:54       ` system.map Albert D. Cahalan
2002-01-02 19:51   ` system.map Horst von Brand
2002-01-02 20:54   ` system.map Keith Owens
2002-01-02 21:13     ` system.map Timothy Covell
2002-01-02 23:01       ` system.map skidley
2002-01-02 23:14         ` system.map Timothy Covell
2002-01-02 21:17     ` system.map Albert D. Cahalan
2002-01-02 21:31       ` system.map Keith Owens
2002-01-02 22:09         ` system.map Nicholas Knight
2002-03-09  0:21           ` system.map H. Peter Anvin
2002-01-02 22:23         ` system.map Albert D. Cahalan
2002-01-02 23:38           ` system.map Marcel J.E. Mol
2002-01-02 19:30 ` system.map Sebastian Roth
2002-01-02 21:25   ` system.map Lionel Bouton
2002-01-02 22:15     ` system.map David Golden
2002-01-02 22:21       ` system.map Nick LeRoy
2002-01-02 22:29       ` system.map Lionel Bouton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).