xref: /linux/README (revision 88f7a642cf0d6bdfa789593ba2b019ca940a3a72)
10466dcbeSJesper Juhl	Linux kernel release 3.x <http://kernel.org/>
21da177e4SLinus Torvalds
30466dcbeSJesper JuhlThese are the release notes for Linux version 3.  Read them carefully,
41da177e4SLinus Torvaldsas they tell you what this is all about, explain how to install the
51da177e4SLinus Torvaldskernel, and what to do if something goes wrong.
61da177e4SLinus Torvalds
71da177e4SLinus TorvaldsWHAT IS LINUX?
81da177e4SLinus Torvalds
94f4e2dc3SXose Vazquez Perez  Linux is a clone of the operating system Unix, written from scratch by
104f4e2dc3SXose Vazquez Perez  Linus Torvalds with assistance from a loosely-knit team of hackers across
114f4e2dc3SXose Vazquez Perez  the Net. It aims towards POSIX and Single UNIX Specification compliance.
121da177e4SLinus Torvalds
134f4e2dc3SXose Vazquez Perez  It has all the features you would expect in a modern fully-fledged Unix,
144f4e2dc3SXose Vazquez Perez  including true multitasking, virtual memory, shared libraries, demand
154f4e2dc3SXose Vazquez Perez  loading, shared copy-on-write executables, proper memory management,
164f4e2dc3SXose Vazquez Perez  and multistack networking including IPv4 and IPv6.
171da177e4SLinus Torvalds
181da177e4SLinus Torvalds  It is distributed under the GNU General Public License - see the
191da177e4SLinus Torvalds  accompanying COPYING file for more details.
201da177e4SLinus Torvalds
211da177e4SLinus TorvaldsON WHAT HARDWARE DOES IT RUN?
221da177e4SLinus Torvalds
234f4e2dc3SXose Vazquez Perez  Although originally developed first for 32-bit x86-based PCs (386 or higher),
244f4e2dc3SXose Vazquez Perez  today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
25620034c8SJesper Juhl  UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
264f4e2dc3SXose Vazquez Perez  IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
27cddb5de0STracey Dent  Xtensa, Tilera TILE, AVR32 and Renesas M32R architectures.
284f4e2dc3SXose Vazquez Perez
294f4e2dc3SXose Vazquez Perez  Linux is easily portable to most general-purpose 32- or 64-bit architectures
304f4e2dc3SXose Vazquez Perez  as long as they have a paged memory management unit (PMMU) and a port of the
314f4e2dc3SXose Vazquez Perez  GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has
324f4e2dc3SXose Vazquez Perez  also been ported to a number of architectures without a PMMU, although
334f4e2dc3SXose Vazquez Perez  functionality is then obviously somewhat limited.
34620034c8SJesper Juhl  Linux has also been ported to itself. You can now run the kernel as a
35620034c8SJesper Juhl  userspace application - this is called UserMode Linux (UML).
361da177e4SLinus Torvalds
371da177e4SLinus TorvaldsDOCUMENTATION:
381da177e4SLinus Torvalds
391da177e4SLinus Torvalds - There is a lot of documentation available both in electronic form on
401da177e4SLinus Torvalds   the Internet and in books, both Linux-specific and pertaining to
411da177e4SLinus Torvalds   general UNIX questions.  I'd recommend looking into the documentation
421da177e4SLinus Torvalds   subdirectories on any Linux FTP site for the LDP (Linux Documentation
431da177e4SLinus Torvalds   Project) books.  This README is not meant to be documentation on the
441da177e4SLinus Torvalds   system: there are much better sources available.
451da177e4SLinus Torvalds
461da177e4SLinus Torvalds - There are various README files in the Documentation/ subdirectory:
471da177e4SLinus Torvalds   these typically contain kernel-specific installation notes for some
481da177e4SLinus Torvalds   drivers for example. See Documentation/00-INDEX for a list of what
491da177e4SLinus Torvalds   is contained in each file.  Please read the Changes file, as it
501da177e4SLinus Torvalds   contains information about the problems, which may result by upgrading
511da177e4SLinus Torvalds   your kernel.
521da177e4SLinus Torvalds
531da177e4SLinus Torvalds - The Documentation/DocBook/ subdirectory contains several guides for
541da177e4SLinus Torvalds   kernel developers and users.  These guides can be rendered in a
552af238e4SRandy Dunlap   number of formats:  PostScript (.ps), PDF, HTML, & man-pages, among others.
562af238e4SRandy Dunlap   After installation, "make psdocs", "make pdfdocs", "make htmldocs",
572af238e4SRandy Dunlap   or "make mandocs" will render the documentation in the requested format.
581da177e4SLinus Torvalds
592af238e4SRandy DunlapINSTALLING the kernel source:
601da177e4SLinus Torvalds
611da177e4SLinus Torvalds - If you install the full sources, put the kernel tarball in a
621da177e4SLinus Torvalds   directory where you have permissions (eg. your home directory) and
631da177e4SLinus Torvalds   unpack it:
641da177e4SLinus Torvalds
650466dcbeSJesper Juhl		gzip -cd linux-3.X.tar.gz | tar xvf -
661da177e4SLinus Torvalds
67b39f72feSHorms   or
68b39f72feSHorms
69*88f7a642SMichael Witten		bzip2 -dc linux-3.X.tar.bz2 | tar xvf -
70b39f72feSHorms
715b4285fbSMichael Witten   Replace "X" with the version number of the latest kernel.
721da177e4SLinus Torvalds
731da177e4SLinus Torvalds   Do NOT use the /usr/src/linux area! This area has a (usually
741da177e4SLinus Torvalds   incomplete) set of kernel headers that are used by the library header
751da177e4SLinus Torvalds   files.  They should match the library, and not get messed up by
761da177e4SLinus Torvalds   whatever the kernel-du-jour happens to be.
771da177e4SLinus Torvalds
780466dcbeSJesper Juhl - You can also upgrade between 3.x releases by patching.  Patches are
792b422383SHåkon Løvdal   distributed in the traditional gzip and the newer bzip2 format.  To
801da177e4SLinus Torvalds   install by patching, get all the newer patch files, enter the
815b4285fbSMichael Witten   top level directory of the kernel source (linux-3.X) and execute:
821da177e4SLinus Torvalds
830466dcbeSJesper Juhl		gzip -cd ../patch-3.x.gz | patch -p1
841da177e4SLinus Torvalds
851da177e4SLinus Torvalds   or
86*88f7a642SMichael Witten
870466dcbeSJesper Juhl		bzip2 -dc ../patch-3.x.bz2 | patch -p1
881da177e4SLinus Torvalds
895b4285fbSMichael Witten   Replace "x" for all versions bigger than the version "X" of your current
905b4285fbSMichael Witten   source tree, _in_order_, and you should be ok.  You may want to remove
915b4285fbSMichael Witten   the backup files (some-file-name~ or some-file-name.orig), and make sure
925b4285fbSMichael Witten   that there are no failed patches (some-file-name# or some-file-name.rej).
93a20e3a79SMichael Witten   If there are, either you or I have made a mistake.
941da177e4SLinus Torvalds
950466dcbeSJesper Juhl   Unlike patches for the 3.x kernels, patches for the 3.x.y kernels
966ad44229SJesper Juhl   (also known as the -stable kernels) are not incremental but instead apply
970466dcbeSJesper Juhl   directly to the base 3.x kernel.  Please read
986ad44229SJesper Juhl   Documentation/applying-patches.txt for more information.
996ad44229SJesper Juhl
1001da177e4SLinus Torvalds   Alternatively, the script patch-kernel can be used to automate this
1011da177e4SLinus Torvalds   process.  It determines the current kernel version and applies any
1021da177e4SLinus Torvalds   patches found.
1031da177e4SLinus Torvalds
1041da177e4SLinus Torvalds		linux/scripts/patch-kernel linux
1051da177e4SLinus Torvalds
1061da177e4SLinus Torvalds   The first argument in the command above is the location of the
1071da177e4SLinus Torvalds   kernel source.  Patches are applied from the current directory, but
1081da177e4SLinus Torvalds   an alternative directory can be specified as the second argument.
1091da177e4SLinus Torvalds
110896e5518SKurt Wall - If you are upgrading between releases using the stable series patches
1110466dcbeSJesper Juhl   (for example, patch-3.x.y), note that these "dot-releases" are
1120466dcbeSJesper Juhl   not incremental and must be applied to the 3.x base tree. For
1130466dcbeSJesper Juhl   example, if your base kernel is 3.0 and you want to apply the
1140466dcbeSJesper Juhl   3.0.3 patch, you do not and indeed must not first apply the
1150466dcbeSJesper Juhl   3.0.1 and 3.0.2 patches. Similarly, if you are running kernel
1160466dcbeSJesper Juhl   version 3.0.2 and want to jump to 3.0.3, you must first
1170466dcbeSJesper Juhl   reverse the 3.0.2 patch (that is, patch -R) _before_ applying
1180466dcbeSJesper Juhl   the 3.0.3 patch.
119620034c8SJesper Juhl   You can read more on this in Documentation/applying-patches.txt
120896e5518SKurt Wall
1211da177e4SLinus Torvalds - Make sure you have no stale .o files and dependencies lying around:
1221da177e4SLinus Torvalds
1231da177e4SLinus Torvalds		cd linux
1241da177e4SLinus Torvalds		make mrproper
1251da177e4SLinus Torvalds
1261da177e4SLinus Torvalds   You should now have the sources correctly installed.
1271da177e4SLinus Torvalds
1281da177e4SLinus TorvaldsSOFTWARE REQUIREMENTS
1291da177e4SLinus Torvalds
1300466dcbeSJesper Juhl   Compiling and running the 3.x kernels requires up-to-date
1311da177e4SLinus Torvalds   versions of various software packages.  Consult
1321da177e4SLinus Torvalds   Documentation/Changes for the minimum version numbers required
1331da177e4SLinus Torvalds   and how to get updates for these packages.  Beware that using
1341da177e4SLinus Torvalds   excessively old versions of these packages can cause indirect
1351da177e4SLinus Torvalds   errors that are very difficult to track down, so don't assume that
1361da177e4SLinus Torvalds   you can just update packages when obvious problems arise during
1371da177e4SLinus Torvalds   build or operation.
1381da177e4SLinus Torvalds
1391da177e4SLinus TorvaldsBUILD directory for the kernel:
1401da177e4SLinus Torvalds
141a6144bb9SMichael Witten   When compiling the kernel, all output files will per default be
1421da177e4SLinus Torvalds   stored together with the kernel source code.
1431da177e4SLinus Torvalds   Using the option "make O=output/dir" allow you to specify an alternate
1441da177e4SLinus Torvalds   place for the output files (including .config).
1451da177e4SLinus Torvalds   Example:
146*88f7a642SMichael Witten
1475b4285fbSMichael Witten     kernel source code:	/usr/src/linux-3.X
1481da177e4SLinus Torvalds     build directory:		/home/name/build/kernel
1491da177e4SLinus Torvalds
150a6144bb9SMichael Witten   To configure and build the kernel, use:
151*88f7a642SMichael Witten
1525b4285fbSMichael Witten     cd /usr/src/linux-3.X
1531da177e4SLinus Torvalds     make O=/home/name/build/kernel menuconfig
1541da177e4SLinus Torvalds     make O=/home/name/build/kernel
1551da177e4SLinus Torvalds     sudo make O=/home/name/build/kernel modules_install install
1561da177e4SLinus Torvalds
157a6144bb9SMichael Witten   Please note: If the 'O=output/dir' option is used, then it must be
1581da177e4SLinus Torvalds   used for all invocations of make.
1591da177e4SLinus Torvalds
1601da177e4SLinus TorvaldsCONFIGURING the kernel:
1611da177e4SLinus Torvalds
1621da177e4SLinus Torvalds   Do not skip this step even if you are only upgrading one minor
1631da177e4SLinus Torvalds   version.  New configuration options are added in each release, and
1641da177e4SLinus Torvalds   odd problems will turn up if the configuration files are not set up
1651da177e4SLinus Torvalds   as expected.  If you want to carry your existing configuration to a
1661da177e4SLinus Torvalds   new version with minimal work, use "make oldconfig", which will
1671da177e4SLinus Torvalds   only ask you for the answers to new questions.
1681da177e4SLinus Torvalds
1696d12760cSMichael Witten - Alternative configuration commands are:
170*88f7a642SMichael Witten
171620034c8SJesper Juhl	"make config"      Plain text interface.
172*88f7a642SMichael Witten
1731da177e4SLinus Torvalds	"make menuconfig"  Text based color menus, radiolists & dialogs.
174*88f7a642SMichael Witten
175b3235fe4SAndrea Gelmini	"make nconfig"     Enhanced text based color menus.
176*88f7a642SMichael Witten
1771da177e4SLinus Torvalds	"make xconfig"     X windows (Qt) based configuration tool.
178*88f7a642SMichael Witten
1791da177e4SLinus Torvalds	"make gconfig"     X windows (Gtk) based configuration tool.
180*88f7a642SMichael Witten
1811da177e4SLinus Torvalds	"make oldconfig"   Default all questions based on the contents of
1829dfb563bSRandy Dunlap			   your existing ./.config file and asking about
1839dfb563bSRandy Dunlap			   new config symbols.
184*88f7a642SMichael Witten
185f875a1a6SPaolo 'Blaisorblade' Giarrusso	"make silentoldconfig"
186f875a1a6SPaolo 'Blaisorblade' Giarrusso			   Like above, but avoids cluttering the screen
187e3fc4cc1SRandy Dunlap			   with questions already answered.
188590a5857SMarkus Heidelberg			   Additionally updates the dependencies.
189*88f7a642SMichael Witten
1909dfb563bSRandy Dunlap	"make defconfig"   Create a ./.config file by using the default
191b2d89930SPatrick Ringl			   symbol values from either arch/$ARCH/defconfig
192b2d89930SPatrick Ringl			   or arch/$ARCH/configs/${PLATFORM}_defconfig,
193b2d89930SPatrick Ringl			   depending on the architecture.
194*88f7a642SMichael Witten
195b2d89930SPatrick Ringl	"make ${PLATFORM}_defconfig"
196b2d89930SPatrick Ringl			   Create a ./.config file by using the default
197b2d89930SPatrick Ringl			   symbol values from
198b2d89930SPatrick Ringl			   arch/$ARCH/configs/${PLATFORM}_defconfig.
199b2d89930SPatrick Ringl			   Use "make help" to get a list of all available
200b2d89930SPatrick Ringl			   platforms of your architecture.
201*88f7a642SMichael Witten
2029dfb563bSRandy Dunlap	"make allyesconfig"
2039dfb563bSRandy Dunlap			   Create a ./.config file by setting symbol
2049dfb563bSRandy Dunlap			   values to 'y' as much as possible.
205*88f7a642SMichael Witten
2069dfb563bSRandy Dunlap	"make allmodconfig"
2079dfb563bSRandy Dunlap			   Create a ./.config file by setting symbol
2089dfb563bSRandy Dunlap			   values to 'm' as much as possible.
209*88f7a642SMichael Witten
2109dfb563bSRandy Dunlap	"make allnoconfig" Create a ./.config file by setting symbol
2119dfb563bSRandy Dunlap			   values to 'n' as much as possible.
212*88f7a642SMichael Witten
2139dfb563bSRandy Dunlap	"make randconfig"  Create a ./.config file by setting symbol
2149dfb563bSRandy Dunlap			   values to random values.
2159dfb563bSRandy Dunlap
2162af238e4SRandy Dunlap   You can find more information on using the Linux kernel config tools
217ad444684SLi Zefan   in Documentation/kbuild/kconfig.txt.
2181da177e4SLinus Torvalds
2191da177e4SLinus Torvalds	NOTES on "make config":
220*88f7a642SMichael Witten
2211da177e4SLinus Torvalds	- having unnecessary drivers will make the kernel bigger, and can
2221da177e4SLinus Torvalds	  under some circumstances lead to problems: probing for a
2231da177e4SLinus Torvalds	  nonexistent controller card may confuse your other controllers
224*88f7a642SMichael Witten
2251da177e4SLinus Torvalds	- compiling the kernel with "Processor type" set higher than 386
2261da177e4SLinus Torvalds	  will result in a kernel that does NOT work on a 386.  The
2271da177e4SLinus Torvalds	  kernel will detect this on bootup, and give up.
228*88f7a642SMichael Witten
2291da177e4SLinus Torvalds	- A kernel with math-emulation compiled in will still use the
2301da177e4SLinus Torvalds	  coprocessor if one is present: the math emulation will just
2311da177e4SLinus Torvalds	  never get used in that case.  The kernel will be slightly larger,
2321da177e4SLinus Torvalds	  but will work on different machines regardless of whether they
2331da177e4SLinus Torvalds	  have a math coprocessor or not.
234*88f7a642SMichael Witten
2351da177e4SLinus Torvalds	- the "kernel hacking" configuration details usually result in a
2361da177e4SLinus Torvalds	  bigger or slower kernel (or both), and can even make the kernel
2371da177e4SLinus Torvalds	  less stable by configuring some routines to actively try to
2381da177e4SLinus Torvalds	  break bad code to find kernel problems (kmalloc()).  Thus you
2391da177e4SLinus Torvalds	  should probably answer 'n' to the questions for
2401da177e4SLinus Torvalds          "development", "experimental", or "debugging" features.
2411da177e4SLinus Torvalds
2421da177e4SLinus TorvaldsCOMPILING the kernel:
2431da177e4SLinus Torvalds
244a1365647SAndrew Morton - Make sure you have at least gcc 3.2 available.
245a1365647SAndrew Morton   For more information, refer to Documentation/Changes.
2461da177e4SLinus Torvalds
2471da177e4SLinus Torvalds   Please note that you can still run a.out user programs with this kernel.
2481da177e4SLinus Torvalds
2491da177e4SLinus Torvalds - Do a "make" to create a compressed kernel image. It is also
2501da177e4SLinus Torvalds   possible to do "make install" if you have lilo installed to suit the
2511da177e4SLinus Torvalds   kernel makefiles, but you may want to check your particular lilo setup first.
2521da177e4SLinus Torvalds
253a6144bb9SMichael Witten   To do the actual install, you have to be root, but none of the normal
2541da177e4SLinus Torvalds   build should require that. Don't take the name of root in vain.
2551da177e4SLinus Torvalds
2561da177e4SLinus Torvalds - If you configured any of the parts of the kernel as `modules', you
2571da177e4SLinus Torvalds   will also have to do "make modules_install".
2581da177e4SLinus Torvalds
2592af238e4SRandy Dunlap - Verbose kernel compile/build output:
2602af238e4SRandy Dunlap
261a6144bb9SMichael Witten   Normally, the kernel build system runs in a fairly quiet mode (but not
2622af238e4SRandy Dunlap   totally silent).  However, sometimes you or other kernel developers need
2632af238e4SRandy Dunlap   to see compile, link, or other commands exactly as they are executed.
2642af238e4SRandy Dunlap   For this, use "verbose" build mode.  This is done by inserting
2652af238e4SRandy Dunlap   "V=1" in the "make" command.  E.g.:
2662af238e4SRandy Dunlap
2672af238e4SRandy Dunlap	make V=1 all
2682af238e4SRandy Dunlap
2692af238e4SRandy Dunlap   To have the build system also tell the reason for the rebuild of each
2702af238e4SRandy Dunlap   target, use "V=2".  The default is "V=0".
2712af238e4SRandy Dunlap
2721da177e4SLinus Torvalds - Keep a backup kernel handy in case something goes wrong.  This is
2731da177e4SLinus Torvalds   especially true for the development releases, since each new release
2741da177e4SLinus Torvalds   contains new code which has not been debugged.  Make sure you keep a
2751da177e4SLinus Torvalds   backup of the modules corresponding to that kernel, as well.  If you
2761da177e4SLinus Torvalds   are installing a new kernel with the same version number as your
2771da177e4SLinus Torvalds   working kernel, make a backup of your modules directory before you
2781da177e4SLinus Torvalds   do a "make modules_install".
279*88f7a642SMichael Witten
280e3fc4cc1SRandy Dunlap   Alternatively, before compiling, use the kernel config option
281e3fc4cc1SRandy Dunlap   "LOCALVERSION" to append a unique suffix to the regular kernel version.
282e3fc4cc1SRandy Dunlap   LOCALVERSION can be set in the "General Setup" menu.
2831da177e4SLinus Torvalds
2841da177e4SLinus Torvalds - In order to boot your new kernel, you'll need to copy the kernel
2851da177e4SLinus Torvalds   image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
2861da177e4SLinus Torvalds   to the place where your regular bootable kernel is found.
2871da177e4SLinus Torvalds
2881da177e4SLinus Torvalds - Booting a kernel directly from a floppy without the assistance of a
2891da177e4SLinus Torvalds   bootloader such as LILO, is no longer supported.
2901da177e4SLinus Torvalds
291a6144bb9SMichael Witten   If you boot Linux from the hard drive, chances are you use LILO, which
2921da177e4SLinus Torvalds   uses the kernel image as specified in the file /etc/lilo.conf.  The
2931da177e4SLinus Torvalds   kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
2941da177e4SLinus Torvalds   /boot/bzImage.  To use the new kernel, save a copy of the old image
2951da177e4SLinus Torvalds   and copy the new image over the old one.  Then, you MUST RERUN LILO
2961da177e4SLinus Torvalds   to update the loading map!! If you don't, you won't be able to boot
2971da177e4SLinus Torvalds   the new kernel image.
2981da177e4SLinus Torvalds
2991da177e4SLinus Torvalds   Reinstalling LILO is usually a matter of running /sbin/lilo.
3001da177e4SLinus Torvalds   You may wish to edit /etc/lilo.conf to specify an entry for your
3011da177e4SLinus Torvalds   old kernel image (say, /vmlinux.old) in case the new one does not
3021da177e4SLinus Torvalds   work.  See the LILO docs for more information.
3031da177e4SLinus Torvalds
3041da177e4SLinus Torvalds   After reinstalling LILO, you should be all set.  Shutdown the system,
3051da177e4SLinus Torvalds   reboot, and enjoy!
3061da177e4SLinus Torvalds
3071da177e4SLinus Torvalds   If you ever need to change the default root device, video mode,
3081da177e4SLinus Torvalds   ramdisk size, etc.  in the kernel image, use the 'rdev' program (or
3091da177e4SLinus Torvalds   alternatively the LILO boot options when appropriate).  No need to
3101da177e4SLinus Torvalds   recompile the kernel to change these parameters.
3111da177e4SLinus Torvalds
3121da177e4SLinus Torvalds - Reboot with the new kernel and enjoy.
3131da177e4SLinus Torvalds
3141da177e4SLinus TorvaldsIF SOMETHING GOES WRONG:
3151da177e4SLinus Torvalds
3161da177e4SLinus Torvalds - If you have problems that seem to be due to kernel bugs, please check
3171da177e4SLinus Torvalds   the file MAINTAINERS to see if there is a particular person associated
3181da177e4SLinus Torvalds   with the part of the kernel that you are having trouble with. If there
3191da177e4SLinus Torvalds   isn't anyone listed there, then the second best thing is to mail
32099ddcc7eSLinus Torvalds   them to me (torvalds@linux-foundation.org), and possibly to any other
32199ddcc7eSLinus Torvalds   relevant mailing-list or to the newsgroup.
3221da177e4SLinus Torvalds
3231da177e4SLinus Torvalds - In all bug-reports, *please* tell what kernel you are talking about,
3241da177e4SLinus Torvalds   how to duplicate the problem, and what your setup is (use your common
3251da177e4SLinus Torvalds   sense).  If the problem is new, tell me so, and if the problem is
3261da177e4SLinus Torvalds   old, please try to tell me when you first noticed it.
3271da177e4SLinus Torvalds
3281da177e4SLinus Torvalds - If the bug results in a message like
3291da177e4SLinus Torvalds
3301da177e4SLinus Torvalds	unable to handle kernel paging request at address C0000010
3311da177e4SLinus Torvalds	Oops: 0002
3321da177e4SLinus Torvalds	EIP:   0010:XXXXXXXX
3331da177e4SLinus Torvalds	eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
3341da177e4SLinus Torvalds	esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
3351da177e4SLinus Torvalds	ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
3361da177e4SLinus Torvalds	Pid: xx, process nr: xx
3371da177e4SLinus Torvalds	xx xx xx xx xx xx xx xx xx xx
3381da177e4SLinus Torvalds
3391da177e4SLinus Torvalds   or similar kernel debugging information on your screen or in your
3401da177e4SLinus Torvalds   system log, please duplicate it *exactly*.  The dump may look
3411da177e4SLinus Torvalds   incomprehensible to you, but it does contain information that may
3421da177e4SLinus Torvalds   help debugging the problem.  The text above the dump is also
3431da177e4SLinus Torvalds   important: it tells something about why the kernel dumped code (in
344a6144bb9SMichael Witten   the above example, it's due to a bad kernel pointer). More information
3451da177e4SLinus Torvalds   on making sense of the dump is in Documentation/oops-tracing.txt
3461da177e4SLinus Torvalds
3471da177e4SLinus Torvalds - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
3481da177e4SLinus Torvalds   as is, otherwise you will have to use the "ksymoops" program to make
349620034c8SJesper Juhl   sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
350620034c8SJesper Juhl   This utility can be downloaded from
351620034c8SJesper Juhl   ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ .
3526d12760cSMichael Witten   Alternatively, you can do the dump lookup by hand:
3531da177e4SLinus Torvalds
3541da177e4SLinus Torvalds - In debugging dumps like the above, it helps enormously if you can
3551da177e4SLinus Torvalds   look up what the EIP value means.  The hex value as such doesn't help
3561da177e4SLinus Torvalds   me or anybody else very much: it will depend on your particular
3571da177e4SLinus Torvalds   kernel setup.  What you should do is take the hex value from the EIP
3581da177e4SLinus Torvalds   line (ignore the "0010:"), and look it up in the kernel namelist to
3591da177e4SLinus Torvalds   see which kernel function contains the offending address.
3601da177e4SLinus Torvalds
3611da177e4SLinus Torvalds   To find out the kernel function name, you'll need to find the system
3621da177e4SLinus Torvalds   binary associated with the kernel that exhibited the symptom.  This is
3631da177e4SLinus Torvalds   the file 'linux/vmlinux'.  To extract the namelist and match it against
3641da177e4SLinus Torvalds   the EIP from the kernel crash, do:
3651da177e4SLinus Torvalds
3661da177e4SLinus Torvalds		nm vmlinux | sort | less
3671da177e4SLinus Torvalds
3681da177e4SLinus Torvalds   This will give you a list of kernel addresses sorted in ascending
3691da177e4SLinus Torvalds   order, from which it is simple to find the function that contains the
3701da177e4SLinus Torvalds   offending address.  Note that the address given by the kernel
3711da177e4SLinus Torvalds   debugging messages will not necessarily match exactly with the
3721da177e4SLinus Torvalds   function addresses (in fact, that is very unlikely), so you can't
3731da177e4SLinus Torvalds   just 'grep' the list: the list will, however, give you the starting
3741da177e4SLinus Torvalds   point of each kernel function, so by looking for the function that
3751da177e4SLinus Torvalds   has a starting address lower than the one you are searching for but
3761da177e4SLinus Torvalds   is followed by a function with a higher address you will find the one
3771da177e4SLinus Torvalds   you want.  In fact, it may be a good idea to include a bit of
3781da177e4SLinus Torvalds   "context" in your problem report, giving a few lines around the
3791da177e4SLinus Torvalds   interesting one.
3801da177e4SLinus Torvalds
3811da177e4SLinus Torvalds   If you for some reason cannot do the above (you have a pre-compiled
3821da177e4SLinus Torvalds   kernel image or similar), telling me as much about your setup as
383620034c8SJesper Juhl   possible will help.  Please read the REPORTING-BUGS document for details.
3841da177e4SLinus Torvalds
3856d12760cSMichael Witten - Alternatively, you can use gdb on a running kernel. (read-only; i.e. you
3861da177e4SLinus Torvalds   cannot change values or set break points.) To do this, first compile the
3871da177e4SLinus Torvalds   kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
3881da177e4SLinus Torvalds   clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
3891da177e4SLinus Torvalds
3901da177e4SLinus Torvalds   After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
3911da177e4SLinus Torvalds   You can now use all the usual gdb commands. The command to look up the
3921da177e4SLinus Torvalds   point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
3931da177e4SLinus Torvalds   with the EIP value.)
3941da177e4SLinus Torvalds
3951da177e4SLinus Torvalds   gdb'ing a non-running kernel currently fails because gdb (wrongly)
3961da177e4SLinus Torvalds   disregards the starting offset for which the kernel is compiled.
3971da177e4SLinus Torvalds
398