OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [README] - Blame information for rev 1622

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1622 jcastillo
 
2
        Linux kernel release 2.0.xx
3
 
4
These are the release notes for linux version 2.0.  Read them carefully,
5
as they tell you what this is all about, explain how to install the
6
kernel, and what to do if something goes wrong.
7
 
8
WHAT IS LINUX?
9
 
10
  Linux is a Unix clone written from scratch by Linus Torvalds with
11
  assistance from a loosely-knit team of hackers across the Net.
12
  It aims towards POSIX compliance.
13
 
14
  It has all the features you would expect in a modern fully-fledged
15
  Unix, including true multitasking, virtual memory, shared libraries,
16
  demand loading, shared copy-on-write executables, proper memory
17
  management and TCP/IP networking.
18
 
19
  It is distributed under the GNU General Public License - see the
20
  accompanying COPYING file for more details.
21
 
22
ON WHAT HARDWARE DOES IT RUN?
23
 
24
  Linux was first developed for 386/486-based PCs.  These days it also
25
  runs on DEC Alphas, SUN Sparcs, M68000 machines (like Atari and Amiga),
26
  MIPS and PowerPC.
27
 
28
DOCUMENTATION:
29
 
30
 - there is a lot of documentation available both in electronic form on
31
   the internet and in books, both Linux-specific and pertaining to
32
   general UNIX questions.  I'd recommend looking into the documentation
33
   subdirectories on any Linux ftp site for the LDP (Linux Documentation
34
   Project) books.  This README is not meant to be documentation on the
35
   system: there are much better sources available.
36
 
37
 - There are various readme's in the kernel Documentation/ subdirectory:
38
   these typically contain kernel-specific installation notes for some
39
   drivers for example. See ./Documentation/00-INDEX for a list of what
40
   is contained in each file.
41
 
42
INSTALLING the kernel:
43
 
44
 - If you install the full sources, do a
45
 
46
                cd /usr/src
47
                gzip -cd linux-2.0.XX.tar.gz | tar xfv -
48
 
49
   to get it all put in place. Replace "XX" with the version number of the
50
   latest kernel. If you use GNU tar,
51
 
52
                cd /usr/src
53
                tar -xzvf linux-2.1.XX.tar.gz
54
 
55
   is equivalent.
56
 
57
 - You can also upgrade between 2.0.xx releases by patching.  Each
58
   patch that is released for 2.0.xx contains only bugfixes.  No
59
   new features will be added to the Linux kernel until the 2.1.xx
60
   development effort begins.  To install by patching, get all the
61
   newer patch files and do
62
 
63
                cd /usr/src
64
                gzip -cd patchXX.gz | patch -p0
65
 
66
   (repeat xx for all versions bigger than the version of your current
67
   source tree, _in_order_) and you should be ok.  You may want to remove
68
   the backup files (xxx~ or xxx.orig), and make sure that there are no
69
   failed patches (xxx# or xxx.rej). If there are, either you or me has
70
   made a mistake.
71
 
72
   Alternatively, the script patch-kernel can be used to automate this
73
   process.  It determines the current kernel version and applies any
74
   patches found.
75
 
76
                cd /usr/src
77
                linux/scripts/patch-kernel
78
 
79
   The default directory for the kernel source is /usr/src/linux, but
80
   can be specified as the first argument.  Patches are applied from
81
   the current directory, but an alternative directory can be specified
82
   as the second argument.
83
 
84
 - make sure you have no stale .o files and dependencies lying around:
85
 
86
                cd /usr/src/linux
87
                make mrproper
88
 
89
   You should now have the sources correctly installed.
90
 
91
CONFIGURING the kernel:
92
 
93
 - do a "make config" to configure the basic kernel.  "make config"
94
   needs bash to work: it will search for bash in $BASH, /bin/bash and
95
   /bin/sh (in that order), so hopefully one of those is correct.
96
 
97
 - Alternate configuration commands are:
98
        "make menuconfig"  Text based color menus, radiolists & dialogs.
99
        "make xconfig"     X windows based configuration tool.
100
 
101
        NOTES on "make config":
102
        - having unnecessary drivers will make the kernel bigger, and can
103
          under some circumstances lead to problems: probing for a
104
          nonexistent controller card may confuse your other controllers
105
        - compiling the kernel with "Processor type" set higher than 386
106
          will result in a kernel that does NOT work on a 386.  The
107
          kernel will detect this on bootup, and give up.
108
        - A kernel with math-emulation compiled in will still use the
109
          coprocessor if one is present: the math emulation will just
110
          never get used in that case.  The kernel will be slightly larger,
111
          but will work on different machines regardless of whether they
112
          have a math coprocessor or not.
113
        - the "kernel hacking" configuration details usually result in a
114
          bigger or slower kernel (or both), and can even make the kernel
115
          less stable by configuring some routines to actively try to
116
          break bad code to find kernel problems (kmalloc()).  Thus you
117
          should probably answer 'n' to the questions for a "production"
118
          kernel.
119
 
120
 - Check the top Makefile for further site-dependent configuration
121
   (default SVGA mode etc).
122
 
123
 - Finally, do a "make dep" to set up all the dependencies correctly.
124
 
125
COMPILING the kernel:
126
 
127
 - make sure you have gcc-2.6.3 or newer available.  It seems older gcc
128
   versions can have problems compiling newer versions of linux.  If you
129
   upgrade your compiler, remember to get the new binutils package too
130
   (for as/ld/nm and company).
131
 
132
 - do a "make zImage" to create a compressed kernel image.  If you want
133
   to make a bootdisk (without root filesystem or lilo), insert a floppy
134
   in your A: drive, and do a "make zdisk".  It is also possible to do
135
   "make zlilo" if you have lilo installed to suit the kernel makefiles,
136
   but you may want to check your particular lilo setup first.
137
 
138
 - if your kernel is too large for "make zImage", use "make bzImage"
139
   instead.
140
 
141
 - if you configured any of the parts of the kernel as `modules', you
142
   will have to do "make modules" followed by "make modules_install".
143
   Read Documentation/modules.txt for more information.  For example,
144
   an explanation of how to use the modules is included there.
145
 
146
 - keep a backup kernel handy in case something goes wrong.  This is
147
   especially true for the development releases, since each new release
148
   contains new code which has not been debugged.
149
 
150
 - In order to boot your new kernel, you'll need to copy the kernel
151
   image (found in /usr/src/linux/arch/i386/boot/zImage after compilation)
152
   to the place where your regular bootable kernel is found.
153
 
154
   For some, this is on a floppy disk, in which case you can "cp
155
   /usr/src/linux/arch/i386/boot/zImage /dev/fd0" to make a bootable
156
   floppy.  Note that as of Linux 2.0.0, a kernel copied to a 720k
157
   double-density 3.5" floppy disk no longer boots.  In this case,
158
   it is highly recommended that you install LILO on your
159
   double-density bootfloppy or switch to high-density floppies.
160
 
161
   If you boot Linux from the hard drive, chances are you use LILO which
162
   uses the kernel image as specified in the file /etc/lilo.conf.  The
163
   kernel image file is usually /vmlinuz, or /zImage, or /etc/zImage.
164
   To use the new kernel, copy the new image over the old one (save a
165
   backup of the original!).  Then, you MUST RERUN LILO to update the
166
   loading map!! If you don't, you won't be able to boot the new kernel
167
   image.
168
 
169
   Reinstalling LILO is usually a matter of running /sbin/lilo.
170
   You may wish to edit /etc/lilo.conf to specify an entry for your
171
   old kernel image (say, /vmlinux.old) in case the new one does not
172
   work.  See the LILO docs for more information.
173
 
174
   After reinstalling LILO, you should be all set.  Shutdown the system,
175
   reboot, and enjoy!
176
 
177
   If you ever need to change the default root device, video mode,
178
   ramdisk size, etc.  in the kernel image, use the 'rdev' program (or
179
   alternatively the LILO boot options when appropriate).  No need to
180
   recompile the kernel to change these parameters.
181
 
182
 - reboot with the new kernel and enjoy.
183
 
184
IF SOMETHING GOES WRONG:
185
 
186
 - if you have problems that seem to be due to kernel bugs, please check
187
   the file MAINTAINERS to see if there is a particular person associated
188
   with the part of the kernel that you are having trouble with. If there
189
   isn't anyone listed there, then the second best thing is to mail
190
   them to me (Linus.Torvalds@Helsinki.FI), and possibly to any other
191
   relevant mailing-list or to the newsgroup.  The mailing-lists are
192
   useful especially for SCSI and NETworking problems, as I can't test
193
   either of those personally anyway.
194
 
195
 - In all bug-reports, *please* tell what kernel you are talking about,
196
   how to duplicate the problem, and what your setup is (use your common
197
   sense).  If the problem is new, tell me so, and if the problem is
198
   old, please try to tell me when you first noticed it.
199
 
200
 - if the bug results in a message like
201
 
202
        unable to handle kernel paging request at address C0000010
203
        Oops: 0002
204
        EIP:   0010:XXXXXXXX
205
        eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
206
        esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
207
        ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
208
        Pid: xx, process nr: xx
209
        xx xx xx xx xx xx xx xx xx xx
210
 
211
   or similar kernel debugging information on your screen or in your
212
   system log, please duplicate it *exactly*.  The dump may look
213
   incomprehensible to you, but it does contain information that may
214
   help debugging the problem.  The text above the dump is also
215
   important: it tells something about why the kernel dumped code (in
216
   the above example it's due to a bad kernel pointer). More information
217
   on making sense of the dump is in Documentation/oops-tracing.txt
218
 
219
 - You can use the "ksymoops" program to make sense of the dump.  Find
220
   the C++ sources under the scripts/ directory to avoid having to do
221
   the dump lookup by hand:
222
 
223
 - in debugging dumps like the above, it helps enormously if you can
224
   look up what the EIP value means.  The hex value as such doesn't help
225
   me or anybody else very much: it will depend on your particular
226
   kernel setup.  What you should do is take the hex value from the EIP
227
   line (ignore the "0010:"), and look it up in the kernel namelist to
228
   see which kernel function contains the offending address.
229
 
230
   To find out the kernel function name, you'll need to find the system
231
   binary associated with the kernel that exhibited the symptom.  This is
232
   the file 'linux/vmlinux'.  To extract the namelist and match it against
233
   the EIP from the kernel crash, do:
234
 
235
                nm vmlinux | sort | less
236
 
237
   This will give you a list of kernel addresses sorted in ascending
238
   order, from which it is simple to find the function that contains the
239
   offending address.  Note that the address given by the kernel
240
   debugging messages will not necessarily match exactly with the
241
   function addresses (in fact, that is very unlikely), so you can't
242
   just 'grep' the list: the list will, however, give you the starting
243
   point of each kernel function, so by looking for the function that
244
   has a starting address lower than the one you are searching for but
245
   is followed by a function with a higher address you will find the one
246
   you want.  In fact, it may be a good idea to include a bit of
247
   "context" in your problem report, giving a few lines around the
248
   interesting one.
249
 
250
   If you for some reason cannot do the above (you have a pre-compiled
251
   kernel image or similar), telling me as much about your setup as
252
   possible will help.
253
 
254
 - alternately, you can use gdb on a running kernel. (read-only; i.e. you
255
   cannot change values or set break points.) To do this, first compile the
256
   kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
257
   clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
258
 
259
   After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
260
   You can now use all the usual gdb commands. The command to look up the
261
   point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
262
   with the EIP value.)
263
 
264
   gdb'ing a non-running kernel currently fails because gdb (wrongly)
265
   disregards the starting offset for which the kernel is compiled.
266
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.