From: Christopher H. <ch...@us...> - 2003-01-27 20:49:09
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv13665/src/blob Modified Files: badge4.c Log Message: use new part offset and size support; allow for CONFIG_ZIMAGE_SUPPORT Index: badge4.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/badge4.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- badge4.c 24 Jan 2003 09:27:56 -0000 1.13 +++ badge4.c 27 Jan 2003 20:49:06 -0000 1.14 @@ -62,46 +62,53 @@ /* default partition table for BadgePAD 4 */ static blob_partition_t badge4_default_partition_table[] = { -#define PART_START 0 { /* start of table */ magic: BLOB_DEFAULT_PART_TABLE_MAGIC, next: sizeof(blob_partition_t), offset: 0x00000000, /* absolute base address */ - size: -1 /* filled in later */ + size: BLOB_PART_SIZ_FULL }, -#define PART_BLOB 1 { /* blob itself */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), - offset: BLOB_FLASH_BASE, + offset: BLOB_PART_OFS_APPEND, size: BLOB_FLASH_LEN, name: "blob", mem_base: BLOB_RAM_BASE }, -#define PART_PARAM 2 { /* parameter block */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), - offset: PARAM_FLASH_BASE, + offset: BLOB_PART_OFS_APPEND, size: PARAM_FLASH_LEN, name: "parameters", }, -#define PART_ROOT 3 +#ifdef CONFIG_ZIMAGE_SUPPORT + { + /* parameter block */ + magic: BLOB_PART_VALID_MAGIC, + next: sizeof(blob_partition_t), + offset: BLOB_PART_OFS_APPEND, + size: KERNEL_FLASH_LEN, + name: "kernel", + flags: BLOB_PART_FLAG_EXEC + }, +#endif { /* root */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), - offset: RAMDISK_FLASH_BASE, - size: -1, /* filled in later */ + offset: BLOB_PART_OFS_APPEND, + size: BLOB_PART_SIZ_FULL, name: "root", flags: BLOB_PART_FLAG_JFFS2 }, -#define PART_LAST 4 { /* last entry */ +#define PART_LAST (PART_ROOT + 1) magic: BLOB_PART_LAST_MAGIC } }; @@ -110,16 +117,7 @@ static void badge4_set_partition_table(void) { /* set up the default partition table */ - u32 flash_size = flash_get_size(); - printf("FLASH: %d KiB\n", flash_size / 1024); - - badge4_default_partition_table[PART_START].size = flash_size; - badge4_default_partition_table[PART_ROOT].size = - flash_size - badge4_default_partition_table[PART_BLOB].size - - badge4_default_partition_table[PART_PARAM].size; - default_partition_table = badge4_default_partition_table; - /* we don't know where the flash partition table will live, so * point to the flash and let the partition table |