aboutsummaryrefslogtreecommitdiff
path: root/Documentation/arm/SA1100/Assabet
blob: 78bc1c1b04e58596d118d0f601914ad0cba9a3ce (plain)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
The Intel Assabet (SA-1110 evaluation) board
============================================

Please see:
http://developer.intel.com/design/strong/quicklist/eval-plat/sa-1110.htm
http://developer.intel.com/design/strong/guides/278278.htm

Also some notes from John G Dorsey <jd5q@andrew.cmu.edu>:
http://www.cs.cmu.edu/~wearable/software/assabet.html


Building the kernel
-------------------

To build the kernel with current defaults:

	make assabet_config
	make oldconfig
	make zImage

The resulting kernel image should be available in linux/arch/arm/boot/zImage.


Installing a bootloader
-----------------------

A couple of bootloaders able to boot Linux on Assabet are available:

BLOB (http://www.lartmaker.nl/lartware/blob/)

   BLOB is a bootloader used within the LART project.  Some contributed
   patches were merged into BLOB to add support for Assabet.

Compaq's Bootldr + John Dorsey's patch for Assabet support
(http://www.handhelds.org/Compaq/bootldr.html)
(http://www.wearablegroup.org/software/bootldr/)

   Bootldr is the bootloader developed by Compaq for the iPAQ Pocket PC.
   John Dorsey has produced add-on patches to add support for Assabet and
   the JFFS filesystem.

RedBoot (http://sources.redhat.com/redboot/)

   RedBoot is a bootloader developed by Red Hat based on the eCos RTOS
   hardware abstraction layer.  It supports Assabet amongst many other
   hardware platforms.

RedBoot is currently the recommended choice since it's the only one to have
networking support, and is the most actively maintained.

Brief examples on how to boot Linux with RedBoot are shown below.  But first
you need to have RedBoot installed in your flash memory.  A known to work
precompiled RedBoot binary is available from the following location:

ftp://ftp.netwinder.org/users/n/nico/
ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/
ftp://ftp.handhelds.org/pub/linux/arm/sa-1100-patches/

Look for redboot-assabet*.tgz.  Some installation infos are provided in
redboot-assabet*.txt.


Initial RedBoot configuration
-----------------------------

The commands used here are explained in The RedBoot User's Guide available
on-line at http://sources.redhat.com/ecos/docs-latest/redboot/redboot.html.
Please refer to it for explanations.

If you have a CF network card (my Assabet kit contained a CF+ LP-E from
Socket Communications Inc.), you should strongly consider using it for TFTP
file transfers.  You must insert it before RedBoot runs since it can't detect
it dynamically.

To initialize the flash directory:

	fis init -f

To initialize the non-volatile settings, like whether you want to use BOOTP or
a static IP address, etc, use this command:

	fconfig -i


Writing a kernel image into flash
---------------------------------

First, the kernel image must be loaded into RAM.  If you have the zImage file
available on a TFTP server:

	load zImage -r -b 0x100000

If you rather want to use Y-Modem upload over the serial port:

	load -m ymodem -r -b 0x100000

To write it to flash:

	fis create "Linux kernel" -b 0x100000 -l 0xc0000


Booting the kernel
------------------

The kernel still requires a filesystem to boot.  A ramdisk image can be loaded
as follows:

	load ramdisk_image.gz -r -b 0x800000

Again, Y-Modem upload can be used instead of TFTP by replacing the file name
by '-y ymodem'.

Now the kernel can be retrieved from flash like this:

	fis load "Linux kernel"

or loaded as described previously.  To boot the kernel:

	exec -b 0x100000 -l 0xc0000

The ramdisk image could be stored into flash as well, but there are better
solutions for on-flash filesystems as mentioned below.


Using JFFS2
-----------

Using JFFS2 (the Second Journalling Flash File System) is probably the most
convenient way to store a writable filesystem into flash.  JFFS2 is used in
conjunction with the MTD layer which is responsible for low-level flash
management.  More information on the Linux MTD can be found on-line at:
http://www.linux-mtd.infradead.org/.  A JFFS howto with some infos about
creating JFFS/JFFS2 images is available from the same site.

For instance, a sample JFFS2 image can be retrieved from the same FTP sites
mentioned below for the precompiled RedBoot image.

To load this file:

	load sample_img.jffs2 -r -b 0x100000

The result should look like:

RedBoot> load sample_img.jffs2 -r -b 0x100000
Raw file loaded 0x00100000-0x00377424

Now we must know the size of the unallocated flash:

	fis free

Result:

RedBoot> fis free
  0x500E0000 .. 0x503C0000

The values above may be different depending on the size of the filesystem and
the type of flash.  See their usage below as an example and take care of
substituting yours appropriately.

We must determine some values:

size of unallocated flash:	0x503c0000 - 0x500e0000 = 0x2e0000
size of the filesystem image:	0x00377424 - 0x00100000 = 0x277424

We want to fit the filesystem image of course, but we also want to give it all
the remaining flash space as well.  To write it:

	fis unlock -f 0x500E0000 -l 0x2e0000
	fis erase -f 0x500E0000 -l 0x2e0000
	fis write -b 0x100000 -l 0x277424 -f 0x500E0000
	fis create "JFFS2" -n -f 0x500E0000 -l 0x2e0000

Now the filesystem is associated to a MTD "partition" once Linux has discovered
what they are in the boot process.  From Redboot, the 'fis list' command
displays them:

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x50000000  0x50000000  0x00020000  0x00000000
RedBoot config    0x503C0000  0x503C0000  0x00020000  0x00000000
FIS directory     0x503E0000  0x503E0000  0x00020000  0x00000000
Linux kernel      0x50020000  0x00100000  0x000C0000  0x00000000
JFFS2             0x500E0000  0x500E0000  0x002E0000  0x00000000

However Linux should display something like:

SA1100 flash: probing 32-bit flash bus
SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode
Using RedBoot partition definition
Creating 5 MTD partitions on "SA1100 flash":
0x00000000-0x00020000 : "RedBoot"
0x00020000-0x000e0000 : "Linux kernel"
0x000e0000-0x003c0000 : "JFFS2"
0x003c0000-0x003e0000 : "RedBoot config"
0x003e0000-0x00400000 : "FIS directory"

What's important here is the position of the partition we are interested in,
which is the third one.  Within Linux, this correspond to /dev/mtdblock2.
Therefore to boot Linux with the kernel and its root filesystem in flash, we
need this RedBoot command:

	fis load "Linux kernel"
	exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2"

Of course other filesystems than JFFS might be used, like cramfs for example.
You might want to boot with a root filesystem over NFS, etc.  It is also
possible, and sometimes more convenient, to flash a filesystem directly from
within Linux while booted from a ramdisk or NFS.  The Linux MTD repository has
many tools to deal with flash memory as well, to erase it for example.  JFFS2
can then be mounted directly on a freshly erased partition and files can be
copied over directly.  Etc...


RedBoot scripting
-----------------

All the commands above aren't so useful if they have to be typed in every
time the Assabet is rebooted.  Therefore it's possible to automatize the boot
process using RedBoot's scripting capability.

For example, I use this to boot Linux with both the kernel and the ramdisk
images retrieved from a TFTP server on the network:

RedBoot> fconfig
Run script at boot: false true
Boot script:
Enter script, terminate with empty line
>> load zImage -r -b 0x100000
>> load ramdisk_ks.gz -r -b 0x800000
>> exec -b 0x100000 -l 0xc0000
>>
Boot script timeout (1000ms resolution): 3
Use BOOTP for network configuration: true
GDB connection port: 9000
Network debug at boot time: false
Update RedBoot non-volatile configuration - are you sure (y/n)? y

Then, rebooting the Assabet is just a matter of waiting for the login prompt.



Nicolas Pitre
nico@cam.org
June 12, 2001


Status of peripherals in -rmk tree (updated 14/10/2001)
-------------------------------------------------------

Assabet:
 Serial ports:
  Radio:		TX, RX, CTS, DSR, DCD, RI
   PM:			Not tested.
  COM:			TX, RX, CTS, DSR, DCD, RTS, DTR, PM
   PM:			Not tested.
  I2C:			Implemented, not fully tested.
  L3:			Fully tested, pass.
   PM:			Not tested.

 Video:
  LCD:			Fully tested.  PM
			(LCD doesn't like being blanked with
			 neponset connected)
  Video out:		Not fully

 Audio:
  UDA1341:
   Playback:		Fully tested, pass.
   Record:		Implemented, not tested.
   PM:			Not tested.

  UCB1200:
   Audio play:		Implemented, not heavily tested.
   Audio rec:		Implemented, not heavily tested.
   Telco audio play:	Implemented, not heavily tested.
   Telco audio rec:	Implemented, not heavily tested.
   POTS control:	No
   Touchscreen:		Yes
   PM:			Not tested.

 Other:
  PCMCIA:
   LPE:			Fully tested, pass.
  USB:			No
  IRDA:
   SIR:			Fully tested, pass.
   FIR:			Fully tested, pass.
   PM:			Not tested.

Neponset:
 Serial ports:
  COM1,2:	TX, RX, CTS, DSR, DCD, RTS, DTR
   PM:			Not tested.
  USB:			Implemented, not heavily tested.
  PCMCIA:		Implemented, not heavily tested.
   PM:			Not tested.
  CF:			Implemented, not heavily tested.
   PM:			Not tested.

More stuff can be found in the -np (Nicolas Pitre's) tree.