PageRenderTime 24ms CodeModel.GetById 11ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/Documentation/arm/SA1100/Assabet

https://bitbucket.org/evzijst/gittest
#! | 301 lines | 212 code | 89 blank | 0 comment | 0 complexity | ad8a9159c4dbb743642b4d99af5af098 MD5 | raw file
  1The Intel Assabet (SA-1110 evaluation) board
  2============================================
  3
  4Please see:
  5http://developer.intel.com/design/strong/quicklist/eval-plat/sa-1110.htm
  6http://developer.intel.com/design/strong/guides/278278.htm
  7
  8Also some notes from John G Dorsey <jd5q@andrew.cmu.edu>:
  9http://www.cs.cmu.edu/~wearable/software/assabet.html
 10
 11
 12Building the kernel
 13-------------------
 14
 15To build the kernel with current defaults:
 16
 17	make assabet_config
 18	make oldconfig
 19	make zImage
 20
 21The resulting kernel image should be available in linux/arch/arm/boot/zImage.
 22
 23
 24Installing a bootloader
 25-----------------------
 26
 27A couple of bootloaders able to boot Linux on Assabet are available:
 28
 29BLOB (http://www.lart.tudelft.nl/lartware/blob/)
 30
 31   BLOB is a bootloader used within the LART project.  Some contributed
 32   patches were merged into BLOB to add support for Assabet.
 33
 34Compaq's Bootldr + John Dorsey's patch for Assabet support
 35(http://www.handhelds.org/Compaq/bootldr.html)
 36(http://www.wearablegroup.org/software/bootldr/)
 37
 38   Bootldr is the bootloader developed by Compaq for the iPAQ Pocket PC.
 39   John Dorsey has produced add-on patches to add support for Assabet and
 40   the JFFS filesystem.
 41
 42RedBoot (http://sources.redhat.com/redboot/)
 43
 44   RedBoot is a bootloader developed by Red Hat based on the eCos RTOS
 45   hardware abstraction layer.  It supports Assabet amongst many other
 46   hardware platforms.
 47
 48RedBoot is currently the recommended choice since it's the only one to have
 49networking support, and is the most actively maintained.
 50
 51Brief examples on how to boot Linux with RedBoot are shown below.  But first
 52you need to have RedBoot installed in your flash memory.  A known to work
 53precompiled RedBoot binary is available from the following location:
 54
 55ftp://ftp.netwinder.org/users/n/nico/
 56ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/
 57ftp://ftp.handhelds.org/pub/linux/arm/sa-1100-patches/
 58
 59Look for redboot-assabet*.tgz.  Some installation infos are provided in
 60redboot-assabet*.txt.
 61
 62
 63Initial RedBoot configuration
 64-----------------------------
 65
 66The commands used here are explained in The RedBoot User's Guide available
 67on-line at http://sources.redhat.com/ecos/docs-latest/redboot/redboot.html.
 68Please refer to it for explanations.
 69
 70If you have a CF network card (my Assabet kit contained a CF+ LP-E from
 71Socket Communications Inc.), you should strongly consider using it for TFTP
 72file transfers.  You must insert it before RedBoot runs since it can't detect
 73it dynamically.
 74
 75To initialize the flash directory:
 76
 77	fis init -f
 78
 79To initialize the non-volatile settings, like whether you want to use BOOTP or
 80a static IP address, etc, use this command:
 81
 82	fconfig -i
 83
 84
 85Writing a kernel image into flash
 86---------------------------------
 87
 88First, the kernel image must be loaded into RAM.  If you have the zImage file
 89available on a TFTP server:
 90
 91	load zImage -r -b 0x100000
 92
 93If you rather want to use Y-Modem upload over the serial port:
 94
 95	load -m ymodem -r -b 0x100000
 96
 97To write it to flash:
 98
 99	fis create "Linux kernel" -b 0x100000 -l 0xc0000
100
101
102Booting the kernel
103------------------
104
105The kernel still requires a filesystem to boot.  A ramdisk image can be loaded
106as follows:
107
108	load ramdisk_image.gz -r -b 0x800000
109
110Again, Y-Modem upload can be used instead of TFTP by replacing the file name
111by '-y ymodem'.
112
113Now the kernel can be retrieved from flash like this:
114
115	fis load "Linux kernel"
116
117or loaded as described previously.  To boot the kernel:
118
119	exec -b 0x100000 -l 0xc0000
120
121The ramdisk image could be stored into flash as well, but there are better
122solutions for on-flash filesystems as mentioned below.
123
124
125Using JFFS2
126-----------
127
128Using JFFS2 (the Second Journalling Flash File System) is probably the most
129convenient way to store a writable filesystem into flash.  JFFS2 is used in
130conjunction with the MTD layer which is responsible for low-level flash
131management.  More information on the Linux MTD can be found on-line at:
132http://www.linux-mtd.infradead.org/.  A JFFS howto with some infos about
133creating JFFS/JFFS2 images is available from the same site.
134
135For instance, a sample JFFS2 image can be retrieved from the same FTP sites
136mentioned below for the precompiled RedBoot image.
137
138To load this file:
139
140	load sample_img.jffs2 -r -b 0x100000
141
142The result should look like:
143
144RedBoot> load sample_img.jffs2 -r -b 0x100000
145Raw file loaded 0x00100000-0x00377424
146
147Now we must know the size of the unallocated flash:
148
149	fis free
150
151Result:
152
153RedBoot> fis free
154  0x500E0000 .. 0x503C0000
155
156The values above may be different depending on the size of the filesystem and
157the type of flash.  See their usage below as an example and take care of
158substituting yours appropriately.
159
160We must determine some values:
161
162size of unallocated flash:	0x503c0000 - 0x500e0000 = 0x2e0000
163size of the filesystem image:	0x00377424 - 0x00100000 = 0x277424
164
165We want to fit the filesystem image of course, but we also want to give it all
166the remaining flash space as well.  To write it:
167
168	fis unlock -f 0x500E0000 -l 0x2e0000
169	fis erase -f 0x500E0000 -l 0x2e0000
170	fis write -b 0x100000 -l 0x277424 -f 0x500E0000
171	fis create "JFFS2" -n -f 0x500E0000 -l 0x2e0000
172
173Now the filesystem is associated to a MTD "partition" once Linux has discovered
174what they are in the boot process.  From Redboot, the 'fis list' command
175displays them:
176
177RedBoot> fis list
178Name              FLASH addr  Mem addr    Length      Entry point
179RedBoot           0x50000000  0x50000000  0x00020000  0x00000000
180RedBoot config    0x503C0000  0x503C0000  0x00020000  0x00000000
181FIS directory     0x503E0000  0x503E0000  0x00020000  0x00000000
182Linux kernel      0x50020000  0x00100000  0x000C0000  0x00000000
183JFFS2             0x500E0000  0x500E0000  0x002E0000  0x00000000
184
185However Linux should display something like:
186
187SA1100 flash: probing 32-bit flash bus
188SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode
189Using RedBoot partition definition
190Creating 5 MTD partitions on "SA1100 flash":
1910x00000000-0x00020000 : "RedBoot"
1920x00020000-0x000e0000 : "Linux kernel"
1930x000e0000-0x003c0000 : "JFFS2"
1940x003c0000-0x003e0000 : "RedBoot config"
1950x003e0000-0x00400000 : "FIS directory"
196
197What's important here is the position of the partition we are interested in,
198which is the third one.  Within Linux, this correspond to /dev/mtdblock2.
199Therefore to boot Linux with the kernel and its root filesystem in flash, we
200need this RedBoot command:
201
202	fis load "Linux kernel"
203	exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2"
204
205Of course other filesystems than JFFS might be used, like cramfs for example.
206You might want to boot with a root filesystem over NFS, etc.  It is also
207possible, and sometimes more convenient, to flash a filesystem directly from
208within Linux while booted from a ramdisk or NFS.  The Linux MTD repository has
209many tools to deal with flash memory as well, to erase it for example.  JFFS2
210can then be mounted directly on a freshly erased partition and files can be
211copied over directly.  Etc...
212
213
214RedBoot scripting
215-----------------
216
217All the commands above aren't so useful if they have to be typed in every
218time the Assabet is rebooted.  Therefore it's possible to automatize the boot
219process using RedBoot's scripting capability.
220
221For example, I use this to boot Linux with both the kernel and the ramdisk
222images retrieved from a TFTP server on the network:
223
224RedBoot> fconfig
225Run script at boot: false true
226Boot script:
227Enter script, terminate with empty line
228>> load zImage -r -b 0x100000
229>> load ramdisk_ks.gz -r -b 0x800000
230>> exec -b 0x100000 -l 0xc0000
231>>
232Boot script timeout (1000ms resolution): 3
233Use BOOTP for network configuration: true
234GDB connection port: 9000
235Network debug at boot time: false
236Update RedBoot non-volatile configuration - are you sure (y/n)? y
237
238Then, rebooting the Assabet is just a matter of waiting for the login prompt.
239
240
241
242Nicolas Pitre
243nico@cam.org
244June 12, 2001
245
246
247Status of peripherals in -rmk tree (updated 14/10/2001)
248-------------------------------------------------------
249
250Assabet:
251 Serial ports:
252  Radio:		TX, RX, CTS, DSR, DCD, RI
253   PM:			Not tested.
254  COM:			TX, RX, CTS, DSR, DCD, RTS, DTR, PM
255   PM:			Not tested.
256  I2C:			Implemented, not fully tested.
257  L3:			Fully tested, pass.
258   PM:			Not tested.
259
260 Video:
261  LCD:			Fully tested.  PM
262			(LCD doesn't like being blanked with
263			 neponset connected)
264  Video out:		Not fully
265
266 Audio:
267  UDA1341:
268   Playback:		Fully tested, pass.
269   Record:		Implemented, not tested.
270   PM:			Not tested.
271
272  UCB1200:
273   Audio play:		Implemented, not heavily tested.
274   Audio rec:		Implemented, not heavily tested.
275   Telco audio play:	Implemented, not heavily tested.
276   Telco audio rec:	Implemented, not heavily tested.
277   POTS control:	No
278   Touchscreen:		Yes
279   PM:			Not tested.
280
281 Other:
282  PCMCIA:
283   LPE:			Fully tested, pass.
284  USB:			No
285  IRDA:
286   SIR:			Fully tested, pass.
287   FIR:			Fully tested, pass.
288   PM:			Not tested.
289
290Neponset:
291 Serial ports:
292  COM1,2:	TX, RX, CTS, DSR, DCD, RTS, DTR
293   PM:			Not tested.
294  USB:			Implemented, not heavily tested.
295  PCMCIA:		Implemented, not heavily tested.
296   PM:			Not tested.
297  CF:			Implemented, not heavily tested.
298   PM:			Not tested.
299
300More stuff can be found in the -np (Nicolas Pitre's) tree.
301