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 |