booting.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. =========================
  2. BOOTING FR-V LINUX KERNEL
  3. =========================
  4. ======================
  5. PROVIDING A FILESYSTEM
  6. ======================
  7. First of all, a root filesystem must be made available. This can be done in
  8. one of two ways:
  9. (1) NFS Export
  10. A filesystem should be constructed in a directory on an NFS server that
  11. the target board can reach. This directory should then be NFS exported
  12. such that the target board can read and write into it as root.
  13. (2) Flash Filesystem (JFFS2 Recommended)
  14. In this case, the image must be stored or built up on flash before it
  15. can be used. A complete image can be built using the mkfs.jffs2 or
  16. similar program and then downloaded and stored into flash by RedBoot.
  17. ========================
  18. LOADING THE KERNEL IMAGE
  19. ========================
  20. The kernel will need to be loaded into RAM by RedBoot (or by some alternative
  21. boot loader) before it can be run. The kernel image (arch/frv/boot/Image) may
  22. be loaded in one of three ways:
  23. (1) Load from Flash
  24. This is the simplest. RedBoot can store an image in the flash (see the
  25. RedBoot documentation) and then load it back into RAM. RedBoot keeps
  26. track of the load address, entry point and size, so the command to do
  27. this is simply:
  28. fis load linux
  29. The image is then ready to be executed.
  30. (2) Load by TFTP
  31. The following command will download a raw binary kernel image from the
  32. default server (as negotiated by BOOTP) and store it into RAM:
  33. load -b 0x00100000 -r /tftpboot/image.bin
  34. The image is then ready to be executed.
  35. (3) Load by Y-Modem
  36. The following command will download a raw binary kernel image across the
  37. serial port that RedBoot is currently using:
  38. load -m ymodem -b 0x00100000 -r zImage
  39. The serial client (such as minicom) must then be told to transmit the
  40. program by Y-Modem.
  41. When finished, the image will then be ready to be executed.
  42. ==================
  43. BOOTING THE KERNEL
  44. ==================
  45. Boot the image with the following RedBoot command:
  46. exec -c "<CMDLINE>" 0x00100000
  47. For example:
  48. exec -c "console=ttySM0,115200 ip=:::::dhcp root=/dev/mtdblock2 rw"
  49. This will start the kernel running. Note that if the GDB-stub is compiled in,
  50. then the kernel will immediately wait for GDB to connect over serial before
  51. doing anything else. See the section on kernel debugging with GDB.
  52. The kernel command line <CMDLINE> tells the kernel where its console is and
  53. how to find its root filesystem. This is made up of the following components,
  54. separated by spaces:
  55. (*) console=ttyS<x>[,<baud>[<parity>[<bits>[<flow>]]]]
  56. This specifies that the system console should output through on-chip
  57. serial port <x> (which can be "0" or "1").
  58. <baud> is a standard baud rate between 1200 and 115200 (default 9600).
  59. <parity> is a parity setting of "N", "O", "E", "M" or "S" for None, Odd,
  60. Even, Mark or Space. "None" is the default.
  61. <stop> is "7" or "8" for the number of bits per character. "8" is the
  62. default.
  63. <flow> is "r" to use flow control (XCTS on serial port 2 only). The
  64. default is to not use flow control.
  65. For example:
  66. console=ttyS0,115200
  67. To use the first on-chip serial port at baud rate 115200, no parity, 8
  68. bits, and no flow control.
  69. (*) root=<xxxx>
  70. This specifies the device upon which the root filesystem resides. It
  71. may be specified by major and minor number, device path, or even
  72. partition uuid, if supported. For example:
  73. /dev/nfs NFS root filesystem
  74. /dev/mtdblock3 Fourth RedBoot partition on the System Flash
  75. PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF/PARTNROFF=1
  76. first partition after the partition with the given UUID
  77. 253:0 Device with major 253 and minor 0
  78. Authoritative information can be found in
  79. "Documentation/kernel-parameters.txt".
  80. (*) rw
  81. Start with the root filesystem mounted Read/Write.
  82. The remaining components are all optional:
  83. (*) ip=<ip>::::<host>:<iface>:<cfg>
  84. Configure the network interface. If <cfg> is "off" then <ip> should
  85. specify the IP address for the network device <iface>. <host> provide
  86. the hostname for the device.
  87. If <cfg> is "bootp" or "dhcp", then all of these parameters will be
  88. discovered by consulting a BOOTP or DHCP server.
  89. For example, the following might be used:
  90. ip=192.168.73.12::::frv:eth0:off
  91. This sets the IP address on the VDK motherboard RTL8029 ethernet chipset
  92. (eth0) to be 192.168.73.12, and sets the board's hostname to be "frv".
  93. (*) nfsroot=<server>:<dir>[,v<vers>]
  94. This is mandatory if "root=/dev/nfs" is given as an option. It tells the
  95. kernel the IP address of the NFS server providing its root filesystem,
  96. and the pathname on that server of the filesystem.
  97. The NFS version to use can also be specified. v2 and v3 are supported by
  98. Linux.
  99. For example:
  100. nfsroot=192.168.73.1:/nfsroot-frv
  101. (*) profile=1
  102. Turns on the kernel profiler (accessible through /proc/profile).
  103. (*) console=gdb0
  104. This can be used as an alternative to the "console=ttyS..." listed
  105. above. I tells the kernel to pass the console output to GDB if the
  106. gdbstub is compiled in to the kernel.
  107. If this is used, then the gdbstub passes the text to GDB, which then
  108. simply dumps it to its standard output.
  109. (*) mem=<xxx>M
  110. Normally the kernel will work out how much SDRAM it has by reading the
  111. SDRAM controller registers. That can be overridden with this
  112. option. This allows the kernel to be told that it has <xxx> megabytes of
  113. memory available.
  114. (*) init=<prog> [<arg> [<arg> [<arg> ...]]]
  115. This tells the kernel what program to run initially. By default this is
  116. /sbin/init, but /sbin/sash or /bin/sh are common alternatives.