Booting101 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. The bitsy comes with Wince. To get to Plan 9, you will need a serial cable,
  2. a Windows machine with a serial interface, the CDROM that comes with the bitsy,
  3. and a Plan 9 machine with a serial interface. The Windows machine is used to
  4. get the Linux boot loader onto the bitsy (and to save away wince, if you so
  5. desire). The Plan 9 machine is used to get the plan 9 kernel and a read only
  6. file system onto the bitsy.
  7. 0) charge up the bitsy.
  8. 1) go to
  9. ftp://ftp.handhelds.org/pub/linux/compaq/ipaq/stable/install.html Get
  10. the latest version of the Linux "osloader" and "bootldr" programs
  11. (current versions are 1.3.0 and 0000-2.14.8, respectively).
  12. 2. Use ActiveSync to copy osloader to the bitsy.
  13. 3. Run osloader by clicking on it under the WinCE File Explorer
  14. (4). Use osloader to save your WinCE flash away. This takes a while,
  15. as it's 16MB over a 115,200 baud line.
  16. 5. Select "Run" from the osloader menu. Ignore "Run from RAM"; it's
  17. not needed.
  18. 6. At this point, the bitsy's screen turns blank, but you can still
  19. talk to the bitsy over its serial port. The serial port is connected
  20. to the OS loader's terminal program. On Windows, you have to exit
  21. ActiveSync before the serial port is available for a terminal program.
  22. I moved the bitsy and its cable over to a Plan 9 machine and connected
  23. using "con -b 115200 /dev/eia[01]" to talk to the console. The
  24. command "help" lists the OS loader's commands.
  25. 7. Now you need to download the BOOT loader program into flash (right
  26. now, you're only running the OS loader program out of RAM; rebooting
  27. will get you back to WinCE). In the con window, "load bootldr" to the
  28. bitsy. It will indicate that it's starting an xmodem download.
  29. Under con, type "Ctrl-\" to get a ">>>" prompt. At this prompt, you
  30. want to run Plan 9's xms program to pipe the bootldr program to the
  31. bitsy. For example, to download /tmp/bootldr, type "!xms /tmp/bootldr".
  32. If this step works successfully, the OS loader will print out some sort
  33. of OK checksum message.
  34. 8. Reboot your bitsy (either cycle the power or use the reset
  35. switch). The new boot loader runs out of Flash. You'll get the linux
  36. penguin splash screen and a bunch of options triggered by buttons.
  37. Pick the one that gets you to the boot loader.
  38. 9. Make the partitions you need in the bitsy's flash, type, using
  39. the con program:
  40. partition reset
  41. partition define bootldr 0x000000 0x040000 2
  42. partition define params 0x040000 0x040000 0
  43. partition define kernel 0x080000 0x0c0000 0
  44. partition define user 0x140000 0x0c0000 0
  45. partition define ramdisk 0x200000 0x600000 0
  46. partition define fs 0x800000 0x800000 0
  47. params save
  48. After each line you'll get a message like `defining partiton: params'.
  49. 10. Before you can fill the new partitions with a kernel and a read-only
  50. file system, you'll have to make them. In the directory /sys/src/9/bitsy,
  51. type mk and mk paqdisk. Before mk-ing paqdisk, examine the file
  52. paqfiles/mfs to see what you need to change for connecting to your local
  53. file servers.
  54. 11. Now you can type "load kernel". The boot loader will prompt for
  55. another xmodem download. Again escape using "Ctrl-\", then use
  56. "!xms /sys/src/9/bitsy/9bitsy".
  57. 12. Download the ramdisk, using "load ramdisk" and
  58. "!xms /sys/src/9/bitsy/paqdisk", similarly to 10, above.
  59. 13. Type `boot'. This time, select "boot Linux" at the
  60. penguin splash screen. You'll get a Dutch flag, then the boot screen
  61. will say:
  62. root is from [paq]:
  63. Just wait a while or hit enter in the con window and it'll continue.
  64. 14. The bitsy will now want to calibrate the screen. It'll put up a
  65. series of crosses that you should press the center of. Hold the pen
  66. down over each cross for a second or so; aim carefully. Hold the
  67. machine in your hand the way you'ld normally use it or the calibration
  68. could be off since there is depth to the glass in the screen.
  69. 15. You'll get a new screen with a single line at the top and a
  70. keyboard/scribble area at the bottom. This is a simple one file editor.
  71. This file is similar to plan9.ini on PC's. There may be garbage on the
  72. top line. If there is, delete the garbage letters. You should be left with
  73. a single line containing (with slightly different numbers)
  74. calibrate='-16374 22919 251 -24'
  75. You need to enter a few more things, including,
  76. but not limited to:
  77. user=<user-name>
  78. wvkey1=<key string>
  79. wvkey2=<key string>
  80. wvkey3=<key string>
  81. wvtxkey=<key string>
  82. wvessid=<wavelan name>
  83. auth=<ip address>
  84. fs=<ip address>
  85. Your best bet is to copy these off a working bitsy. When you're done,
  86. hit the "ESC" key on the simulated keyboard, or the side button near
  87. the word iPAQ on the bitsy. The system will now come
  88. up as you. However, you'll get a message about the flash file system
  89. being corrupted, because we haven't yet initialized it.
  90. 16. To set up the file systems, sweep a window and do the following
  91. sequence of commands.
  92. # aux/mkflashfs /dev/flash/fs
  93. # aux/flashfs
  94. aux/flashfs created a Plan 9 server in /srv/brzr, which we can use to set up
  95. default directories.
  96. # mount -c /srv/brzr /n/brzr
  97. # cd /n/brzr
  98. # mkdir n usr
  99. # mkdir n/fs n/emelie n/choline n/nslocum
  100. # mkdir usr/yourname usr/yourfriend
  101. 17. For safety, reboot the system:
  102. # reboot
  103. 18. Now reboot, go through the Linux splash screen, the Plan 9 boot
  104. editor, and sweep yourself a new rio window.
  105. Before you can connect to other machines, you need a way to enter
  106. passwords and keys into factotum. The easiest way to do this is to
  107. run
  108. # auth/fgui
  109. in the window you just made. The window will disappear (fgui
  110. spends most of its time hidden), so sweep a new window and run
  111. the command
  112. # mfs
  113. to connect to file servers. You will probably need to modify mfs to
  114. work in your environment (see point 10).
  115. 19. When you're all set with a working wavelan, you can download new
  116. kernels more quickly using
  117. # bitsyload k
  118. and new paqdisks using
  119. # bitsyload r
  120. (r stands for ramdisk, the name of the partition into which paqdisk goes).
  121. Note that overwriting the ramdisk partition will cause the read-only file
  122. system which forms the root of you namespace to fail. You'll need to
  123. reboot immediately after bytsyload r.