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