Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(7) |
2
|
3
|
4
(16) |
5
(15) |
6
(2) |
7
(8) |
8
(24) |
9
|
10
|
11
(10) |
12
(7) |
13
(10) |
14
(8) |
15
(2) |
16
(3) |
17
(18) |
18
(4) |
19
(2) |
20
|
21
(5) |
22
(6) |
23
|
24
|
25
(1) |
26
(8) |
27
(15) |
28
(2) |
|
|
From: Erik Mouw <J.A.K.Mouw@it...> - 2002-02-17 20:27:51
|
On Sun, Feb 17, 2002 at 12:03:43PM -0800, Erik Mouw wrote: > Update of /cvsroot/blob/blob/utils/build > In directory usw-pr-cvs1:/tmp/cvs-serv28493/utils/build > > Modified Files: > build_all > Log Message: > Add infrastructure to select at compile-time which commands should be > linked with blob. Note: you might want to run "make distclean" or otherwise src/blob/commands.c and src/diag/commands.c are build in $src_dir instead of $build_dir . Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, 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.K.Mouw@... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Erik Mouw <erikm@us...> - 2002-02-17 20:03:45
|
Update of /cvsroot/blob/blob/utils/build In directory usw-pr-cvs1:/tmp/cvs-serv28493/utils/build Modified Files: build_all Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: build_all =================================================================== RCS file: /cvsroot/blob/blob/utils/build/build_all,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- build_all 4 Feb 2002 18:11:22 -0000 1.10 +++ build_all 17 Feb 2002 20:03:41 -0000 1.11 @@ -15,7 +15,7 @@ archs="accelent_sa assabet badge4 brutus creditlart h3600 idr jornada720 lart neponset nesa pleb shannon system3 frodo" linux_prefix=~/LART/build/linux/elinux blob_src=~/src/sourceforge/blob -extra_flags="--enable-all-features" +extra_flags="--enable-all-features --with-commands=all" export CC=arm-linux-gcc |
From: Erik Mouw <erikm@us...> - 2002-02-17 20:03:45
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv28493/src/blob Modified Files: .cvsignore Makefile.am Removed Files: commands.c Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: .cvsignore =================================================================== RCS file: /cvsroot/blob/blob/src/blob/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 4 Dec 2001 00:14:56 -0000 1.2 +++ .cvsignore 17 Feb 2002 20:03:41 -0000 1.3 @@ -1,6 +1,7 @@ Makefile.in Makefile blob* +commands.c rest-ld-script *.o .deps Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Makefile.am 17 Feb 2002 15:41:53 -0000 1.25 +++ Makefile.am 17 Feb 2002 20:03:41 -0000 1.26 @@ -41,12 +41,15 @@ # ---- Built sources ------------------------------------------------- BUILT_SOURCES = \ - rest-ld-script + rest-ld-script \ + commands.c rest-ld-script: rest-ld-script.in $(CC) -x c-header -undef -nostdinc ${INCLUDES} -E $< | sed 's/^#.*//' > $@ +commands.c: + ${top_srcdir}/src/commands/make_commands.sh @BLOB_COMMANDS@ > $@ # ---- Blob first stage loader --------------------------------------- @@ -141,7 +144,6 @@ EXTRA_blob_rest_elf32_SOURCES = \ chkmem.c \ clock.c \ - debug.c \ amd32.c intel16.c intel32.c nullflash.c \ cramfs.c \ compr_rtime.c compr_rubin.c jffs2.c \ @@ -156,7 +158,6 @@ @BLOB_CHKMEM_OBJS@ \ @BLOB_CLOCK_OBJS@ \ @BLOB_CRAMFS_OBJS@ \ - @BLOB_DEBUG_OBJS@ \ @BLOB_FLASH_OBJS@ \ @BLOB_JFFS2_OBJS@ \ @BLOB_PLATFORM_OBJS@ \ @@ -171,7 +172,6 @@ @BLOB_CHKMEM_OBJS@ \ @BLOB_CLOCK_OBJS@ \ @BLOB_CRAMFS_OBJS@ \ - @BLOB_DEBUG_OBJS@ \ @BLOB_FLASH_OBJS@ \ @BLOB_JFFS2_OBJS@ \ @BLOB_PLATFORM_OBJS@ \ @@ -230,7 +230,7 @@ rest-ld-script.in -CLEANFILES = ${srcdir}/*~ rest-ld-script *.map +CLEANFILES = ${srcdir}/*~ rest-ld-script commands.c *.map DISTCLEANFILES = ${builddir}/.deps/*.P --- commands.c DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 20:03:45
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv28493/src/diag Modified Files: .cvsignore Makefile.am regs-sa11x0.c Added Files: getcommand.c Removed Files: commands.c Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. --- NEW FILE: getcommand.c --- /* * getcommand.c: commands for diag * * Copyright (C) 2001 Erik Mouw <J.A.K.Mouw@...> * * $Id: getcommand.c,v 1.1 2002/02/17 20:03:41 erikm Exp $ * * 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: getcommand.c,v 1.1 2002/02/17 20:03:41 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/command.h> #include <blob/command_hist.h> #include <blob/error.h> #include <blob/serial.h> #include <blob/time.h> #include <blob/util.h> /* more or less like SerialInputString(), but with echo and backspace */ /* unlike the version in libblob, this version has a command history */ int GetCommand(char *command, int len, int timeout) { u32 startTime, currentTime; int c; int i; int numRead; int maxRead = len - 1; TimerClearOverflow(); startTime = TimerGetTime(); cmdhist_reset(); for(numRead = 0, i = 0; numRead < maxRead;) { /* try to get a byte from the serial port */ while(serial_poll() != 0) { currentTime = TimerGetTime(); /* check timeout value */ if((currentTime - startTime) > (timeout * TICKS_PER_SECOND)) { /* timeout */ command[i++] = '\0'; cmdhist_push( command ); return(numRead); } } c = serial_read(); /* check for errors */ if(c < 0) { command[i++] = '\0'; serial_write('\n'); printerror(c, "can't read command"); return c; } if((c == '\r') || (c == '\n')) { command[i++] = '\0'; /* print newline */ serial_write('\n'); cmdhist_push( command ); return(numRead); } else if(c == '\b') { /* FIXME: is this backspace? */ if(i > 0) { i--; numRead--; /* cursor one position back. */ SerialOutputString("\b \b"); } } else if ( c == CMDHIST_KEY_UP ) { char *cmd = NULL; /* get cmd from history */ if ( cmdhist_next( &cmd ) != 0 ) continue; /* clear line */ while ( numRead-- ) { SerialOutputString("\b \b"); } /* display it */ SerialOutputString(cmd); i = numRead = strlen( cmd ); strncpy( command, cmd, MAX_COMMANDLINE_LENGTH ); } else if ( c == CMDHIST_KEY_DN ) { char *cmd = NULL; /* get cmd from history */ if ( cmdhist_prev( &cmd ) != 0 ) continue; /* clear line */ while ( numRead-- ) { SerialOutputString("\b \b"); } /* display it */ SerialOutputString(cmd); i = numRead = strlen( cmd ); strncpy( command, cmd, MAX_COMMANDLINE_LENGTH ); } else { command[i++] = c; numRead++; /* print character */ serial_write(c); } } cmdhist_push( command ); return(numRead); } Index: .cvsignore =================================================================== RCS file: /cvsroot/blob/blob/src/diag/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 11 Feb 2002 22:50:59 -0000 1.3 +++ .cvsignore 17 Feb 2002 20:03:41 -0000 1.4 @@ -1,5 +1,6 @@ Makefile.in Makefile +commands.c diag diag-elf32 *.o Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/diag/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.am 17 Feb 2002 15:41:54 -0000 1.13 +++ Makefile.am 17 Feb 2002 20:03:41 -0000 1.14 @@ -32,12 +32,24 @@ -I${top_srcdir}/include +# ---- Built sources ------------------------------------------------- + +BUILT_SOURCES = \ + commands.c + +commands.c: + ${top_srcdir}/src/commands/make_commands.sh @ALL_COMMANDS@ > $@ + + +# ---- diag ---------------------------------------------------------- + # WARNING: start.S *must* be the first file, otherwise the target will # be linked in the wrong order! diag_elf32_SOURCES = \ start.S \ command_hist.c \ commands.c \ + getcommand.c \ initcalls.c \ regs-sa11x0.c \ main.c @@ -86,11 +98,13 @@ $(OBJCOPY) $(OCFLAGS) $< $@ +# ---- Automake administrativia -------------------------------------- + EXTRA_DIST = \ ld-script -CLEANFILES = ${srcdir}/*~ *.map +CLEANFILES = ${srcdir}/*~ *.map commands.c DISTCLEANFILES = ${builddir}/.deps/*.P Index: regs-sa11x0.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/regs-sa11x0.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- regs-sa11x0.c 11 Feb 2002 16:53:16 -0000 1.4 +++ regs-sa11x0.c 17 Feb 2002 20:03:41 -0000 1.5 @@ -224,6 +224,15 @@ /**********************************************************************/ /**********************************************************************/ +/********************************************************************** + * regs_show() + * + * AUTHOR: seletz + * REVISED: + * + * Display register contents + * + */ static int regs_show( int argc, char *argv[] ) { int i = 0; @@ -237,17 +246,11 @@ while ( reg_sets[set].name ) { i = 0; registers = reg_sets[set].set; - SerialOutputString( reg_sets[set].name ); - serial_write( '\n' ); - SerialOutputString( "--------------------------------\n" ); + printf( "%s\n", reg_sets[set].name ); + printf( "--------------------------------\n" ); while ( registers && registers[i].name ) { - SerialOutputString( registers[i].name ); - SerialOutputString( "= 0x" ); - SerialOutputHex( MEM( registers[i].adr ) ); - if ( registers[i].desc ) { - SerialOutputString( registers[i].desc ); - } - serial_write( '\n' ); + printf( "%s= 0x%08x %s\n", registers[i].name, MEM( registers[i].adr ), + registers[i].desc?registers[i].desc:"" ); i++; } set++; @@ -256,5 +259,7 @@ return 0; } + static char regshelp[] = "print register info\n"; + __commandlist(regs_show, "regs", regshelp); --- commands.c DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 20:03:44
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv28493 Modified Files: configure.in Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- configure.in 17 Feb 2002 15:41:53 -0000 1.45 +++ configure.in 17 Feb 2002 20:03:40 -0000 1.46 @@ -308,6 +308,31 @@ +dnl Check for blob commands +AC_ARG_WITH(commands,[ --with-commands=<list> compile blob with commands in <list> + commands may be separated with commas; + 'all' compiles all commands; + Valid commands are: + call, chgbit, dummy, dump, memcpy, poke, peek], + blob_commands="$withval", + blob_commands="") + +default_commands="reset, reboot" +all_commands="call, chgbit, dummy, dump, memcpy, poke, peek" + +if test "$blob_commands" = "all" ; then + blob_commands="$all_commands" +fi + +ALL_COMMANDS=`echo $default_commands $all_commands | sed 's/,//g'` +BLOB_COMMANDS=`echo $default_commands $blob_commands | sed 's/,//g'` + +AC_SUBST(ALL_COMMANDS) +AC_SUBST(BLOB_COMMANDS) + + + + dnl Check for individual features AC_ARG_ENABLE(clock-scaling, [ --enable-clock-scaling Enable support for clock scaling (SA1100 only)], @@ -319,11 +344,6 @@ [chkmem_flag=$enable_memtest], [chkmem_flag=no]) -AC_ARG_ENABLE(debug, -[ --enable-debug Enable support for misc debugging functions ], -[debug_flag=$enable_debug], -[debug_flag=no]) - AC_ARG_ENABLE(lcd, [ --enable-lcd Enable lcd support ], [lcd_flag=$enable_lcd], @@ -366,7 +386,6 @@ if test "x$all_features_flag" = "xyes" ; then clock_scaling_flag=yes chkmem_flag=yes - debug_flag=yes lcd_flag=yes md5_flag=yes xmodem_flag=yes @@ -404,16 +423,6 @@ -dnl Check wether or not debug code is wanted -if test "x$debug_flag" = "xyes" ; then - BLOB_DEBUG_OBJS="debug.o" -fi - -AC_SUBST(BLOB_DEBUG_OBJS) - - - - dnl Check wether or not lcd support code is wanted if test "x$lcd_flag" = "xyes" ; then if test "x$use_lcd" = "xyes" ; then @@ -483,12 +492,6 @@ -dnl Check wether or not additional platform source code -dnl for is needed - - - - dnl Check for extra debug info AC_ARG_ENABLE(blob-debug, [ --enable-blob-debug Enable run-time debug information], @@ -586,12 +589,12 @@ echo "Objcopy flags ${OCFLAGS}" echo "Clock scaling support ${clock_scaling_flag}" echo "Memory test support ${chkmem_flag}" -echo "Debugging commands support ${debug_flag}" echo "LCD support ${lcd_flag}" echo "MD5 support ${md5_flag}" echo "Xmodem support ${xmodem_flag}" echo "UU Codec support ${uucodec_flag}" echo "JFFS2 support ${jffs2_flag}" echo "cramfs support ${cramfs_flag}" +echo "Blob commands: ${BLOB_COMMANDS}" echo "Run-time debug information ${blob_debug_flag}" echo "" |
From: Erik Mouw <erikm@us...> - 2002-02-17 20:03:44
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv28493/include/blob Modified Files: util.h Log Message: Add infrastructure to select at compile-time which commands should be linked with blob. Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/util.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- util.h 16 Feb 2002 00:43:59 -0000 1.10 +++ util.h 17 Feb 2002 20:03:41 -0000 1.11 @@ -56,6 +56,8 @@ /* convert a string to an u32 value */ int strtou32(const char *str, u32 *value); +void reboot_system(void); + /* printf and friends */ int snprintf(char * buf, size_t size, const char *fmt, ...); int printf(const char *fmt, ...); |
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv28118 Modified Files: Makefile.am call.c changebit.c dummy.c dump.c memcpy.c peek.c poke.c Added Files: make_commands.sh Removed Files: cmddebug.h common.c common.h Log Message: Cleanup commands. Add a shell script to generate C code for commands. --- NEW FILE: make_commands.sh --- #! /bin/sh # # make_commands.sh: generate commandlist code # # Copyright (C) 2002 Erik Mouw (J.A.K.Mouw@...) # # $Id: make_commands.sh,v 1.1 2002/02/17 20:01:31 erikm Exp $ # # 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 cat <<EOF /* * WARNING: * This file was generated by make_commands.sh. All changes to this file * will be automatically overwritten once you rerun make_commands.sh. Do * not try to check this file into CVS: generated files do not belong in * CVS repositories. */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/command.h> EOF for i in $* ; do cat <<EOF extern int ${i}_cmd(int argc, char *argv[]); extern char ${i}_help[]; __commandlist(${i}_cmd, "${i}", ${i}_help); EOF done Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/commands/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 12 Feb 2002 12:54:59 -0000 1.2 +++ Makefile.am 17 Feb 2002 20:01:31 -0000 1.3 @@ -26,20 +26,24 @@ libcommands_a_SOURCES = \ - common.c \ - poke.c \ - peek.c \ - regs-sa11x0.c \ call.c \ changebit.c \ + dummy.c \ dump.c \ - chkmem.c \ - dummy.c + memcpy.c \ + peek.c \ + poke.c \ + reboot.c \ + terminal.c INCLUDES += \ -I${top_builddir}/include \ -I${top_srcdir}/include + + +EXTRA_DIST = \ + make_commands.sh CLEANFILES = ${srcdir}/*~ Index: call.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/call.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- call.c 12 Feb 2002 12:54:59 -0000 1.1 +++ call.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -1,7 +1,6 @@ /* * debug.c: Debugging command functions * - * Copyright (C) 2001 Stefan Eletzhofer <stefan.eletzhofer@...> * Copyright (C) 2001 Christopher Hoover <ch@...> * * This program is free software; you can redistribute it and/or modify @@ -31,14 +30,10 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> +#include <blob/serial.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -48,16 +43,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * Call @@ -68,52 +53,54 @@ * Jumps to an arbitrary address. * */ -static int Call( int argc, char *argv[] ) +int call_cmd( int argc, char *argv[] ) { - int ret = 0; + int ret = 0; u32 adr, a = 0, b = 0, c = 0, d = 0; int (*called_fn)(u32, u32, u32, u32); - if ( argc < 2 || argc > 6 ) ERR( -EINVAL ); + if ( argc < 2 || argc > 6 ) + ERR( -EINVAL ); ret = strtou32( argv[1], &adr ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); if ( argc >= 3 ) { ret = strtou32( argv[2], &a ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } if ( argc >= 4 ) { ret = strtou32( argv[2], &b ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } if ( argc >= 5 ) { ret = strtou32( argv[2], &c ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } if ( argc >= 6) { ret = strtou32( argv[2], &d ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); } - printf( "Calling function at address 0x%08lx ...\n", adr ); + dprintf( "calling function at 0x%08x ...\n", adr ); serial_flush_output(); called_fn = (int (*)(u32, u32, u32, u32))adr; ret = called_fn(a, b, c, d); - printf( "Return value: %d == 0x%04x\n", ret, ret ); + dprintf("return value: %d == 0x%04x\n", ret, ret); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char callhelp[] = "call address [arg0 [arg1 [arg2 [arg3]]]]\n" +char call_help[] = "call address [arg0 [arg1 [arg2 [arg3]]]]\n" "Call function at <address> with optional arguments\n"; - -__commandlist(Call, "call", callhelp); Index: changebit.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/changebit.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- changebit.c 12 Feb 2002 12:54:59 -0000 1.1 +++ changebit.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> -#include "cmddebug.h" -#include "common.h" /********************************************************************** * defines @@ -48,16 +43,6 @@ #define MEM( x ) (*((u32 *)x)) -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * ChangeBit * @@ -67,25 +52,27 @@ * Modifies bits of an given memory location * */ -static int ChangeBit( int argc, char *argv[] ) +int chgbit_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 adr = 0L; - u32 value = 0L; + int ret = 0; + u32 adr, value; - if ( argc < 4 ) ERR( -EINVAL ); + if ( argc < 4 ) + ERR( -EINVAL ); ret = strtou32( argv[1], &adr ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32( argv[2], &value ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); /* check memory alignment */ if(adr &= 0x03) ERR(-EALIGN); - printf( "0x%08lx", MEM( adr ) ); + printf("0x%08x", MEM( adr ) ); switch ( argv[3][0] & (~0x20) ) { case 'A': @@ -106,16 +93,12 @@ break; } - printf( "-> 0x%08lx\n", MEM( adr ) ); + printf( " --> 0x%08x\n", MEM( adr ) ); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char chgbithelp[] = "chgbit address value {and|or|xor|set|clear}\n"; - -__commandlist(ChangeBit, "chgbit", chgbithelp ); +char chgbit_help[] = "chgbit address value {and|or|xor|set|clear}\n"; Index: dummy.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/dummy.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dummy.c 29 Jan 2002 17:47:23 -0000 1.1 +++ dummy.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -27,7 +27,7 @@ # include <blob/config.h> #endif -#include <blob/serial.h> +#include <blob/util.h> @@ -36,13 +36,8 @@ { int i; - for(i = 0; i < argc; i++) { - SerialOutputString("arg["); - SerialOutputDec(i); - SerialOutputString("] = "); - SerialOutputString(argv[i]); - serial_write('\n'); - } + for(i = 0; i < argc; i++) + printf("argv[%d] = '%s'\n", i, argv[i]); return 0; } Index: dump.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/dump.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dump.c 12 Feb 2002 12:54:59 -0000 1.1 +++ dump.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -1,8 +1,7 @@ /* - * dump.c: hextump command + * dump.c: hexdump command * - * Copyright (C) 2001 Stefan Eletzhofer <stefan.eletzhofer@...> - * Copyright (C) 2001 Tim Riker + * Copyright (C) 2001 Tim Riker <tim@...> * * 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 @@ -31,14 +30,10 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/serial.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> -#include "cmddebug.h" -#include "common.h" /********************************************************************** * defines @@ -47,16 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * dump * @@ -66,13 +51,10 @@ * dumps memory * */ -static int dump( int argc, char *argv[] ) +int dump_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 address; - u32 endaddress; - u32 tmpaddress; - u32 value; + int ret = 0; + u32 address, endaddress, tmpaddress, value; if ( argc < 2 ) ERR( -EINVAL ); @@ -95,10 +77,10 @@ /* print it */ for ( ; address < endaddress; address += 0x10) { - printf( "0x%08lx: ", address ); + printf( "0x%08x: ", address ); for (tmpaddress = address; tmpaddress < address + 0x10; tmpaddress += 4) { value = (*((u32 *)tmpaddress)); - printf( "0x%08lx ", value ); + printf( "0x%08x ", value ); } for (tmpaddress = address; tmpaddress < address + 0x10; tmpaddress++) { value = (*((u8 *)tmpaddress)) & 0xff; @@ -111,13 +93,9 @@ } ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char dumphelp[] = "dump address [endAddress]\n"; - -__commandlist(dump, "dump", dumphelp ); +char dump_help[] = "dump address [endAddress]\n"; Index: memcpy.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/memcpy.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- memcpy.c 12 Feb 2002 12:54:59 -0000 1.1 +++ memcpy.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -47,16 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************** * prototypes @@ -71,23 +56,25 @@ * Command wrapper for memcpy utility function. * */ -static int CmdMemcpy( int argc, char *argv[] ) +int memcpy_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 src = 0L; - u32 dest = 0L; - u32 len = 0L; + int ret = 0; + u32 src, dest, len; - if ( argc < 4 ) ERR( -EINVAL ); + if ( argc < 4 ) + ERR( -EINVAL ); ret = strtou32( argv[1], &src ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32( argv[2], &dest ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32( argv[3], &len ); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); /* check alignment of src and dest */ if((src & 0x03) || (dest & 0x03)) @@ -100,22 +87,17 @@ len = len >> 2; } - _DBG( dbg, "memcpy: src=0x%08lx, dest=0x%08lx, %d words\n", - src, sest, len ); + dprintf("src=0x%08x, dest=0x%08x, %d words\n", src, dest, len ); MyMemCpy( (u32 *)dest, (const u32 *)src, len); printf("%d words copied.\n", len ); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char memcpyhelp[] = "memcpy src dst len\n" +char memcpy_help[] = "memcpy src dst len\n" "copy len bytes from src to dst\n"; - -__commandlist(CmdMemcpy, "memcpy", memcpyhelp); Index: peek.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/peek.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- peek.c 12 Feb 2002 12:54:59 -0000 1.1 +++ peek.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -47,16 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - /********************************************************************* * Peek * @@ -66,23 +51,23 @@ * Peeks values from memory * */ -static int Peek( int argc, char *argv[] ) +int peek_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 address; - u32 value; - char type = 'w'; + int ret = 0; + u32 address, value; + char type = 'w'; - if ( argc < 2 ) ERR( -EINVAL ); + if ( argc < 2 ) + ERR( -EINVAL ); ret = strtou32(argv[1], &address); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); - if ( argc >= 2 ) { + if ( argc >= 2 ) type = argv[2][0]; - } - _DBG( dbg, "peek: adr=0x%08lx, type=%c\n", address, type ); + dprintf("adr=0x%08x, type=%c\n", address, type); /* check memory alignment */ switch(type | 0x20) { @@ -130,18 +115,13 @@ break; } - printf( "%c 0x%08lx\n", type, value ); + printf("%c 0x%08x\n", type, value ); ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char peekhelp[] = "peek address [b|h|w]\n" +char peek_help[] = "peek address [b|h|w]\n" "b = byte, h = half word, w = word (default is w)\n"; - -__commandlist(Peek, "peek", peekhelp ); - Index: poke.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/poke.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- poke.c 12 Feb 2002 12:54:59 -0000 1.1 +++ poke.c 17 Feb 2002 20:01:31 -0000 1.2 @@ -30,14 +30,9 @@ #endif #include <blob/errno.h> -#include <blob/error.h> +#include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> -#include <blob/command.h> - -#include "cmddebug.h" -#include "common.h" /********************************************************************** @@ -47,19 +42,6 @@ /* this will send a cold shiver through erik's spine ... */ #define ERR( x ) { ret = x; goto DONE; } -/********************************************************************** - * statics - */ - -#if DEBUG -static int dbg = 1; -#else -static int dbg = 0; -#endif - -/********************************************************************** - * prototypes - */ /********************************************************************* * Poke @@ -70,27 +52,28 @@ * Poke values to memory * */ -static int Poke( int argc, char *argv[] ) +int poke_cmd( int argc, char *argv[] ) { - int ret = 0; - u32 address; - u32 value; - char type = 'w'; + int ret = 0; + u32 address, value; + char type = 'w'; - if ( argc < 3 ) ERR( -EINVAL ); + if ( argc < 3 ) + ERR( -EINVAL ); ret = strtou32(argv[1], &address); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); ret = strtou32(argv[2], &value); - if ( ret < 0 ) ERR( -EINVAL ); + if ( ret < 0 ) + ERR( -EINVAL ); - if ( argc >= 3 ) { + if ( argc >= 3 ) type = argv[3][0]; - } - _DBG( dbg, "poke: adr=0x%08lx, val=0x%08lx, type=%c\n", - address, value, type ); + dprintf("adr=0x%08x, val=0x%08x, type=%c\n", + address, value, type ); /* check memory alignment */ switch(type | 0x20) { @@ -138,17 +121,11 @@ break; } - ret = 0; + DONE: - if ( ret != 0 ) { - perror( ret, __FUNCTION__ ); - } return ret; } -static char pokehelp[] = "poke address value [b|h|w]\n" +char poke_help[] = "poke address value [b|h|w]\n" "b = byte, h = half word, w = word (default is w)\n"; - -__commandlist(Poke, "poke", pokehelp ); - --- cmddebug.h DELETED --- --- common.c DELETED --- --- common.h DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 19:58:56
|
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv27392 Removed Files: regs-sa11x0.c Log Message: remove file because it shouldn't be shared with blob --- regs-sa11x0.c DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 19:57:30
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv26944/diag Added Files: chkmem.c Log Message: Move chkmem to diag because it shouldn't be shared with blob --- NEW FILE: chkmem.c --- /* * chkmem.c: Utility to test memory integrity * * Charles Cazabon <memtest@...> * * Copyright © 1999 Simon Kirby. * Version 2 Copyright © 1999 Charles Cazabon. * * Copyright (C) 2001 Stefan Eletzhofer <stefan.eletzhofer@...> * * 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: chkmem.c,v 1.1 2002/02/17 19:57:26 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/arch.h> #include <blob/command.h> #include <blob/types.h> #include <blob/serial.h> #include <blob/time.h> #include <blob/util.h> #include <blob/memory.h> /*********************************************************************/ /** DEFINES *********************************************************/ /*********************************************************************/ /* define this to 1 for debug */ #define CHKMEM_DEBUG 1 /* show every X bytes of memory during test */ #define CHKMEM_SHOWEVERY (1<<14) /* more readable IMHO */ #define MEM( x ) (*((u32 *)x)) #define MAKE32FROM8(x) (u32) ((x) | ((x) << 8) | ((x) << 16) | ((x) << 24)) #define CHKMEM_ERR (-1) #define CHKMEM_OK (0) #if CHKMEM_DEBUG # define SHOWFUNC() SerialOutputString("chkmem: method: "__FUNCTION__ "\n" ); \ SerialOutputString(" p1=0x"); \ SerialOutputHex((u32)bp1); \ SerialOutputString(" p2=0x"); \ SerialOutputHex((u32)bp2); \ SerialOutputString(" count=0x"); \ SerialOutputHex((u32)count); \ SerialOutputString("\n"); #else # define SHOWFUNC() SerialOutputString("chkmem: method: "__FUNCTION__ "\n" ); #endif #define SKIPBLOBMEM(x) if ((x) < BLOB_RAM_BASE + 0x00100000) x = BLOB_RAM_BASE + 0x00100000 #define CHKMEM_MAXERR 64 #define CHKMEM_PUSHERR( ADR ) { chkmem_errlist[ chkmem_errs % CHKMEM_MAXERR ] = ADR; \ chkmem_errs++; } /*********************************************************************/ /** MODULE GLOBALS *************************************************/ /*********************************************************************/ static u32 showevery; /* list of failed adresses */ static u32 chkmem_errlist[ CHKMEM_MAXERR ]; static int chkmem_errs; /*********************************************************************/ /** TYPES *********************************************************/ /*********************************************************************/ typedef int (*memtestfunc_t)( u32, u32, u32, u32 *); /*********************************************************************/ /** FORWARDS *******************************************************/ /*********************************************************************/ static int ChkMemErr( void ); static int ChkMemMovInv( u32 start, u32 end, u32 pattern, u32 *badadr ); static int ChkMemAdrTst( u32 start, u32 end, u32 pattern, u32 *badadr ); static int ChkMemHardcore( u32 start, u32 end, u32 pattern, u32 *badadr ); static void showrun( u32 run ); static void showadr( volatile u32 *adr ); /* Charles Cazabon test methods */ static int test_or_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_and_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_seqinc_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_checkerboard_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_solidbits_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_blockseq_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_walkbits_comparison (u32 *bp1, u32 *bp2, u32 count, int mode); static int test_bitspread_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_bitflip_comparison (u32 *bp1, u32 *bp2, u32 count); static int test_stuck_address (u32 *bp1, u32 *bp2, u32 count); /*********************************************************************/ /** EXPORTED FUNCTIONS ***********************************************/ /*********************************************************************/ /********************************************************************* * ChkMem * * AUTOR: Stefan Eletzhofer * REVISED: * * Command entry, memory test method dispatcher * */ int ChkMem( int argc, char *argv[] ) { memtestfunc_t method; int area; u32 start = 0L; u32 end = 0L; u32 badaddr = 0L; u32 repcount = 0L; /* check args */ if ( argc < 2 ) { SerialOutputString("*** not enough arguments\n"); return CHKMEM_ERR; } /* reset error counter */ chkmem_errs = 0; /* get verbosity level */ showevery = CHKMEM_SHOWEVERY; if ( argc > 2 ) { if(strtou32(argv[2], &showevery) < 0) { SerialOutputString("*** not a value\n"); return CHKMEM_ERR; } if ( showevery > 0 ) { showevery = 1<<showevery; } else { /* never show address */ showevery = 0xffffffff; } } /* get repeat count */ repcount = 1; if ( argc > 3 ) { if ( strtou32(argv[3], &repcount ) < 0 ) { SerialOutputString("*** not a value\n"); return CHKMEM_ERR; } } SerialOutputString(argv[0]); SerialOutputString(": display every 0x"); SerialOutputHex(showevery); SerialOutputString(" bytes\n"); /* set memory test method */ switch ( *argv[1] ) { case '0': method = ChkMemMovInv; break; case '1': method = ChkMemAdrTst; break; case '2': method = ChkMemHardcore; break; default: SerialOutputString("*** unknown method\n"); return CHKMEM_ERR; break; } while ( repcount-- ) { /* test all known memory areas */ for (area = 0; area < NUM_MEM_AREAS; area++) { if(memory_map[area].used) { start = memory_map[area].start; end = start + memory_map[area].len; if ( method(start, end, 0x5555aaaa, &badaddr) != CHKMEM_OK ) { CHKMEM_PUSHERR( badaddr ); } } } } if ( chkmem_errs == 0 ) { SerialOutputString("\n*** no error found\n"); } else { ChkMemErr(); } return CHKMEM_OK; } static char chkmemhelp[] = "chkmem [method] {verbosity:1..F} {repeat-count}\n" "method=0: move-inverse test\n" "method=1: address test\n" "method=2: hardcore test\n" "verbosity: display every 2^n address during test\n"; __commandlist(ChkMem, "chkmem", chkmemhelp); /*********************************************************************/ /** STATIC FUNCTIONS ************************************************/ /*********************************************************************/ /********************************************************************* * showrun * * AUTOR: SELETZ * REVISED: * * Shows current memory test run * */ static void showrun( u32 run ) { SerialOutputString( "\r\nrun " ); SerialOutputHex( run ); SerialOutputString( "\n" ); } /********************************************************************* * showadr * * AUTOR: SELETZ * REVISED: * * display <adr> every <showevery> bytes. * */ static void showadr( volatile u32 *adr ) { if ( ((u32)adr) % showevery == 0 ) { SerialOutputString("\r"); SerialOutputHex( (u32)adr ); } } /********************************************************************* * ChkMemErr * * AUTOR: Stefan Eletzhofer * REVISED: * * Reports memory check errors * */ static int ChkMemErr( void ) { int i; SerialOutputString("\n*** memory errors:\n"); for ( i=0; i< chkmem_errs % CHKMEM_MAXERR; i++ ) { SerialOutputHex( i ); SerialOutputString(": 0x"); SerialOutputHex(chkmem_errlist[i]); SerialOutputString("\n"); } return CHKMEM_OK; } /********************************************************************* * ChkMemMovInv * * AUTOR: Stefan Eletzhofer * REVISED: * * Moving-Inverse Memory Test * * Test method (from GNU/memtest86 utility): * 1) Fill memory with a pattern * 2) Starting at the lowest address * 2a check that the pattern has not changed * 2b write the patterns complement * 2c increment the address * repeat 2a - 2c * 3) Starting at the highest address * 3a check that the pattern has not changed * 3b write the patterns complement * 3c decrement the address * repeat 3a - 3c * * returns 1 if memory failure, returns failed * address in badadr * */ static int ChkMemMovInv( u32 start, u32 end, u32 pattern, u32 *badadr ) { int ret = 1; register u32 p; register u32 tst; SerialOutputString("\nchkmem: move-inverse method\n"); SKIPBLOBMEM( start ); #if CHKMEM_DEBUG SerialOutputString("ChkMem: start(0x"); SerialOutputHex(start); SerialOutputString(") - end(0x"); SerialOutputHex(end); SerialOutputString(")\n"); #endif #if CHKMEM_DEBUG SerialOutputString("ChkMem: fillup\n"); #endif /* fill mem with pattern */ p=start; while ( p<end ) { MEM( p ) = pattern; barrier(); p += 4; } #if CHKMEM_DEBUG SerialOutputString("\rChkMem: bottom-up\n"); #endif /* bottom-up test */ p=start; while ( p<end ) { showadr( (u32*)p ); tst = MEM( p ); if ( tst != pattern ) { goto DONE; } MEM( p ) = ~pattern; barrier(); p += 4; } pattern = ~pattern; #if CHKMEM_DEBUG SerialOutputString("\rChkMem: top-down\n"); #endif /* top-down test */ p=end-4; while ( p>=start ) { showadr( (u32*)p ); tst = MEM( p ); if ( tst != pattern ) { goto DONE; } MEM( p ) = ~pattern; barrier(); p -= 4; } /* no error if we reach this point */ ret = 0; DONE: if ( ret != 0 && badadr ) { *badadr = p; } return ret; } /********************************************************************* * ChkMemAdrTst * * AUTOR: Stefan Eletzhofer * REVISED: * * Writes every memory location with its adress, then checks address * * returns 1 if memory failure, returns failed * address in badadr * */ static int ChkMemAdrTst( u32 start, u32 end, u32 pattern, u32 *badadr ) { int ret = 1; register u32 p; register u32 tst; SerialOutputString("\nchkmem: address test method\n"); SKIPBLOBMEM( start ); #if CHKMEM_DEBUG SerialOutputString("ChkMem: start(0x"); SerialOutputHex(start); SerialOutputString(") - end(0x"); SerialOutputHex(end); SerialOutputString(")\n"); #endif #if CHKMEM_DEBUG SerialOutputString("ChkMem: fillup\n"); #endif /* fill mem with pattern */ p=start; while ( p<end ) { MEM( p ) = p; barrier(); p += 4; } #if CHKMEM_DEBUG SerialOutputString("\rChkMem: bottom-up\n"); #endif /* bottom-up test */ p=start; while ( p<end ) { showadr( (u32*)p ); tst = MEM( p ); if ( tst != p ) { goto DONE; } p += 4; } /* no error if we reach this point */ ret = 0; DONE: if ( ret != 0 && badadr ) { *badadr = p; } return ret; } /********************************************************************* * ChkMemHardcore * * AUTOR: Stefan Eletzhofer * REVISED: * * Hardcore memory test. Test methods based on memtest * by Charles Cazabon <memtest@...> * * returns 1 if memory failure, returns failed * address in badadr * */ static int ChkMemHardcore( u32 start, u32 end, u32 pattern, u32 *badadr ) { register u32 count; SerialOutputString("\nchkmem: hardcore test method\n"); SKIPBLOBMEM( start ); #if CHKMEM_DEBUG SerialOutputString("ChkMem: start(0x"); SerialOutputHex(start); SerialOutputString(") - end(0x"); SerialOutputHex(end); SerialOutputString(")\n"); #endif count = end - start; SerialOutputHex(count); SerialOutputString("\n"); count = (count >> 1); SerialOutputHex(count); SerialOutputString("\n"); test_or_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_and_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_seqinc_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_checkerboard_comparison ((u32 *)start, (u32 *)(start+count), count>>2); test_solidbits_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_blockseq_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_walkbits_comparison((u32 *)start, (u32 *)(start+count), count>>2, 0); test_walkbits_comparison((u32 *)start, (u32 *)(start+count), count>>2, 1); test_bitspread_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_bitflip_comparison((u32 *)start, (u32 *)(start+count), count>>2); test_stuck_address((u32 *)start, (u32 *)(start+count), count>>2); /* no error if we reach this point */ if ( badadr ) { *badadr = 0L; } return 0; } /*********************************************************************/ /** MEMTESTER FUNCTIONS *********************************************/ /*********************************************************************/ /********************************************************************** * Original Authors of following memory test functions: * * Charles Cazabon <memtest@...> * * Copyright © 1999 Simon Kirby. * Version 2 Copyright © 1999 Charles Cazabon. * */ int test_verify_success (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; for (i = 0; i < count; i++, p1++, p2++) { if ( MEM( p1 ) != MEM( p2 ) ) { SerialOutputString("\nchkmem: contents differ:\n"); SerialOutputHex((u32)p1); SerialOutputString("\n"); SerialOutputHex((u32)p2); SerialOutputString("\n"); CHKMEM_PUSHERR( (u32)p1 ); CHKMEM_PUSHERR( (u32)p2 ); } } return (CHKMEM_OK); } int test_or_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; u32 q = 0xdeadbeef; SHOWFUNC(); for (i = 0; i < count; i++) { showadr( p2 ); MEM( p1++ ) |= q; barrier(); MEM( p2++ ) |= q; barrier(); } return (test_verify_success (bp1, bp2, count)); } int test_and_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; u32 q = 0xdeadbeef; SHOWFUNC(); for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) &= q; barrier(); MEM( p2++ ) &= q; barrier(); } return (test_verify_success (bp1, bp2, count)); } int test_seqinc_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i; u32 q = 0xdeadbeef; SHOWFUNC(); for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i + q); barrier(); } return (test_verify_success (bp1, bp2, count)); } int test_solidbits_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 q, i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); q = (j % 2) == 0 ? 0xFFFFFFFF : 0x00000000; p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q; barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_checkerboard_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 q, i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); q = (j % 2) == 0 ? 0x55555555 : 0xAAAAAAAA; p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q; barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_blockseq_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j; SHOWFUNC(); for (j = 0; j < 256; j++) { showrun( j ); p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = MAKE32FROM8 (j); barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_walkbits_comparison (u32 *bp1, u32 *bp2, u32 count, int m) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { if (j < 32) /* Walk it up. */ { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (m == 0) ? 0x00000001 << j : 0xFFFFFFFF ^ (0x00000001 << j); barrier(); } else /* Walk it back down. */ { MEM( p1++ ) = MEM( p2++ ) = (m == 0) ? 0x00000001 << (64 - j - 1) : 0xFFFFFFFF ^ (0x00000001 << (64 - j - 1)); barrier(); } } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_bitspread_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j; SHOWFUNC(); for (j = 0; j < 64; j++) { showrun( j ); p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); if (j < 32) /* Walk it up. */ { MEM( p1++ ) = MEM( p2++ ) = (i % 2 == 0) ? (0x00000001 << j) | (0x00000001 << (j + 2)) : 0xFFFFFFFF ^ ((0x00000001 << j) | (0x00000001 << (j + 2))); barrier(); } else /* Walk it back down. */ { MEM( p1++ ) = MEM( p2++ ) = (i % 2 == 0) ? (0x00000001 << (63 - j)) | (0x00000001 << (65 - j)) : 0xFFFFFFFF ^ (0x00000001 << (63 - j) | (0x00000001 << (65 - j))); barrier(); } } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } return (CHKMEM_OK); } int test_bitflip_comparison (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1 = (volatile u32 *) bp1; volatile u32 *p2 = (volatile u32 *) bp2; u32 i, j, k; u32 q; SHOWFUNC(); for (k = 0; k < 32; k++) { showrun( k*8 ); q = 0x00000001 << k; for (j = 0; j < 8; j++) { q = ~q; p1 = (volatile u32 *) bp1; p2 = (volatile u32 *) bp2; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = MEM( p2++ ) = (i % 2) == 0 ? q : ~q; barrier(); } if (test_verify_success (bp1, bp2, count) == CHKMEM_ERR) { return (CHKMEM_ERR); } } } return (CHKMEM_OK); } int test_stuck_address (u32 *bp1, u32 *bp2, u32 count) { volatile u32 *p1; /* second argument is not used; just gives it a compatible signature. */ u32 i, j; SHOWFUNC(); count <<= 1; for (j = 0; j < 16; j++) { showrun( j ); p1 = (volatile u32 *) bp1; for (i = 0; i < count; i++) { showadr( p1 ); MEM( p1++ ) = ((j + i) % 2) == 0 ? (u32) p1 : ~((u32) p1); barrier(); } p1 = (volatile u32 *) bp1; for (i = 0; i < count; i++, p1++) { showadr( p1 ); if (*p1 != (((j + i) % 2) == 0 ? (u32) p1 : ~((u32) p1))) { return (CHKMEM_ERR); } } } return (CHKMEM_OK); } |
From: Erik Mouw <erikm@us...> - 2002-02-17 19:57:30
|
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv26944/commands Removed Files: chkmem.c Log Message: Move chkmem to diag because it shouldn't be shared with blob --- chkmem.c DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 19:56:11
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv26614 Removed Files: debug.c Log Message: Remove debug.c because all commands are available in libcommands.a --- debug.c DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 19:54:51
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv26300/include/blob Modified Files: Makefile.am Removed Files: terminal.h reboot.h Log Message: Move "reset" and "reboot" commands to lib/commands/ Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/include/blob/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Makefile.am 16 Feb 2002 00:43:59 -0000 1.16 +++ Makefile.am 17 Feb 2002 19:54:47 -0000 1.17 @@ -39,11 +39,9 @@ mini_inflate.h \ param_block.h \ partition.h \ - reboot.h \ sa1100.h \ sa1111.h \ serial.h \ - terminal.h \ time.h \ types.h \ util.h \ --- terminal.h DELETED --- --- reboot.h DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 19:54:51
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv26300/src/lib Modified Files: Makefile.am reboot.c Removed Files: terminal.c Log Message: Move "reset" and "reboot" commands to lib/commands/ Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/lib/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.am 17 Feb 2002 15:41:54 -0000 1.13 +++ Makefile.am 17 Feb 2002 19:54:47 -0000 1.14 @@ -45,7 +45,6 @@ strlen.c \ strncmp.c \ strtou32.c \ - terminal.c \ time.c \ util.c Index: reboot.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/reboot.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- reboot.c 13 Feb 2002 00:10:57 -0000 1.3 +++ reboot.c 17 Feb 2002 19:54:47 -0000 1.4 @@ -27,27 +27,14 @@ # include <blob/config.h> #endif -#include <blob/serial.h> #include <blob/sa1100.h> #include <blob/util.h> -char reboothelp[] = "reboot\n" -"Reboot system\n"; - - - - -int reboot(int argc, char *argv[]) +void reboot_system(void) { - printf("Rebooting...\n\n"); - serial_flush_output(); - RCSR = 0; RSRR = 1; - - /* never reached, but anyway... */ - return 0; } --- terminal.c DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 19:54:51
|
Update of /cvsroot/blob/blob/src/commands In directory usw-pr-cvs1:/tmp/cvs-serv26300/src/commands Added Files: terminal.c reboot.c Log Message: Move "reset" and "reboot" commands to lib/commands/ --- NEW FILE: terminal.c --- /* * terminal.c: terminal reset functions * * Copyright (C) 1999 2000 2001 2002 Erik Mouw (J.A.K.Mouw@...) * * $Id: terminal.c,v 1.1 2002/02/17 19:54:47 erikm Exp $ * * 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: terminal.c,v 1.1 2002/02/17 19:54:47 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/serial.h> #include <blob/util.h> int reset_cmd(int argc, char *argv[]) { int i; serial_flush_output(); printf("c"); serial_flush_output(); for(i = 0; i < 100; i++) serial_write('\n'); serial_flush_output(); printf("c"); serial_flush_output(); serial_flush_input(); return 0; } char reset_help[] = "reset\n" "Reset terminal\n"; --- NEW FILE: reboot.c --- /* * reboot.c: Reboot board * * Copyright (C) 2001 Erik Mouw (J.A.K.Mouw@...) * * $Id: reboot.c,v 1.1 2002/02/17 19:54:47 erikm Exp $ * * 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: reboot.c,v 1.1 2002/02/17 19:54:47 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/serial.h> #include <blob/util.h> int reboot_cmd(int argc, char *argv[]) { printf("Rebooting...\n\n"); serial_flush_output(); reboot_system(); /* never reached, but anyway... */ return 0; } char reboot_help[] = "reboot\n" "Reboot system\n"; |
From: Erik Mouw <erikm@us...> - 2002-02-17 15:41:57
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv889/src/diag Modified Files: Makefile.am Log Message: - cleanup configure.in and Makefile.am - make uudecode and xmodem conditionally compiled sources - make cramfs and jffs2 really conditionally compiled - move mini_inflate to libblob Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/diag/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 7 Feb 2002 23:59:37 -0000 1.12 +++ Makefile.am 17 Feb 2002 15:41:54 -0000 1.13 @@ -60,8 +60,8 @@ system3.c diag_elf32_DEPENDENCIES = \ - @LCD@ \ - @DIAG_PLATFORM_OBJ@ \ + @DIAG_LCD_OBJS@ \ + @DIAG_PLATFORM_OBJS@ \ ${top_builddir}/src/commands/libcommands.a \ ${top_builddir}/src/lib/libblob.a \ ld-script @@ -72,8 +72,8 @@ diag_elf32_LDADD += \ - @LCD@ \ - @DIAG_PLATFORM_OBJ@ \ + @DIAG_LCD_OBJS@ \ + @DIAG_PLATFORM_OBJS@ \ -L${top_builddir}/src/commands -L${top_builddir}/src/lib \ -lcommands -lblob \ -lgcc |
From: Erik Mouw <erikm@us...> - 2002-02-17 15:41:57
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv889/src/lib Modified Files: Makefile.am Added Files: mini_inflate.c Log Message: - cleanup configure.in and Makefile.am - make uudecode and xmodem conditionally compiled sources - make cramfs and jffs2 really conditionally compiled - move mini_inflate to libblob --- NEW FILE: mini_inflate.c --- /*------------------------------------------------------------------------- * Filename: mini_inflate.c * Version: $Id: mini_inflate.c,v 1.1 2002/02/17 15:41:54 erikm Exp $ * Copyright: Copyright (C) 2001, Russ Dill * Author: Russ Dill <Russ.Dill@...> * Description: Mini inflate implementation (RFC 1951) *-----------------------------------------------------------------------*/ /* * * 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: mini_inflate.c,v 1.1 2002/02/17 15:41:54 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/mini_inflate.h> #include <blob/util.h> #define NO_ERROR 0 #define COMP_UNKNOWN 1 /* The specififed bytype is invalid */ #define CODE_NOT_FOUND 2 /* a huffman code in the stream could not be decoded */ #define TOO_MANY_BITS 3 /* pull_bits was passed an argument that is too * large */ /* This struct represents an entire huffman code set. It has various lookup * tables to speed decoding */ struct huffman_set { int bits; /* maximum bit length */ int num_symbols; /* Number of symbols this code can represent */ int *lengths; /* The bit length of symbols */ int *symbols; /* All of the symbols, sorted by the huffman code */ int *count; /* the number of codes of this bit length */ int *first; /* the first code of this bit length */ int *pos; /* the symbol that first represents (in the symbols * array) */ }; struct bitstream { unsigned char *data; /* increments as we move from byte to byte */ unsigned char bit; /* 0 to 7 */ unsigned long decoded; /* The number of bytes decoded */ int error; int distance_count[16]; int distance_first[16]; int distance_pos[16]; int distance_lengths[32]; int distance_symbols[32]; int code_count[8]; int code_first[8]; int code_pos[8]; int code_lengths[19]; int code_symbols[19]; int length_count[16]; int length_first[16]; int length_pos[16]; int length_lengths[288]; int length_symbols[288]; struct huffman_set codes; struct huffman_set lengths; struct huffman_set distance; }; #define NO_COMP 0 #define FIXED_COMP 1 #define DYNAMIC_COMP 2 /* The order that the code lengths in section 3.2.7 are in */ static unsigned char huffman_order[] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; /* associate a stream with a block of data and reset the stream */ static void init_stream(struct bitstream *stream, unsigned char *data) { stream->error = NO_ERROR; stream->decoded = 0; stream->data = data; stream->bit = 0; /* The first bit of the stream is the lsb of the * first byte */ /* really sorry about all this initialization, think of a better way, * let me know and it will get cleaned up */ stream->codes.bits = 8; stream->codes.num_symbols = 19; stream->codes.lengths = stream->code_lengths; stream->codes.symbols = stream->code_symbols; stream->codes.count = stream->code_count; stream->codes.first = stream->code_first; stream->codes.pos = stream->code_pos; stream->lengths.bits = 16; stream->lengths.num_symbols = 288; stream->lengths.lengths = stream->length_lengths; stream->lengths.symbols = stream->length_symbols; stream->lengths.count = stream->length_count; stream->lengths.first = stream->length_first; stream->lengths.pos = stream->length_pos; stream->distance.bits = 16; stream->distance.num_symbols = 32; stream->distance.lengths = stream->distance_lengths; stream->distance.symbols = stream->distance_symbols; stream->distance.count = stream->distance_count; stream->distance.first = stream->distance_first; stream->distance.pos = stream->distance_pos; } /* pull 'bits' bits out of the stream. The last bit pulled it returned as the * msb. (section 3.1.1) */ static unsigned long pull_bits(struct bitstream *stream, const unsigned int bits) { unsigned long ret; int i; ret = 0; for (i = 0; i < bits; i++) { ret += ((*(stream->data) >> stream->bit) & 1) << i; /* if, before incrementing, we are on bit 7, * go to the lsb of the next byte */ if (stream->bit++ == 7) { stream->bit = 0; stream->data++; } } return ret; } static int pull_bit(struct bitstream *stream) { int ret = ((*(stream->data) >> stream->bit) & 1); if (stream->bit++ == 7) { stream->bit = 0; stream->data++; } return ret; } /* discard bits up to the next whole byte */ static void discard_bits(struct bitstream *stream) { if (stream->bit != 0) { stream->bit = 0; stream->data++; } } /* No decompression, the data is all literals (section 3.2.4) */ static void decompress_none(struct bitstream *stream, unsigned char *dest) { unsigned int length; discard_bits(stream); length = *(stream->data++); length += *(stream->data++) << 8; pull_bits(stream, 16); /* throw away the inverse of the size */ stream->decoded += length; memcpy(dest, stream->data, length); stream->data += length; } /* Read in a symbol from the stream (section 3.2.2) */ static int read_symbol(struct bitstream *stream, struct huffman_set *set) { int bits = 0; int code = 0; while (!(set->count[bits] && code < set->first[bits] + set->count[bits])) { code = (code << 1) + pull_bit(stream); if (++bits > set->bits) { /* error decoding (corrupted data?) */ stream->error = CODE_NOT_FOUND; return -1; } } return set->symbols[set->pos[bits] + code - set->first[bits]]; } /* decompress a stream of data encoded with the passed length and distance * huffman codes */ static void decompress_huffman(struct bitstream *stream, unsigned char *dest) { struct huffman_set *lengths = &(stream->lengths); struct huffman_set *distance = &(stream->distance); int symbol, length, dist, i; do { if ((symbol = read_symbol(stream, lengths)) < 0) return; if (symbol < 256) { *(dest++) = symbol; /* symbol is a literal */ stream->decoded++; } else if (symbol > 256) { /* Determine the length of the repitition * (section 3.2.5) */ if (symbol < 265) length = symbol - 254; else if (symbol == 285) length = 258; else { length = pull_bits(stream, (symbol - 261) >> 2); length += (4 << ((symbol - 261) >> 2)) + 3; length += ((symbol - 1) % 4) << ((symbol - 261) >> 2); } /* Determine how far back to go */ if ((symbol = read_symbol(stream, distance)) < 0) return; if (symbol < 4) dist = symbol + 1; else { dist = pull_bits(stream, (symbol - 2) >> 1); dist += (2 << ((symbol - 2) >> 1)) + 1; dist += (symbol % 2) << ((symbol - 2) >> 1); } stream->decoded += length; for (i = 0; i < length; i++) *(dest++) = dest[-dist]; } } while (symbol != 256); /* 256 is the end of the data block */ } /* Fill the lookup tables (section 3.2.2) */ static void fill_code_tables(struct huffman_set *set) { int code = 0, i, length; /* fill in the first code of each bit length, and the pos pointer */ set->pos[0] = 0; for (i = 1; i < set->bits; i++) { code = (code + set->count[i - 1]) << 1; set->first[i] = code; set->pos[i] = set->pos[i - 1] + set->count[i - 1]; } /* Fill in the table of symbols in order of their huffman code */ for (i = 0; i < set->num_symbols; i++) { if ((length = set->lengths[i])) set->symbols[set->pos[length]++] = i; } /* reset the pos pointer */ for (i = 1; i < set->bits; i++) set->pos[i] -= set->count[i]; } static void init_code_tables(struct huffman_set *set) { memset(set->lengths, 0, set->num_symbols); memset(set->count, 0, set->bits); memset(set->first, 0, set->bits); } /* read in the huffman codes for dynamic decoding (section 3.2.7) */ static void decompress_dynamic(struct bitstream *stream, unsigned char *dest) { /* I tried my best to minimize the memory footprint here, while still * keeping up performance. I really dislike the _lengths[] tables, but * I see no way of eliminating them without a sizable performance * impact. The first struct table keeps track of stats on each bit * length. The _length table keeps a record of the bit length of each * symbol. The _symbols table is for looking up symbols by the huffman * code (the pos element points to the first place in the symbol table * where that bit length occurs). I also hate the initization of these * structs, if someone knows how to compact these, lemme know. */ struct huffman_set *codes = &(stream->codes); struct huffman_set *lengths = &(stream->lengths); struct huffman_set *distance = &(stream->distance); int hlit = pull_bits(stream, 5) + 257; int hdist = pull_bits(stream, 5) + 1; int hclen = pull_bits(stream, 4) + 4; int length, curr_code, symbol, i, last_code; last_code = 0; init_code_tables(codes); init_code_tables(lengths); init_code_tables(distance); /* fill in the count of each bit length' as well as the lengths * table */ for (i = 0; i < hclen; i++) { length = pull_bits(stream, 3); codes->lengths[huffman_order[i]] = length; if (length) codes->count[length]++; } fill_code_tables(codes); /* Do the same for the length codes, being carefull of wrap through * to the distance table */ curr_code = 0; while (curr_code < hlit) { if ((symbol = read_symbol(stream, codes)) < 0) return; if (symbol == 0) { curr_code++; last_code = 0; } else if (symbol < 16) { /* Literal length */ lengths->lengths[curr_code] = last_code = symbol; lengths->count[symbol]++; curr_code++; } else if (symbol == 16) { /* repeat the last symbol 3 - 6 * times */ length = 3 + pull_bits(stream, 2); for (;length; length--, curr_code++) if (curr_code < hlit) { lengths->lengths[curr_code] = last_code; lengths->count[last_code]++; } else { /* wrap to the distance table */ distance->lengths[curr_code - hlit] = last_code; distance->count[last_code]++; } } else if (symbol == 17) { /* repeat a bit length 0 */ curr_code += 3 + pull_bits(stream, 3); last_code = 0; } else { /* same, but more times */ curr_code += 11 + pull_bits(stream, 7); last_code = 0; } } fill_code_tables(lengths); /* Fill the distance table, don't need to worry about wrapthrough * here */ curr_code -= hlit; while (curr_code < hdist) { if ((symbol = read_symbol(stream, codes)) < 0) return; if (symbol == 0) { curr_code++; last_code = 0; } else if (symbol < 16) { distance->lengths[curr_code] = last_code = symbol; distance->count[symbol]++; curr_code++; } else if (symbol == 16) { length = 3 + pull_bits(stream, 2); for (;length; length--, curr_code++) { distance->lengths[curr_code] = last_code; distance->count[last_code]++; } } else if (symbol == 17) { curr_code += 3 + pull_bits(stream, 3); last_code = 0; } else { curr_code += 11 + pull_bits(stream, 7); last_code = 0; } } fill_code_tables(distance); decompress_huffman(stream, dest); } /* fill in the length and distance huffman codes for fixed encoding * (section 3.2.6) */ static void decompress_fixed(struct bitstream *stream, unsigned char *dest) { /* let gcc fill in the initial values */ struct huffman_set *lengths = &(stream->lengths); struct huffman_set *distance = &(stream->distance); memset(lengths->count, 0, 16); memset(lengths->first, 0, 16); memset(lengths->lengths, 8, 144); memset(lengths->lengths + 144, 9, 112); memset(lengths->lengths + 256, 7, 24); memset(lengths->lengths + 280, 8, 8); lengths->count[7] = 24; lengths->count[8] = 152; lengths->count[9] = 112; memset(distance->count, 0, 16); memset(distance->first, 0, 16); memset(distance->lengths, 5, 32); distance->count[5] = 32; fill_code_tables(lengths); fill_code_tables(distance); decompress_huffman(stream, dest); } /* returns the number of bytes decoded, < 0 if there was an error. Note that * this function assumes that the block starts on a byte boundry * (non-compliant, but I don't see where this would happen). section 3.2.3 */ long decompress_block(unsigned char *dest, unsigned char *source) { int bfinal, btype; struct bitstream stream; init_stream(&stream, source); do { bfinal = pull_bit(&stream); btype = pull_bits(&stream, 2); if (btype == NO_COMP) decompress_none(&stream, dest + stream.decoded); else if (btype == DYNAMIC_COMP) decompress_dynamic(&stream, dest + stream.decoded); else if (btype == FIXED_COMP) decompress_fixed(&stream, dest + stream.decoded); else stream.error = COMP_UNKNOWN; } while (!bfinal && !stream.error); return stream.error ? -stream.error : stream.decoded; } Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/lib/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 15 Feb 2002 23:08:20 -0000 1.12 +++ Makefile.am 17 Feb 2002 15:41:54 -0000 1.13 @@ -36,6 +36,7 @@ md5support.c \ memcpy.c \ memset.c \ + mini_inflate.c \ printf.c \ reboot.c \ serial.c \ |
From: Erik Mouw <erikm@us...> - 2002-02-17 15:41:57
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv889/src/blob Modified Files: Makefile.am main.c uucodec.c xmodem.c Removed Files: mini_inflate.c Log Message: - cleanup configure.in and Makefile.am - make uudecode and xmodem conditionally compiled sources - make cramfs and jffs2 really conditionally compiled - move mini_inflate to libblob Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Makefile.am 16 Feb 2002 00:43:59 -0000 1.24 +++ Makefile.am 17 Feb 2002 15:41:53 -0000 1.25 @@ -63,8 +63,8 @@ start-sa11x0.S blob_start_elf32_DEPENDENCIES = \ - @MEMSETUP@ \ - @STARTCODE@ \ + @BLOB_MEMSETUP_OBJS@ \ + @BLOB_STARTCODE_OBJS@ \ start-ld-script blob_start_elf32_LDFLAGS += \ @@ -72,8 +72,8 @@ -Wl,-Map,blob-start-elf32.map blob_start_elf32_LDADD += \ - @MEMSETUP@ \ - @STARTCODE@ \ + @BLOB_MEMSETUP_OBJS@ \ + @BLOB_STARTCODE_OBJS@ \ -lgcc @@ -133,14 +133,7 @@ param_block.c \ partition.c \ reboot.c \ - uucodec.c \ - xmodem.c \ load_kernel.c \ - mini_inflate.c \ - jffs2.c \ - compr_rtime.c \ - compr_rubin.c \ - cramfs.c \ zImage.c @@ -149,48 +142,46 @@ chkmem.c \ clock.c \ debug.c \ - amd32.c \ - intel16.c \ - intel32.c \ - nullflash.c \ - accelent_sa.c \ - assabet.c \ - brutus.c \ - badge4.c \ - clart.c \ - frodo.c \ - h3600.c \ - idr.c \ - jornada720.c \ - lart.c \ - nesa.c \ - pleb.c \ - shannon.c \ + amd32.c intel16.c intel32.c nullflash.c \ + cramfs.c \ + compr_rtime.c compr_rubin.c jffs2.c \ + uucodec.c \ + xmodem.c \ + accelent_sa.c assabet.c brutus.c badge4.c clart.c frodo.c \ + h3600.c idr.c jornada720.c lart.c nesa.c pleb.c shannon.c \ system3.c blob_rest_elf32_DEPENDENCIES = \ - @BLOB_PLATFORM_OBJ@ \ + @BLOB_CHKMEM_OBJS@ \ + @BLOB_CLOCK_OBJS@ \ + @BLOB_CRAMFS_OBJS@ \ + @BLOB_DEBUG_OBJS@ \ @BLOB_FLASH_OBJS@ \ - @CHKMEM@ \ - @DEBUG@ \ - @CLOCK@ \ + @BLOB_JFFS2_OBJS@ \ + @BLOB_PLATFORM_OBJS@ \ + @BLOB_UUCODEC_OBJS@ \ + @BLOB_XMODEM_OBJS@ \ ${top_builddir}/src/commands/libcommands.a \ ${top_builddir}/src/lib/libblob.a \ rest-ld-script blob_rest_elf32_LDFLAGS += \ + @BLOB_CHKMEM_OBJS@ \ + @BLOB_CLOCK_OBJS@ \ + @BLOB_CRAMFS_OBJS@ \ + @BLOB_DEBUG_OBJS@ \ + @BLOB_FLASH_OBJS@ \ + @BLOB_JFFS2_OBJS@ \ + @BLOB_PLATFORM_OBJS@ \ + @BLOB_UUCODEC_OBJS@ \ + @BLOB_XMODEM_OBJS@ \ -Wl,-T,rest-ld-script \ -Wl,-Map,blob-rest-elf32.map blob_rest_elf32_LDADD += \ - @BLOB_PLATFORM_OBJ@ \ - @BLOB_FLASH_OBJS@ \ - @CHKMEM@ \ - @DEBUG@ \ - @CLOCK@ \ -L${top_builddir}/src/commands -L${top_builddir}/src/lib \ -lcommands -lblob \ -lgcc Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- main.c 16 Feb 2002 00:43:59 -0000 1.34 +++ main.c 17 Feb 2002 15:41:54 -0000 1.35 @@ -188,6 +188,7 @@ +#if (defined CONFIG_XMODEM_SUPPORT) || (defined CONFIG_UUCODEC_SUPPORT) static int set_download_parameters(char *name, u32 *startAddress, int *bufLen, int **numRead, u32 **digest) @@ -229,6 +230,7 @@ return 0; } +#endif Index: uucodec.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/uucodec.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- uucodec.c 5 Feb 2002 14:47:54 -0000 1.4 +++ uucodec.c 17 Feb 2002 15:41:54 -0000 1.5 @@ -37,8 +37,6 @@ # include <blob/config.h> #endif -#ifdef CONFIG_UUCODEC_SUPPORT - #include <blob/errno.h> #include <blob/serial.h> #include <blob/util.h> @@ -197,6 +195,3 @@ } /* UUEncode */ #endif - -#endif /* #ifdef CONFIG_UUCODEC_SUPPORT */ - Index: xmodem.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/xmodem.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xmodem.c 4 Feb 2002 12:14:16 -0000 1.3 +++ xmodem.c 17 Feb 2002 15:41:54 -0000 1.4 @@ -35,8 +35,6 @@ # include <blob/config.h> #endif -#ifdef CONFIG_XMODEM_SUPPORT - #include <blob/errno.h> #include <blob/serial.h> #include <blob/util.h> @@ -266,6 +264,3 @@ done: return length; } - -#endif /* #ifdef CONFIG_XMODEM_SUPPORT */ - --- mini_inflate.c DELETED --- |
From: Erik Mouw <erikm@us...> - 2002-02-17 15:41:56
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv889 Modified Files: configure.in Log Message: - cleanup configure.in and Makefile.am - make uudecode and xmodem conditionally compiled sources - make cramfs and jffs2 really conditionally compiled - move mini_inflate to libblob Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- configure.in 8 Feb 2002 12:49:03 -0000 1.44 +++ configure.in 17 Feb 2002 15:41:53 -0000 1.45 @@ -98,19 +98,19 @@ accelent_sa) board_name="Accelent IDP" AC_DEFINE(ACCELENT_SA) - BLOB_PLATFORM_OBJ="accelent_sa.o" + BLOB_PLATFORM_OBJS="accelent_sa.o" BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="accelent_sa.o" + DIAG_PLATFORM_OBJS="accelent_sa.o" use_cpu="sa1110" use_lcd="no" ;; assabet) board_name="Intel Assabet" AC_DEFINE(ASSABET) - BLOB_PLATFORM_OBJ="assabet.o" + BLOB_PLATFORM_OBJS="assabet.o" AC_MSG_WARN([Please check assabet memory config in arch/assabet.h]) BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="assabet.o" + DIAG_PLATFORM_OBJS="assabet.o" use_cpu="sa1110" use_lcd="no" ;; @@ -118,124 +118,124 @@ board_name="Intel Assabet with Neponset Expansion Board" AC_DEFINE(ASSABET) AC_DEFINE(NEPONSET) - BLOB_PLATFORM_OBJ="assabet.o" + BLOB_PLATFORM_OBJS="assabet.o" AC_MSG_WARN([Please check assabet memory config in arch/assabet.h]) BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="assabet.o" + DIAG_PLATFORM_OBJS="assabet.o" use_cpu="sa1110" use_lcd="no" ;; badge4) board_name="Hewlett-Packard Laboratories Badge-4" AC_DEFINE(BADGE4) - BLOB_PLATFORM_OBJ="badge4.o" + BLOB_PLATFORM_OBJS="badge4.o" BLOB_FLASH_OBJS="intel16.o" - DIAG_PLATFORM_OBJ="badge4.o" + DIAG_PLATFORM_OBJS="badge4.o" use_cpu="sa1110" use_lcd="no" ;; brutus) board_name="Intel Brutus" AC_DEFINE(BRUTUS) - BLOB_PLATFORM_OBJ="brutus.o" + BLOB_PLATFORM_OBJS="brutus.o" AC_MSG_WARN([Please check Brutus flash]) BLOB_FLASH_OBJS="nullflash.o" - DIAG_PLATFORM_OBJ="brutus.o" + DIAG_PLATFORM_OBJS="brutus.o" use_cpu="sa1100" use_lcd="no" ;; creditlart) board_name="Delft University of Technology CreditLART" AC_DEFINE(CLART) - BLOB_PLATFORM_OBJ="clart.o" + BLOB_PLATFORM_OBJS="clart.o" AC_MSG_WARN([Please check creditlart memory config in arch/clart.h]) BLOB_FLASH_OBJS="intel16.o" - DIAG_PLATFORM_OBJ="clart.o" + DIAG_PLATFORM_OBJS="clart.o" use_cpu="sa1110" use_lcd="no" ;; frodo) board_name="2d3D, Inc. SA-1110 Development Board" AC_DEFINE(FRODO) - BLOB_PLATFORM_OBJ="frodo.o" + BLOB_PLATFORM_OBJS="frodo.o" BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="frodo.o" + DIAG_PLATFORM_OBJS="frodo.o" use_cpu="sa1110" use_lcd="no" ;; h3600) board_name="Compaq Ipaq H3600 series" AC_DEFINE(H3600) - BLOB_PLATFORM_OBJ="h3600.o" + BLOB_PLATFORM_OBJS="h3600.o" AC_MSG_WARN([Warning: untested platform!]) AC_MSG_WARN([Please check h3600 memory config in arch/h3600.h]) BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="h3600.o" + DIAG_PLATFORM_OBJS="h3600.o" use_cpu="sa1110" use_lcd="no" ;; idr) board_name="Vercel UD-1 (IDR)" AC_DEFINE(IDR) - BLOB_PLATFORM_OBJ="idr.o" + BLOB_PLATFORM_OBJS="idr.o" BLOB_FLASH_OBJS="intel16.o" - DIAG_PLATFORM_OBJ="idr.o" + DIAG_PLATFORM_OBJS="idr.o" use_cpu="sa1110" use_lcd="no" ;; jornada720) board_name="Hewlett-Packard Jornada 720 with flash daughter board" AC_DEFINE(JORNADA720) - BLOB_PLATFORM_OBJ="jornada720.o" + BLOB_PLATFORM_OBJS="jornada720.o" AC_MSG_WARN([Warning: untested platform!]) BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="jornada720.o" + DIAG_PLATFORM_OBJS="jornada720.o" use_cpu="sa1110" use_lcd="no" ;; lart) board_name="Delft University of Technology LART" AC_DEFINE(LART) - BLOB_PLATFORM_OBJ="lart.o" + BLOB_PLATFORM_OBJS="lart.o" BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="lart.o" + DIAG_PLATFORM_OBJS="lart.o" use_cpu="sa1100" use_lcd="no" ;; nesa) board_name="NESA" AC_DEFINE(NESA) - BLOB_PLATFORM_OBJ="nesa.o" + BLOB_PLATFORM_OBJS="nesa.o" BLOB_FLASH_OBJS="amd32.o" - DIAG_PLATFORM_OBJ="nesa.o" + DIAG_PLATFORM_OBJS="nesa.o" use_cpu="sa1100" use_lcd="no" ;; pleb) board_name="University of New South Wales PLEB" AC_DEFINE(PLEB) - BLOB_PLATFORM_OBJ="pleb.o" + BLOB_PLATFORM_OBJS="pleb.o" AC_MSG_WARN([Please check PLEB flash]) BLOB_FLASH_OBJS="nullflash.o" - DIAG_PLATFORM_OBJ="pleb.o" + DIAG_PLATFORM_OBJS="pleb.o" use_cpu="sa1100" use_lcd="no" ;; shannon) board_name="TuxScreen (Shannon)" AC_DEFINE(SHANNON) - BLOB_PLATFORM_OBJ="shannon.o" + BLOB_PLATFORM_OBJS="shannon.o" BLOB_FLASH_OBJS="amd32.o" - DIAG_PLATFORM_OBJ="shannon.o" + DIAG_PLATFORM_OBJS="shannon.o" use_cpu="sa1100" use_lcd="no" ;; system3) board_name="Prueftechnik Digital Board" AC_DEFINE(PT_SYSTEM3) - BLOB_PLATFORM_OBJ="system3.o" + BLOB_PLATFORM_OBJS="system3.o" BLOB_FLASH_OBJS="intel32.o" - DIAG_PLATFORM_OBJ="system3.o" + DIAG_PLATFORM_OBJS="system3.o" use_cpu="sa1110" use_lcd="yes" ;; @@ -245,6 +245,13 @@ ;; esac +AC_SUBST(BLOB_FLASH_OBJS) +AC_SUBST(BLOB_PLATFORM_OBJS) +AC_SUBST(DIAG_PLATFORM_OBJS) + + + + dnl define board name and CPU in configuration AC_MSG_RESULT("${board_name}") AC_DEFINE_UNQUOTED(BOARD_NAME, "${board_name}") @@ -255,13 +262,13 @@ case "$use_cpu" in sa1100) dnl SA1100 CPU: EDORAM memory setup code - STARTCODE="start-sa11x0.o" - MEMSETUP="memsetup-sa1100.o" + BLOB_STARTCODE_OBJS="start-sa11x0.o" + BLOB_MEMSETUP_OBJS="memsetup-sa1100.o" ;; sa1110) dnl SA1110 CPU: SDRAM memory setup code - STARTCODE="start-sa11x0.o" - MEMSETUP="memsetup-sa1110.o" + BLOB_STARTCODE_OBJS="start-sa11x0.o" + BLOB_MEMSETUP_OBJS="memsetup-sa1110.o" ;; *) AC_MSG_ERROR([Unknown CPU name \"$use_cpu\", bailing out]); @@ -269,8 +276,8 @@ esac dnl Define in configuration -AC_SUBST(STARTCODE) -AC_SUBST(MEMSETUP) +AC_SUBST(BLOB_STARTCODE_OBJS) +AC_SUBST(BLOB_MEMSETUP_OBJS) @@ -300,6 +307,7 @@ + dnl Check for individual features AC_ARG_ENABLE(clock-scaling, [ --enable-clock-scaling Enable support for clock scaling (SA1100 only)], @@ -347,6 +355,8 @@ [cramfs_flag=no]) + + dnl Check if the user wants *all* features AC_ARG_ENABLE(all-features, [ --enable-all-features Enable all features], @@ -367,40 +377,47 @@ + dnl Check wether or not clock scaling code is wanted if test "x$clock_scaling_flag" = "xyes" ; then if test "x$use_cpu" = "xsa1100"; then - CLOCK="clock.o" + BLOB_CLOCK_OBJS="clock.o" else AC_MSG_WARN([No clock scaling support for SA1110 CPUs, disabling]) clock_scaling_flag=no - CLOCK="" + BLOB_CLOCK_OBJS="" fi fi -AC_SUBST(CLOCK) +AC_SUBST(BLOB_CLOCK_OBJS) dnl Check wether or not memtest code is wanted if test "x$chkmem_flag" = "xyes" ; then - CHKMEM="chkmem.o" + BLOB_CHKMEM_OBJS="chkmem.o" fi -AC_SUBST(CHKMEM) +AC_SUBST(BLOB_CHKMEM_OBJS) + + + dnl Check wether or not debug code is wanted if test "x$debug_flag" = "xyes" ; then - DEBUG="debug.o" + BLOB_DEBUG_OBJS="debug.o" fi -AC_SUBST(DEBUG) +AC_SUBST(BLOB_DEBUG_OBJS) + + + dnl Check wether or not lcd support code is wanted if test "x$lcd_flag" = "xyes" ; then if test "x$use_lcd" = "xyes" ; then - LCD="lcd.o" + DIAG_LCD_OBJS="lcd.o" AC_DEFINE(CONFIG_LCD_SUPPORT) else AC_MSG_WARN([No LCD support for ${board_name}, disabling]) @@ -409,40 +426,66 @@ fi fi -AC_SUBST(LCD) +AC_SUBST(DIAG_LCD_OBJS) + + + dnl Check wether or not MD5 support is wanted if test "x$md5_flag" = "xyes" ; then AC_DEFINE(CONFIG_MD5_SUPPORT) fi + + + dnl Check wether or not Xmodem support is wanted if test "x$xmodem_flag" = "xyes" ; then AC_DEFINE(CONFIG_XMODEM_SUPPORT) + BLOB_XMODEM_OBJS="xmodem.o" fi +AC_SUBST(BLOB_XMODEM_OBJS) + + + + dnl Check wether or not UU Codec support is wanted if test "x$uucodec_flag" = "xyes"; then AC_DEFINE(CONFIG_UUCODEC_SUPPORT) + BLOB_UUCODEC_OBJS="uucodec.o" fi +AC_SUBST(BLOB_UUCODEC_OBJS) + + + + dnl Check wether or not JFFS2 support is wanted if test "x$jffs2_flag" = "xyes" ; then - AC_MSG_WARN("JFFS2 support is only dummy code") + BLOB_JFFS2_OBJS="compr_rtime.o compr_rubin.o jffs2.o" AC_DEFINE(CONFIG_JFFS2_SUPPORT) fi +AC_SUBST(BLOB_JFFS2_OBJS) + + + + dnl Check wether or not cramfs support is wanted if test "x$cramfs_flag" = "xyes" ; then - AC_MSG_WARN("cramfs support is only dummy code") + BLOB_CRAMFS_OBJS="cramfs.o" AC_DEFINE(CONFIG_CRAMFS_SUPPORT) fi +AC_SUBST(BLOB_CRAMFS_OBJS) + + + + dnl Check wether or not additional platform source code dnl for is needed -AC_SUBST(BLOB_FLASH_OBJS) -AC_SUBST(BLOB_PLATFORM_OBJ) -AC_SUBST(DIAG_PLATFORM_OBJ) + |