2005-02-02 14:25:30 +00:00
|
|
|
static __attribute__((used)) char* rcsid = "$CVSHeader$";
|
|
|
|
/*
|
|
|
|
*
|
2006-09-15 14:55:39 +00:00
|
|
|
* (c) 2004 Laurent Vivier <Laurent@lvivier.info>
|
2005-02-02 14:25:30 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "partition.h"
|
|
|
|
#include "libemile.h"
|
2006-05-29 20:18:19 +00:00
|
|
|
#include "emile.h"
|
2005-02-02 14:25:30 +00:00
|
|
|
|
|
|
|
int emile_map_get_bootinfo(emile_map_t *map, int* bootstart, int *bootsize,
|
|
|
|
int *bootaddr, int *bootentry, int* checksum,
|
|
|
|
char* processor)
|
|
|
|
{
|
|
|
|
if (!emile_map_is_valid(map))
|
|
|
|
return -1;
|
|
|
|
|
2007-02-24 13:35:32 +00:00
|
|
|
*bootstart = read_long((u_int32_t*)&map->partition.LgBootStart);
|
|
|
|
*bootsize = read_long((u_int32_t*)&map->partition.BootSize);
|
|
|
|
*bootaddr = read_long((u_int32_t*)&map->partition.BootAddr);
|
|
|
|
*bootentry = read_long((u_int32_t*)&map->partition.BootEntry);
|
|
|
|
*checksum = read_long((u_int32_t*)&map->partition.BootCksum);
|
2005-02-02 14:25:30 +00:00
|
|
|
strcpy(processor, map->partition.Processor);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|