📄 booting101
字号:
The bitsy comes with Wince. To get to Plan 9, you will need a serial cable,a Windows machine with a serial interface, the CDROM that comes with the bitsy,and a Plan 9 machine with a serial interface. The Windows machine is used toget the Linux boot loader onto the bitsy (and to save away wince, if you sodesire). The Plan 9 machine is used to get the plan 9 kernel and a read onlyfile system onto the bitsy.0. charge up the bitsy.1. go to ftp://ftp.handhelds.org/pub/linux/compaq/ipaq/stable/install.htmlGet the latest version of the Linux "osloader" and "bootldr" programs(we have tried versions 1.3.0 and 0000-2.14.8, respectively; newestversions seem not to allow you to suspend your bitsy due to a bugwhich is probably ours). You can find them all atwww.collyer.net/who/geoff/9/bitsy/.2. Use ActiveSync to copy osloader and bootldr to the bitsy. Copy orrename the bootldr binary to "bootldr" on Windows, then copy it to thebitsy; trying to rename it on WinCE won't produce the right result.Steps 3 - 7 may work on a Pocket PC bitsy, but see Steps 3a - 7aif they don't or if you have a Pocket PC 2002 bitsy.3. Run osloader by clicking on it under the WinCE File Explorer4. Use osloader to save your WinCE flash away. This takes a while,as it's 16MB over a 115,200 baud line.5. Select "Run" from the osloader menu. Ignore "Run from RAM"; it'snot needed.6. At this point, the bitsy's screen turns blank, but you can stilltalk to the bitsy over its serial port. The serial port is connectedto the OS loader's terminal program. On Windows, you have to exitActiveSync before the serial port is available for a terminal program.I moved the bitsy and its cable over to a Plan 9 machine and connectedusing "con -b 115200 /dev/eia[01]" to talk to the console. Thecommand "help" lists the OS loader's commands.7. Now you need to download the BOOT loader program into flash (rightnow, you're only running the OS loader program out of RAM; rebootingwill get you back to WinCE). In the con window, "load bootldr" to thebitsy. It will indicate that it's starting an xmodem download.Under con, type "Ctrl-\" to get a ">>>" prompt. At this prompt, youwant to run Plan 9's xms program to pipe the bootldr program to thebitsy. For example, to download /tmp/bootldr, type "!xms /tmp/bootldr".If this step works successfully, the OS loader will print out some sortof OK checksum message.If you have a Pocket PC 2002 or steps 3 - 7 above didn't work for you,try 3a - 7a.3a. Copy BootBlaster (also) to the bitsy via ActiveSync.4a. Save your flash by running osloader and selecting "Flash->Save toFile". As it produces 4MB files, use ActiveSync to copy them off thebitsy.5a. Move the bitsy and its cable over to a Plan 9 machine and connectusing "con -b 115200 /dev/eia[01]" to talk to the console.6a. Run BootBlaster by clicking on it under the WinCE File Explorer.7a. Select "Program"; it should copy "bootldr" into your flash inabout 15 seconds.8. Reboot your bitsy (either cycle the power or use the resetswitch). The new boot loader runs out of Flash. You'll get the linuxpenguin splash screen and a bunch of options triggered by buttons.Pick the one that gets you to the boot loader.9. Make the partitions you need in the bitsy's flash, type, usingthe con program: partition reset partition define bootldr 0x000000 0x040000 2 partition define params 0x040000 0x040000 0 partition define kernel 0x080000 0x0c0000 0 partition define user 0x140000 0x0c0000 0 partition define ramdisk 0x200000 0x600000 0 partition define fs 0x800000 0x800000 0 params saveThese are the partitions as shown by partition show: boot> partition show argv[1]=partition npartitions=00000006 bootldr base: 00000000 size: 00040000 flags: 00000002 params base: 00040000 size: 00040000 flags: 00000000 kernel base: 00080000 size: 000C0000 flags: 00000000 user base: 00140000 size: 000C0000 flags: 00000000 ramdisk base: 00200000 size: 00600000 flags: 00000000 fs base: 00800000 size: 00800000 flags: 00000000After each line you'll get a message like `defining partition: params'.Different versions of the bootloader predefine different partitions.The bootldr partition is usually predefined, so you don't have to remakethat. You may have to delete one or two partitions. The command is partition delete <name>Make sure the partition layout is as given above; some of this knowledge isbuilt into the kernel.10. Before you can fill the new partitions with a kernel and a read-onlyfile system, you'll have to make them. In the directory /sys/src/9/bitsy,type mk and mk paqdisk. Before mk-ing paqdisk, make sure you have allthe necessary arm binaries installed in /arm and examine the filepaqfiles/mfs to see what you need to change for connecting to your localfile servers.11. Now you can type "load kernel". The boot loader will prompt foranother xmodem download. Again escape using "Ctrl-\", then use"!xms /sys/src/9/bitsy/9bitsy" (or "!xms /arm/9bitsy" if you've alreadyinstalled it).12. Download the ramdisk, using "load ramdisk" and"!xms /sys/src/9/bitsy/paqdisk" (or "!xms /arm/paqdisk" if you've alreadyinstalled it), similarly to 10, above.13. Type `boot' or `boot flash' depending on your version of the boot loader.If you need the latter, you may want to set boot_type flash params saveto make boot flash the default.You'll get a Dutch flag (or a French one, if you hold the iPaq the wrong way),then the boot screen will say, on the serial port, thus in your con window: root is from [paq]:Just wait a while or hit enter in the con window and it'll continue.14. The bitsy will now want to calibrate the screen. It'll put up aseries of crosses that you should press the center of. Hold the pendown over each cross for a second or so; aim carefully. Hold themachine in your hand the way you'ld normally use it or the calibrationcould be off since there is depth to the glass in the screen.15. You'll get a new screen with a single line at the top and akeyboard/scribble area at the bottom. This is a simple one fileeditor. This file is similar to plan9.ini on PC's. There may begarbage on the top line. If there is, delete the garbage letters.(Be careful here: the backspace and delete keys are adjacent on thewee keyboard and it's much too easy to hit delete instead ofbackspace, especially if you haven't calibrated the screen dead-on.)You should be left with a single line containing (with differentnumbers): calibrate='-16374 22919 251 -24'You need to enter a few more things, including, but not limited to: user=<user-name> wvkey1=<key string> wvkey2=<key string> wvkey3=<key string> wvtxkey=<key string> wvessid=<wavelan name> auth=<ip address> cpu=<ip address> proxy=<ip address> fs=<ip address>Your best bet is to copy these off a working bitsy. wv*key* onlymatter if your wireless network is encrypted. When roaming the world,omit wv*. When you're done, hit the "ESC" key on the simulatedkeyboard, or the side button near the word iPAQ on the bitsy. Thesystem will now come up as you. However, you'll get a message aboutthe flash file system being corrupted, because we haven't yetinitialized it.16. To set up the file systems, sweep a window and give the followingsequence of commands. # aux/mkflashfs /dev/flash/fs # aux/flashfsaux/flashfs created a Plan 9 server in /srv/brzr, which we can use to set updefault directories. # mount -c /srv/brzr /n/brzr # cd /n/brzr # mkdir n usr # mkdir n/fs n/emelie n/choline n/nslocum # mkdir usr/yourname usr/yourfriend17. For safety, reboot the system: # reboot18. Now reboot, go through the Linux splash screen, the Plan 9 booteditor, and sweep yourself a new rio window.Before you can connect to other machines, you need a way to enterpasswords and keys into factotum. The easiest way to do this is torun # auth/fgui &in the window you just made. The window will disappear (fgui spendsmost of its time hidden), so sweep a new window and run the command # mfsto connect to file servers. You will probably need to modify mfs towork in your environment (see point 10), though you can supply manyof the variables it needs in step 15, and doing # import $cpu /netbefore running mfs can go a long ways.19. When you're all set with a working wavelan, you can download newkernels more quickly using # bitsyload kand new paqdisks using # bitsyload r(r stands for ramdisk, the name of the partition into which paqdisk goes).Note that overwriting the ramdisk partition will cause the read-only filesystem which forms the root of you namespace to fail. You'll need toreboot immediately after bytsyload r.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -