Changeset 464

Show
Ignore:
Timestamp:
11/05/09 09:17:04 (3 weeks ago)
Author:
goskab
Message:

Pulled in some more advanced partition detection

Because of some problems we have had with loading u-boot from SD cards
the partitioning scheme has been updated to now use the same routines as
u-boot. This means we have dynamic partition detection in x-loader. The
biggest thing that this fixes is the "could not read boot sector" error
message that occurs (seemingly at random) and stops devices from
properly being flashed. A little more testing should be done, but it
seems very promising.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/software/x-load/disk/Makefile

    r27 r464  
    2828LIB     = libdisk.a 
    2929 
    30 OBJS    = part.o 
     30OBJS    = part.o part_dos.o 
    3131 
    3232all:    $(LIB) 
  • trunk/software/x-load/disk/part.c

    r27 r464  
    3939     (CONFIG_COMMANDS & CFG_CMD_USB)    || \ 
    4040     defined(CONFIG_MMC) || \ 
     41         defined(CFG_CMD_MMC) || \ 
    4142     defined(CONFIG_SYSTEMACE) ) 
    4243 
     
    125126     (CONFIG_COMMANDS & CFG_CMD_USB)    || \ 
    126127     (CONFIG_COMMANDS & CFG_CMD_MMC)    || \ 
    127      defined(CONFIG_SYSTEMACE)          ) 
     128     defined(CONFIG_SYSTEMACE)          || \ 
     129         defined(CFG_CMD_MMC)                           ) 
    128130 
    129131#if defined(CONFIG_MAC_PARTITION) || \ 
  • trunk/software/x-load/fs/fat/fat.c

    r27 r464  
    5252#define DOS_PART_TBL_OFFSET     0x1be 
    5353#define DOS_PART_MAGIC_OFFSET   0x1fe 
    54 #define DOS_FS_TYPE_OFFSET      0x52 
     54#define DOS_FS_TYPE_OFFSET      0x36 
    5555 
    5656int strncmp(const char * cs,const char * ct,size_t count) 
     
    135135        else { 
    136136#if (CONFIG_COMMANDS & CFG_CMD_IDE) || (CONFIG_COMMANDS & CFG_CMD_SCSI) || \ 
    137     (CONFIG_COMMANDS & CFG_CMD_USB) || (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_SYSTEMACE) 
     137    (CONFIG_COMMANDS & CFG_CMD_USB) || (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_SYSTEMACE) || defined(CFG_CMD_MMC) 
    138138                disk_partition_t info; 
    139139                if(!get_partition_info(dev_desc, part_no, &info)) { 
     
    151151                 * purpose the libpart must be included. 
    152152                 */ 
    153                 part_offset=63
     153                part_offset=32
    154154                //part_offset=0; 
    155155                cur_part = 1; 
     
    604604        volume_info *vistart; 
    605605 
    606         printf("Reading boot sector\n"); 
    607  
    608606        if (disk_read(0, 1, block) < 0) { 
    609607                FAT_DPRINT("Error: reading block\n"); 
     
    640638           is ok - it's just the buffer. */ 
    641639        vistart->fs_type[8] = '\0'; 
    642  
     640         
    643641        if (*fatsize == 32) { 
    644642                if (compare_sign(FAT32_SIGN, vistart->fs_type) == 0) { 
  • trunk/software/x-load/include/configs/omap3530oswald.h

    r100 r464  
    4545/* Enable the below macro if MMC boot support is required */ 
    4646#define CONFIG_MMC      1 
    47 #if defined(CONFIG_MMC) 
    48         #define CFG_CMD_MMC             1 
    49         #define CFG_CMD_FAT             1 
    50         #define CFG_I2C_SPEED           100000 
    51         #define CFG_I2C_SLAVE           1 
    52         #define CFG_I2C_BUS             0 
    53         #define CFG_I2C_BUS_SELECT      1 
    54         #define CONFIG_DRIVER_OMAP34XX_I2C 1 
    55 #endif 
     47#define CFG_CMD_MMC             1 
     48#define CFG_CMD_FAT             1 
     49#define CFG_I2C_SPEED           100000 
     50#define CFG_I2C_SLAVE           1 
     51#define CFG_I2C_BUS             0 
     52#define CFG_I2C_BUS_SELECT      1 
     53#define CONFIG_DOS_PARTITION 1 
     54#define CONFIG_DRIVER_OMAP34XX_I2C 1 
    5655 
    5756#include <asm/arch/cpu.h>        /* get chip and board defs */