1			   ARM Linux 2.6
2			   =============
3
4    Please check <ftp://ftp.arm.linux.org.uk/pub/armlinux> for
5    updates.
6
7Compilation of kernel
8---------------------
9
10  In order to compile ARM Linux, you will need a compiler capable of
11  generating ARM ELF code with GNU extensions.  GCC 3.3 is known to be
12  a good compiler.  Fortunately, you needn't guess.  The kernel will report
13  an error if your compiler is a recognized offender.
14
15  To build ARM Linux natively, you shouldn't have to alter the ARCH = line
16  in the top level Makefile.  However, if you don't have the ARM Linux ELF
17  tools installed as default, then you should change the CROSS_COMPILE
18  line as detailed below.
19
20  If you wish to cross-compile, then alter the following lines in the top
21  level make file:
22
23    ARCH = <whatever>
24	with
25    ARCH = arm
26
27	and
28
29    CROSS_COMPILE=
30	to
31    CROSS_COMPILE=<your-path-to-your-compiler-without-gcc>
32	eg.
33    CROSS_COMPILE=arm-linux-
34
35  Do a 'make config', followed by 'make Image' to build the kernel 
36  (arch/arm/boot/Image).  A compressed image can be built by doing a 
37  'make zImage' instead of 'make Image'.
38
39
40Bug reports etc
41---------------
42
43  Please send patches to the patch system.  For more information, see
44  http://www.arm.linux.org.uk/developer/patches/info.php Always include some
45  explanation as to what the patch does and why it is needed.
46
47  Bug reports should be sent to linux-arm-kernel@lists.arm.linux.org.uk,
48  or submitted through the web form at
49  http://www.arm.linux.org.uk/developer/ 
50
51  When sending bug reports, please ensure that they contain all relevant
52  information, eg. the kernel messages that were printed before/during
53  the problem, what you were doing, etc.
54
55
56Include files
57-------------
58
59  Several new include directories have been created under include/asm-arm,
60  which are there to reduce the clutter in the top-level directory.  These
61  directories, and their purpose is listed below:
62
63   arch-*	machine/platform specific header files
64   hardware	driver-internal ARM specific data structures/definitions
65   mach		descriptions of generic ARM to specific machine interfaces
66   proc-*	processor dependent header files (currently only two
67		categories)
68
69
70Machine/Platform support
71------------------------
72
73  The ARM tree contains support for a lot of different machine types.  To
74  continue supporting these differences, it has become necessary to split
75  machine-specific parts by directory.  For this, the machine category is
76  used to select which directories and files get included (we will use
77  $(MACHINE) to refer to the category)
78
79  To this end, we now have arch/arm/mach-$(MACHINE) directories which are
80  designed to house the non-driver files for a particular machine (eg, PCI,
81  memory management, architecture definitions etc).  For all future
82  machines, there should be a corresponding arch/arm/mach-$(MACHINE)/include/mach
83  directory.
84
85
86Modules
87-------
88
89  Although modularisation is supported (and required for the FP emulator),
90  each module on an ARM2/ARM250/ARM3 machine when is loaded will take
91  memory up to the next 32k boundary due to the size of the pages.
92  Therefore, is modularisation on these machines really worth it?
93
94  However, ARM6 and up machines allow modules to take multiples of 4k, and
95  as such Acorn RiscPCs and other architectures using these processors can
96  make good use of modularisation.
97
98
99ADFS Image files
100----------------
101
102  You can access image files on your ADFS partitions by mounting the ADFS
103  partition, and then using the loopback device driver.  You must have
104  losetup installed.
105
106  Please note that the PCEmulator DOS partitions have a partition table at
107  the start, and as such, you will have to give '-o offset' to losetup.
108
109
110Request to developers
111---------------------
112
113  When writing device drivers which include a separate assembler file, please
114  include it in with the C file, and not the arch/arm/lib directory.  This
115  allows the driver to be compiled as a loadable module without requiring
116  half the code to be compiled into the kernel image.
117
118  In general, try to avoid using assembler unless it is really necessary.  It
119  makes drivers far less easy to port to other hardware.
120
121
122ST506 hard drives
123-----------------
124
125  The ST506 hard drive controllers seem to be working fine (if a little
126  slowly).  At the moment they will only work off the controllers on an
127  A4x0's motherboard, but for it to work off a Podule just requires
128  someone with a podule to add the addresses for the IRQ mask and the
129  HDC base to the source.
130
131  As of 31/3/96 it works with two drives (you should get the ADFS
132  *configure harddrive set to 2). I've got an internal 20MB and a great
133  big external 5.25" FH 64MB drive (who could ever want more :-) ).
134
135  I've just got 240K/s off it (a dd with bs=128k); thats about half of what
136  RiscOS gets; but it's a heck of a lot better than the 50K/s I was getting
137  last week :-)
138
139  Known bug: Drive data errors can cause a hang; including cases where
140  the controller has fixed the error using ECC. (Possibly ONLY
141  in that case...hmm).
142
143
1441772 Floppy
145-----------
146  This also seems to work OK, but hasn't been stressed much lately.  It
147  hasn't got any code for disc change detection in there at the moment which
148  could be a bit of a problem!  Suggestions on the correct way to do this
149  are welcome.
150
151
152CONFIG_MACH_ and CONFIG_ARCH_
153-----------------------------
154  A change was made in 2003 to the macro names for new machines.
155  Historically, CONFIG_ARCH_ was used for the bonafide architecture,
156  e.g. SA1100, as well as implementations of the architecture,
157  e.g. Assabet.  It was decided to change the implementation macros
158  to read CONFIG_MACH_ for clarity.  Moreover, a retroactive fixup has
159  not been made because it would complicate patching.
160
161  Previous registrations may be found online.
162
163    <http://www.arm.linux.org.uk/developer/machines/>
164
165Kernel entry (head.S)
166--------------------------
167  The initial entry into the kernel is via head.S, which uses machine
168  independent code.  The machine is selected by the value of 'r1' on
169  entry, which must be kept unique.
170
171  Due to the large number of machines which the ARM port of Linux provides
172  for, we have a method to manage this which ensures that we don't end up
173  duplicating large amounts of code.
174
175  We group machine (or platform) support code into machine classes.  A
176  class typically based around one or more system on a chip devices, and
177  acts as a natural container around the actual implementations.  These
178  classes are given directories - arch/arm/mach-<class> and
179  arch/arm/mach-<class> - which contain the source files to/include/mach
180  support the machine class.  This directories also contain any machine
181  specific supporting code.
182
183  For example, the SA1100 class is based upon the SA1100 and SA1110 SoC
184  devices, and contains the code to support the way the on-board and off-
185  board devices are used, or the device is setup, and provides that
186  machine specific "personality."
187
188  For platforms that support device tree (DT), the machine selection is
189  controlled at runtime by passing the device tree blob to the kernel.  At
190  compile-time, support for the machine type must be selected.  This allows for
191  a single multiplatform kernel build to be used for several machine types.
192
193  For platforms that do not use device tree, this machine selection is
194  controlled by the machine type ID, which acts both as a run-time and a
195  compile-time code selection method.  You can register a new machine via the
196  web site at:
197
198    <http://www.arm.linux.org.uk/developer/machines/>
199
200  Note: Please do not register a machine type for DT-only platforms.  If your
201  platform is DT-only, you do not need a registered machine type.
202
203---
204Russell King (15/03/2004)
205