162306a36Sopenharmony_ci============================================
262306a36Sopenharmony_ciThe Intel Assabet (SA-1110 evaluation) board
362306a36Sopenharmony_ci============================================
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciPlease see:
662306a36Sopenharmony_cihttp://developer.intel.com
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciAlso some notes from John G Dorsey <jd5q@andrew.cmu.edu>:
962306a36Sopenharmony_cihttp://www.cs.cmu.edu/~wearable/software/assabet.html
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciBuilding the kernel
1362306a36Sopenharmony_ci-------------------
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciTo build the kernel with current defaults::
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci	make assabet_defconfig
1862306a36Sopenharmony_ci	make oldconfig
1962306a36Sopenharmony_ci	make zImage
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciThe resulting kernel image should be available in linux/arch/arm/boot/zImage.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ciInstalling a bootloader
2562306a36Sopenharmony_ci-----------------------
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ciA couple of bootloaders able to boot Linux on Assabet are available:
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciBLOB (http://www.lartmaker.nl/lartware/blob/)
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci   BLOB is a bootloader used within the LART project.  Some contributed
3262306a36Sopenharmony_ci   patches were merged into BLOB to add support for Assabet.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciCompaq's Bootldr + John Dorsey's patch for Assabet support
3562306a36Sopenharmony_ci(http://www.handhelds.org/Compaq/bootldr.html)
3662306a36Sopenharmony_ci(http://www.wearablegroup.org/software/bootldr/)
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci   Bootldr is the bootloader developed by Compaq for the iPAQ Pocket PC.
3962306a36Sopenharmony_ci   John Dorsey has produced add-on patches to add support for Assabet and
4062306a36Sopenharmony_ci   the JFFS filesystem.
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciRedBoot (http://sources.redhat.com/redboot/)
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci   RedBoot is a bootloader developed by Red Hat based on the eCos RTOS
4562306a36Sopenharmony_ci   hardware abstraction layer.  It supports Assabet amongst many other
4662306a36Sopenharmony_ci   hardware platforms.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciRedBoot is currently the recommended choice since it's the only one to have
4962306a36Sopenharmony_cinetworking support, and is the most actively maintained.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciBrief examples on how to boot Linux with RedBoot are shown below.  But first
5262306a36Sopenharmony_ciyou need to have RedBoot installed in your flash memory.  A known to work
5362306a36Sopenharmony_ciprecompiled RedBoot binary is available from the following location:
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci- ftp://ftp.netwinder.org/users/n/nico/
5662306a36Sopenharmony_ci- ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/
5762306a36Sopenharmony_ci- ftp://ftp.handhelds.org/pub/linux/arm/sa-1100-patches/
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ciLook for redboot-assabet*.tgz.  Some installation infos are provided in
6062306a36Sopenharmony_ciredboot-assabet*.txt.
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ciInitial RedBoot configuration
6462306a36Sopenharmony_ci-----------------------------
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ciThe commands used here are explained in The RedBoot User's Guide available
6762306a36Sopenharmony_cion-line at http://sources.redhat.com/ecos/docs.html.
6862306a36Sopenharmony_ciPlease refer to it for explanations.
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciIf you have a CF network card (my Assabet kit contained a CF+ LP-E from
7162306a36Sopenharmony_ciSocket Communications Inc.), you should strongly consider using it for TFTP
7262306a36Sopenharmony_cifile transfers.  You must insert it before RedBoot runs since it can't detect
7362306a36Sopenharmony_ciit dynamically.
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ciTo initialize the flash directory::
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ci	fis init -f
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ciTo initialize the non-volatile settings, like whether you want to use BOOTP or
8062306a36Sopenharmony_cia static IP address, etc, use this command::
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci	fconfig -i
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciWriting a kernel image into flash
8662306a36Sopenharmony_ci---------------------------------
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ciFirst, the kernel image must be loaded into RAM.  If you have the zImage file
8962306a36Sopenharmony_ciavailable on a TFTP server::
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci	load zImage -r -b 0x100000
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ciIf you rather want to use Y-Modem upload over the serial port::
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ci	load -m ymodem -r -b 0x100000
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ciTo write it to flash::
9862306a36Sopenharmony_ci
9962306a36Sopenharmony_ci	fis create "Linux kernel" -b 0x100000 -l 0xc0000
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ciBooting the kernel
10362306a36Sopenharmony_ci------------------
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ciThe kernel still requires a filesystem to boot.  A ramdisk image can be loaded
10662306a36Sopenharmony_cias follows::
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci	load ramdisk_image.gz -r -b 0x800000
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ciAgain, Y-Modem upload can be used instead of TFTP by replacing the file name
11162306a36Sopenharmony_ciby '-y ymodem'.
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ciNow the kernel can be retrieved from flash like this::
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci	fis load "Linux kernel"
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_cior loaded as described previously.  To boot the kernel::
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci	exec -b 0x100000 -l 0xc0000
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ciThe ramdisk image could be stored into flash as well, but there are better
12262306a36Sopenharmony_cisolutions for on-flash filesystems as mentioned below.
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ciUsing JFFS2
12662306a36Sopenharmony_ci-----------
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciUsing JFFS2 (the Second Journalling Flash File System) is probably the most
12962306a36Sopenharmony_ciconvenient way to store a writable filesystem into flash.  JFFS2 is used in
13062306a36Sopenharmony_ciconjunction with the MTD layer which is responsible for low-level flash
13162306a36Sopenharmony_cimanagement.  More information on the Linux MTD can be found on-line at:
13262306a36Sopenharmony_cihttp://www.linux-mtd.infradead.org/.  A JFFS howto with some infos about
13362306a36Sopenharmony_cicreating JFFS/JFFS2 images is available from the same site.
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ciFor instance, a sample JFFS2 image can be retrieved from the same FTP sites
13662306a36Sopenharmony_cimentioned below for the precompiled RedBoot image.
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ciTo load this file::
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci	load sample_img.jffs2 -r -b 0x100000
14162306a36Sopenharmony_ci
14262306a36Sopenharmony_ciThe result should look like::
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci	RedBoot> load sample_img.jffs2 -r -b 0x100000
14562306a36Sopenharmony_ci	Raw file loaded 0x00100000-0x00377424
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ciNow we must know the size of the unallocated flash::
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci	fis free
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ciResult::
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci	RedBoot> fis free
15462306a36Sopenharmony_ci	  0x500E0000 .. 0x503C0000
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ciThe values above may be different depending on the size of the filesystem and
15762306a36Sopenharmony_cithe type of flash.  See their usage below as an example and take care of
15862306a36Sopenharmony_cisubstituting yours appropriately.
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ciWe must determine some values::
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ci	size of unallocated flash:	0x503c0000 - 0x500e0000 = 0x2e0000
16362306a36Sopenharmony_ci	size of the filesystem image:	0x00377424 - 0x00100000 = 0x277424
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ciWe want to fit the filesystem image of course, but we also want to give it all
16662306a36Sopenharmony_cithe remaining flash space as well.  To write it::
16762306a36Sopenharmony_ci
16862306a36Sopenharmony_ci	fis unlock -f 0x500E0000 -l 0x2e0000
16962306a36Sopenharmony_ci	fis erase -f 0x500E0000 -l 0x2e0000
17062306a36Sopenharmony_ci	fis write -b 0x100000 -l 0x277424 -f 0x500E0000
17162306a36Sopenharmony_ci	fis create "JFFS2" -n -f 0x500E0000 -l 0x2e0000
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ciNow the filesystem is associated to a MTD "partition" once Linux has discovered
17462306a36Sopenharmony_ciwhat they are in the boot process.  From Redboot, the 'fis list' command
17562306a36Sopenharmony_cidisplays them::
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci	RedBoot> fis list
17862306a36Sopenharmony_ci	Name              FLASH addr  Mem addr    Length      Entry point
17962306a36Sopenharmony_ci	RedBoot           0x50000000  0x50000000  0x00020000  0x00000000
18062306a36Sopenharmony_ci	RedBoot config    0x503C0000  0x503C0000  0x00020000  0x00000000
18162306a36Sopenharmony_ci	FIS directory     0x503E0000  0x503E0000  0x00020000  0x00000000
18262306a36Sopenharmony_ci	Linux kernel      0x50020000  0x00100000  0x000C0000  0x00000000
18362306a36Sopenharmony_ci	JFFS2             0x500E0000  0x500E0000  0x002E0000  0x00000000
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ciHowever Linux should display something like::
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ci	SA1100 flash: probing 32-bit flash bus
18862306a36Sopenharmony_ci	SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode
18962306a36Sopenharmony_ci	Using RedBoot partition definition
19062306a36Sopenharmony_ci	Creating 5 MTD partitions on "SA1100 flash":
19162306a36Sopenharmony_ci	0x00000000-0x00020000 : "RedBoot"
19262306a36Sopenharmony_ci	0x00020000-0x000e0000 : "Linux kernel"
19362306a36Sopenharmony_ci	0x000e0000-0x003c0000 : "JFFS2"
19462306a36Sopenharmony_ci	0x003c0000-0x003e0000 : "RedBoot config"
19562306a36Sopenharmony_ci	0x003e0000-0x00400000 : "FIS directory"
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ciWhat's important here is the position of the partition we are interested in,
19862306a36Sopenharmony_ciwhich is the third one.  Within Linux, this correspond to /dev/mtdblock2.
19962306a36Sopenharmony_ciTherefore to boot Linux with the kernel and its root filesystem in flash, we
20062306a36Sopenharmony_cineed this RedBoot command::
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ci	fis load "Linux kernel"
20362306a36Sopenharmony_ci	exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2"
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ciOf course other filesystems than JFFS might be used, like cramfs for example.
20662306a36Sopenharmony_ciYou might want to boot with a root filesystem over NFS, etc.  It is also
20762306a36Sopenharmony_cipossible, and sometimes more convenient, to flash a filesystem directly from
20862306a36Sopenharmony_ciwithin Linux while booted from a ramdisk or NFS.  The Linux MTD repository has
20962306a36Sopenharmony_cimany tools to deal with flash memory as well, to erase it for example.  JFFS2
21062306a36Sopenharmony_cican then be mounted directly on a freshly erased partition and files can be
21162306a36Sopenharmony_cicopied over directly.  Etc...
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ciRedBoot scripting
21562306a36Sopenharmony_ci-----------------
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ciAll the commands above aren't so useful if they have to be typed in every
21862306a36Sopenharmony_citime the Assabet is rebooted.  Therefore it's possible to automate the boot
21962306a36Sopenharmony_ciprocess using RedBoot's scripting capability.
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ciFor example, I use this to boot Linux with both the kernel and the ramdisk
22262306a36Sopenharmony_ciimages retrieved from a TFTP server on the network::
22362306a36Sopenharmony_ci
22462306a36Sopenharmony_ci	RedBoot> fconfig
22562306a36Sopenharmony_ci	Run script at boot: false true
22662306a36Sopenharmony_ci	Boot script:
22762306a36Sopenharmony_ci	Enter script, terminate with empty line
22862306a36Sopenharmony_ci	>> load zImage -r -b 0x100000
22962306a36Sopenharmony_ci	>> load ramdisk_ks.gz -r -b 0x800000
23062306a36Sopenharmony_ci	>> exec -b 0x100000 -l 0xc0000
23162306a36Sopenharmony_ci	>>
23262306a36Sopenharmony_ci	Boot script timeout (1000ms resolution): 3
23362306a36Sopenharmony_ci	Use BOOTP for network configuration: true
23462306a36Sopenharmony_ci	GDB connection port: 9000
23562306a36Sopenharmony_ci	Network debug at boot time: false
23662306a36Sopenharmony_ci	Update RedBoot non-volatile configuration - are you sure (y/n)? y
23762306a36Sopenharmony_ci
23862306a36Sopenharmony_ciThen, rebooting the Assabet is just a matter of waiting for the login prompt.
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ciNicolas Pitre
24362306a36Sopenharmony_cinico@fluxnic.net
24462306a36Sopenharmony_ci
24562306a36Sopenharmony_ciJune 12, 2001
24662306a36Sopenharmony_ci
24762306a36Sopenharmony_ci
24862306a36Sopenharmony_ciStatus of peripherals in -rmk tree (updated 14/10/2001)
24962306a36Sopenharmony_ci-------------------------------------------------------
25062306a36Sopenharmony_ci
25162306a36Sopenharmony_ciAssabet:
25262306a36Sopenharmony_ci Serial ports:
25362306a36Sopenharmony_ci  Radio:		TX, RX, CTS, DSR, DCD, RI
25462306a36Sopenharmony_ci   - PM:		Not tested.
25562306a36Sopenharmony_ci   - COM:		TX, RX, CTS, DSR, DCD, RTS, DTR, PM
25662306a36Sopenharmony_ci   - PM:		Not tested.
25762306a36Sopenharmony_ci   - I2C:		Implemented, not fully tested.
25862306a36Sopenharmony_ci   - L3:		Fully tested, pass.
25962306a36Sopenharmony_ci   - PM:		Not tested.
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ci Video:
26262306a36Sopenharmony_ci  - LCD:		Fully tested.  PM
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci   (LCD doesn't like being blanked with neponset connected)
26562306a36Sopenharmony_ci
26662306a36Sopenharmony_ci  - Video out:		Not fully
26762306a36Sopenharmony_ci
26862306a36Sopenharmony_ci Audio:
26962306a36Sopenharmony_ci  UDA1341:
27062306a36Sopenharmony_ci  -  Playback:		Fully tested, pass.
27162306a36Sopenharmony_ci  -  Record:		Implemented, not tested.
27262306a36Sopenharmony_ci  -  PM:			Not tested.
27362306a36Sopenharmony_ci
27462306a36Sopenharmony_ci  UCB1200:
27562306a36Sopenharmony_ci  -  Audio play:	Implemented, not heavily tested.
27662306a36Sopenharmony_ci  -  Audio rec:		Implemented, not heavily tested.
27762306a36Sopenharmony_ci  -  Telco audio play:	Implemented, not heavily tested.
27862306a36Sopenharmony_ci  -  Telco audio rec:	Implemented, not heavily tested.
27962306a36Sopenharmony_ci  -  POTS control:	No
28062306a36Sopenharmony_ci  -  Touchscreen:	Yes
28162306a36Sopenharmony_ci  -  PM:		Not tested.
28262306a36Sopenharmony_ci
28362306a36Sopenharmony_ci Other:
28462306a36Sopenharmony_ci  - PCMCIA:
28562306a36Sopenharmony_ci  - LPE:		Fully tested, pass.
28662306a36Sopenharmony_ci  - USB:		No
28762306a36Sopenharmony_ci  - IRDA:
28862306a36Sopenharmony_ci  - SIR:		Fully tested, pass.
28962306a36Sopenharmony_ci  - FIR:		Fully tested, pass.
29062306a36Sopenharmony_ci  - PM:			Not tested.
29162306a36Sopenharmony_ci
29262306a36Sopenharmony_ciNeponset:
29362306a36Sopenharmony_ci Serial ports:
29462306a36Sopenharmony_ci  - COM1,2:		TX, RX, CTS, DSR, DCD, RTS, DTR
29562306a36Sopenharmony_ci  - PM:			Not tested.
29662306a36Sopenharmony_ci  - USB:		Implemented, not heavily tested.
29762306a36Sopenharmony_ci  - PCMCIA:		Implemented, not heavily tested.
29862306a36Sopenharmony_ci  - CF:			Implemented, not heavily tested.
29962306a36Sopenharmony_ci  - PM:			Not tested.
30062306a36Sopenharmony_ci
30162306a36Sopenharmony_ciMore stuff can be found in the -np (Nicolas Pitre's) tree.
302