File: flashwrite.8

package info (click to toggle)
corel-util 1.2-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 128 kB
  • ctags: 57
  • sloc: ansic: 776; makefile: 61; sh: 5
file content (97 lines) | stat: -rw-r--r-- 4,202 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.TH flashwrite 8 "November 8 1998" "CCC" "Corel NetWinder Utilities" 
.SH NAME
flashwrite \- NetWinder flash programming utility
.SH SYNOPSIS
.B flashwrite
.RB [ -base64 ]
.I filename offset
.SH DESCRIPTION
This program is used to program the Flash memory (a.k.a. firmware) on a
NetWinder.  The JTAG boundary-scan feature is (ab)used to open a short
window of time during which the flash memory is writable (this fauture is
intended to make accidental flash erasure more difficult).  Since the window
is very narrow, any unexpected interrupts or other "diversions" may cause
the process to fail, leaving the flash memory corrupted.  The flash driver
will retry several times, but may give up if repeated failures occur.
.PP
Since the flash contains the NetWinder's boot code, it is imperative that
the flash writing process be repeated manually until the entire data is
written successfully.  If a failure occurs, DO NOT POWER DOWN OR RESET YOUR
MACHINE as it will very likely NEVER BE ABLE TO BOOT AGAIN.  Do not use
.I flashwrite
during a thunderstorm!  If repeated failures occur, try repositioning the
NetWinder away from the monitor or other sources of EMI.
.SH OPTIONS
.TP 10
.B -base64
Enable access to the first 64kB of flash.  Otherwise any attempts to write
with an offset FFFF or less will fail. In the future the base 64kB block
should contain a fail-safe code and once factory programmed, should never
be rewritten.
.TP 10
.I filename
The name of the file containing the new data you wish to program into the
flash.
.TP 10
.I offset
An offset within the flash memory indicating where the write is to begin.
This value must be specified and is commonly
.BR 0.
Non-zero values must be given in hexadecimal.
.SH FILES
.I /sbin/flashwrite
.I /man/man8/flashwrite.8
.I /boot/nettrom*
.SH DIAGNOSTICS
This program is just a front-end on the kernel flash driver.  The driver
must be loaded by running
.B insmod nwflash
as root, otherwise 
.I flashwrite
will will report "Error -1 opening /dev/nwflash".  There must also exist the 
.I /dev/nwflash
device node; it can be created with the command
.TP
.I mknod -m666 /dev/nwflash c 10 160
.PP
The optional string
.B flashdebug=1
may be passed to 
.I insmod
while loading the flash driver and will enable verbose output of the writing
process.  The flash is written in blocks which are first erased and then
re-programmed with new data.  Thus a failure during the burning process will
generally leave a gap somewhere in the flash.
.SH FILE FORMAT
The following information is subject to change and may be totally wrong even
at the time of writing.  The flash data file given by
.I filename
contains several sections separated by magic numbers and/or marker strings. 
The first 64kB is reserved for low-level bootstrapping and hardware
initialization, detection of RAM, and video initialization.  This section is
known as
.B NeTTrom
and is maintained by San Mehat <sanm@corelcomputer.com>.
.PP
The next 400kB (approximately) contain a compressed linux kernel that has
been stripped down to support only key features.  We call this the 
.B minikernel
and it is this code that presents the Sun-like boot configuration manager. 
This code also handles DHCP booting, fetching of the real kernel via TFTP,
and NFS booting.
.PP
Optionally, a compressed root filesystem may follow the minikernel.  The
size is limited by the Flash, currently NetWinders ship with 1 Meg of flash
memory.  Future machines may have 2 or 4 Megs.  The minikernel is able to
uncompress this filesystem into RAM and then to mount it as the root
filesystem, so it is possible to boot "diskless" and also "networkless".
.PP
Finally, the top-most 32 (or 64) kB of Flash are reserved for holding the
configuration information entered in the configuration manager.  If no valid
information is found in this area, the minikernel will supply default values
and will OVERWRITE this part of the flash.  So it is important to ensure
that any rootfs image does not extend into this region.
.SH AUTHOR
The program is written by Woody Suwalski <woody@corelcomputer.com>, and the
man page was written by Ralph Siemsen <ralphs@corelcomputer.com>.  Both are
distributed under the terms of the GPL.