You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(79) |
Aug
(27) |
Sep
(64) |
Oct
(202) |
Nov
(31) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(173) |
Mar
(13) |
Apr
(140) |
May
(75) |
Jun
(1) |
Jul
(37) |
Aug
(14) |
Sep
|
Oct
(20) |
Nov
(9) |
Dec
(2) |
2003 |
Jan
(51) |
Feb
(12) |
Mar
(18) |
Apr
(24) |
May
(1) |
Jun
|
Jul
|
Aug
(72) |
Sep
(12) |
Oct
(18) |
Nov
(60) |
Dec
(26) |
2004 |
Jan
(1) |
Feb
(40) |
Mar
(3) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(5) |
2006 |
Jan
(13) |
Feb
(5) |
Mar
(8) |
Apr
(13) |
May
(7) |
Jun
(6) |
Jul
(10) |
Aug
(6) |
Sep
(6) |
Oct
(35) |
Nov
(20) |
Dec
(10) |
2007 |
Jan
(13) |
Feb
(9) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(54) |
Jun
(78) |
Jul
(35) |
Aug
(21) |
Sep
(21) |
Oct
(29) |
Nov
(10) |
Dec
(5) |
2010 |
Jan
|
Feb
|
Mar
(26) |
Apr
(55) |
May
(73) |
Jun
(63) |
Jul
(38) |
Aug
(39) |
Sep
(19) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Erik M. <er...@us...> - 2001-08-06 22:44:55
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv26030/include Modified Files: Makefile.am flash.h main.h time.h types.h util.h Added Files: led.h linux.h memory.h sa1100.h Log Message: Here we go: merge the blob_1_0_9_hack branch back into the HEAD branch Index: led.h =================================================================== RCS file: led.h diff -N led.h --- /dev/null Thu May 24 22:33:05 2001 +++ /tmp/cvs0ZNj3i Mon Aug 6 15:44:54 2001 @@ -0,0 +1,54 @@ +/* + * led.h: header file for memory.c + * + * Copyright (C) 2001 Erik Mouw (J.A...@it...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ident "$Id$" + +#ifndef BLOB_LED_H +#define BLOB_LED_H + + + + +/* define the GPIO pin for the LED */ +#if defined ASSABET +# define LED_GPIO 0x00020000 /* GPIO 17 */ +#elif (defined CLART) || (defined LART) || (defined NESA) +# define LED_GPIO 0x00800000 /* GPIO 23 */ +#elif defined PLEB +# define LED_GPIO 0x00010000 /* GPIO 16 */ +#else +#warning "FIXME: Include code to turn on one of the LEDs on your board" +# define LED_GPIO 0x00000000 /* safe mode: no GPIO, so no LED */ +#endif + + + +#ifndef ASSEMBLY + +void led_on(void); +void led_off(void); +void led_toggle(void); + +#endif + + + +#endif Index: linux.h =================================================================== RCS file: linux.h diff -N linux.h --- /dev/null Thu May 24 22:33:05 2001 +++ /tmp/cvsZtddDk Mon Aug 6 15:44:54 2001 @@ -0,0 +1,58 @@ +/* + * linux.h: header file for linux.c + * + * Copyright (C) 2001 Erik Mouw (J.A...@it...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ident "$Id$" + +#ifndef BLOB_LINUX_H +#define BLOB_LINUX_H + + +/* FIXME: + * these numbers should be generated from arch/arm/tools/mach-types + * with a hacked up version of arch/arm/tools/gen-mach-types + * + * -- Erik + */ + +#if defined ASSABET +# define ARCH_NUMBER (25) +#elif defined BRUTUS +# define ARCH_NUMBER (16) +#elif defined CLART +# define ARCH_NUMBER (68) +#elif defined LART +# define ARCH_NUMBER (27) +#elif defined NESA +# define ARCH_NUMBER (75) +#elif defined PLEB +# define ARCH_NUMBER (20) +#elif defined SHANNON +# define ARCH_NUMBER (97) +#else +#warning "FIXME: Calling the kernel with a generic SA1100 architecture code. YMMV!" +#define ARCH_NUMBER (18) +#endif + + +void boot_linux(char *commandline); + + +#endif Index: memory.h =================================================================== RCS file: memory.h diff -N memory.h --- /dev/null Thu May 24 22:33:05 2001 +++ /tmp/cvskgolek Mon Aug 6 15:44:54 2001 @@ -0,0 +1,52 @@ +/* + * memory.h: header file for memory.c + * + * Copyright (C) 2001 Erik Mouw (J.A...@it...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ident "$Id$" + +#ifndef BLOB_MEMORY_H +#define BLOB_MEMORY_H + +#include "types.h" + +/* The number of memory areas. Needs to be large to be able to detect + * aliases. + */ +#define NUM_MEM_AREAS (32) + +typedef struct { + u32 start; + u32 len; + int used; +} memory_area_t; + + + + +extern memory_area_t memory_map[NUM_MEM_AREAS]; + + + +void get_memory_map(void); + + + + +#endif Index: sa1100.h =================================================================== RCS file: sa1100.h diff -N sa1100.h --- /dev/null Thu May 24 22:33:05 2001 +++ /tmp/cvsXxzPAj Mon Aug 6 15:44:54 2001 @@ -0,0 +1,37 @@ +/* + * sa1100.h: wrapper file to include asm/arch-sa1100/SA-1100.h + * + * Copyright (C) 2001 Erik Mouw (J.A...@it...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ident "$Id$" + +#ifndef BLOB_SA1100_H +#define BLOB_SA1100_H + + + + +/* Tell SA-1100.h to shut up; we're including it anyway. Nyah nyah ;-) */ +#define __ASM_ARCH_HARDWARE_H +#include <asm/arch-sa1100/SA-1100.h> + + + + +#endif Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/include/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile.am 2001/06/27 19:47:41 1.1.1.1 +++ Makefile.am 2001/08/06 22:44:52 1.2 @@ -15,8 +15,12 @@ clock.h \ command.h \ flash.h \ + led.h \ + linux.h \ main.h \ + memory.h \ registers.h \ + sa1100.h \ serial.h \ time.h \ types.h \ Index: flash.h =================================================================== RCS file: /cvsroot/blob/blob/include/flash.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- flash.h 2001/06/27 19:47:42 1.1.1.1 +++ flash.h 2001/08/06 22:44:52 1.2 @@ -39,15 +39,17 @@ #define NUM_FLASH_BLOCKS (31) #define FLASH_BLOCK_BASE ((u32 *) 0x020000) #define FLASH_BLOCK_SIZE ((u32) 0x020000) -#define BLOCK_NAME_LEN (64) -#define NO_BLOCK ((u8) 0xFF) -#define BLOCK_HDR_SIG ((u32) 'LART') -#define BLOCK_EMPTY_SIG ((u32) 0xFFFFFFFF) +#define BLOCK_NAME_LEN (64) +#define NO_BLOCK ((u8) 0xFF) +#define BLOCK_HDR_SIG ((u32) 'LART') +#define BLOCK_EMPTY_SIG ((u32) 0xFFFFFFFF) #define BLOCK_IN_USE(x) (x.signature == BLOCK_HDR_SIG) typedef enum { - blRamdisk, blKernel + blBlob, + blKernel, + blRamdisk } tBlockType; static inline int RunningFromInternal(void) { @@ -61,21 +63,37 @@ #define MAIN_BLOCK_SIZE (32768 * 4) #define CS0_BASE (0x00000000) -#define CS1_BASE (0x08000000) +#define CS1_BASE (0x08000000) #define INT_FLASH_BASE (RunningFromInternal() ? CS0_BASE : CS1_BASE) #ifdef ASSABET // Assabet settings come from linux/drivers/block/flash_mem.h -#define KERNEL_START 0x10000 -#define KERNEL_LEN 0xc0000 +#define BLOB_START 0x00000 +#define BLOB_LEN 0x10000 +#define NUM_BLOB_BLOCKS (BLOB_LEN / MAIN_BLOCK_SIZE) +#define KERNEL_START 0x10000 +#define KERNEL_LEN 0xc0000 #define NUM_KERNEL_BLOCKS (KERNEL_LEN / MAIN_BLOCK_SIZE) #define INITRD_START (KERNEL_START + KERNEL_LEN) #define INITRD_LEN 0x280000 #define NUM_INITRD_BLOCKS (INITRD_LEN / MAIN_BLOCK_SIZE) +#elif defined SHANNON +#define BLOB_START (INT_FLASH_BASE) +#define NUM_BLOB_BLOCKS (1) +#define BLOB_LEN (NUM_BLOB_BLOCKS * MAIN_BLOCK_SIZE) +#define KERNEL_START (INT_FLASH_BASE + MAIN_BLOCK_SIZE) +#define NUM_KERNEL_BLOCKS (7) +#define KERNEL_LEN (NUM_KERNEL_BLOCKS * MAIN_BLOCK_SIZE) +#define INITRD_START (KERNEL_START + KERNEL_LEN) +#define NUM_INITRD_BLOCKS (24) +#define INITRD_LEN (NUM_INITRD_BLOCKS * MAIN_BLOCK_SIZE) #else -#define KERNEL_START (INT_FLASH_BASE + MAIN_BLOCK_SIZE) +#define BLOB_START (INT_FLASH_BASE) +#define NUM_BLOB_BLOCKS (1) +#define BLOB_LEN (NUM_BLOB_BLOCKS * MAIN_BLOCK_SIZE) +#define KERNEL_START (INT_FLASH_BASE + MAIN_BLOCK_SIZE) #define NUM_KERNEL_BLOCKS (7) -#define KERNEL_LEN (NUM_KERNEL_BLOCKS * MAIN_BLOCK_SIZE) +#define KERNEL_LEN (NUM_KERNEL_BLOCKS * MAIN_BLOCK_SIZE) #define INITRD_START (KERNEL_START + KERNEL_LEN) #define NUM_INITRD_BLOCKS (24) #define INITRD_LEN (NUM_INITRD_BLOCKS * MAIN_BLOCK_SIZE) Index: main.h =================================================================== RCS file: /cvsroot/blob/blob/include/main.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- main.h 2001/06/27 19:47:42 1.1.1.1 +++ main.h 2001/08/06 22:44:52 1.2 @@ -34,22 +34,79 @@ #ifndef BLOB_MAIN_H #define BLOB_MAIN_H +/* memory start and end */ +#define MEMORY_START (0xc0000000) +#define MEMORY_END (0xe0000000) +/* where does blob live when we download it */ +#if defined SHANNON +#define BLOB_RAM_BASE (0xc0100000) +#else +#define BLOB_RAM_BASE (0xc1000000) +#endif -#define KERNEL_RAM_BASE (0xC0008000) +#define BLOB_BLOCK_OFFSET (0x00000000) -#ifdef ASSABET -#define RAMDISK_RAM_BASE (0xC0800000) -#else -#define RAMDISK_RAM_BASE (0xC0400000) -#endif +/* where does the kernel live in RAM */ +#define KERNEL_RAM_BASE (0xC0008000) + #define KERNEL_BLOCK_OFFSET (0x00008000) + -#ifdef ASSABET -#define RAMDISK_BLOCK_OFFSET (0x00800000) +/* where does the ramdisk live in RAM */ +#if defined ASSABET +# define RAMDISK_RAM_BASE (0xC0800000) +#elif defined SHANNON +# define RAMDISK_RAM_BASE (0xC8000000) #else -#define RAMDISK_BLOCK_OFFSET (0x00400000) +# define RAMDISK_RAM_BASE (0xC0400000) #endif + +#if defined ASSABET +# define RAMDISK_BLOCK_OFFSET (0x00800000) +#elif defined SHANNON +# define RAMDISK_BLOCK_OFFSET (0x00200000) +#else +# define RAMDISK_BLOCK_OFFSET (0x00400000) +#endif + +/* where does the command block live in memory */ +/* As far as I know all architectures have this at the same address */ +#define BOOT_PARAMS (0xc0000100) + +/* the size to which the compressed ramdisk expands */ +#define RAMDISK_SIZE (8 * 1024 * 1024) + + +#include "types.h" +#include "serial.h" + + +typedef enum { + fromFlash = 0, + fromDownload = 1 +} block_source_t; + + +typedef struct { + int kernelSize; + block_source_t kernelType; + + int ramdiskSize; + block_source_t ramdiskType; + + int blobSize; + block_source_t blobType; + + u32 blockSize; + + eBauds downloadSpeed; +} blob_status_t; + + +extern blob_status_t blob_status; + + #endif Index: time.h =================================================================== RCS file: /cvsroot/blob/blob/include/time.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- time.h 2001/06/27 19:47:42 1.1.1.1 +++ time.h 2001/08/06 22:44:52 1.2 @@ -9,9 +9,9 @@ * Modified at: Tue Sep 28 23:44:11 1999 *-----------------------------------------------------------------------*/ /* - * timer.c: Timer functions for blob + * time.h: header file for time.c * - * Copyright (C) 1999 Erik Mouw (J.A...@it...) + * Copyright (C) 1999 2000 2001 Erik Mouw (J.A...@it...) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,17 +42,22 @@ -#define TICKS_PER_SECOND 32768 +#define TICKS_PER_SECOND 3686400 - /* initialise timer */ void TimerInit(void); -/* returns the time in 1/32768 seconds */ +/* returns the time in 1/TICKS_PER_SECOND seconds */ u32 TimerGetTime(void); +int TimerDetectOverflow(void); + +void TimerClearOverflow(void); + +/* suspend execution for interval of milliseconds */ +void msleep(unsigned int msec); Index: types.h =================================================================== RCS file: /cvsroot/blob/blob/include/types.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- types.h 2001/06/27 19:47:42 1.1.1.1 +++ types.h 2001/08/06 22:44:52 1.2 @@ -34,21 +34,15 @@ #ifndef BLOB_TYPES_H #define BLOB_TYPES_H - - - typedef unsigned long u32; typedef unsigned short u16; typedef unsigned char u8; - +/* number of nibbles in a word */ +#define NIBBLES_PER_WORD (8) - #ifndef NULL #define NULL (void *)0 #endif - - - #endif Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/util.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- util.h 2001/06/27 19:47:42 1.1.1.1 +++ util.h 2001/08/06 22:44:52 1.2 @@ -45,4 +45,7 @@ int MyToUpper(int c); int MyToLower(int c); +int strlen(const char *s); +char *strcpy(char *dest, const char *src); + #endif |
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) |
From: Erik M. <er...@us...> - 2001-07-31 21:45:59
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv3467 Modified Files: Tag: blob_1_0_9_hack main.c Log Message: add size check before we try to write too large images to the flash Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/main.c,v retrieving revision 1.1.1.1.2.12 retrieving revision 1.1.1.1.2.13 diff -u -r1.1.1.1.2.12 -r1.1.1.1.2.13 --- main.c 2001/07/26 00:33:03 1.1.1.1.2.12 +++ main.c 2001/07/31 21:45:56 1.1.1.1.2.13 @@ -273,12 +273,14 @@ { u32 startAddress = 0; tBlockType block; - int numBytes = 0;; + int numBytes = 0; + int maxSize = 0; if(MyStrNCmp(commandline, "blob", 4) == 0) { startAddress = BLOB_RAM_BASE; block = blBlob; numBytes = blob_status.blobSize; + maxSize = BLOB_LEN; if(blob_status.blobType == fromFlash) { SerialOutputString("*** No blob downloaded\n"); @@ -290,6 +292,7 @@ startAddress = KERNEL_RAM_BASE; block = blKernel; numBytes = blob_status.kernelSize; + maxSize = KERNEL_LEN; if(blob_status.kernelType == fromFlash) { SerialOutputString("*** No kernel downloaded\n"); @@ -301,6 +304,7 @@ startAddress = RAMDISK_RAM_BASE; block = blRamdisk; numBytes = blob_status.ramdiskSize; + maxSize = INITRD_LEN; if(blob_status.ramdiskType == fromFlash) { SerialOutputString("*** No ramdisk downloaded\n"); @@ -312,6 +316,17 @@ SerialOutputString("*** Don't know how to flash \""); SerialOutputString(commandline); SerialOutputString("\"\n"); + return; + } + + if(numBytes > maxSize) { + SerialOutputString("*** Downloaded image too large for flash area\n"); + SerialOutputString("*** (0x"); + SerialOutputHex(numBytes); + SerialOutputString(" downloaded, maximum size is 0x"); + SerialOutputHex(maxSize); + SerialOutputString(" bytes)\n"); + return; } |
From: Russ D. <ru...@us...> - 2001-07-31 09:52:00
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv24521 Modified Files: Tag: blob_1_0_9_hack memsetup.S Log Message: added nesa flash timing (same as shannon) Index: memsetup.S =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/memsetup.S,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- memsetup.S 2001/07/29 21:50:37 1.1.2.5 +++ memsetup.S 2001/07/31 09:51:57 1.1.2.6 @@ -52,12 +52,20 @@ -#if (defined BRUTUS) || (defined NESA) +#if (defined BRUTUS) mdcas0: .long 0xc71c703f mdcas1: .long 0xffc71c71 mdcas2: .long 0xffffffff mdcnfg: .long 0x0334b22f mcs0: .long 0xfff8fff8 +#endif + +#if (defined NESA) +mdcas0: .long 0xc71c703f +mdcas1: .long 0xffc71c71 +mdcas2: .long 0xffffffff +mdcnfg: .long 0x0334b22f +mcs0: .long 0xfff84458 #endif #if defined LART |
From: Erik M. <J.A...@IT...> - 2001-07-30 14:00:37
|
On Mon, Jul 30, 2001 at 03:37:48PM +0200, Abraham vd Merwe wrote: > Could somebody please add a check in blob for stupid people (like me) who > tries to upload images that won't fit in the flash. Uploading a large image shouldn't be a real problem. > At the moment blob happily writes too big images which ends up as a royal > mess :P But writing a large image is, though. I'll look into it. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department of Electrical Engineering, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Abraham vd M. <ab...@2d...> - 2001-07-30 13:37:28
|
Hi! Could somebody please add a check in blob for stupid people (like me) who tries to upload images that won't fit in the flash. At the moment blob happily writes too big images which ends up as a royal mess :P --=20 Regards Abraham In a museum in Havana, there are two skulls of Christopher Columbus, "one when he was a boy and one when he was a man." -- Mark Twain __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: ab...@2d... Kenilworth, 7700 Http: http://www.2d3d.com South Africa |
From: Erik M. <er...@us...> - 2001-07-29 21:50:41
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv27615 Modified Files: Tag: blob_1_0_9_hack memsetup.S Log Message: LART flash is even faster :) Index: memsetup.S =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/memsetup.S,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- memsetup.S 2001/07/28 22:24:04 1.1.2.4 +++ memsetup.S 2001/07/29 21:50:37 1.1.2.5 @@ -52,14 +52,22 @@ -#if (defined BRUTUS) || (defined LART) || (defined NESA) +#if (defined BRUTUS) || (defined NESA) mdcas0: .long 0xc71c703f mdcas1: .long 0xffc71c71 mdcas2: .long 0xffffffff mdcnfg: .long 0x0334b22f mcs0: .long 0xfff8fff8 #endif - + +#if defined LART +mdcas0: .long 0xc71c703f +mdcas1: .long 0xffc71c71 +mdcas2: .long 0xffffffff +mdcnfg: .long 0x0334b22f +mcs0: .long 0xad8c4888 +#endif + #if defined PLEB mdcas0: .long 0x1c71c01f mdcas1: .long 0xff1c71c7 @@ -80,13 +88,13 @@ .globl memsetup memsetup: #if defined USE_SA1100 - /* Setup the flash memory in banks 0 and 1 */ + /* Setup the flash memory */ ldr r0, MEM_BASE ldr r1, mcs0 str r1, [r0, #MCS0] - /* Set up the DRAM in banks 0 and 1 */ + /* Set up the DRAM */ /* MDCAS0 */ ldr r1, mdcas0 |
From: Russ D. <ru...@us...> - 2001-07-28 22:24:06
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv8637 Modified Files: Tag: blob_1_0_9_hack memsetup.S Log Message: Added flash timing for shannon Index: memsetup.S =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/memsetup.S,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- memsetup.S 2001/07/16 21:41:26 1.1.2.3 +++ memsetup.S 2001/07/28 22:24:04 1.1.2.4 @@ -47,6 +47,7 @@ #define MDCAS0 0x04 #define MDCAS1 0x08 #define MDCAS2 0x0c +#define MCS0 0x10 @@ -56,6 +57,7 @@ mdcas1: .long 0xffc71c71 mdcas2: .long 0xffffffff mdcnfg: .long 0x0334b22f +mcs0: .long 0xfff8fff8 #endif #if defined PLEB @@ -63,6 +65,7 @@ mdcas1: .long 0xff1c71c7 mdcas2: .long 0xffffffff mdcnfg: .long 0x0c7f3ca3 +mcs0: .long 0xfff8fff8 #endif #if defined SHANNON @@ -70,14 +73,20 @@ mdcas1: .long 0xffc71c71 mdcas2: .long 0xffffffff mdcnfg: .long 0x0334b21f +mcs0: .long 0xfff84458 #endif .globl memsetup memsetup: #if defined USE_SA1100 - /* Set up the DRAM in banks 0 and 1 */ + /* Setup the flash memory in banks 0 and 1 */ ldr r0, MEM_BASE + + ldr r1, mcs0 + str r1, [r0, #MCS0] + + /* Set up the DRAM in banks 0 and 1 */ /* MDCAS0 */ ldr r1, mdcas0 |
From: Erik M. <er...@us...> - 2001-07-27 14:05:51
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv9185 Modified Files: Tag: blob_1_0_9_hack start.S Log Message: >From Dinakar Guniguntala <di...@ya...>: jump to 0xc0000400 instead of 0xc0000000 Index: start.S =================================================================== RCS file: /cvsroot/blob/blob/src/start.S,v retrieving revision 1.1.1.1.2.15 retrieving revision 1.1.1.1.2.16 diff -u -r1.1.1.1.2.15 -r1.1.1.1.2.16 --- start.S 2001/07/26 09:03:47 1.1.1.1.2.15 +++ start.S 2001/07/27 14:05:48 1.1.1.1.2.16 @@ -201,6 +201,7 @@ /* blob is copied to ram, so jump to it */ + add r0, r0, #0x400 mov pc, r0 |
From: Erik M. <J.A...@IT...> - 2001-07-27 14:04:24
|
On Fri, Jul 27, 2001 at 11:12:03AM +0200, Erik Mouw wrote: > No, untested feature I thought off when I took a shower last night. > Looked obvious enough to me to apply :) I'll test. It works. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department of Electrical Engineering, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Erik M. <J.A...@IT...> - 2001-07-27 09:16:00
|
On Thu, Jul 26, 2001 at 05:44:15PM -0700, Russ Dill wrote: > > - if there is no command line, don't issue an ATAG_CMDLINE node, so the > > kernel will use its default command line > > Did this actually work for you? I tried this, but it didn't seem to > help. No, untested feature I thought off when I took a shower last night. Looked obvious enough to me to apply :) I'll test. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department of Electrical Engineering, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Russ D. <Rus...@as...> - 2001-07-27 00:41:12
|
> - if there is no command line, don't issue an ATAG_CMDLINE node, so the > kernel will use its default command line Did this actually work for you? I tried this, but it didn't seem to help. |
From: Erik M. <er...@us...> - 2001-07-27 00:22:28
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv30236/src Modified Files: Tag: blob_1_0_9_hack linux.c Log Message: - an ATAG_INITRD tag also needs an ATAG_RAMDISK tag - if there is no command line, don't issue an ATAG_CMDLINE node, so the kernel will use its default command line Index: linux.c =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/linux.c,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- linux.c 2001/07/26 10:58:40 1.1.2.4 +++ linux.c 2001/07/27 00:22:25 1.1.2.5 @@ -38,7 +38,8 @@ static void setup_start_tag(void); static void setup_memory_tags(void); static void setup_commandline_tag(char *commandline); -/* static void setup_initrd_tag(void); */ +static void setup_ramdisk_tag(void); +static void setup_initrd_tag(void); static void setup_end_tag(void); @@ -53,7 +54,8 @@ setup_start_tag(); setup_memory_tags(); setup_commandline_tag(commandline); -/* setup_initrd_tag(); */ + setup_initrd_tag(); + setup_ramdisk_tag(); setup_end_tag(); /* we assume that the kernel is in place */ @@ -108,22 +110,32 @@ static void setup_commandline_tag(char *commandline) { + char *p; + + /* eat leading white space */ + for(p = commandline; *p == ' '; p++) + ; + + /* skip non-existent command lines so the kernel will still + * use its default command line. + */ + if(*p == '\0') + return; + params->hdr.tag = ATAG_CMDLINE; - params->hdr.size = (sizeof(struct tag_header) + strlen(commandline) + 1 + 4) >> 2; + params->hdr.size = (sizeof(struct tag_header) + strlen(p) + 1 + 4) >> 2; - strcpy(params->u.cmdline.cmdline, commandline); + strcpy(params->u.cmdline.cmdline, p); params = tag_next(params); } -#if 0 -/* no, this is not the right way. you can't boot from /dev/hda1 with - * this stuff. we first need proper parameter block support to make - * this work. - */ static void setup_initrd_tag(void) { + /* an ATAG_INITRD node tells the kernel where the compressed + * ramdisk can be found. ATAG_RDIMG is a better name, actually. + */ params->hdr.tag = ATAG_INITRD; params->hdr.size = tag_size(tag_initrd); @@ -131,8 +143,24 @@ params->u.initrd.size = INITRD_LEN; params = tag_next(params); +} + + +static void setup_ramdisk_tag(void) +{ + /* an ATAG_RAMDISK node tells the kernel how large the + * decompressed ramdisk will become. + */ + params->hdr.tag = ATAG_RAMDISK; + params->hdr.size = tag_size(tag_ramdisk); + + params->u.ramdisk.start = 0; + params->u.ramdisk.size = RAMDISK_SIZE; + params->u.ramdisk.flags = 1; /* automatically load ramdisk */ + + params = tag_next(params); } -#endif + static void setup_end_tag(void) { |
From: Erik M. <er...@us...> - 2001-07-27 00:22:27
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv30236/include Modified Files: Tag: blob_1_0_9_hack main.h Log Message: - an ATAG_INITRD tag also needs an ATAG_RAMDISK tag - if there is no command line, don't issue an ATAG_CMDLINE node, so the kernel will use its default command line Index: main.h =================================================================== RCS file: /cvsroot/blob/blob/include/main.h,v retrieving revision 1.1.1.1.2.6 retrieving revision 1.1.1.1.2.7 diff -u -r1.1.1.1.2.6 -r1.1.1.1.2.7 --- main.h 2001/07/26 00:33:03 1.1.1.1.2.6 +++ main.h 2001/07/27 00:22:25 1.1.1.1.2.7 @@ -76,6 +76,8 @@ /* As far as I know all architectures have this at the same address */ #define BOOT_PARAMS (0xc0000100) +/* the size to which the compressed ramdisk expands */ +#define RAMDISK_SIZE (8 * 1024 * 1024) #include "types.h" |
From: Erik M. <er...@us...> - 2001-07-27 00:20:45
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv30104 Modified Files: Tag: blob_1_0_9_hack README Log Message: having linux source ready is also a requirement Index: README =================================================================== RCS file: /cvsroot/blob/blob/README,v retrieving revision 1.1.1.1.2.4 retrieving revision 1.1.1.1.2.5 diff -u -r1.1.1.1.2.4 -r1.1.1.1.2.5 --- README 2001/07/24 13:23:54 1.1.1.1.2.4 +++ README 2001/07/27 00:20:43 1.1.1.1.2.5 @@ -80,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 |
From: Erik M. <er...@us...> - 2001-07-26 10:58:43
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv3744 Modified Files: Tag: blob_1_0_9_hack linux.c Log Message: back out initrd tag Index: linux.c =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/linux.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- linux.c 2001/07/26 09:32:26 1.1.2.3 +++ linux.c 2001/07/26 10:58:40 1.1.2.4 @@ -38,7 +38,7 @@ static void setup_start_tag(void); static void setup_memory_tags(void); static void setup_commandline_tag(char *commandline); -static void setup_initrd_tag(void); +/* static void setup_initrd_tag(void); */ static void setup_end_tag(void); @@ -53,7 +53,7 @@ setup_start_tag(); setup_memory_tags(); setup_commandline_tag(commandline); - setup_initrd_tag(); +/* setup_initrd_tag(); */ setup_end_tag(); /* we assume that the kernel is in place */ @@ -117,6 +117,11 @@ } +#if 0 +/* no, this is not the right way. you can't boot from /dev/hda1 with + * this stuff. we first need proper parameter block support to make + * this work. + */ static void setup_initrd_tag(void) { params->hdr.tag = ATAG_INITRD; @@ -127,7 +132,7 @@ params = tag_next(params); } - +#endif static void setup_end_tag(void) { |
From: Erik M. <J.A...@IT...> - 2001-07-26 10:57:53
|
On Thu, Jul 26, 2001 at 02:32:28AM -0700, Russ Dill wrote: > + params = tag_next(params); > +} > + > + > +static void setup_initrd_tag(void) > +{ > + params->hdr.tag = ATAG_INITRD; > + params->hdr.size = tag_size(tag_initrd); > + > + params->u.initrd.start = RAMDISK_RAM_BASE; > + params->u.initrd.size = INITRD_LEN; > + > params = tag_next(params); That's not right. This doesn't work if you want to boot from /dev/hda1. I comment this patch out for the moment and put it back in when we have proper parameter block support. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department of Electrical Engineering, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Russ D. <ru...@us...> - 2001-07-26 09:32:29
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv21538 Modified Files: Tag: blob_1_0_9_hack linux.c Log Message: added initrd tag Index: linux.c =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/linux.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- linux.c 2001/07/26 00:33:03 1.1.2.2 +++ linux.c 2001/07/26 09:32:26 1.1.2.3 @@ -27,6 +27,7 @@ #include "linux.h" #include "main.h" +#include "flash.h" #include "memory.h" #include "serial.h" #include "util.h" @@ -37,6 +38,7 @@ static void setup_start_tag(void); static void setup_memory_tags(void); static void setup_commandline_tag(char *commandline); +static void setup_initrd_tag(void); static void setup_end_tag(void); @@ -51,6 +53,7 @@ setup_start_tag(); setup_memory_tags(); setup_commandline_tag(commandline); + setup_initrd_tag(); setup_end_tag(); /* we assume that the kernel is in place */ @@ -110,6 +113,18 @@ strcpy(params->u.cmdline.cmdline, commandline); + params = tag_next(params); +} + + +static void setup_initrd_tag(void) +{ + params->hdr.tag = ATAG_INITRD; + params->hdr.size = tag_size(tag_initrd); + + params->u.initrd.start = RAMDISK_RAM_BASE; + params->u.initrd.size = INITRD_LEN; + params = tag_next(params); } |
From: Russ D. <ru...@us...> - 2001-07-26 09:03:49
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv16377 Modified Files: Tag: blob_1_0_9_hack start.S Log Message: 206MHz was getting a crc error, its probably the memory timings, but we'll set it to 191.7Mhz for now Index: start.S =================================================================== RCS file: /cvsroot/blob/blob/src/start.S,v retrieving revision 1.1.1.1.2.14 retrieving revision 1.1.1.1.2.15 diff -u -r1.1.1.1.2.14 -r1.1.1.1.2.15 --- start.S 2001/07/26 08:12:04 1.1.1.1.2.14 +++ start.S 2001/07/26 09:03:47 1.1.1.1.2.15 @@ -79,7 +79,7 @@ || (defined NESA) || (defined NESA) cpuspeed: .long 0x0b /* 221 MHz */ #elif defined SHANNON -cpuspeed: .long 0x0a /* 206 MHz */ +cpuspeed: .long 0x09 /* 191.7 MHz */ #else #warning "FIXME: Include code to use the correct clock speed for your board" cpuspeed: .long 0x05 /* safe 133 MHz speed */ |
From: Russ D. <ru...@us...> - 2001-07-26 08:12:07
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv6351 Modified Files: Tag: blob_1_0_9_hack start.S Log Message: I've decided that 160x is a bad cpu multiplier for shannon, lets use 10 instead... Index: start.S =================================================================== RCS file: /cvsroot/blob/blob/src/start.S,v retrieving revision 1.1.1.1.2.13 retrieving revision 1.1.1.1.2.14 diff -u -r1.1.1.1.2.13 -r1.1.1.1.2.14 --- start.S 2001/07/26 00:33:03 1.1.1.1.2.13 +++ start.S 2001/07/26 08:12:04 1.1.1.1.2.14 @@ -79,7 +79,7 @@ || (defined NESA) || (defined NESA) cpuspeed: .long 0x0b /* 221 MHz */ #elif defined SHANNON -cpuspeed: .long 0xa0 /* 206 MHz */ +cpuspeed: .long 0x0a /* 206 MHz */ #else #warning "FIXME: Include code to use the correct clock speed for your board" cpuspeed: .long 0x05 /* safe 133 MHz speed */ |
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv25835/src Modified Files: Tag: blob_1_0_9_hack Makefile.am linux.c main.c memory.c rest-ld-script start.S util.c Log Message: Kernel command line support. - linux.c handles parameter list setup and also passes the correct memory layout to the kernel - cleanup in main.c - add strlen() and strcpy() functions - move blob to 0xc0000400 instead of 0xc000000 because the parameter list has to live at 0xc0000100 - minor cleanups Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/Makefile.am,v retrieving revision 1.1.1.1.2.3 retrieving revision 1.1.1.1.2.4 diff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 --- Makefile.am 2001/07/22 22:54:26 1.1.1.1.2.3 +++ Makefile.am 2001/07/26 00:33:03 1.1.1.1.2.4 @@ -54,6 +54,7 @@ command.c \ flash.c \ led.c \ + linux.c \ main.c \ memory.c \ serial.c \ Index: linux.c =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/linux.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- linux.c 2001/07/24 13:57:47 1.1.2.1 +++ linux.c 2001/07/26 00:33:03 1.1.2.2 @@ -1 +1,121 @@ +/* + * linux.c: support functions for booting a kernel + * + * Copyright (C) 2001 Erik Mouw (J.A...@it...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + #ident "$Id$" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "linux.h" +#include "main.h" +#include "memory.h" +#include "serial.h" +#include "util.h" + +#include <asm/setup.h> + + +static void setup_start_tag(void); +static void setup_memory_tags(void); +static void setup_commandline_tag(char *commandline); +static void setup_end_tag(void); + + +static struct tag *params; + + +void boot_linux(char *commandline) +{ + register u32 i; + void (*theKernel)(int zero, int arch) = (void (*)(int, int))KERNEL_RAM_BASE; + + setup_start_tag(); + setup_memory_tags(); + setup_commandline_tag(commandline); + setup_end_tag(); + + /* we assume that the kernel is in place */ + SerialOutputString("\nStarting kernel ...\n\n"); + + /* turn off I-cache */ + asm ("mrc p15, 0, %0, c1, c0, 0": "=r" (i)); + i &= ~0x1000; + asm ("mcr p15, 0, %0, c1, c0, 0": : "r" (i)); + + /* flush I-cache */ + asm ("mcr p15, 0, %0, c7, c5, 0": : "r" (i)); + + theKernel(0, ARCH_NUMBER); + + SerialOutputString("Hey, the kernel returned! This should not happen.\n"); +} + + +static void setup_start_tag(void) +{ + params = (struct tag *)BOOT_PARAMS; + + params->hdr.tag = ATAG_CORE; + params->hdr.size = tag_size(tag_core); + + params->u.core.flags = 0; + params->u.core.pagesize = 0; + params->u.core.rootdev = 0; + + params = tag_next(params); +} + + +static void setup_memory_tags(void) +{ + int i; + + for(i = 0; i < NUM_MEM_AREAS; i++) { + if(memory_map[i].used) { + params->hdr.tag = ATAG_MEM; + params->hdr.size = tag_size(tag_mem32); + + params->u.mem.start = memory_map[i].start; + params->u.mem.size = memory_map[i].len; + + params = tag_next(params); + } + } +} + + +static void setup_commandline_tag(char *commandline) +{ + params->hdr.tag = ATAG_CMDLINE; + params->hdr.size = (sizeof(struct tag_header) + strlen(commandline) + 1 + 4) >> 2; + + strcpy(params->u.cmdline.cmdline, commandline); + + params = tag_next(params); +} + + +static void setup_end_tag(void) +{ + params->hdr.tag = ATAG_NONE; + params->hdr.size = 0; +} Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/main.c,v retrieving revision 1.1.1.1.2.11 retrieving revision 1.1.1.1.2.12 diff -u -r1.1.1.1.2.11 -r1.1.1.1.2.12 --- main.c 2001/07/24 13:23:54 1.1.1.1.2.11 +++ main.c 2001/07/26 00:33:03 1.1.1.1.2.12 @@ -42,6 +42,7 @@ #include "command.h" #include "flash.h" #include "led.h" +#include "linux.h" #include "main.h" #include "memory.h" #include "sa1100.h" @@ -52,40 +53,14 @@ -typedef enum { - fromFlash = 0, - fromDownload = 1 -} blockSource; - - - -typedef struct { - int kernelSize; - blockSource kernelType; - - int ramdiskSize; - blockSource ramdiskType; - - int blobSize; - blockSource blobType; - - u32 blockSize; - - eBauds downloadSpeed; -} blobStatus; - - - - -void BootKernel(char *commandline); -void Download(char *commandline, blobStatus *status); -void Flash(char *commandline, blobStatus *status); +void Download(char *commandline); +void Flash(char *commandline); void PrintHelp(void); -void SetDownloadSpeed(char *commandline, blobStatus *status); -void PrintStatus(blobStatus *status); +void SetDownloadSpeed(char *commandline); +void PrintStatus(void); void ResetTerminal(void); -void Reload(char *commandline, blobStatus *status); +void Reload(char *commandline); void PrintSerialSpeed(eBauds speed); void Reboot(void); void Reblob(void); @@ -93,12 +68,16 @@ +blob_status_t blob_status; + + + + int main(void) { u32 blockSize = 0x00800000; int numRead = 0; char commandline[128]; - blobStatus status; int i; int retval = 0; @@ -125,25 +104,25 @@ SerialOutputString("This is free software, and you are welcome " "to redistribute it\n"); SerialOutputString("under certain conditions; " - "read the GNU GPL for details.\n\n"); + "read the GNU GPL for details.\n"); /* get the amount of memory */ get_memory_map(); /* initialise status */ - status.kernelSize = 0; - status.kernelType = fromFlash; - status.ramdiskSize = 0; - status.ramdiskType = fromFlash; - status.blockSize = blockSize; - status.downloadSpeed = baud115k2; + blob_status.kernelSize = 0; + blob_status.kernelType = fromFlash; + blob_status.ramdiskSize = 0; + blob_status.ramdiskType = fromFlash; + blob_status.blockSize = blockSize; + blob_status.downloadSpeed = baud115k2; /* Load kernel and ramdisk from flash to RAM */ - Reload("blob", &status); - Reload("kernel", &status); - Reload("ramdisk", &status); + Reload("blob"); + Reload("kernel"); + Reload("ramdisk"); #ifdef BLOB_DEBUG /* print some information */ @@ -171,7 +150,7 @@ /* no key was pressed, so proceed booting the kernel */ if(retval == 0) { commandline[0] = '\0'; - BootKernel(commandline); + boot_linux(commandline); } SerialOutputString("\nAutoboot aborted\n"); @@ -186,13 +165,13 @@ if(numRead > 0) { if(MyStrNCmp(commandline, "boot", 4) == 0) { - BootKernel(commandline + 4); + boot_linux(commandline + 4); } else if(MyStrNCmp(commandline, "clock", 5) == 0) { SetClock(commandline + 5); } else if(MyStrNCmp(commandline, "download ", 9) == 0) { - Download(commandline + 9, &status); + Download(commandline + 9); } else if(MyStrNCmp(commandline, "flash ", 6) == 0) { - Flash(commandline + 6, &status); + Flash(commandline + 6); } else if(MyStrNCmp(commandline, "help", 4) == 0) { PrintHelp(); } else if(MyStrNCmp(commandline, "reblob", 6) == 0) { @@ -200,14 +179,14 @@ } else if(MyStrNCmp(commandline, "reboot", 6) == 0) { Reboot(); } else if(MyStrNCmp(commandline, "reload ", 7) == 0) { - Reload(commandline + 7, &status); + Reload(commandline + 7); } else if(MyStrNCmp(commandline, "reset", 5) == 0) { ResetTerminal(); } else if(MyStrNCmp(commandline, "speed ", 6) == 0) { - SetDownloadSpeed(commandline + 6, &status); + SetDownloadSpeed(commandline + 6); } else if(MyStrNCmp(commandline, "status", 6) == 0) { - PrintStatus(&status); + PrintStatus(); } else { SerialOutputString("*** Unknown command: "); SerialOutputString(commandline); @@ -217,62 +196,12 @@ } return 0; -} /* c_main */ - - - - -void BootKernel(char *commandline) -{ - register u32 i; - void (*theKernel)(int zero, int arch) = (void (*)(int, int))KERNEL_RAM_BASE; - -#warning "FIXME: should set kernel commandline parameters -- Erik" - -#ifdef BLOB_DEBUG - SerialOutputString("\n*** Ignoring kernel parameters\n"); -#endif - - /* we assume that the kernel is in place */ - /* See linux/include/asm-arm/system.h for architecture numbers */ - SerialOutputString("\nStarting kernel ...\n\n"); - - /* turn off I-cache */ - asm ("mrc p15, 0, %0, c1, c0, 0": "=r" (i)); - i &= ~0x1000; - asm ("mcr p15, 0, %0, c1, c0, 0": : "r" (i)); - - /* flush I-cache */ - asm ("mcr p15, 0, %0, c7, c5, 0": : "r" (i)); - -#if defined ASSABET - theKernel(0, 25); -#elif defined BRUTUS - theKernel(0, 16); -#elif defined CLART - theKernel(0, 68); -#elif defined LART - theKernel(0, 27); -#elif defined NESA - theKernel(0, 75); -#elif defined PLEB - theKernel(0, 20); -#elif defined SHANNON - theKernel(0, 97); -#else - /* Be generic and just tell the kernel that we are an SA1100 - architecture */ -#warning "Calling the kernel with a generic SA1100 architecture code. YMMV!" - theKernel(0,18); -#endif - - SerialOutputString("Hey, the kernel returned! This should not happen.\n"); -} +} /* main */ -void Download(char *commandline, blobStatus *status) +void Download(char *commandline) { u32 startAddress = 0; int bufLen; @@ -281,21 +210,21 @@ if(MyStrNCmp(commandline, "blob", 4) == 0) { /* download blob */ startAddress = BLOB_RAM_BASE; - bufLen = status->blockSize - BLOB_BLOCK_OFFSET; - numRead = &status->blobSize; - status->blobType = fromDownload; + bufLen = blob_status.blockSize - BLOB_BLOCK_OFFSET; + numRead = &blob_status.blobSize; + blob_status.blobType = fromDownload; } else if(MyStrNCmp(commandline, "kernel", 6) == 0) { /* download kernel */ startAddress = KERNEL_RAM_BASE; - bufLen = status->blockSize - KERNEL_BLOCK_OFFSET; - numRead = &status->kernelSize; - status->kernelType = fromDownload; + bufLen = blob_status.blockSize - KERNEL_BLOCK_OFFSET; + numRead = &blob_status.kernelSize; + blob_status.kernelType = fromDownload; } else if(MyStrNCmp(commandline, "ramdisk", 7) == 0) { /* download ramdisk */ startAddress = RAMDISK_RAM_BASE; - bufLen = status->blockSize - RAMDISK_BLOCK_OFFSET; - numRead = &status->ramdiskSize; - status->ramdiskType = fromDownload; + bufLen = blob_status.blockSize - RAMDISK_BLOCK_OFFSET; + numRead = &blob_status.ramdiskSize; + blob_status.ramdiskType = fromDownload; } else { SerialOutputString("*** Don't know how to download \""); SerialOutputString(commandline); @@ -305,13 +234,13 @@ SerialOutputString("Switching to "); - PrintSerialSpeed(status->downloadSpeed); + PrintSerialSpeed(blob_status.downloadSpeed); SerialOutputString(" baud\n"); SerialOutputString("You have 60 seconds to switch your terminal emulator to the same speed and\n"); SerialOutputString("start downloading. After that " PACKAGE " will switch back to 9600 baud.\n"); - SerialInit(status->downloadSpeed); + SerialInit(blob_status.downloadSpeed); *numRead = UUDecode((char *)startAddress, bufLen); @@ -322,7 +251,7 @@ SerialOutputString("*** Uudecode receive failed\n"); /* reload the correct memory */ - Reload(commandline, status); + Reload(commandline); SerialInit(baud9k6); return; @@ -340,7 +269,7 @@ -void Flash(char *commandline, blobStatus *status) +void Flash(char *commandline) { u32 startAddress = 0; tBlockType block; @@ -349,9 +278,9 @@ if(MyStrNCmp(commandline, "blob", 4) == 0) { startAddress = BLOB_RAM_BASE; block = blBlob; - numBytes = status->blobSize; + numBytes = blob_status.blobSize; - if(status->blobType == fromFlash) { + if(blob_status.blobType == fromFlash) { SerialOutputString("*** No blob downloaded\n"); return; } @@ -360,9 +289,9 @@ } else if(MyStrNCmp(commandline, "kernel", 6) == 0) { startAddress = KERNEL_RAM_BASE; block = blKernel; - numBytes = status->kernelSize; + numBytes = blob_status.kernelSize; - if(status->kernelType == fromFlash) { + if(blob_status.kernelType == fromFlash) { SerialOutputString("*** No kernel downloaded\n"); return; } @@ -371,9 +300,9 @@ } else if(MyStrNCmp(commandline, "ramdisk", 7) == 0) { startAddress = RAMDISK_RAM_BASE; block = blRamdisk; - numBytes = status->ramdiskSize; + numBytes = blob_status.ramdiskSize; - if(status->ramdiskType == fromFlash) { + if(blob_status.ramdiskType == fromFlash) { SerialOutputString("*** No ramdisk downloaded\n"); return; } @@ -417,32 +346,32 @@ -void SetDownloadSpeed(char *commandline, blobStatus *status) +void SetDownloadSpeed(char *commandline) { if(MyStrNCmp(commandline, "1200", 4) == 0) { - status->downloadSpeed = baud1k2; + blob_status.downloadSpeed = baud1k2; } else if(MyStrNCmp(commandline, "1k2", 3) == 0) { - status->downloadSpeed = baud1k2; + blob_status.downloadSpeed = baud1k2; } else if(MyStrNCmp(commandline, "9600", 4) == 0) { - status->downloadSpeed = baud9k6; + blob_status.downloadSpeed = baud9k6; } else if(MyStrNCmp(commandline, "9k6", 3) == 0) { - status->downloadSpeed = baud9k6; + blob_status.downloadSpeed = baud9k6; } else if(MyStrNCmp(commandline, "19200", 5) == 0) { - status->downloadSpeed = baud19k2; + blob_status.downloadSpeed = baud19k2; } else if(MyStrNCmp(commandline, "19k2", 4) == 0) { - status->downloadSpeed = baud19k2; + blob_status.downloadSpeed = baud19k2; } else if(MyStrNCmp(commandline, "38400", 5) == 0) { - status->downloadSpeed = baud38k4; + blob_status.downloadSpeed = baud38k4; } else if(MyStrNCmp(commandline, "38k4", 4) == 0) { - status->downloadSpeed = baud38k4; + blob_status.downloadSpeed = baud38k4; } else if(MyStrNCmp(commandline, "57600", 5) == 0) { - status->downloadSpeed = baud57k6; + blob_status.downloadSpeed = baud57k6; } else if(MyStrNCmp(commandline, "57k6", 4) == 0) { - status->downloadSpeed = baud57k6; + blob_status.downloadSpeed = baud57k6; } else if(MyStrNCmp(commandline, "115200", 6) == 0) { - status->downloadSpeed = baud115k2; + blob_status.downloadSpeed = baud115k2; } else if(MyStrNCmp(commandline, "115k2", 5) == 0) { - status->downloadSpeed = baud115k2; + blob_status.downloadSpeed = baud115k2; } else { SerialOutputString("*** Invalid download speed value \""); SerialOutputString(commandline); @@ -452,14 +381,14 @@ } SerialOutputString("Download speed set to "); - PrintSerialSpeed(status->downloadSpeed); + PrintSerialSpeed(blob_status.downloadSpeed); SerialOutputString(" baud\n"); } -void PrintStatus(blobStatus *status) +void PrintStatus(void) { SerialOutputString("Bootloader : " PACKAGE "\n"); SerialOutputString("Version : " VERSION "\n"); @@ -471,36 +400,36 @@ SerialOutputString("external"); SerialOutputString(" flash\nBlocksize : 0x"); - SerialOutputHex(status->blockSize); + SerialOutputHex(blob_status.blockSize); SerialOutputString("\nDownload speed: "); - PrintSerialSpeed(status->downloadSpeed); + PrintSerialSpeed(blob_status.downloadSpeed); SerialOutputString(" baud\n"); SerialOutputString("Blob : "); - if(status->blobType == fromFlash) { + if(blob_status.blobType == fromFlash) { SerialOutputString("from flash\n"); } else { SerialOutputString("downloaded, "); - SerialOutputDec(status->blobSize); + SerialOutputDec(blob_status.blobSize); SerialOutputString(" bytes\n"); } SerialOutputString("Kernel : "); - if(status->kernelType == fromFlash) { + if(blob_status.kernelType == fromFlash) { SerialOutputString("from flash\n"); } else { SerialOutputString("downloaded, "); - SerialOutputDec(status->kernelSize); + SerialOutputDec(blob_status.kernelSize); SerialOutputString(" bytes\n"); } SerialOutputString("Ramdisk : "); - if(status->ramdiskType == fromFlash) { + if(blob_status.ramdiskType == fromFlash) { SerialOutputString("from flash\n"); } else { SerialOutputString("downloaded, "); - SerialOutputDec(status->ramdiskSize); + SerialOutputDec(blob_status.ramdiskSize); SerialOutputString(" bytes\n"); } } @@ -523,7 +452,7 @@ -void Reload(char *commandline, blobStatus *status) +void Reload(char *commandline) { u32 *src = 0; u32 *dst = 0; @@ -533,22 +462,22 @@ src = (u32 *)BLOB_RAM_BASE; dst = (u32 *)BLOB_START; numWords = BLOB_LEN / 4; - status->blobSize = 0; - status->blobType = fromFlash; + blob_status.blobSize = 0; + blob_status.blobType = fromFlash; SerialOutputString("Loading blob from flash "); } else if(MyStrNCmp(commandline, "kernel", 6) == 0) { src = (u32 *)KERNEL_RAM_BASE; dst = (u32 *)KERNEL_START; numWords = KERNEL_LEN / 4; - status->kernelSize = 0; - status->kernelType = fromFlash; + blob_status.kernelSize = 0; + blob_status.kernelType = fromFlash; SerialOutputString("Loading kernel from flash "); } else if(MyStrNCmp(commandline, "ramdisk", 7) == 0) { src = (u32 *)RAMDISK_RAM_BASE; dst = (u32 *)INITRD_START; numWords = INITRD_LEN / 4; - status->ramdiskSize = 0; - status->ramdiskType = fromFlash; + blob_status.ramdiskSize = 0; + blob_status.ramdiskType = fromFlash; SerialOutputString("Loading ramdisk from flash "); } else { SerialOutputString("*** Don't know how to reload \""); Index: memory.c =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/memory.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- memory.c 2001/07/22 22:54:26 1.1.2.1 +++ memory.c 2001/07/26 00:33:03 1.1.2.2 @@ -56,9 +56,6 @@ memory_map[i].used = 0; /* first write a 0 to all memory locations */ - /* this will overwrite the first word of the second stage - * bootloader, but that's a branch to main() anyway - */ for(addr = MEMORY_START; addr < MEMORY_END; addr += TEST_BLOCK_SIZE) * (u32 *)addr = 0; @@ -108,11 +105,11 @@ if(memory_map[i].used) { SerialOutputString(" 0x"); SerialOutputHex(memory_map[i].len); + SerialOutputString(" @ 0x"); + SerialOutputHex(memory_map[i].start); SerialOutputString(" ("); SerialOutputDec(memory_map[i].len / (1024 * 1024)); - SerialOutputString(" MB) @ 0x"); - SerialOutputHex(memory_map[i].start); - SerialOutputByte('\n'); + SerialOutputString(" MB)\n"); } } } Index: rest-ld-script =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/rest-ld-script,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- rest-ld-script 2001/07/08 22:34:14 1.1.2.1 +++ rest-ld-script 2001/07/26 00:33:03 1.1.2.2 @@ -15,7 +15,7 @@ ENTRY(_trampoline) SECTIONS { - . = 0xc0000000; + . = 0xc0000400; . = ALIGN(4); .text : { *(.text) } Index: start.S =================================================================== RCS file: /cvsroot/blob/blob/src/start.S,v retrieving revision 1.1.1.1.2.12 retrieving revision 1.1.1.1.2.13 diff -u -r1.1.1.1.2.12 -r1.1.1.1.2.13 --- start.S 2001/07/24 13:23:54 1.1.1.1.2.12 +++ start.S 2001/07/26 00:33:03 1.1.1.1.2.13 @@ -175,6 +175,7 @@ add r2, r0, #(128 * 1024) /* blob is 128kB */ add r0, r0, #0x400 /* skip first 1024 bytes */ ldr r1, MEM_START + add r1, r1, #0x400 /* skip over here as well */ /* r0 = source address * r1 = target address Index: util.c =================================================================== RCS file: /cvsroot/blob/blob/src/util.c,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 --- util.c 2001/07/22 23:55:22 1.1.1.1.2.1 +++ util.c 2001/07/26 00:33:03 1.1.1.1.2.2 @@ -126,3 +126,25 @@ return(c); } + + +int strlen(const char *s) +{ + int i = 0; + + for(;*s != '\0'; s++) + i++; + + return i; +} + + +char *strcpy(char *dest, const char *src) +{ + while(*src != '\0') + *dest++ = *src++; + + *dest = '\0'; + + return dest; +} |
From: Erik M. <er...@us...> - 2001-07-26 00:33:06
|
Update of /cvsroot/blob/blob/include In directory usw-pr-cvs1:/tmp/cvs-serv25835/include Modified Files: Tag: blob_1_0_9_hack Makefile.am linux.h main.h time.h util.h Log Message: Kernel command line support. - linux.c handles parameter list setup and also passes the correct memory layout to the kernel - cleanup in main.c - add strlen() and strcpy() functions - move blob to 0xc0000400 instead of 0xc000000 because the parameter list has to live at 0xc0000100 - minor cleanups Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/include/Makefile.am,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 --- Makefile.am 2001/07/22 22:54:26 1.1.1.1.2.1 +++ Makefile.am 2001/07/26 00:33:03 1.1.1.1.2.2 @@ -16,6 +16,7 @@ command.h \ flash.h \ led.h \ + linux.h \ main.h \ memory.h \ registers.h \ Index: linux.h =================================================================== RCS file: /cvsroot/blob/blob/include/Attic/linux.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- linux.h 2001/07/24 13:57:47 1.1.2.1 +++ linux.h 2001/07/26 00:33:03 1.1.2.2 @@ -1 +1,58 @@ +/* + * linux.h: header file for linux.c + * + * Copyright (C) 2001 Erik Mouw (J.A...@it...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + #ident "$Id$" + +#ifndef BLOB_LINUX_H +#define BLOB_LINUX_H + + +/* FIXME: + * these numbers should be generated from arch/arm/tools/mach-types + * with a hacked up version of arch/arm/tools/gen-mach-types + * + * -- Erik + */ + +#if defined ASSABET +# define ARCH_NUMBER (25) +#elif defined BRUTUS +# define ARCH_NUMBER (16) +#elif defined CLART +# define ARCH_NUMBER (68) +#elif defined LART +# define ARCH_NUMBER (27) +#elif defined NESA +# define ARCH_NUMBER (75) +#elif defined PLEB +# define ARCH_NUMBER (20) +#elif defined SHANNON +# define ARCH_NUMBER (97) +#else +#warning "FIXME: Calling the kernel with a generic SA1100 architecture code. YMMV!" +#define ARCH_NUMBER (18) +#endif + + +void boot_linux(char *commandline); + + +#endif Index: main.h =================================================================== RCS file: /cvsroot/blob/blob/include/main.h,v retrieving revision 1.1.1.1.2.5 retrieving revision 1.1.1.1.2.6 diff -u -r1.1.1.1.2.5 -r1.1.1.1.2.6 --- main.h 2001/07/23 05:44:26 1.1.1.1.2.5 +++ main.h 2001/07/26 00:33:03 1.1.1.1.2.6 @@ -72,4 +72,39 @@ # define RAMDISK_BLOCK_OFFSET (0x00400000) #endif +/* where does the command block live in memory */ +/* As far as I know all architectures have this at the same address */ +#define BOOT_PARAMS (0xc0000100) + + + +#include "types.h" +#include "serial.h" + + +typedef enum { + fromFlash = 0, + fromDownload = 1 +} block_source_t; + + +typedef struct { + int kernelSize; + block_source_t kernelType; + + int ramdiskSize; + block_source_t ramdiskType; + + int blobSize; + block_source_t blobType; + + u32 blockSize; + + eBauds downloadSpeed; +} blob_status_t; + + +extern blob_status_t blob_status; + + #endif Index: time.h =================================================================== RCS file: /cvsroot/blob/blob/include/time.h,v retrieving revision 1.1.1.1.2.2 retrieving revision 1.1.1.1.2.3 diff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 --- time.h 2001/07/24 13:23:54 1.1.1.1.2.2 +++ time.h 2001/07/26 00:33:03 1.1.1.1.2.3 @@ -9,9 +9,9 @@ * Modified at: Tue Sep 28 23:44:11 1999 *-----------------------------------------------------------------------*/ /* - * timer.c: Timer functions for blob + * time.h: header file for time.c * - * Copyright (C) 1999 Erik Mouw (J.A...@it...) + * Copyright (C) 1999 2000 2001 Erik Mouw (J.A...@it...) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/util.h,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- util.h 2001/06/27 19:47:42 1.1.1.1 +++ util.h 2001/07/26 00:33:03 1.1.1.1.2.1 @@ -45,4 +45,7 @@ int MyToUpper(int c); int MyToLower(int c); +int strlen(const char *s); +char *strcpy(char *dest, const char *src); + #endif |
From: Erik M. <er...@us...> - 2001-07-25 18:04:05
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv11538 Modified Files: Tag: blob_1_0_9_hack trampoline.S Log Message: if main() somehow returned, just call it again Index: trampoline.S =================================================================== RCS file: /cvsroot/blob/blob/src/Attic/trampoline.S,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- trampoline.S 2001/07/08 22:35:25 1.1.2.1 +++ trampoline.S 2001/07/25 18:04:02 1.1.2.2 @@ -30,3 +30,5 @@ .globl _trampoline _trampoline: bl main + /* if main ever returns we just call it again */ + b _trampoline |
From: Tim R. <tim...@us...> - 2001-07-25 04:38:41
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv6165 Modified Files: Tag: blob_1_0_9_hack AUTHORS Log Message: email syntax and additions Index: AUTHORS =================================================================== RCS file: /cvsroot/blob/blob/AUTHORS,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 --- AUTHORS 2001/07/08 22:34:14 1.1.1.1.2.1 +++ AUTHORS 2001/07/25 04:38:35 1.1.1.1.2.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,37 +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...) +- Russ Dill <Rus...@as...> * Shannon (aka TuxScreen) port ============================== -- Tim Riker (ti...@ri...) +- Tim Riker <Ti...@Ri...>, <Ti...@De...>, <Ti...@Li...> * Various fixes =============== -- Mark Huang (mh...@li...), RTC fix -- Justin M. Seger (jus...@in...), Assabet fixes -- Wookey (wo...@al...), run-from-RAM +- Mark Huang <mh...@li...>, RTC fix +- Justin M. Seger <jus...@in...>, Assabet fixes +- Wookey <wo...@al...>, run-from-RAM |
From: Erik M. <er...@us...> - 2001-07-24 13:57:50
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv19819/src Added Files: Tag: blob_1_0_9_hack linux.c Log Message: I'll check in those empty files so the changes are visible later ***** Error reading new file: [Errno 2] No such file or directory: 'linux.c' |