linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: How to check the kernel compile options ?
@ 2002-02-05 23:56 Andries.Brouwer
  2002-02-06  0:14 ` Ian S. Nelson
                   ` (3 more replies)
  0 siblings, 4 replies; 118+ messages in thread
From: Andries.Brouwer @ 2002-02-05 23:56 UTC (permalink / raw)
  To: hpa; +Cc: linux-kernel

    > I would be surprised if there is anyone on this list
    > who has not lost at some point either the .config, the
    > ksyms, or something similar associated with at least
    > one build they've made.

    Sure.  And people have lost their root filesystems due to "rm -rf /".
    That doesn't mean we build the entire (real) root filesystem into
    the kernel.

	-hpa

Peter, in my eyes this is an unreasonable answer.

For debugging and other purposes it is good to have some
information. One may wish to know about a certain kernel image
what Linux kernel version that was, with what patches, compiled
with what options, by which compiler. Or one may want to know
such things about the currently running kernel. Even user-space
programs (like mount) may want to know (what NFS version? do we
have CONFIG_JOLIET?).

Today we supply a little of this information.
For example, /proc/version supplies information on version
and compiler and date. Why? One might as well keep this compiler
info in a separate file. What a waste of unswappable kernel memory!

You see - this is not a matter of absolutes.
In the good old days, when an operating system had to fit in 4k
and a device driver in 128 words, putting a 100-char text like
the one found in /proc/version into the system would be ridiculous.
Today nobody worries about a hundred bytes paid for some useful info.

So, the question is: how useful is the information, and how expensive
is it to store it. Consider the config options. How much space do they
take? Typically 1-5 kB (compressed). If this is stored at the end of
a kernel image file, and not loaded into memory, then the kernel memory
cost is zero. If this is made part of the kernel itself, say accessible
via /proc, then the cost is 1-5 kB.

So, you should ponder whether it is worthwhile to pay this cost of zero,
and ponder whether it is worthwhile to pay this cost of 5 kB.

Andries

^ permalink raw reply	[flat|nested] 118+ messages in thread
[parent not found: <0C01A29FBAE24448A792F5C68F5EA47D217218@nasdaq.ms.ensim.com>]
* Re: How to check the kernel compile options ?
@ 2002-02-06  4:55 Rick A. Hohensee
  0 siblings, 0 replies; 118+ messages in thread
From: Rick A. Hohensee @ 2002-02-06  4:55 UTC (permalink / raw)
  To: linux-kernel

The following is my original post on "make appendage" and some other
goodies you'll find in cLIeNUX, assuming you can find cLIeNUX. Perhaps it
would have recieved more play at the time if the subject line had been 

make state relink Linux appendage

The real reason I repeat posts like this though is I look at them later
and *I* can't readily see what I'm talking about. Oops.

make state   snags the state of the shell and make environment for the
build. You need a hook in the makefile to get it.

Make relink   allows a quick rebuild after one small source file edit
somewhere by zapping all the per-dir lib.o's and other rebuild snaggers.

make Linux   saves newbies (We are all newbies) from having the
arch/bla/compressed/actual.img    "learning" experience and not trying to
boot vmlinuz.

make appendage   is the part that this thread resembles.

Other cLIeNUXisms are the 2-line Bash prompt, here in tawdry monochrome, 
and the DISTRO shell variable.


            make state ; make relink ; make Linux ; make appendage

   From: Rick Hohensee ([1]humbubba@smarty.smart.net)
   Date: Mon Apr 10 2000 - 01:00:10 EST

     * Next message: [2]Web Administrator: "Re: /proc/net/dev reporting
       on virtual interfaces"
     * Previous message: [3]Eric W. Biederman: "Re: Suggested dual
       human/binary interface for proc/devfs"
     * Messages sorted by: [4][ date ] [5][ thread ] [6][ subject ] [7][
       author ]
     _________________________________________________________________

   cd linux

   The next 2 lines are an occurance of my Bash prompt...
   :; cLIeNUX0 /dev/tty4 r 20:08:30 /source/core/KERNEL/linux
   :;<cursor here>

   step-wise demo. Elapsed times per $PS1 are not quite realistic.
   ..................................................................
   :; cLIeNUX0 /dev/tty4 r 20:08:30 /source/core/KERNEL/linux
   :;make state
   set > .make_state
   :; cLIeNUX0 /dev/tty4 r 20:10:39 /source/core/KERNEL/linux
   :;cat .make_state
   AR=ar
   ARCH=i386
   AS=as
   AWKPATH=/source/script/awk
   BASH=/.bi/sh
   BASH_VERSINFO=([0]="2" [1]="02" [2]="0" [3]="1" [4]="release"
   [5]="i4<snip>
   BASH_VERSION='2.02.0(1)-release'
   CC='gcc -D__KERNEL__ -I/source/core/KERNEL/linux/include'
   CFLAGS='-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe
   -fno-s<snip>
   CFLAGS_NSR=-fno-strength-reduce
   CFLAGS_PIPE=-pipe
   COMPILER_PATH='~:/.roo/command:/.bi:/.sbi:/.bi/unix/:.:/.bi/background
   /C/'
   CONFIG_1GB=y
   CONFIG_M386=y
   CONFIG_SHELL=/.bi/sh
   CORE_FILES='arch/i386/kernel/kernel.o arch/i386/mm/mm.o
   kernel/kerne<snip>
   fs/fs.o ipc/ipc.o'
   CPP='gcc -D__KERNEL__ -I/source/core/KERNEL/linux/include -E'
   CROSS_COMPILE=
   C_INCLUDE_PATH=/.bi/background/C/include:/source/C/include/:/suit<snip
   >
   DIRSTACK=()
   DISTRO=cLIeNUX
   <snip>

   :; cLIeNUX0 /dev/tty4 r 20:10:39 /source/core/KERNEL/linux
   :;make relink

   rm -v /source/core/KERNEL/linux/arch/i386/boot/bzImage
   /source/core/KERNEL/linux/arch/i386/boot/zImage
   /source/core/KERNEL/linux/vmlinux
   /source/core/KERNEL/linux/arch/i386/boot/compressed/bvmlinux
   /source/core/KERNEL/linux/arch/i386/boot/compressed/bvmlinux.out
   /source/core/KERNEL/linux/arch/i386/boot/compressed/piggy.o
   /source/core/KERNEL/linux/Linux arch/i386/kernel/kernel.o
   arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
   fs/filesystems.a net/network.a \
           drivers/block/block.a drivers/char/char.a drivers/misc/misc.a
   drivers/net/net.a /source/core/KERNEL/linux/arch/i386/lib/lib.a
   /source/core/KERNEL/linux/lib/lib.a
   /source/core/KERNEL/linux/arch/i386/lib/lib.a
   /source/core/KERNEL/linux/arch/i386/boot/bzImage
   /source/core/KERNEL/linux/arch/i386/boot/zImage
   /source/core/KERNEL/linux/vmlinux
   /source/core/KERNEL/linux/arch/i386/boot/compressed/bvmlinux
   /source/core/KERNEL/linux/arch/i386/boot/compressed/bvmlinux.out
   /source/core/KERNEL/linux/arch/i386/boot/compressed/piggy.o
   /source/core/KERNEL/linux/Linux
   rm: /source/core/KERNEL/linux/arch/i386/boot/bzImage: No such file or
   directory
   rm: /source/core/KERNEL/linux/arch/i386/boot/zImage: No such file or
   directory
   /source/core/KERNEL/linux/vmlinux
   /source/core/KERNEL/linux/arch/i386/boot/compressed/bvmlinux
   /source/core/KERNEL/linux/arch/i386/boot/compressed/bvmlinux.out
   /source/core/KERNEL/linux/arch/i386/boot/compressed/piggy.o
   /source/core/KERNEL/linux/Linux
   arch/i386/kernel/kernel.o
   arch/i386/mm/mm.o
   kernel/kernel.o
   mm/mm.o
   fs/fs.o
   ipc/ipc.o
   fs/filesystems.a
   net/network.a
   drivers/block/block.a
   drivers/char/char.a
   drivers/misc/misc.a
   drivers/net/net.a
   /source/core/KERNEL/linux/arch/i386/lib/lib.a
   /source/core/KERNEL/linux/lib/lib.a
   make: [relink] Error 1 (ignored)
   :; cLIeNUX0 /dev/tty4 r 20:10:39 /source/core/KERNEL/linux
   :;make Linux
   make -C kernel
   make[1]: Entering directory `/source/core/KERNEL/linux/kernel'
   make all_targets
   make[2]: Entering directory `/source/core/KERNEL/linux/kernel'
   rm -f kernel.o
   ld -m elf_i386 -r -o kernel.o signal.o sched.o dma.o fork.o exe<snip>
   make[2]: Leaving directory `/source/core/KERNEL/linux/kernel'
   make[1]: Leaving directory `/source/core/KERNEL/linux/kernel'
   make -C drivers
   make[1]: Entering directory `/source/core/KERNEL/linux/drivers'
   make -C block
   make[2]: Entering directory `/source/core/KERNEL/linux/drivers/block'
   make all_targets
   make[3]: Entering directory `/source/core/KERNEL/linux/drivers/block'
   rm -f block.a
   ar rcs block.a ll_rw_blk.o genhd.o
   make[3]: Leaving directory `/source/core/KERNEL/linux/drivers/block'

   < ... much more re-linking and no actual compiling snipped...>

   Root device is (8, 1)
   Boot sector 512 bytes.
   Setup is 1288 bytes.
   System is 154 kB
   make[1]: Leaving directory `/source/core/KERNEL/linux/arch/i386/boot'
   mv /source/core/KERNEL/linux/arch/i386/boot/bzImage
   /source/core/<snip>
   :; cLIeNUX0 /dev/tty4 r 20:20:19 /source/core/KERNEL/linux
   :;make appendage
   set > .make_state
   echo -e "\n\nCONFIG_>> .config appendage..." >> /source/c
   grep -v "^#" /source/core/KERNEL/linux/.config >> /source/core/K<snip>
   echo -e "\nCONFIG_>> .make_state appendage..." >>
   /source/core/KERNE<snip>
   cat /source/core/KERNEL/linux/.make_state >>
   /source/core/KERNEL/linux/Linux
   :; cLIeNUX0 /dev/tty4 r 20:22:09 /source/core/KERNEL/linux
   :;grep CONFIG Linux
   Binary file Linux matches
   :; cLIeNUX0 /dev/tty4 r 20:22:25 /source/core/KERNEL/linux
   :;grep -a CONFIG Linux
   CONFIG_>> .config appendage...
   CONFIG_M386=y
   CONFIG_1GB=y
   CONFIG_>> .make_state appendage...
   CONFIG_1GB=y
   CONFIG_M386=y
   CONFIG_SHELL=/.bi/sh
   :; cLIeNUX0 /dev/tty4 r 20:22:32 /source/core/KERNEL/linux
   :;
   ....................................................................

   caused by...
           in linux/Makefile...
                   ..................................................
   relink:
           -rm -v $(IMAGES) $(CORE_FILES) $(FILESYSTEMS) $(NETWORKS) \
                   $(DRIVERS) $(LIBS)

   state:
           set > .make_state

   ................................................................
           In linux/arch/i386/Makefile...

                   ................................................

   IMAGES =$(TOPDIR)/arch/$(ARCH)/boot/bzImage \
                    $(TOPDIR)/arch/$(ARCH)/boot/zImage \
                    $(TOPDIR)/vmlinux \
                    $(TOPDIR)/arch/$(ARCH)/boot/compressed/bvmlinux \
                    $(TOPDIR)/arch/$(ARCH)/boot/compressed/bvmlinux.out \
                    $(TOPDIR)/arch/$(ARCH)/boot/compressed/piggy.o \
                    $(TOPDIR)/Linux

   Linux: bzImage
           mv $(TOPDIR)/arch/$(ARCH)/boot/bzImage $(TOPDIR)/Linux

   append appendage: state
           -echo -e "\n\nCONFIG_>> .config appendage..." >>
   $(TOPDIR)/Linux
           -grep -v "^#" $(TOPDIR)/.config >> $(TOPDIR)/Linux
           -echo -e "\nCONFIG_>> .make_state appendage..." >>
   $(TOPDIR)/Linux
           -cat $(TOPDIR)/.make_state >> $(TOPDIR)/Linux

   ......................................................................
   .

   I wasn't going to bother with make targets for these, not being real
   fond
   of make anyway, until I saw that the variables in the relink: target
   except for IMAGES already exist.

                           Cordially,

                                   Rick Hohensee

r


^ permalink raw reply	[flat|nested] 118+ messages in thread
[parent not found: <fa.c5n369v.1a10827@ifi.uio.no>]
* How to check the kernel compile options ?
@ 2002-02-04 16:01 David Balazic
  2002-02-04 16:54 ` Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 118+ messages in thread
From: David Balazic @ 2002-02-04 16:01 UTC (permalink / raw)
  To: linux-kernel

Hi!

This problem again :-)

I purchase/download a program for linux.
It says it requires certain kernel features, for example :
CONFIG_PROC_FS,CONFIG_NET,CONFIG_INET

How can I figure out in 5 minutes, without a kernel hacker, if
my linux system has the correct settings ?

This is a real life question, probably more suitable to ask
on some distributions mail list, but I thought I'll start here.

TIA,
david

P.S.: Please CC me on the answers.

-- 
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

^ permalink raw reply	[flat|nested] 118+ messages in thread
* How to check the kernel compile options ?
@ 2002-02-04 16:01 David Balazic
  2002-02-04 21:47 ` Matti Aarnio
  0 siblings, 1 reply; 118+ messages in thread
From: David Balazic @ 2002-02-04 16:01 UTC (permalink / raw)
  To: linux-kernel

Hi!

This problem again :-)

I purchase/download a program for linux.
It says it requires certain kernel features, for example :
CONFIG_PROC_FS,CONFIG_NET,CONFIG_INET

How can I figure out in 5 minutes, without a kernel hacker, if
my linux system has the correct settings ?

This is a real life question, probably more suitable to ask
on some distributions mail list, but I thought I'll start here.

TIA,
david

-- 
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

end of thread, other threads:[~2002-03-01 21:08 UTC | newest]

Thread overview: 118+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-05 23:56 How to check the kernel compile options ? Andries.Brouwer
2002-02-06  0:14 ` Ian S. Nelson
2002-02-06  0:19 ` H. Peter Anvin
2002-02-06  0:20 ` Alan Cox
2002-02-06 10:36   ` Christoph Rohland
2002-02-06 14:16     ` Alan Cox
2002-02-06 15:31       ` Christoph Rohland
2002-02-06 22:13         ` Alex Bligh - linux-kernel
2002-02-06 15:59       ` Randy.Dunlap
2002-02-06 16:32         ` Padraig Brady
2002-02-09 18:15         ` Bill Davidsen
2002-02-11  0:29           ` Daniel Phillips
2002-02-11 19:05             ` Bill Davidsen
2002-02-11 21:17               ` Alex Bligh - linux-kernel
2002-02-12  0:32               ` Daniel Phillips
2002-02-12 16:38                 ` Bill Davidsen
2002-02-12 17:23                   ` Daniel Phillips
2002-02-12 17:26                     ` Padraig Brady
2002-02-12 18:32                       ` Bill Davidsen
2002-02-12 21:06                         ` Andreas Dilger
2002-02-12 22:10                           ` Ville Herva
2002-02-12 22:33                             ` Andreas Dilger
2002-02-13  0:49                           ` Randy.Dunlap
2002-02-13  2:35                             ` Andreas Dilger
2002-02-13 15:37                             ` [lkml] " Ian Soboroff
2002-02-12 18:26                     ` Bill Davidsen
2002-02-13 14:19                     ` Horst von Brand
2002-02-13 15:58                       ` Daniel Phillips
2002-02-13 23:00                         ` Bill Davidsen
2002-02-13 16:25                       ` Richard B. Johnson
2002-02-13 18:09                         ` Randy.Dunlap
2002-02-13 18:26                           ` Daniel Phillips
2002-02-13 18:27                           ` Richard B. Johnson
2002-02-13 18:35                             ` Daniel Phillips
2002-02-13 18:40                           ` Randy.Dunlap
2002-02-13 21:51                         ` Bill Davidsen
2002-02-13 22:02                           ` Richard B. Johnson
2002-02-13 23:08                             ` Bill Davidsen
2002-02-13 23:21                               ` Ben Greear
2002-02-13 23:39                                 ` Andreas Dilger
2002-02-13 22:17                           ` Ben Greear
2002-02-13 23:13                             ` Bill Davidsen
2002-02-14 16:48                               ` Randy.Dunlap
2002-02-15 22:51                                 ` Andreas Dilger
2002-02-15 23:04                                   ` Randy.Dunlap
2002-02-16  1:10                                     ` Randy.Dunlap
2002-02-19 11:14                                       ` Andreas Dilger
2002-02-16  0:58                                   ` Andreas Ferber
2002-02-22 19:56                                     ` Randy.Dunlap
2002-02-23  7:02                                       ` Andreas Ferber
2002-02-26  6:30                                         ` Andreas Ferber
2002-03-01 21:01                                           ` Randy.Dunlap
2002-02-14  1:02                           ` Daniel Phillips
2002-02-17 12:11                             ` Bill Davidsen
2002-02-12 17:35                   ` Chris Friesen
2002-02-11 18:37           ` Randy.Dunlap
2002-02-11 19:26             ` Bill Davidsen
2002-02-06 16:26       ` Ville Herva
2002-02-06 17:26         ` Thomas Capricelli
2002-02-06 18:16       ` David Relson
2002-02-07  7:56         ` Ville Herva
2002-02-07  9:12           ` Thomas Capricelli
2002-02-07 12:22             ` Ville Herva
2002-02-07 21:11           ` Horst von Brand
2002-02-08  8:25             ` Ville Herva
2002-02-07  8:52       ` Horst von Brand
2002-02-06 11:29 ` Marco Colombo
2002-02-06 13:26   ` Horst von Brand
     [not found] <0C01A29FBAE24448A792F5C68F5EA47D217218@nasdaq.ms.ensim.com>
2002-02-12 21:26 ` Paul Menage
  -- strict thread matches above, loose matches on Subject: below --
2002-02-06  4:55 Rick A. Hohensee
     [not found] <fa.c5n369v.1a10827@ifi.uio.no>
2002-02-04 16:21 ` Giacomo Catenazzi
2002-02-04 16:01 David Balazic
2002-02-04 16:54 ` Alan Cox
2002-02-04 17:02   ` David Balazic
2002-02-04 17:23     ` Alan Cox
2002-02-04 17:12       ` David Balazic
2002-02-04 17:16         ` Allan Sandfeld
2002-02-04 18:05           ` Daniel Phillips
2002-02-04 18:14             ` Arjan van de Ven
2002-02-04 18:24               ` Ben Greear
2002-02-04 18:24               ` Daniel Phillips
2002-02-04 22:11                 ` H. Peter Anvin
2002-02-04 23:46                   ` Daniel Phillips
2002-02-04 23:34               ` J.A. Magallon
2002-02-04 18:09     ` Samuli Suonpaa
2002-02-04 17:34 ` Thomas Capricelli
2002-02-04 17:50 ` David Relson
2002-02-04 18:22   ` H. Peter Anvin
2002-02-05 22:02     ` Alex Bligh - linux-kernel
2002-02-05 22:13       ` H. Peter Anvin
2002-02-06  9:15         ` Daniel Phillips
2002-02-07  4:13           ` Mike Touloumtzis
2002-02-07  9:32             ` Marco Colombo
2002-02-07 13:18             ` Daniel Phillips
2002-02-07 18:26               ` Mike Touloumtzis
2002-02-07 19:19                 ` Daniel Phillips
2002-02-07 20:34                   ` Mike Touloumtzis
2002-02-07 20:54                     ` Daniel Phillips
2002-02-07 21:08                       ` Mike Touloumtzis
2002-02-07 21:33                         ` Daniel Phillips
2002-02-07 23:58                         ` John Alvord
2002-02-09 21:59                         ` Alex Bligh - linux-kernel
2002-02-07 21:08                     ` Daniel Phillips
2002-02-07 21:41                       ` Mike Touloumtzis
2002-02-07 22:09                         ` Daniel Phillips
2002-02-07 22:13                           ` Mike Touloumtzis
2002-02-07 22:27                             ` Daniel Phillips
2002-02-08 20:53                           ` Horst von Brand
2002-02-09 12:22                             ` Daniel Phillips
2002-02-11 16:07                             ` Randy.Dunlap
2002-02-09 21:39                     ` Alex Bligh - linux-kernel
2002-02-06 16:37       ` Bill Davidsen
2002-02-04 18:34   ` David Relson
2002-02-04 21:09     ` Keith Owens
2002-02-05 16:30       ` Thomas Capricelli
2002-02-04 22:12     ` H. Peter Anvin
2002-02-04 16:01 David Balazic
2002-02-04 21:47 ` Matti Aarnio

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).