You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(79) |
Aug
(27) |
Sep
(64) |
Oct
(202) |
Nov
(31) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(173) |
Mar
(13) |
Apr
(140) |
May
(75) |
Jun
(1) |
Jul
(37) |
Aug
(14) |
Sep
|
Oct
(20) |
Nov
(9) |
Dec
(2) |
2003 |
Jan
(51) |
Feb
(12) |
Mar
(18) |
Apr
(24) |
May
(1) |
Jun
|
Jul
|
Aug
(72) |
Sep
(12) |
Oct
(18) |
Nov
(60) |
Dec
(26) |
2004 |
Jan
(1) |
Feb
(40) |
Mar
(3) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(5) |
2006 |
Jan
(13) |
Feb
(5) |
Mar
(8) |
Apr
(13) |
May
(7) |
Jun
(6) |
Jul
(10) |
Aug
(6) |
Sep
(6) |
Oct
(35) |
Nov
(20) |
Dec
(10) |
2007 |
Jan
(13) |
Feb
(9) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(54) |
Jun
(78) |
Jul
(35) |
Aug
(21) |
Sep
(21) |
Oct
(29) |
Nov
(10) |
Dec
(5) |
2010 |
Jan
|
Feb
|
Mar
(26) |
Apr
(55) |
May
(73) |
Jun
(63) |
Jul
(38) |
Aug
(39) |
Sep
(19) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Christopher H. <ch...@us...> - 2003-01-27 20:45:11
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv11388 Modified Files: partition.h Log Message: fix typo. Index: partition.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/partition.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- partition.h 27 Jan 2003 20:42:32 -0000 1.5 +++ partition.h 27 Jan 2003 20:45:00 -0000 1.6 @@ -61,7 +61,7 @@ #define BLOB_PART_NAMELEN (32) #define BLOB_PART_OFS_APPEND ((u32) -1) /* append to previous */ -#define BLOB_PART_SIZ_FULL ((u32) -1) /* use remaing flash */ +#define BLOB_PART_SIZ_FULL ((u32) -1) /* use remaining flash */ typedef struct { /* generic (i.e.: blob independent) data */ |
From: Christopher H. <ch...@us...> - 2003-01-27 20:43:38
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv10477 Modified Files: partition.c Log Message: Add supprot for BLOB_PART_OFS_APPEND and BLOB_PART_SIZ_FULL flags. BLOB_PART_OFF_APPEND allows a partition offset to be defined to start at the end of the previous partition. BLOB_PART_SIZ_FULL allows a partition length to be defined to use up all remaining flash space. This is especially useful with the CFI query support (cf. QUERY_FLASH_FOR_DESCRIPTORS). Index: partition.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/partition.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- partition.c 9 May 2002 12:22:22 -0000 1.5 +++ partition.c 27 Jan 2003 20:43:35 -0000 1.6 @@ -1,3 +1,4 @@ +#define BLOB_DEBUG /* * partition.c: flash partitioning * @@ -254,7 +255,61 @@ } } +static int fixup_ptable(blob_partition_t *ptable) +{ + /* walk through ptable and fix up BLOB_PART_OFS_APPEND and + BLOB_PART_SIZ_FULL entries */ + + u32 offset = ptable->offset; + u32 size = ptable->size; + int no_more_parts_allowed = 0; + blob_partition_t *t = ptable; + + dprintf("ptable->offset = 0x%08X\n", ptable->offset); + dprintf("ptable->size = 0x%08X\n", ptable->size); + if (ptable->size == BLOB_PART_SIZ_FULL) { + ptable->size = size = flash_get_size(); + dprintf("ptable->size => 0x%08X\n", ptable->size); + } + + for(;;) { + t = next_ptable_entry(t); + + switch(t->magic) { + case BLOB_PART_LAST_MAGIC: + return 0; + + case BLOB_PART_VALID_MAGIC: + dprintf("part @ 0x%p\n", t); + + if (no_more_parts_allowed) { + eprintf("ptable fixup found additional parts" + " after BLOB_PART_SIZ_FULL size\n"); + return -EINVAL; + } + + dprintf(" offset = 0x%08X\n", t->offset); + if (t->offset == BLOB_PART_OFS_APPEND) { + t->offset = offset; + dprintf(" offset => 0x%08X\n", t->offset); + } + dprintf(" size = 0x%08X\n", t->size); + if (t->size == BLOB_PART_SIZ_FULL) { + t->size = size; + no_more_parts_allowed = 1; + dprintf(" size => 0x%08X\n", t->size); + } + offset += t->size; + size -= t->size; + break; + + default: + eprintf("ptable magic failed at 0x%08x\n", (u32)t); + return -EINVAL; + } + } +} static void ptable_init(void) @@ -287,7 +342,8 @@ /* FIXME: if there is still no flash partition table found we * could check for a bootldr partition table over here */ - if(check_ptable_magic(ptable, BLOB_COPY_PART_TABLE_MAGIC) != 0) { + if ((check_ptable_magic(ptable, BLOB_COPY_PART_TABLE_MAGIC) != 0) || + (fixup_ptable(ptable) != 0)) { dprintf("no valid partition table found\n"); /* construct a minimal partition table */ |
From: Christopher H. <ch...@us...> - 2003-01-27 20:42:36
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv9903 Modified Files: partition.h Log Message: Add BLOB_PART_OFS_APPEND and BLOB_PART_SIZ_FULL flags. BLOB_PART_OFF_APPEND allows a partition offset to be defined to start at the end of the previous partition. BLOB_PART_SIZ_FULL allows a partition length to be defined to use up all remaining flash space. This is especially useful with the CFI query support (cf. QUERY_FLASH_FOR_DESCRIPTORS). Index: partition.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/partition.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- partition.h 19 Mar 2002 21:08:39 -0000 1.4 +++ partition.h 27 Jan 2003 20:42:32 -0000 1.5 @@ -60,6 +60,8 @@ #define BLOB_PART_INVALID_MAGIC (0x42504530) /* BPE0, Blob Partition Entry 0 */ #define BLOB_PART_NAMELEN (32) +#define BLOB_PART_OFS_APPEND ((u32) -1) /* append to previous */ +#define BLOB_PART_SIZ_FULL ((u32) -1) /* use remaing flash */ typedef struct { /* generic (i.e.: blob independent) data */ |
From: Christopher H. <ch...@us...> - 2003-01-24 10:03:33
|
Update of /cvsroot/blob/blob/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv14646 Modified Files: i2c-gpio.c Log Message: Remove old comment. Index: i2c-gpio.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/i2c-gpio.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- i2c-gpio.c 2 May 2002 01:45:39 -0000 1.2 +++ i2c-gpio.c 24 Jan 2003 10:03:29 -0000 1.3 @@ -120,7 +120,6 @@ /* float high */ GPDR &= ~(private->scl_gpio); - /* ### this should timeout and return -ETIMEOUT */ while (!get_scl(bus)) { if (i++ > 10) { DPRINTF(__FUNCTION__ ": scl did not go high\n"); |
From: Christopher H. <ch...@us...> - 2003-01-24 09:39:23
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv24775/src/blob Modified Files: main.c flash-commands.c load_kernel.c Log Message: only load/flash/whatever those partitions which are defined (e.g. when loading kernel from jffs2, there is no KERNEL_FLASH_{BASE,LEN}) Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- main.c 14 Aug 2002 21:04:23 -0000 1.50 +++ main.c 24 Jan 2003 09:39:20 -0000 1.51 @@ -427,7 +427,7 @@ maxSize = BLOB_FLASH_LEN; numBytes = blob_status.blobSize; type = blob_status.blobType; -#ifdef PARAM_START +#ifdef PARAM_FLASH_BASE } else if(strncmp(argv[1], "param", 6) == 0) { src = (u32 *)PARAM_RAM_BASE; dst = (u32 *)PARAM_FLASH_BASE; @@ -435,24 +435,28 @@ numBytes = blob_status.paramSize; type = blob_status.paramType; #endif +#ifdef KERNEL_FLASH_BASE } else if(strncmp(argv[1], "kernel", 7) == 0) { -#if KERNEL_FLASH_BASE == RAMDISK_FLASH_BASE +# if defined(RAMDISK_FLASH_BASE) && (KERNEL_FLASH_BASE == RAMDISK_FLASH_BASE) printerrprefix(); printf("configured for kernel in ramdisk\n"); return -EINVAL; -#else +# else src = (u32 *)KERNEL_RAM_BASE; dst = (u32 *)KERNEL_FLASH_BASE; numBytes = blob_status.kernelSize; maxSize = KERNEL_FLASH_LEN; type = blob_status.kernelType; +# endif #endif +#ifdef RAMDISK_FLASH_BASE } else if(strncmp(argv[1], "ramdisk", 8) == 0) { src = (u32 *)RAMDISK_RAM_BASE; dst = (u32 *)RAMDISK_FLASH_BASE; numBytes = blob_status.ramdiskSize; maxSize = RAMDISK_FLASH_LEN; type = blob_status.ramdiskType; +#endif } else { printerror(EINVAL, argv[1]); return 0; @@ -568,7 +572,7 @@ #endif } -#ifdef PARAM_START +#ifdef PARAM_FLASH_BASE printf("param (0x%08x): ", PARAM_FLASH_BASE); if(blob_status.paramType == fromFlash) { printf("from flash\n"); @@ -585,6 +589,7 @@ printf("param : Not available\n"); #endif +#ifdef KERNEL_FLASH_BASE printf("kernel (0x%08x): ", KERNEL_FLASH_BASE); if(blob_status.kernelType == fromFlash) { printf("from flash\n"); @@ -597,7 +602,9 @@ printf("\n"); #endif } +#endif +#ifdef RAMDISK_FLASH_BASE printf("ramdisk (0x%08x): ", RAMDISK_FLASH_BASE); if(blob_status.ramdiskType == fromFlash) { printf("from flash\n"); @@ -610,6 +617,7 @@ printf("\n"); #endif } +#endif return 0; } @@ -635,7 +643,7 @@ blob_status.blobSize = 0; blob_status.blobType = fromFlash; printf("Loading blob from flash "); -#ifdef PARAM_START +#ifdef PARAM_FLASH_BASE } else if(strncmp(what, "param", 6) == 0) { dst = (u32 *)PARAM_RAM_BASE; src = (u32 *)PARAM_FLASH_BASE; @@ -655,6 +663,7 @@ blob_status.kernelType = fromFlash; printf("Loading kernel from flash "); #endif +#ifdef RAMDISK_FLASH_BASE } else if(strncmp(what, "ramdisk", 8) == 0) { dst = (u32 *)RAMDISK_RAM_BASE; src = (u32 *)RAMDISK_FLASH_BASE; @@ -662,6 +671,7 @@ blob_status.ramdiskSize = 0; blob_status.ramdiskType = fromFlash; printf("Loading ramdisk from flash "); +#endif } else { printerror(EINVAL, what); return 0; Index: flash-commands.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/flash-commands.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- flash-commands.c 30 Apr 2002 23:28:25 -0000 1.3 +++ flash-commands.c 24 Jan 2003 09:39:20 -0000 1.4 @@ -50,17 +50,21 @@ if(strncmp(s, "blob", 5) == 0) { *addr = (u32 *)BLOB_FLASH_BASE; *length = BLOB_FLASH_LEN; -#ifdef PARAM_START +#ifdef PARAM_FLASH_BASE } else if(strncmp(s, "param", 6) == 0) { *addr = (u32 *)PARAM_FLASH_BASE; *length = PARAM_FLASH_LEN; #endif +#ifdef KERNEL_FLASH_BASE } else if(strncmp(s, "kernel", 7) == 0) { *addr = (u32 *)KERNEL_FLASH_BASE; *length = KERNEL_FLASH_LEN; +#endif +#ifdef RAMDISK_FLASH_BASE } else if(strncmp(s, "ramdisk", 8) == 0) { *addr = (u32 *)RAMDISK_FLASH_BASE; *length = RAMDISK_FLASH_LEN; +#endif } else { return -EINVAL; } Index: load_kernel.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/load_kernel.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- load_kernel.c 9 Jan 2003 01:40:25 -0000 1.12 +++ load_kernel.c 24 Jan 2003 09:39:20 -0000 1.13 @@ -114,10 +114,16 @@ } if (!loader) { +#if defined(KERNEL_FLASH_BASE) + /* if we have an old-style kernel partition, try that */ eprintf("Unable to find kernel, loading raw data " "and hoping for the best!\n"); size = KERNEL_FLASH_LEN; MyMemCpy((u32 *)KERNEL_RAM_BASE, (u32 *)KERNEL_FLASH_BASE, size >> 2); +#else + eprintf("Unable to find kernel"); + return EINVAL; +#endif } else { printf("Loading kernel from %s ...", loader->name); if ((size = loader->load_kernel((u32 *)KERNEL_RAM_BASE, |
From: Christopher H. <ch...@us...> - 2003-01-24 09:31:54
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv18459/src/blob Modified Files: linux.c Log Message: only add initrd and ramdisk tags when a ramdisk has been loaded Index: linux.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/linux.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- linux.c 25 May 2002 14:45:02 -0000 1.15 +++ linux.c 24 Jan 2003 09:31:42 -0000 1.16 @@ -57,8 +57,10 @@ setup_start_tag(); setup_memory_tags(); setup_commandline_tag(argc, argv); - setup_initrd_tag(); - setup_ramdisk_tag(); + if (blob_status.load_ramdisk) { + setup_initrd_tag(); + setup_ramdisk_tag(); + } setup_end_tag(); /* we assume that the kernel is in place */ |
From: Christopher H. <ch...@us...> - 2003-01-24 09:29:13
|
Update of /cvsroot/blob/blob/include/blob/arch In directory sc8-pr-cvs1:/tmp/cvs-serv16727/include/blob/arch Modified Files: badge4.h Log Message: tweak badge4 params to deal with loading kernel from jffs2 root fs Index: badge4.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/badge4.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- badge4.h 9 Jan 2003 01:47:49 -0000 1.12 +++ badge4.h 24 Jan 2003 09:29:05 -0000 1.13 @@ -98,22 +98,19 @@ #define BLOB_FLASH_LEN (0x00002000 * 6) #define PARAM_FLASH_BASE (BLOB_FLASH_BASE + BLOB_FLASH_LEN) #define PARAM_FLASH_LEN (0x00002000 * 2) -#define KERNEL_FLASH_BASE (PARAM_FLASH_BASE + PARAM_FLASH_LEN) -#define KERNEL_FLASH_LEN (0x00010000 * 16) -#define LOAD_RAMDISK 0 /* load ramdisk into ram */ -#define RAMDISK_FLASH_BASE (KERNEL_FLASH_BASE + KERNEL_FLASH_LEN) -#define RAMDISK_FLASH_LEN (0x00010000 * 47) - +#define RAMDISK_FLASH_BASE (PARAM_FLASH_BASE + PARAM_FLASH_LEN) +#define RAMDISK_FLASH_LEN (0x00010000 * 63) #define PARAM_START PARAM_FLASH_BASE #define PARAM_LEN PARAM_FLASH_LEN -/* the position of the kernel boot parameters */ -#define BOOT_PARAMS (0xc0000100) +#define LOAD_RAMDISK 0 +#define RAMDISK_SIZE (4 * 1024) +#define KERNEL_FLASH_LEN (2 * 1024 * 1024) /* limit for download */ -/* the size (in kbytes) to which the compressed ramdisk expands */ -#define RAMDISK_SIZE (8 * 1024) +/* the position of the kernel boot parameters */ +#define BOOT_PARAMS (0xc0000100) /* Memory configuration */ |
From: Christopher H. <ch...@us...> - 2003-01-24 09:27:59
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv15756/src/blob Modified Files: badge4.c Log Message: use cfi query for flash descriptors; adjust default part table to reflect actual flash size Index: badge4.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/badge4.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- badge4.c 9 Jan 2003 01:47:50 -0000 1.12 +++ badge4.c 24 Jan 2003 09:27:56 -0000 1.13 @@ -55,37 +55,22 @@ private: &badge4_i2c_bus_gpio_private }; -/* flash descriptor for BadgePAD 4 flash */ -/* 1 x Intel 28F320C3BA100 Advanced+ Boot Block Flash (32 Mbit) */ -/* http://developer.intel.com/design/flcomp/datashts/29064512.pdf */ +/* flash descriptors for BadgePAD 4 flash */ static const flash_descriptor_t badge4_flash_descriptors[] = -{ - { - /* Eight 4 KW Parameter Bottom Blocks (64K bytes) */ - size: 2 * 4 * 1024, /* 8 KiB */ - num: 8, - lockable: 1 - }, - { - /* Sixty three 32 KW Main Blocks (4032K bytes) */ - size: 2 * 32 * 1024, /* 64 KiB */ - num: 63, - lockable: 1 - }, - { - /* NULL block */ - }, -}; + QUERY_FLASH_FOR_DESCRIPTORS(0); + /* default partition table for BadgePAD 4 */ -static const blob_partition_t badge4_default_partition_table[] = { +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: 4 * 1024 * 1024 /* total size of the flash */ + magic: BLOB_DEFAULT_PART_TABLE_MAGIC, + next: sizeof(blob_partition_t), + offset: 0x00000000, /* absolute base address */ + size: -1 /* filled in later */ }, +#define PART_BLOB 1 { /* blob itself */ magic: BLOB_PART_VALID_MAGIC, @@ -95,6 +80,7 @@ name: "blob", mem_base: BLOB_RAM_BASE }, +#define PART_PARAM 2 { /* parameter block */ magic: BLOB_PART_VALID_MAGIC, @@ -102,52 +88,46 @@ offset: PARAM_FLASH_BASE, size: PARAM_FLASH_LEN, name: "parameters", - flags: BLOB_PART_FLAG_PTABLE - }, -#if 0 - { - /* kernel */ - magic: BLOB_PART_VALID_MAGIC, - next: sizeof(blob_partition_t), - offset: KERNEL_FLASH_BASE, - size: KERNEL_FLASH_LEN, - name: "kernel", - flags: BLOB_PART_FLAG_LOAD | BLOB_PART_FLAG_EXEC, - mem_base: KERNEL_RAM_BASE, - entry_point: KERNEL_RAM_BASE }, -#endif +#define PART_ROOT 3 { /* root */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: RAMDISK_FLASH_BASE, - size: RAMDISK_FLASH_LEN, + size: -1, /* filled in later */ name: "root", flags: BLOB_PART_FLAG_JFFS2 }, +#define PART_LAST 4 { /* last entry */ - magic: BLOB_PART_LAST_MAGIC + magic: BLOB_PART_LAST_MAGIC } }; - - static void badge4_set_partition_table(void) { - /* the default partition table */ + /* 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 - * put the pointer at 0x0000000 and let the partition table + * point to the flash and let the partition table * parser figure out. */ flash_partition_table = (blob_partition_t*)0x00000000; } - -__initlist(badge4_set_partition_table, INIT_LEVEL_OTHER_STUFF); +__initlist(badge4_set_partition_table, INIT_LEVEL_OTHER_STUFF + 1); static void badge4_select_drivers(void) @@ -155,8 +135,8 @@ reboot_driver = &sa11x0_reboot_driver; serial_driver = &sa11x0_serial_driver; - flash_descriptors = badge4_flash_descriptors; flash_driver = &intel16_flash_driver; + flash_descriptors = badge4_flash_descriptors; } __initlist(badge4_select_drivers, INIT_LEVEL_DRIVER_SELECTION); @@ -257,7 +237,7 @@ size += (4<<i); size *= module_rows; - printf("SDRAM: %d Mbytes (rows=%d, row bits=%d, col bits=%d)\n", + printf("SDRAM: %d MiB (rows=%d, row bits=%d, col bits=%d)\n", size, module_rows, row_bits, col_bits); /* |
From: Christopher H. <ch...@us...> - 2003-01-24 09:26:07
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv14402/include/blob Modified Files: flash.h Log Message: add (optional) support for cfi query to build flash descriptors automagically; implemented for 16-bit wide intel parts Index: flash.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/flash.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- flash.h 9 May 2002 13:27:26 -0000 1.12 +++ flash.h 24 Jan 2003 09:26:02 -0000 1.13 @@ -42,7 +42,6 @@ int lockable; } flash_descriptor_t; - typedef int (*flash_erase_func_t)(u32 *); typedef int (*flash_write_func_t)(u32 *, const u32 *); typedef int (*flash_lock_block_func_t)(u32 *); @@ -50,7 +49,7 @@ typedef int (*flash_query_block_lock_func_t)(u32 *); typedef int (*flash_enable_vpp_func_t)(void); typedef int (*flash_disable_vpp_func_t)(void); - +typedef int (*flash_query_descriptors_func_t)(u32 *, flash_descriptor_t **out); typedef struct { /* the following functions should be implemented by all flash @@ -67,8 +66,10 @@ * functions unimplemented, blob will safely work around it */ flash_enable_vpp_func_t enable_vpp; flash_disable_vpp_func_t disable_vpp; -} flash_driver_t; + /* optional: determine the descriptors automagically */ + flash_query_descriptors_func_t query_descriptors; +} flash_driver_t; /* implemented flash drivers */ extern flash_driver_t amd32_flash_driver; @@ -78,9 +79,14 @@ /* should be filled out by the architecture dependent files */ -extern const flash_descriptor_t *flash_descriptors; extern flash_driver_t *flash_driver; +/* should be filled out by the architecture dependent files; can + * be set to QUERY_FLASH_FOR_DESCRIPTORS() if driver supports that */ +#define QUERY_FLASH_FOR_DESCRIPTORS(flash_addr) \ + { { .size = (u32) flash_addr, .num = -1 } } +extern const flash_descriptor_t *flash_descriptors; + /* flash data mangle functions */ u32 data_from_flash(u32 what); @@ -98,5 +104,13 @@ int flash_get_next_block_address(u32* addr, u32 current); int flash_get_block_size(u32 address); u32 flash_get_size( void ); + +/* CFI offsets ... useful to many flavors of flash */ +#define CFI_MANUF_CODE 0x00 +#define CFI_DEVICE_CODE 0x01 +#define CFI_DEVICE_SIZE_LG2 0x27 +#define CFI_ERASE_REGION_COUNT 0x2c +#define CFI_ERASE_REGION_XBLKS(n) (0x2d + 4 * (n)) +#define CFI_ERASE_REGION_XSIZE(n) (0x2f + 4 * (n)) #endif |
From: Christopher H. <ch...@us...> - 2003-01-24 09:26:06
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv14402/src/blob Modified Files: flash.c intel16.c Log Message: add (optional) support for cfi query to build flash descriptors automagically; implemented for 16-bit wide intel parts Index: flash.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/flash.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- flash.c 9 May 2002 13:27:05 -0000 1.18 +++ flash.c 24 Jan 2003 09:26:00 -0000 1.19 @@ -133,6 +133,27 @@ if(flash_driver->disable_vpp == NULL) flash_driver->disable_vpp = flash_dummy_ok; + if (flash_descriptors[0].num == -1) { + u32 *flashAddr = (u32 *) flash_descriptors[0].size; + flash_descriptor_t *d; + int rc; + + if (flash_driver->query_descriptors == 0) { + deprintf("driver does not support query_descriptors\n"); + flash_descriptors = 0; + return; + } + + rc = flash_driver->query_descriptors(flashAddr, &d); + if (rc) { + deprintf("driver failed to query flash for descriptors\n"); + flash_descriptors = 0; + return; + } + + flash_descriptors = d; + } + /* initialise flash blocks table */ num_flash_blocks = 0; Index: intel16.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/intel16.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- intel16.c 11 Mar 2002 22:06:55 -0000 1.6 +++ intel16.c 24 Jan 2003 09:26:01 -0000 1.7 @@ -31,6 +31,7 @@ #include <blob/util.h> #include <blob/serial.h> #include <blob/time.h> +#include <blob/debug.h> /* flash commands for a single 16 bit intel flash chip */ #define READ_ARRAY 0x000000FF @@ -39,6 +40,7 @@ #define PGM_SETUP 0x00000040 #define STATUS_READ 0x00000070 #define STATUS_CLEAR 0x00000050 +#define READ_QUERY 0x00000098 #define STATUS_READY 0x00000080 #define STATUS_ERASE_SUSP 0x00000040 @@ -324,11 +326,72 @@ } +/* automatic descriptor support */ + +#define MAX_AUTO_DESCRIPTORS 4 +static flash_descriptor_t auto_descriptors[MAX_AUTO_DESCRIPTORS + 1]; + +static int flash_query_descriptors_intel16(u32 *flashAddr, + flash_descriptor_t **out) +{ + u16 *addr = (u16 *) flashAddr; + int result, nregions, n; + + addr[0x55] = READ_QUERY; + barrier(); + + if (addr[0x10] != 'Q' && addr[0x11] != 'R' && addr[0x12] != 'Y') { + result = -EINVAL; + goto out; + } + + dprintf("intel16: manuf_code = %02X\n", addr[CFI_MANUF_CODE]); + dprintf("intel16: device code = %02X\n", addr[CFI_DEVICE_CODE]); + dprintf("intel16: device size = 2^%d bytes\n", addr[CFI_DEVICE_SIZE_LG2]); + + nregions = addr[CFI_ERASE_REGION_COUNT]; + +#define READ_U16LE(off) ((addr[(off)]) | (addr[(off) + 1]<<8)) + + for (n = 0; n < nregions && n < MAX_AUTO_DESCRIPTORS; n++) { + u32 xcount = READ_U16LE(CFI_ERASE_REGION_XBLKS(n)); + u32 count = xcount + 1; + u32 xsize = READ_U16LE(CFI_ERASE_REGION_XSIZE(n)); + u32 size = (xsize == 0) ? 128 : xsize * 256; + + dprintf("intel16: erase region #%d\n", n); + dprintf("intel16: count = %d\n", count); + dprintf("intel16: size = %d\n", size); + + auto_descriptors[n].size = size; + auto_descriptors[n].num = count; + auto_descriptors[n].lockable = 1; /* fix me */ + } + +#undef READ_U16LE + + auto_descriptors[n].size = 0; + auto_descriptors[n].num = 0; + + *out = auto_descriptors; + result = 0; + +out: + /* put flash back into Read Array mode */ + barrier(); + + *addr = READ_ARRAY; + barrier(); + + return result; +} + /* flash driver structure */ flash_driver_t intel16_flash_driver = { - erase: flash_erase_intel16, - write: flash_write_intel16, - lock_block: flash_lock_block_intel16, - unlock_block: flash_unlock_block_intel16, - query_block_lock: flash_query_block_lock_intel16 + .erase = flash_erase_intel16, + .write = flash_write_intel16, + .lock_block = flash_lock_block_intel16, + .unlock_block = flash_unlock_block_intel16, + .query_block_lock = flash_query_block_lock_intel16, + .query_descriptors = flash_query_descriptors_intel16 }; |
From: Russ D. <Rus...@as...> - 2003-01-15 21:25:20
|
On Wed, 2003-01-15 at 14:16, Georg Nikodym wrote: > All day I've been getting: > > cvs [update aborted]: connect to cvs.blob.sourceforge.net(66.35.250.207):2401 failed: Connection refused > > Do the powers that be know? check the sf status page, not only do they know, they caused it. Developer ssh access still works http://sourceforge.net/docman/display_doc.php?docid=2352&group_id=1#cvs -- Russ Dill <Rus...@as...> |
From: Georg N. <ge...@so...> - 2003-01-15 21:17:08
|
All day I've been getting: cvs [update aborted]: connect to cvs.blob.sourceforge.net(66.35.250.207):2401 failed: Connection refused Do the powers that be know? -g |
From: Russ D. <ru...@us...> - 2003-01-14 21:10:59
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv3122 Modified Files: jffs2.c Log Message: make jffs2 loader more error tolerant Index: jffs2.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/jffs2.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- jffs2.c 27 Apr 2002 07:32:40 -0000 1.4 +++ jffs2.c 14 Jan 2003 21:10:39 -0000 1.5 @@ -138,30 +138,37 @@ } /* decompress a page from the flash, first contains a linked list of references - * all the nodes of this file, sorted is decending order (newest first) */ -static int jffs2_uncompress_page(char *dest, struct data_strip *first, u32 page) + * all the nodes of this file, sorted is decending order (newest first). Return + * the number of total bytes decompressed (not accurate, because some strips + * overlap, but at least we know we decompressed something) */ +static long jffs2_uncompress_page(char *dest, struct data_strip *first, u32 page) { int i; + long uncompressed = 0; char *src; /* look for the next reference to this page */ - for (; first && first->page != page; first = first->next); - if (!first) return 1; - - /* if we aren't covering what's behind us, uncompress that first */ + for (; first; first = first->next) { + /* This might be a page to uncompress, check that its the right + * page, and that the crc matches */ + if (first->page == page) { + src = ((char *) first->inode) + + sizeof(struct jffs2_raw_inode); + if (first->inode->data_crc == + crc32(0, src, first->inode->csize)) break; + } + } + + /* reached the end of the list without finding any pages */ + if (!first) return 0; + + /* if we aren't covering what's behind us, uncompress that first. + * Note: if the resulting doesn't quite fill the order, we are in + * trouble */ if (first->length != 4096) - if (!(jffs2_uncompress_page(dest, first->next, page))) - return 0; - + uncompressed = jffs2_uncompress_page(dest, first->next, page); dest += first->inode->offset; - src = ((char *) first->inode) + sizeof(struct jffs2_raw_inode); - - if (first->inode->data_crc != crc32(0, src, first->inode->csize)) { - printf("CRC Error!"); - return 0; - } - switch (first->inode->compr) { case JFFS2_COMPR_NONE: memcpy(dest, src, first->length); @@ -181,10 +188,10 @@ zlib_decompress(src, dest, first->inode->csize, first->length); break; default: - /* unknown */ - + /* unknown, attempt to ignore the page */ + return uncompressed; } - return 1; + return first->length + uncompressed; } static int jffs2_check_magic(struct part_info *part) @@ -255,7 +262,7 @@ for (page = 0; page <= size / 4096; page++) { /* Print a '.' every 0x40000 bytes */ if (!(page & 0x3F)) ldr_update_progress(); - if ((jffs2_uncompress_page((char *) dest, first, page)) <= 0) { + if (!jffs2_uncompress_page((char *) dest, first, page)) { UDEBUG("jffs2_uncompress_page failed on page 0x%lx\n", page); return 0; } @@ -357,7 +364,7 @@ } else pino = node->ino; - UDEBUG(" '%s' found at ino %ld\n", curr_name, pino); + UDEBUG(" '%s' found at ino %d\n", curr_name, pino); } while (name[i++] == '/'); return node; |
From: Erik M. <J.A...@it...> - 2003-01-10 20:25:56
|
On Wed, Jan 08, 2003 at 05:37:27PM -0700, Russ Dill wrote: > On Wed, 2003-01-08 at 17:25, Christopher Hoover wrote: > > However, the right thing seems to be to eradicate the #define'd > > RAMDISK_FLASH_BASE and KERNEL_FLASH_BASE partitions entirely, and > > instead rely on the new whizzy partition table support. Is someone > > working on that? > > ya, that would fix everything... I want to pick it up soon. Erik -- J.A.K. (Erik) Mouw Email: J.A...@it... mo...@nl... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Russ D. <Rus...@as...> - 2003-01-10 18:49:13
|
On Fri, 2003-01-10 at 05:12, raj rajesh kalagarla wrote: > Hi to all, > > iam compilng the blob-2.0.5-pre2 with options > ./configure --with-prefix =/usr/arm-linux/linux/linux/ > --with-board = assabet > (crosstool chain from handhelds.org zimage created correctly with > this) > when i compile this for assabet then it is giving fallowing dump hasn't this question now been asked 7 times in the past few hours? like rmk said, be patient, pounding lists like this really annoys people -- Russ Dill <Rus...@as...> |
From: raj r. k. <raj...@re...> - 2003-01-10 12:15:05
|
Hi to all, iam compilng the blob-2.0.5-pre2 with options ./configure --with-prefix =/usr/arm-linux/linux/linux/ --with-board = assabet (crosstool chain from handhelds.org zimage created correctly with this) when i compile this for assabet then it is giving fallowing dump -------------------- loading cache ./config.cache checking for a BSD compatible install... (cached) /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... (cached) yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... found checking whether to enable maintainer-specific portions of Makefiles... no checking host system type... i686-pc-linux-gnu checking for arm-linux-gcc... (cached) c89 checking for arm-linux-objcopy... (cached) objcopy checking for arm-linux-ranlib... (cached) ranlib checking for arm-linux-ar... (cached) ar checking for gcc... (cached) c89 checking whether the C compiler (c89 ) works... yes checking whether the C compiler (c89 ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether c89 accepts -g... (cached) yes checking for ranlib... (cached) ranlib checking for a BSD compatible install... /usr/bin/install -c checking whether ln -s works... (cached) yes checking target board... Delft University of Technology LART checking if the Linux source tree in /usr/arm-linux/linux/linux/ is sane... yes checking for inline... (cached) __inline__ checking for C flags to get more warnings... -Wall creating ./config.status creating Makefile creating doc/Makefile creating include/Makefile creating include/blob/Makefile creating include/blob/arch/Makefile creating src/Makefile creating src/blob/Makefile creating src/diag/Makefile creating src/lib/Makefile creating tools/Makefile creating utils/Makefile creating utils/build/Makefile creating utils/mkparamblock/Makefile creating include/blob/config.h include/blob/config.h is unchanged Configuration ------------------------------------------------------------------------ Target board Delft University of Technology LART C compiler c89 C flags -Os -I/usr/arm-linux/linux/linux//include -Wall -march=armv4 -mtune=strongarm1100 -fomit-frame-pointer -fno-builtin -mapcs-32 -nostdinc Linker flags -static -nostdlib Objcopy tool objcopy Objcopy flags -O binary -R .note -R .comment -S Clock scaling support no Memory test support no Debugging commands support no LCD support no MD5 support no Run-time debug information no ---------------- pl go a head with this dump any thing going wrong? when make in the same dir it is giving errors where i have to do make how can i create blob-start-elf32,blob-rest-elf32? ----------- Making all in doc make[1]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/doc' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/doc' Making all in tools make[1]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/tools' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/tools' Making all in utils make[1]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/utils' Making all in build make[2]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/utils/build' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/utils/build' Making all in mkparamblock make[2]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/utils/mkparamblock' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/utils/mkparamblock' make[2]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/utils' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/utils' make[1]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/utils' Making all in include make[1]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/include' Making all in blob make[2]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob' make all-recursive make[3]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob' Making all in arch make[4]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob/arch' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob/arch' make[4]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob' make[4]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob' make[3]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob' make[2]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/include/blob' make[2]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/include' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/include' make[1]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/include' Making all in src make[1]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/src' Making all in lib make[2]: Entering directory `/usr/arm-linux/blob-2.0.5-pre2/src/lib' c89 -DHAVE_CONFIG_H -I. -I. -I../../include/blob -I../../include -I../../include -Os -I/usr/arm-linux/linux/linux//include -Wall -march=armv4 -mtune=strongarm1100 -fomit-frame-pointer -fno-builtin -mapcs-32 -nostdinc -c command.c make[2]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/src/lib' make[1]: Leaving directory `/usr/arm-linux/blob-2.0.5-pre2/src' cc1: invaild option 'tune=strongarm1100' cc1: invalid option 'apcs-32' make[2]: *** [command.o] error 1 make[2]: *** [all_recursive] error 1 make: ***[all_recursive] error 1 ---------- what is going wrong in this? pl suggest me to proceed furher, reply soon pl.. Regards, Rajesh.k |
From: Christopher H. <ch...@us...> - 2003-01-09 01:47:52
|
Update of /cvsroot/blob/blob/include/blob/arch In directory sc8-pr-cvs1:/tmp/cvs-serv4430/include/blob/arch Modified Files: badge4.h Log Message: Add new-style partition table for BadgePAD 4 Index: badge4.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/badge4.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- badge4.h 26 Jul 2002 07:20:04 -0000 1.11 +++ badge4.h 9 Jan 2003 01:47:49 -0000 1.12 @@ -1,5 +1,5 @@ /* - * badge4.h: Badge4 specific defines + * badge4.h: BadgePAD 4 specific defines * * Copyright (C) 2001-2002 Hewlett-Packard Company * Written by Christopher Hoover <ch...@hp...> @@ -103,6 +103,7 @@ #define LOAD_RAMDISK 0 /* load ramdisk into ram */ #define RAMDISK_FLASH_BASE (KERNEL_FLASH_BASE + KERNEL_FLASH_LEN) #define RAMDISK_FLASH_LEN (0x00010000 * 47) + #define PARAM_START PARAM_FLASH_BASE #define PARAM_LEN PARAM_FLASH_LEN |
From: Christopher H. <ch...@us...> - 2003-01-09 01:47:52
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv4430/src/blob Modified Files: badge4.c Log Message: Add new-style partition table for BadgePAD 4 Index: badge4.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/badge4.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- badge4.c 4 Jan 2003 02:11:42 -0000 1.11 +++ badge4.c 9 Jan 2003 01:47:50 -0000 1.12 @@ -36,6 +36,7 @@ #include <blob/i2c.h> #include <blob/i2c-gpio.h> #include <blob/spd.h> +#include <blob/partition.h> #define DEBUG @@ -54,7 +55,7 @@ private: &badge4_i2c_bus_gpio_private }; -/* flash descriptor for Badge4 flash */ +/* flash descriptor for BadgePAD 4 flash */ /* 1 x Intel 28F320C3BA100 Advanced+ Boot Block Flash (32 Mbit) */ /* http://developer.intel.com/design/flcomp/datashts/29064512.pdf */ static const flash_descriptor_t badge4_flash_descriptors[] = @@ -75,6 +76,79 @@ /* NULL block */ }, }; + +/* default partition table for BadgePAD 4 */ +static const blob_partition_t badge4_default_partition_table[] = { + { + /* start of table */ + magic: BLOB_DEFAULT_PART_TABLE_MAGIC, + next: sizeof(blob_partition_t), + offset: 0x00000000, /* absolute base address */ + size: 4 * 1024 * 1024 /* total size of the flash */ + }, + { + /* blob itself */ + magic: BLOB_PART_VALID_MAGIC, + next: sizeof(blob_partition_t), + offset: BLOB_FLASH_BASE, + size: BLOB_FLASH_LEN, + name: "blob", + mem_base: BLOB_RAM_BASE + }, + { + /* parameter block */ + magic: BLOB_PART_VALID_MAGIC, + next: sizeof(blob_partition_t), + offset: PARAM_FLASH_BASE, + size: PARAM_FLASH_LEN, + name: "parameters", + flags: BLOB_PART_FLAG_PTABLE + }, +#if 0 + { + /* kernel */ + magic: BLOB_PART_VALID_MAGIC, + next: sizeof(blob_partition_t), + offset: KERNEL_FLASH_BASE, + size: KERNEL_FLASH_LEN, + name: "kernel", + flags: BLOB_PART_FLAG_LOAD | BLOB_PART_FLAG_EXEC, + mem_base: KERNEL_RAM_BASE, + entry_point: KERNEL_RAM_BASE + }, +#endif + { + /* root */ + magic: BLOB_PART_VALID_MAGIC, + next: sizeof(blob_partition_t), + offset: RAMDISK_FLASH_BASE, + size: RAMDISK_FLASH_LEN, + name: "root", + flags: BLOB_PART_FLAG_JFFS2 + }, + { + /* last entry */ + magic: BLOB_PART_LAST_MAGIC + } +}; + + + + +static void badge4_set_partition_table(void) +{ + /* the default partition table */ + default_partition_table = badge4_default_partition_table; + + /* we don't know where the flash partition table will live, so + * put the pointer at 0x0000000 and let the partition table + * parser figure out. + */ + flash_partition_table = (blob_partition_t*)0x00000000; +} + +__initlist(badge4_set_partition_table, INIT_LEVEL_OTHER_STUFF); + static void badge4_select_drivers(void) { |
From: Christopher H. <ch...@us...> - 2003-01-09 01:41:24
|
Update of /cvsroot/blob/blob/utils/test In directory sc8-pr-cvs1:/tmp/cvs-serv3104 Modified Files: load_kernel_test.c Log Message: Look for cramfs/jffs2 filesystems at RAMDISK_FLASH_BASE and for zImage's at KERNEL_FLASH_BASE. All loader flavors can co-exist peacefully now; search order is as before. This is an interim solution until the new partition code is fully integrated. Index: load_kernel_test.c =================================================================== RCS file: /cvsroot/blob/blob/utils/test/load_kernel_test.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- load_kernel_test.c 27 Apr 2002 07:32:40 -0000 1.4 +++ load_kernel_test.c 9 Jan 2003 01:41:21 -0000 1.5 @@ -13,6 +13,7 @@ char *out; FILE *fp; struct stat st; + const struct kernel_loader *loader; struct part_info part; int i; unsigned long size = 0; @@ -45,15 +46,22 @@ printf("flash emulation region is 0x%x bytes\n", part.size); - for (i = 0; loader[i]; i++) - if (loader[i]->check_magic(&part)) + for (i = 0; /**/ ; i++) { + loader = hash_defined_part_table[i].loader; + + if (!loader) break; - if (!loader[i]) { + + if (loader->check_magic(&part)) + break; + } + + if (!loader) { printf("unable to find magic\n"); } else { printf("loading kernel from "); - printf(loader[i]->name); - if ((size = loader[i]->load_kernel((u32 *) out, &part, argv[2])) == 0) { + printf(loader->name); + if ((size = loader->load_kernel((u32 *) out, &part, argv[2])) == 0) { printf(" error loading kernel \"%s\"!\n", argv[2]); return 0; } |
From: Christopher H. <ch...@us...> - 2003-01-09 01:41:07
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv3046 Modified Files: load_kernel.h Log Message: Look for cramfs/jffs2 filesystems at RAMDISK_FLASH_BASE and for zImage's at KERNEL_FLASH_BASE. All loader flavors can co-exist peacefully now; search order is as before. This is an interim solution until the new partition code is fully integrated. Index: load_kernel.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/load_kernel.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- load_kernel.h 27 Apr 2002 10:26:49 -0000 1.6 +++ load_kernel.h 9 Jan 2003 01:41:04 -0000 1.7 @@ -59,7 +59,13 @@ char *name; }; -extern const struct kernel_loader *loader[]; +/* this will go away once we integrate the new partition code */ +struct hash_defined_partition { + const struct kernel_loader *loader; + char *offset; + u32 size; +}; +extern struct hash_defined_partition hash_defined_part_table[]; #ifndef USER_SPACE_TEST /* this is a large area of ram for the loaders to use as a scratchpad */ |
From: Christopher H. <ch...@us...> - 2003-01-09 01:40:28
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv2905 Modified Files: load_kernel.c Log Message: Look for cramfs/jffs2 filesystems at RAMDISK_FLASH_BASE and for zImage's at KERNEL_FLASH_BASE. All loader flavors can co-exist peacefully now; search order is as before. This is an interim solution until the new partition code is fully integrated. Index: load_kernel.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/load_kernel.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- load_kernel.c 9 Jan 2003 00:40:05 -0000 1.11 +++ load_kernel.c 9 Jan 2003 01:40:25 -0000 1.12 @@ -52,21 +52,39 @@ #define FODDER_RAM_BASE (0xC0F00000) +const void *fodder_ram_base = (void *) FODDER_RAM_BASE; -const struct kernel_loader *loader[] = { + +/* this will go away once we integrate the new partition code */ +struct hash_defined_partition hash_defined_part_table[] = { #ifdef CONFIG_CRAMFS_SUPPORT - &cramfs_load, + { + .loader = &cramfs_load, + .offset = (char *) RAMDISK_FLASH_BASE, + .size = RAMDISK_FLASH_LEN + }, #endif #ifdef CONFIG_ZIMAGE_SUPPORT - &zImage_load, + { + .loader = &zImage_load, + .offset = (char *) KERNEL_FLASH_BASE, + .size = KERNEL_FLASH_LEN + }, #endif #ifdef CONFIG_JFFS2_SUPPORT - &jffs2_load, + { + .loader = &jffs2_load, + .offset = (char *) RAMDISK_FLASH_BASE, + .size = RAMDISK_FLASH_LEN + }, #endif - NULL + { + .loader = 0, + .offset = 0, + .size = 0 + } }; -const void *fodder_ram_base = (void *) FODDER_RAM_BASE; /* function calls for blob */ void ldr_update_progress(void) @@ -78,29 +96,32 @@ { int i; u32 size; + const struct kernel_loader *loader; struct part_info part; -#if defined(CONFIG_CRAMFS_SUPPORT) || defined(CONFIG_JFFS2_SUPPORT) - part.offset = (char *) RAMDISK_FLASH_BASE; - part.size = RAMDISK_FLASH_LEN; -#else - part.offset = (char *) KERNEL_FLASH_BASE; - part.size = KERNEL_FLASH_LEN; -#endif - part.erasesize = flash_get_block_size((u32)part.offset); + for (i = 0; /**/ ; i++) { + loader = hash_defined_part_table[i].loader; - for (i = 0; loader[i] && !loader[i]->check_magic(&part); i++) - ; + if (!loader) + break; + + part.offset = hash_defined_part_table[i].offset; + part.size = hash_defined_part_table[i].size; + part.erasesize = flash_get_block_size((u32)part.offset); - if (!loader[i]) { + if (loader->check_magic(&part)) + break; + } + + if (!loader) { eprintf("Unable to find kernel, loading raw data " "and hoping for the best!\n"); size = KERNEL_FLASH_LEN; MyMemCpy((u32 *)KERNEL_RAM_BASE, (u32 *)KERNEL_FLASH_BASE, size >> 2); } else { - printf("Loading kernel from %s ...", loader[i]->name); - if ((size = loader[i]->load_kernel((u32 *)KERNEL_RAM_BASE, - &part, "/boot/linux")) == 0) { + printf("Loading kernel from %s ...", loader->name); + if ((size = loader->load_kernel((u32 *)KERNEL_RAM_BASE, + &part, "/boot/linux")) == 0) { eprintf("error loading kernel!\n"); return(EINVAL); } |
From: Christopher H. <ch...@us...> - 2003-01-09 00:40:09
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv20678 Modified Files: load_kernel.c Log Message: Consistify case. Most blob messages start with a capital letter. Index: load_kernel.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/load_kernel.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- load_kernel.c 9 Jan 2003 00:13:30 -0000 1.10 +++ load_kernel.c 9 Jan 2003 00:40:05 -0000 1.11 @@ -93,12 +93,12 @@ ; if (!loader[i]) { - eprintf("unable to find kernel, loading raw data " + eprintf("Unable to find kernel, loading raw data " "and hoping for the best!\n"); size = KERNEL_FLASH_LEN; MyMemCpy((u32 *)KERNEL_RAM_BASE, (u32 *)KERNEL_FLASH_BASE, size >> 2); } else { - printf("loading kernel from %s ...", loader[i]->name); + printf("Loading kernel from %s ...", loader[i]->name); if ((size = loader[i]->load_kernel((u32 *)KERNEL_RAM_BASE, &part, "/boot/linux")) == 0) { eprintf("error loading kernel!\n"); |
From: Russ D. <Rus...@as...> - 2003-01-09 00:37:16
|
On Wed, 2003-01-08 at 17:25, Christopher Hoover wrote: > BTW, this fix makes CONFIG_ZIMAGE_SUPPORT work, unless > CONFIG_{CRAMFS,JFFS2}_SUPPORT is defined -- the magic check/load loop > needs to look for zImages at KERNEL_FLASH_BASE and cramfs/jffs2 at > KERNEL_FLASH_BASE. The fix is trivial. That would kindof break my board, where I have two cramfs images, both with a zImage > However, the right thing seems to be to eradicate the #define'd > RAMDISK_FLASH_BASE and KERNEL_FLASH_BASE partitions entirely, and > instead rely on the new whizzy partition table support. Is someone > working on that? ya, that would fix everything... -- Russ Dill <Rus...@as...> |
From: Christopher H. <ch...@mu...> - 2003-01-09 00:25:46
|
BTW, this fix makes CONFIG_ZIMAGE_SUPPORT work, unless CONFIG_{CRAMFS,JFFS2}_SUPPORT is defined -- the magic check/load loop needs to look for zImages at KERNEL_FLASH_BASE and cramfs/jffs2 at KERNEL_FLASH_BASE. The fix is trivial. However, the right thing seems to be to eradicate the #define'd RAMDISK_FLASH_BASE and KERNEL_FLASH_BASE partitions entirely, and instead rely on the new whizzy partition table support. Is someone working on that? Cheers, -ch -----Original Message----- From: blo...@li... [mailto:blo...@li...] On Behalf Of Christopher Hoover Sent: Wednesday, January 08, 2003 4:14 PM To: blo...@li... Subject: CVS: blob/src/blob load_kernel.c,1.9,1.10 Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv13084 Modified Files: load_kernel.c Log Message: Look for a zImage at KERNEL_FLASH_BASE, not RAMDISK_FLASH_BASE. Index: load_kernel.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/load_kernel.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- load_kernel.c 9 May 2002 13:26:21 -0000 1.9 +++ load_kernel.c 9 Jan 2003 00:13:30 -0000 1.10 @@ -80,7 +80,7 @@ u32 size; struct part_info part; -#if defined(CONFIG_CRAMFS_SUPPORT) || defined(CONFIG_ZIMAGE_SUPPORT) || defined(CONFIG_JFFS2_SUPPORT) +#if defined(CONFIG_CRAMFS_SUPPORT) || defined(CONFIG_JFFS2_SUPPORT) part.offset = (char *) RAMDISK_FLASH_BASE; part.size = RAMDISK_FLASH_LEN; #else ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ blob-cvs-commit mailing list blo...@li... https://lists.sourceforge.net/lists/listinfo/blob-cvs-commit |
From: Christopher H. <ch...@us...> - 2003-01-09 00:13:33
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv13084 Modified Files: load_kernel.c Log Message: Look for a zImage at KERNEL_FLASH_BASE, not RAMDISK_FLASH_BASE. Index: load_kernel.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/load_kernel.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- load_kernel.c 9 May 2002 13:26:21 -0000 1.9 +++ load_kernel.c 9 Jan 2003 00:13:30 -0000 1.10 @@ -80,7 +80,7 @@ u32 size; struct part_info part; -#if defined(CONFIG_CRAMFS_SUPPORT) || defined(CONFIG_ZIMAGE_SUPPORT) || defined(CONFIG_JFFS2_SUPPORT) +#if defined(CONFIG_CRAMFS_SUPPORT) || defined(CONFIG_JFFS2_SUPPORT) part.offset = (char *) RAMDISK_FLASH_BASE; part.size = RAMDISK_FLASH_LEN; #else |