3 /*-------------------------------------------------------------------------
4 * Filename: load_kernel.h
5 * Version: $Id: load_kernel.h,v 1.3 2002/01/25 01:34:11 nyet Exp $
6 * Copyright: Copyright (C) 2001, Russ Dill
7 * Author: Russ Dill <Russ.Dill@asu.edu>
8 * Description: header for load kernel modules
9 *-----------------------------------------------------------------------*/
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 /* this struct is very similar to mtd_info */
30 u32 size; /* Total size of the Partition */
32 /* "Major" erase size for the device. Naïve users may take this
33 * to be the only erase size available, or may use the more detailed
34 * information below if they desire
38 /* Where in memory does this partition start? */
41 /* used by jffs2 set to NULL */
44 /* private filed used by user */
49 jffs2_part_info(int part_num);
51 struct kernel_loader {
53 /* Return true if there is a kernel contained at src */
54 int (* check_magic)(struct part_info *part);
56 /* load the kernel from the partition part to dst, return the number
57 * of bytes copied if successful, zero if not */
58 u32 (* load_kernel)(u32 *dst, struct part_info *part, const char *kernel_filename);
60 /* A brief description of the module (ie, "cramfs") */
64 #define ldr_strlen strlen
65 #define ldr_strncmp strncmp
66 #define ldr_memcpy memcpy
67 #define putstr(x) printf("%s", x)
68 #define mmalloc malloc
71 #define putnstr(str, size) printf("%*.*s", size, size, str)
72 #define ldr_output_string(x) puts(x)
73 #define putLabeledWord(x, y) printf("%s %08x\n", x, (unsigned int)y)
74 #define led_blink(x, y, z, a)
76 #endif /* load_kernel_h */