arm.rst 7.7 KB

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