Faster memcpy / copy_{from,to}_user.
[linux-2.6/linux-mips.git] / README
blob6ed9b448615a471a1034b7659b0a1bee16b9832d
1         Linux kernel release 2.3.xx
3 These are the release notes for Linux version 2.3.  Read them carefully,
4 as they tell you what this is all about, explain how to install the
5 kernel, and what to do if something goes wrong. 
7 Linux version 2.3 is a DEVELOPMENT kernel, and not intended for general
8 public use.  Different releases may have various and sometimes severe
9 bugs.  It is *strongly* recommended that you back up the previous kernel
10 before installing any new 2.3.xx release.
12 If you need to use a proven and stable Linux kernel, please use 2.0.38
13 or 2.2.xx.  All features which will be in the 2.3.xx releases will be
14 contained in 2.4.xx when the code base has stabilized again. 
16 If you decide to use 2.3, it is recommended that you join the kernel mailing
17 list.  To do this, e-mail majordomo@vger.rutgers.edu, and put in the body
18 of the message "subscribe linux-kernel" or "subscribe linux-kernel-digest"
19 for a daily digest of the mailing list (it is a high-traffic list.)
21 However, please make sure you don't ask questions which are already answered
22 in various files in the Documentation directory.  See DOCUMENTATION below.
24 WHAT IS LINUX?
26   Linux is a Unix clone written from scratch by Linus Torvalds with
27   assistance from a loosely-knit team of hackers across the Net.
28   It aims towards POSIX compliance. 
30   It has all the features you would expect in a modern fully-fledged
31   Unix, including true multitasking, virtual memory, shared libraries,
32   demand loading, shared copy-on-write executables, proper memory
33   management and TCP/IP networking. 
35   It is distributed under the GNU General Public License - see the
36   accompanying COPYING file for more details. 
38 ON WHAT HARDWARE DOES IT RUN?
40   Linux was first developed for 386/486-based PCs.  These days it also
41   runs on ARMs, DEC Alphas, SUN Sparcs, M68000 machines (like Atari and
42   Amiga), MIPS and PowerPC, and others.
44 DOCUMENTATION:
46  - There is a lot of documentation available both in electronic form on
47    the Internet and in books, both Linux-specific and pertaining to
48    general UNIX questions.  I'd recommend looking into the documentation
49    subdirectories on any Linux FTP site for the LDP (Linux Documentation
50    Project) books.  This README is not meant to be documentation on the
51    system: there are much better sources available.
53  - There are various README files in the Documentation/ subdirectory:
54    these typically contain kernel-specific installation notes for some 
55    drivers for example. See ./Documentation/00-INDEX for a list of what
56    is contained in each file.  Please read the Changes file, as it
57    contains information about the problems, which may result by upgrading
58    your kernel.
60 INSTALLING the kernel:
62  - If you install the full sources, put the kernel tarball in a
63    directory where you have permissions (eg. your home directory) and
64    unpack it:
66                 gzip -cd linux-2.3.XX.tar.gz | tar xvf -
68    Replace "XX" with the version number of the latest kernel.
70    Do NOT use the /usr/src/linux area! This area has a (usually
71    incomplete) set of kernel headers that are used by the library header
72    files.  They should match the library, and not get messed up by
73    whatever the kernel-du-jour happens to be.
75  - You can also upgrade between 2.3.xx releases by patching.  Patches are
76    distributed in the traditional gzip and the new bzip2 format.  To
77    install by patching, get all the newer patch files, enter the
78    directory in which you unpacked the kernel source and execute:
80                 gzip -cd patchXX.gz | patch -p0
82    or
83                 bzip2 -dc patchXX.bz2 | patch -p0
85    (repeat xx for all versions bigger than the version of your current
86    source tree, _in_order_) and you should be ok.  You may want to remove
87    the backup files (xxx~ or xxx.orig), and make sure that there are no
88    failed patches (xxx# or xxx.rej). If there are, either you or me has
89    made a mistake.
91    Alternatively, the script patch-kernel can be used to automate this
92    process.  It determines the current kernel version and applies any
93    patches found.
95                 linux/scripts/patch-kernel linux
97    The first argument in the command above is the location of the
98    kernel source.  Patches are applied from the current directory, but
99    an alternative directory can be specified as the second argument.
101  - Make sure you have no stale .o files and dependencies lying around:
103                 cd linux
104                 make mrproper
106    You should now have the sources correctly installed.
108 SOFTWARE REQUIREMENTS
110    Compiling and running the 2.3.xx kernels requires up-to-date
111    versions of various software packages.  Consult
112    ./Documentation/Changes for the minimum version numbers required
113    and how to get updates for these packages.  Beware that using
114    excessively old versions of these packages can cause indirect
115    errors that are very difficult to track down, so don't assume that
116    you can just update packages when obvious problems arise during
117    build or operation.
119 CONFIGURING the kernel:
121  - Do a "make config" to configure the basic kernel.  "make config" needs
122    bash to work: it will search for bash in $BASH, /bin/bash and /bin/sh
123    (in that order), so one of those must be correct for it to work. 
125    Do not skip this step even if you are only upgrading one minor
126    version.  New configuration options are added in each release, and
127    odd problems will turn up if the configuration files are not set up
128    as expected.  If you want to carry your existing configuration to a
129    new version with minimal work, use "make oldconfig", which will
130    only ask you for the answers to new questions.
132  - Alternate configuration commands are:
133         "make menuconfig"  Text based color menus, radiolists & dialogs.
134         "make xconfig"     X windows based configuration tool.
135         "make oldconfig"   Default all questions based on the contents of
136                            your existing ./.config file.
137    
138         NOTES on "make config":
139         - having unnecessary drivers will make the kernel bigger, and can
140           under some circumstances lead to problems: probing for a
141           nonexistent controller card may confuse your other controllers
142         - compiling the kernel with "Processor type" set higher than 386
143           will result in a kernel that does NOT work on a 386.  The
144           kernel will detect this on bootup, and give up.
145         - A kernel with math-emulation compiled in will still use the
146           coprocessor if one is present: the math emulation will just
147           never get used in that case.  The kernel will be slightly larger,
148           but will work on different machines regardless of whether they
149           have a math coprocessor or not. 
150         - the "kernel hacking" configuration details usually result in a
151           bigger or slower kernel (or both), and can even make the kernel
152           less stable by configuring some routines to actively try to
153           break bad code to find kernel problems (kmalloc()).  Thus you
154           should probably answer 'n' to the questions for
155           "development", "experimental", or "debugging" features.
157  - Check the top Makefile for further site-dependent configuration
158    (default SVGA mode etc). 
160  - Finally, do a "make dep" to set up all the dependencies correctly. 
162 COMPILING the kernel:
164  - Make sure you have gcc-2.7.2 or newer available.  It seems older gcc
165    versions can have problems compiling newer versions of Linux.  This
166    is mainly because the older compilers can only generate "a.out"-format
167    executables.  As of Linux 2.1.0, the kernel must be compiled as an
168    "ELF" binary.  If you upgrade your compiler, remember to get the new
169    binutils package too (for as/ld/nm and company).
171    Please note that you can still run a.out user programs with this
172    kernel.
174  - Do a "make bzImage" to create a compressed kernel image.  If you want
175    to make a boot disk (without root filesystem or LILO), insert a floppy
176    in your A: drive, and do a "make bzdisk".  It is also possible to do
177    "make install" if you have lilo installed to suit the kernel makefiles,
178    but you may want to check your particular lilo setup first. 
180    To do the actual install you have to be root, but none of the normal
181    build should require that. Don't take the name of root in vain.
183  - In the unlikely event that your system cannot boot bzImage kernels you
184    can still compile your kernel as zImage. However, since zImage support
185    will be removed at some point in the future in favor of bzImage we
186    encourage people having problems with booting bzImage kernels to report
187    these, with detailed hardware configuration information, to the
188    linux-kernel mailing list and to H. Peter Anvin <hpa+linux@zytor.com>.
190  - If you configured any of the parts of the kernel as `modules', you
191    will have to do "make modules" followed by "make modules_install".
192    Read Documentation/modules.txt for more information.  For example,
193    an explanation of how to use the modules is included there.
195  - Keep a backup kernel handy in case something goes wrong.  This is 
196    especially true for the development releases, since each new release
197    contains new code which has not been debugged.  Make sure you keep a
198    backup of the modules corresponding to that kernel, as well.  If you
199    are installing a new kernel with the same version number as your
200    working kernel, make a backup of your modules directory before you
201    do a "make modules_install".
203  - In order to boot your new kernel, you'll need to copy the kernel
204    image (found in .../linux/arch/i386/boot/bzImage after compilation)
205    to the place where your regular bootable kernel is found. 
207    For some, this is on a floppy disk, in which case you can copy the
208    kernel bzImage file to /dev/fd0 to make a bootable floppy. Please note
209    that you can not boot a kernel by directly dumping it to a 720k
210    double-density 3.5" floppy.  In this case, it is highly recommended
211    that you install LILO on your double-density boot floppy or switch to
212    high-density floppies.
214    If you boot Linux from the hard drive, chances are you use LILO which
215    uses the kernel image as specified in the file /etc/lilo.conf.  The
216    kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
217    /boot/bzImage.  To use the new kernel, save a copy of the old image
218    and copy the new image over the old one.  Then, you MUST RERUN LILO
219    to update the loading map!! If you don't, you won't be able to boot
220    the new kernel image.
222    Reinstalling LILO is usually a matter of running /sbin/lilo. 
223    You may wish to edit /etc/lilo.conf to specify an entry for your
224    old kernel image (say, /vmlinux.old) in case the new one does not
225    work.  See the LILO docs for more information. 
227    After reinstalling LILO, you should be all set.  Shutdown the system,
228    reboot, and enjoy!
230    If you ever need to change the default root device, video mode,
231    ramdisk size, etc.  in the kernel image, use the 'rdev' program (or
232    alternatively the LILO boot options when appropriate).  No need to
233    recompile the kernel to change these parameters. 
235  - Reboot with the new kernel and enjoy. 
237 IF SOMETHING GOES WRONG:
239  - If you have problems that seem to be due to kernel bugs, please check
240    the file MAINTAINERS to see if there is a particular person associated
241    with the part of the kernel that you are having trouble with. If there
242    isn't anyone listed there, then the second best thing is to mail
243    them to me (torvalds@transmeta.com), and possibly to any other
244    relevant mailing-list or to the newsgroup.  The mailing-lists are
245    useful especially for SCSI and networking problems, as I can't test
246    either of those personally anyway. 
248  - In all bug-reports, *please* tell what kernel you are talking about,
249    how to duplicate the problem, and what your setup is (use your common
250    sense).  If the problem is new, tell me so, and if the problem is
251    old, please try to tell me when you first noticed it.
253  - If the bug results in a message like
255         unable to handle kernel paging request at address C0000010
256         Oops: 0002
257         EIP:   0010:XXXXXXXX
258         eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
259         esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
260         ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
261         Pid: xx, process nr: xx
262         xx xx xx xx xx xx xx xx xx xx
264    or similar kernel debugging information on your screen or in your
265    system log, please duplicate it *exactly*.  The dump may look
266    incomprehensible to you, but it does contain information that may
267    help debugging the problem.  The text above the dump is also
268    important: it tells something about why the kernel dumped code (in
269    the above example it's due to a bad kernel pointer). More information
270    on making sense of the dump is in Documentation/oops-tracing.txt
272  - You can use the "ksymoops" program to make sense of the dump.  This
273    utility can be downloaded from ftp://ftp.ocs.com.au/pub/ksymoops .
274    Alternately you can do the dump lookup by hand:
276  - In debugging dumps like the above, it helps enormously if you can
277    look up what the EIP value means.  The hex value as such doesn't help
278    me or anybody else very much: it will depend on your particular
279    kernel setup.  What you should do is take the hex value from the EIP
280    line (ignore the "0010:"), and look it up in the kernel namelist to
281    see which kernel function contains the offending address.
283    To find out the kernel function name, you'll need to find the system
284    binary associated with the kernel that exhibited the symptom.  This is
285    the file 'linux/vmlinux'.  To extract the namelist and match it against
286    the EIP from the kernel crash, do:
288                 nm vmlinux | sort | less
290    This will give you a list of kernel addresses sorted in ascending
291    order, from which it is simple to find the function that contains the
292    offending address.  Note that the address given by the kernel
293    debugging messages will not necessarily match exactly with the
294    function addresses (in fact, that is very unlikely), so you can't
295    just 'grep' the list: the list will, however, give you the starting
296    point of each kernel function, so by looking for the function that
297    has a starting address lower than the one you are searching for but
298    is followed by a function with a higher address you will find the one
299    you want.  In fact, it may be a good idea to include a bit of
300    "context" in your problem report, giving a few lines around the
301    interesting one. 
303    If you for some reason cannot do the above (you have a pre-compiled
304    kernel image or similar), telling me as much about your setup as
305    possible will help. 
307  - Alternately, you can use gdb on a running kernel. (read-only; i.e. you
308    cannot change values or set break points.) To do this, first compile the
309    kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
310    clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
312    After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
313    You can now use all the usual gdb commands. The command to look up the
314    point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
315    with the EIP value.)
317    gdb'ing a non-running kernel currently fails because gdb (wrongly)
318    disregards the starting offset for which the kernel is compiled.