From: Erik M. <er...@us...> - 2001-08-06 22:44:54
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv26030 Modified Files: AUTHORS ChangeLog README acconfig.h configure.in Log Message: Here we go: merge the blob_1_0_9_hack branch back into the HEAD branch Index: AUTHORS =================================================================== RCS file: /cvsroot/blob/blob/AUTHORS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- AUTHORS 2001/06/27 19:47:41 1.1.1.1 +++ AUTHORS 2001/08/06 22:44:51 1.2 @@ -1,7 +1,7 @@ * Main authors ============== -- Jan-Derk Bakker (J.D...@it...) -- Erik Mouw (J.A...@it...) +- Jan-Derk Bakker <J.D...@it...> +- Erik Mouw <J.A...@it...> Snail mail address: Information and Communication Theory Group Faculty of Information Technology and Systems @@ -13,26 +13,37 @@ * Clock switching code ====================== -- Johan Pouwelse (J.A...@it...) +- Johan Pouwelse <J.A...@it...> * Assabet port ============== -- Jeff Sutherland (jsu...@ac...) -- Chester (ch...@li...) +- Jeff Sutherland <jsu...@ac...> +- Chester <ch...@li...> * PLEB port =========== -- Adam Wiggins (awi...@cs...) +- Adam Wiggins <awi...@cs...> * Brutus port ============= -- Erik Mouw (J.A...@it...) +- Erik Mouw <J.A...@it...> +* NESA port +=========== +- Russ Dill <Rus...@as...> + + +* Shannon (aka TuxScreen) port +============================== +- Tim Riker <Ti...@Ri...>, <Ti...@De...>, <Ti...@Li...> + + * Various fixes =============== -- Mark Huang (mh...@li...), RTC fix -- Justin M. Seger (jus...@in...), Assabet fixes +- Mark Huang <mh...@li...>, RTC fix +- Justin M. Seger <jus...@in...>, Assabet fixes +- Wookey <wo...@al...>, run-from-RAM Index: ChangeLog =================================================================== RCS file: /cvsroot/blob/blob/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ChangeLog 2001/07/07 16:09:37 1.2 +++ ChangeLog 2001/08/06 22:44:51 1.3 @@ -1,23 +1,38 @@ (If somebody can show me how to update the ChangeLog from CVS, I'd be more than grateful -- Erik) + +$Id$ +blob-1.0.9: +- we moved to SourceForge! +- run from RAM Erik Mouw & Wookey +- PLEB updates Adam Wiggins +- NESA support Russ Dill +- SHANNON (aka TuxScreen) support Tim Riker +- Resume from suspend Erik Mouw +- New "reboot" command Erik Mouw +- Download and flash blob without JTAG dongle Erik Mouw +- Memory tester Erik Mouw + blob-1.0.8-pre2: -- Assabet fixes by Justin Seger -- RTC fix by Mark Huang +- Assabet fixes Justin Seger +- RTC fix Mark Huang blob-1.0.8-pre1: -- Assabet support by Jeff Sutherland and Chester -- Brutus support by Erik Mouw (without a Brutus) -- PLEB support by Erik Mouw +- Assabet support Jeff Sutherland & + Chester +- Brutus support (without a Brutus) Erik Mouw +- PLEB support Erik Mouw blob-1.07b: -- Boots with linux-2.3.99-pre8-rmk1-np1 +- Boots with linux-2.3.99-pre8-rmk1-np1 Erik Mouw blob-1.0.6: -- Clock scaling support by Johan Pouwelse +- Clock scaling support Johan Pouwelse blob-1.0.5: -- Fix flash write bug +- Fix flash write bug Erik Mouw blob-1.0.0: -- Initial release +- Initial release Jan-Derk Bakker & + Erik Mouw Index: README =================================================================== RCS file: /cvsroot/blob/blob/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- README 2001/06/27 19:47:41 1.1.1.1 +++ README 2001/08/06 22:44:51 1.2 @@ -18,20 +18,44 @@ other people also contributed to blob. Blob started its life as a boot loader for the LART, but nowadays it -has been ported to the Intel Assabet SA-1110 evaluation platform by -Jeff Sutherland and Chester, to the Intel Brutus SA-1100 evaluation -platform by Erik Mouw, and to the PLEB Linux board by Adam Wiggins. +has been ported to the Intel Assabet SA-1110 evaluation platform, the +Intel Brutus SA-1100 evaluation platform, the PLEB board, the Nesa +board, the TuxScreen (aka Shannon), and to the CreditLART board. +** Where is the latest blob source available? +--------------------------------------------- + +The latest and greatest blob source is available from SourceForge, see +http://www.sourceforge.net/projects/blob/ . The latest source is +available from anonymous CVS. First log in to the CVS server: + + cvs -d:pserver:ano...@cv...:/cvsroot/blob login + +There is no password, so just press enter. Now check out the blob source: + + cvs -z3 -d:pserver:ano...@cv...:/cvsroot/blob co blob + +If you're using the blob CVS source, it's a good idea to subscribe to +the blob-cvs-commit mailing list so you know about blob patches. See +http://lists.sourceforge.net/lists/listinfo/blob-cvs-commit . The +general blob discussion is done on the LART mailing list, see +http://www.lart.tudelft.nl/list/ for more information. + +Blob also has a home page: http://www.lart.tudelft.nl/lartware/blob/ . + + + + ** So what is LART? ------------------- LART is the Linux Advanced Radio Terminal, a small low power computing -element used in the MMC project and the Ubiquitous Communications -programme (see http://www.lart.tudelft.nl, http://www.mmc.tudelft.nl/ , -and http://www.ubicom.tudelft.nl/). +element used in the MMC project and the Ubiquitous Communications +programme (see http://www.lart.tudelft.nl, http://www.mmc.tudelft.nl, +and http://www.ubicom.tudelft.nl ). LART features: @@ -56,6 +80,7 @@ better) and gcc 2.95.2 installed - GNU make (although some vendor supplied make utilities will do) - GNU autoconf and automake (if you build blob from CVS) +- A configured Linux kernel source tree We tested blob with a native system (Corel/Rebel Netwinder) and with several i386-linux to arm-linux cross compiler systems, but the GNU @@ -85,9 +110,9 @@ - Run "./configure --with-linux-prefix=/path/to/armlinux/source \ --with-board=boardname arm-lart-linux-gnu" - There are currently four valid board names, choose from: assabet, - brutus, lart, or pleb. If the board name is ommited, lart will be - choosen as a default. + There are currently a couple of valid board names, choose from: + assabet, brutus, creditlart, lart, nesa, pleb, or shannon. If the + board name is ommited, lart will be chosen as a default. If you want to do some serious hacking on blob, consider using the "--enable-maintainer-mode" flag. This will automatically regenerate @@ -102,12 +127,12 @@ - Run "./configure --with-board=boardname" - Run "make" - -The binary image is in src/blob, src/blob-elf32 is the image with -complete ELF headers. To disassemble "blob-elf32", use: +The binary image is in src/blob, src/blob-start-elf32 and +src/blob-rest-elf32 are the two parts of the images with complete ELF +headers. To disassemble "blob-start-elf32", use: - objdump --disassemble-all blob-elf32 + arm-linux-objdump -D -S blob-start-elf32 To see the actual hex codes of blob, use: @@ -121,12 +146,24 @@ *** LART -------- + +The current wisdom to install blob on a LART is: -Use whatever tool you need to download the blob image (src/blob) at -address 0x00000000 of your SA-1100 target. The LART project currently -uses the following wisdom to install blob: +- Connect the JTAG dongle to the LART +- Connect the other end of the JTAG dongle to the parallel port of + your PC +- Power up the LART +- Use the jflash utility (available from the LART web site) to write + blob (you usually need to be root for this): jflash blob + +The JTAG flash burn code however is now worked out as a set of Linux +executables provided by the JTAG flash project located at the LART page +as well as JTAG executables ported to support the TuxScreen screen phone. +The LART project initially used the following wisdom to install blob: + Required hardware & software: + - The LART itself with 4 Mbyte flash memory - An external 128 kbyte flash board - A PCI 7200 (???) digital I/O card with a Linux driver @@ -136,7 +173,7 @@ written into the flash memory using the flash burn program. The external flash board is connected to the LART low speed interface. The external flash chip is mapped at address 0x00000000, and the internal -flash is remapped at 0x08000000. As soon as the LART boots, the +flash is re-mapped at 0x08000000. As soon as the LART boots, the external flash is copied to the first 128 kbyte of the internal flash. The next time the LART is started without external flash board, it starts from its internal flash which now contains the just @@ -161,6 +198,11 @@ up with the output on the serial port. +*** SHANNON (TuxScreen phone) +----------- + +The idea is to write the SHANNON flash via the jflash utility in much +the same way as you would do it on LART or Assabet. ** Making a distribution @@ -237,14 +279,14 @@ * download {kernel|ramdisk} Download kernel or ramdisk image to RAM * flash {kernel|ramdisk} Copy kernel or ramdisk from RAM to flash * help Get this help + * reblob Restart blob from RAM (useful for debugging) + * reboot Reboot system * reload {kernel|ramdisk} Reload kernel or ramdisk from flash to RAM * reset Reset terminal * speed Set download speed * status Display current status - - *** "boot" ---------- @@ -262,8 +304,6 @@ ... - - *** "clock" ----------- @@ -281,8 +321,6 @@ say that we didn't warn you! - - *** "download" -------------- @@ -322,8 +360,6 @@ command. - - *** "flash" ----------- @@ -332,12 +368,24 @@ with: blob> flash kernel - Saving kernel to flash ..... .................... done + Saving kernel to flash ..... .... done + +Currently this command only works for LART, we are working on support +for the other architectures. + + +*** "reblob" +------------ + +Restart blob from RAM. This is mainly useful if you are working on +blob itself because it allows you to download blob and immediately +start it without having to burn it to flash first. -Currently this command only works when blob is started from the -external flash board. +*** "reboot" +------------ +This command simply reboots the system. *** "reload" @@ -353,8 +401,6 @@ The "reload command" will overwrite a just downloaded a kernel or ramdisk. - - *** "reset" ----------- @@ -363,8 +409,6 @@ emulator back to 9600 baud after downloading a kernel or ramdisk. - - *** "speed" ----------- @@ -376,8 +420,6 @@ Download speed set to 19200 baud - - *** "status" ------------ @@ -394,3 +436,168 @@ Depending on what commands you used before, these values may or may not be different. + + + + +* Porting blob +============== + +Porting blob to a new SA11x0 platform is quite easy and consist of +four steps: + +1. Define the features of the architecture +2. Write some architecture specific code +3. Test the new architecture +4. Submit the patch + +The next couple of paragraphs describe the process of porting blob to +the "foobar" platform. + + +** Define the architecture in configure.in +------------------------------------------ + +First you need two know a couple of things: the name of the board, +what kind of CPU the board uses (SA1100 or SA1110), what kind of RAM +it uses (EDODRAM or SDRAM), and which serial port will be the console +(port 1 or 3). Let's assume the foobar platform has an SA1100 CPU, +uses EDODRAM, and serial port 1 as console. The correct lines for +configure.in will be: + + foobar) + AC_MSG_RESULT(foobar) + AC_DEFINE(FOOBAR) + AC_DEFINE(USE_SA1100) + AC_DEFINE(USE_EDODRAM) + AC_DEFINE(USE_SERIAL1) + ;; + +Put this just after the CreditLART definition. + + +** Define the architecture in acconfig.h +---------------------------------------- + +Because configure.in was instructed to define FOOBAR for the foobar +platform, we have to define the symbol in acconfig.h as well. Add the +following two lines to acconfig.h, just after the CLART define: + + /* Define for foobar boards */ + #undef FOOBAR + + +** Update the build system +-------------------------- + +Run the following commands to update the configure script, +include/config.h.in, and the Makefile.in files: + + tools/rebuild-gcc + tools/rebuild-gcc + +(yes, twice) + + +** Configure blob +----------------- + +Configure blob for the new foobar architecture: + + setenv CC arm-linux-gcc + ./configure --with-linux-prefix=/path/to/armlinux/source \ + --with-board=foobar --enable-maintainer-mode \ + --enable-blob-debug arm-unknown-linux-gnu + +We're using maintainer-mode and debug information to help the +port. See the section about "Configuring and compiling the package" +for general information. + + +** Select correct clock speed +----------------------------- + +Open src/start.S in an editor, and add a line to select the correct +clock speed (just before the SHANNON definition): + + #if defined FOOBAR + cpuspeed: .long 0x09 /* 190 MHz */ + + +** Edit memory settings +----------------------- + +Edit src/memsetup.c and add the correct memory setting for the foobar +architecture. Add these (example) settings right before the PLEB +definitions: + + #if defined FOOBAR + mdcas0: .long 0x1c71c01f + mdcas1: .long 0xff1c71c7 + mdcas2: .long 0xffffffff + mdcnfg: .long 0x0334b21f + #endif + +Note that the SA1110 memory settings are not as modular as the SA1100 +settings, so you'll have to use your imagination over there to get +proper memory settings. + +Right now, the basic blob functionality is ported to your board and +you should be able to compile blob by running "make". + + +** Edit LED defines +------------------- + +If your board has a LED on a GPIO pin, edit include/led.h in an editor +to switch it on early in the boot stage. Let's assume the foobar board +has the LED on GPIO pin 1, so add the following lines just before the +PLEB definition: + + #elif defined FOOBAR + # define LED_GPIO 0x00000002 /* GPIO 1 */ + + +** Compile blob +--------------- + +Now compile blob by running: + + make + +If everything went right, you have a new blob binary in src/blob. + + +** Test blob +------------ + +You are now ready to flash blob to your board and test it. If +something goes wrong in the early boot process, blob will flash the +LED (that's why you should always have a LED on your board), or not +work at all. As soon as you get character on the serial port the most +difficult part is done and you should be ready to port arm-linux to +your board. + + +** Submit the patch +------------------- + +First run "make distclean" in your blob tree so you'll get a clean +source tree. Now rename your current tree and untar the original blob +source (assuming that you're hacking on blob-2.0.3): + + cd .. + mv blob-2.0.3 blob-2.0.3-foobar + gzip -dc blob-2.0.3.tar.gz | tar xvf - + +Diff the two trees and create a patch file: + + diff -urN blob-2.0.3 blob-2.0.3-foobar > foobar.diff + +Now send the patch to me (er...@us...) and be sure to +CC a couple of other blob developers (for the current list of blob +developers, see +https://sourceforge.net/project/memberlist.php?group_id=30155 ). The +best way to send the patch is to attach it as plain text to your +message because in that way email clients have less chance to corrupt +the patch. Index: acconfig.h =================================================================== RCS file: /cvsroot/blob/blob/acconfig.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- acconfig.h 2001/06/27 19:47:41 1.1.1.1 +++ acconfig.h 2001/08/06 22:44:51 1.2 @@ -59,11 +59,20 @@ /* Define for Brutus boards */ #undef BRUTUS +/* Define for CreditLART boards */ +#undef CLART + /* Define for LART boards */ #undef LART +/* Define for NESA boards */ +#undef NESA + /* Define for PLEB boards */ #undef PLEB + +/* Define for Shannon (TuxScreen) */ +#undef SHANNON /* Define if your system uses an SA-1100 CPU */ #undef USE_SA1100 Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- configure.in 2001/06/27 19:47:41 1.1.1.1 +++ configure.in 2001/08/06 22:44:51 1.2 @@ -19,7 +19,7 @@ PACKAGE=blob BLOB_MAJOR_VERSION=1 BLOB_MINOR_VERSION=0 -BLOB_MICRO_VERSION=8-pre2 +BLOB_MICRO_VERSION=9-hack BLOB_VERSION=$BLOB_MAJOR_VERSION.$BLOB_MINOR_VERSION.$BLOB_MICRO_VERSION VERSION=$BLOB_VERSION @@ -83,6 +83,13 @@ AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) ;; + creditlart) + AC_MSG_RESULT(CreditLART) + AC_DEFINE(CLART) + AC_DEFINE(USE_SA1110) + AC_DEFINE(USE_SDRAM) + AC_DEFINE(USE_SERIAL3) + ;; lart) AC_MSG_RESULT(LART) AC_DEFINE(LART) @@ -90,6 +97,13 @@ AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) ;; + nesa) + AC_MSG_RESULT(NESA) + AC_DEFINE(NESA) + AC_DEFINE(USE_SA1100) + AC_DEFINE(USE_EDODRAM) + AC_DEFINE(USE_SERIAL3) + ;; pleb) AC_MSG_RESULT(PLEB) AC_DEFINE(PLEB) @@ -97,6 +111,13 @@ AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) ;; + shannon) + AC_MSG_RESULT(SHANNON) + AC_DEFINE(SHANNON) + AC_DEFINE(USE_SA1100) + AC_DEFINE(USE_EDODRAM) + AC_DEFINE(USE_SERIAL3) + ;; *) AC_MSG_RESULT(unknown) AC_MSG_WARN([Unknown board name, assuming SA1100 with EDO DRAM and serial 3]) @@ -188,7 +209,7 @@ LDFLAGS=`echo $LDFLAGS | sed 's/\ *-g\ */\ /'` dnl Add some StrongARM specific flags -CFLAGS=`echo $CFLAGS -nostdinc -mcpu=strongarm110 -mapcs-32 -fomit-frame-pointer -fPIC` +CFLAGS=`echo $CFLAGS -march=armv4 -mtune=strongarm1100 -fomit-frame-pointer -mapcs-32 -nostdinc` LDFLAGS=`echo $LDFLAGS -static -nostdlib` OCFLAGS="-O binary -R .note -R .comment -S" AC_SUBST(OCFLAGS) |