1
0

booting 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. .TH BOOTING 8
  2. .SH NAME
  3. booting \- bootstrapping procedures
  4. .SH SYNOPSIS
  5. none
  6. .SH DESCRIPTION
  7. This manual page collects the incantations required to bootstrap Plan 9 machines.
  8. Some of the information here is specific to the installation at Bell Labs;
  9. some is generic.
  10. .PP
  11. If a CPU server is up, BOOTP/DHCP and TFTP will run from there;
  12. if not, the necessary files and services must be available on a separate machine,
  13. such as a Unix system, to use these protocols for bootstrapping.
  14. .PP
  15. Be sure to read
  16. .IR boot (8)
  17. to understand what happens after the kernel is loaded.
  18. .SS Terminals
  19. To bootstrap a diskless terminal or a CPU server, a file server must be running.
  20. PCs can boot from a floppy disk or any FAT16 partition.
  21. On all the terminals, typing two control-T's followed by a lower-case
  22. .B r
  23. reboots the machine;
  24. other methods of rebooting are mentioned for some machines.
  25. .SS PCs
  26. To boot a PC, it is necessary to get
  27. .B /386/9boot
  28. or
  29. .B /386/9load
  30. loaded into memory.
  31. There are many ways to do this. A Plan 9 boot floppy prepared by
  32. .B format
  33. (see
  34. .IR prep (8))
  35. will load
  36. .B 9load
  37. when the PC is reset or powered on.
  38. Other methods are described in
  39. .IR 9boot (8).
  40. .I 9boot
  41. or
  42. .I 9load
  43. then locates and loads a Plan 9 kernel, using configuration information
  44. from the matching file in
  45. .B /cfg/pxe
  46. .RI ( 9boot )
  47. or the file
  48. .B plan9.ini
  49. stored in the
  50. .B 9fat
  51. configuration partition or on a DOS file system
  52. .RI ( 9load ).
  53. See
  54. .IR 9boot (8)
  55. for details.
  56. .PP
  57. Once the kernel is booted, it behaves like the others.
  58. See
  59. .IR boot (8)
  60. for details.
  61. .SS CPU Servers
  62. The Plan 9 CPU servers are multi-user, so they do not request a user name
  63. when booting.
  64. On the CPU servers, typing a control-P on the console reboots the machine.
  65. .SS PC CPU Server
  66. Proceed as for the PC terminal, but load
  67. .B /386/9pccpu
  68. or
  69. .BR /386/9pccpudisk .
  70. .
  71. .SS MIPS Routerboard CPU Server
  72. Configure RouterBOOT via the serial port (115200 baud)
  73. to always boot from Ethernet via DHCP and TFTP, and arrange to load the ELF executable
  74. .B /mips/9rb
  75. in
  76. .IR ndb (6).
  77. .
  78. .SS ARM Systems
  79. All ARM systems are started by
  80. .I U-boot
  81. using similar commands.
  82. The kernels
  83. (and thus
  84. .I ndb
  85. .L bootf
  86. parameters)
  87. are
  88. .TF /arm/9beagl
  89. .TP
  90. .L /arm/9gd
  91. for the Marvell PXA168-based Guruplug Display
  92. .TP
  93. .L /arm/9plug
  94. for other Marvell Kirkwoods (Sheevaplug, Guruplug, Dreamplug, Openrd, etc.)
  95. .TP
  96. .L /arm/9beagle
  97. for TI OMAP3 boards (IGEPv2 from ISEE, Gumstix Overo)
  98. .TP
  99. .L /arm/9ts
  100. for Trimslice systems, which contain the Nvidia Tegra 2
  101. .TP
  102. .L /arm/9pi
  103. .TP
  104. .L /arm/9picpu
  105. for Raspberry Pis
  106. .PD
  107. .LP
  108. In the following,
  109. replace
  110. .I MAC
  111. with your board's MAC address without colons,
  112. in lower case
  113. (the format of the
  114. .L ether
  115. .I ndb
  116. attribute).
  117. If loading from a non-Plan-9
  118. TFTP server,
  119. replace
  120. .L %C
  121. with
  122. .BI /cfg/pxe/ MAC.
  123. .PP
  124. First, establish a
  125. .I /cfg/pxe
  126. (\c
  127. .IR plan9.ini )
  128. file for the new CPU server.
  129. For Kirkwood plugs,
  130. .IP
  131. .EX
  132. cd /cfg/pxe; cp example-kw \fIMAC
  133. .EE
  134. .PP
  135. and edit
  136. .L /cfg/pxe/\fIMAC
  137. to taste.
  138. For PXA plugs, replace
  139. .L kw
  140. with
  141. .LR pxa ;
  142. for OMAP boards, replace
  143. .L kw
  144. with
  145. .LR omap
  146. and
  147. be sure to edit the line for
  148. .L ether0
  149. to set
  150. .IP
  151. .EX
  152. ea=\fIMAC
  153. .EE
  154. .PP
  155. Second,
  156. configure
  157. .I U-boot
  158. to load the appropriate kernel and
  159. .I /cfg/pxe
  160. file at suitable addresses and start the kernel.
  161. For Sheevaplugs and Openrd boards,
  162. type this at U-boot once:
  163. .IP
  164. .EX
  165. setenv bootdelay 2
  166. # \fItype the next two lines as one\fP
  167. setenv bootcmd 'bootp; bootp; tftp 0x1000 %C; bootp; tftp 0x800000;
  168. go 0x800000'
  169. saveenv
  170. .EE
  171. .PP
  172. For Guruplugs Displays,
  173. do the same but type this after
  174. .L "setenv bootcmd"
  175. instead:
  176. .IP
  177. .EX
  178. \&'dhcp; tftpboot; tftpboot 0x1000 %C; bootz 0x500000'
  179. .EE
  180. .PP
  181. For Kirkwood Guruplugs,
  182. type this after
  183. .LR "setenv bootcmd" :
  184. .IP
  185. .EX
  186. \&'dhcp 0x800000; tftp 0x1000 %C; go 0x800000'
  187. .EE
  188. .PP
  189. For IGEPv2 boards,
  190. type this after
  191. .LR "setenv bootcmd" :
  192. .IP
  193. .EX
  194. \&'tftp 0x80300000 %C; dhcp 0x80310000; go 0x80310000'
  195. .EE
  196. .PP
  197. For Gumstix Overo boards,
  198. type this after
  199. .LR "setenv bootcmd" :
  200. .IP
  201. .EX
  202. \&'bootp 0x80310000; bootp 0x80300000 %C; go 0x80310000'
  203. .EE
  204. .PP
  205. For Trimslice systems,
  206. type this after
  207. .LR "setenv bootcmd" :
  208. .IP
  209. .EX
  210. \&'dhcp; dhcp; tftpboot 0x410000; tftpboot 0x400000 %C; go 0x410000'
  211. .EE
  212. .PP
  213. For Raspberry Pis,
  214. .I gunzip
  215. the
  216. .B pi.uboot.sd.img.gz
  217. named below onto an SD card and insert that into your Pi.
  218. .PP
  219. Thereafter, the boards will automatically boot via BOOTP and TFTP
  220. when reset.
  221. .
  222. .SH FILES
  223. .B /n/sources/extra/pi.uboot.sd.img.gz
  224. is a compressed bootable SD card image for Raspberry Pi, uses PXE booting.
  225. .SH SOURCE
  226. .B /sys/src/boot
  227. .br
  228. .B /sys/src/9/pcboot
  229. .SH "SEE ALSO"
  230. .IR ndb (6),
  231. .IR 9boot (8),
  232. .IR boot (8),
  233. .IR init (8),
  234. .IR plan9.ini (8)