1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2025-04-21 12:27:27 +03:00

add-partition-support.patch

We have to minimally support DOS partition scheme.
Partitions are counted from 1+ now, and 0 means no
partition table instead of -1.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green
2008-11-28 10:16:37 +00:00
committed by Andy Green
parent b6dd949b0e
commit 935ef0e12d
9 changed files with 117 additions and 73 deletions

View File

@@ -42,8 +42,8 @@ enum filesystem {
struct kernel_source {
const char *name; /* NULL name means invalid */
int (*block_init)(void);
int (*block_read)(unsigned char * buf, unsigned long byte_start,
int count_bytes);
int (*block_read)(unsigned char * buf, unsigned long start512,
int blocks512);
int partition_index; /* -1 means no partition table */
int offset_if_no_partition; /* used if partition_index is -1 */
enum filesystem filesystem;
@@ -85,9 +85,10 @@ void print32(unsigned int u);
void printdec(int n);
void hexdump(unsigned char *start, int len);
unsigned int _ntohl(unsigned int n);
unsigned int _letocpu(unsigned int n);
unsigned long crc32(unsigned long crc, const unsigned char *buf,
unsigned int len);
int nand_read_ll(unsigned char *buf, unsigned long start_addr, int size);
int nand_read_ll(unsigned char *buf, unsigned long start512, int blocks512);
#endif