Again, nice work!
I am a silent watcher at the moment since i can't help with this.
I am happy to hear it when there is something i can help you with.
Mijzelf wrote:Don't think so. This is about string parsing.
I think your Lacie sources are an 'in between' version, with half implemented 64 bit support. The mixed up 'll' and 'q' prefixes also suggest that.
Concur. But the end of partition 8 doesn't fit in an 32 bits value, so that cannot be read well.
It's the lower significant 32 bits part of the 'real' value: 1565565872 decimal = 5D50A3B0 hex.
If I add the higher significant 32 bits, this becomes 000000015D50A3B0, which is 5860533168 decimal, which boils down to 3000592982016 bytes. Know that value?
I think the values are 32 bits values, when LBA64 disabled, so you could just change %llX in %lX, and get the right values. It is a lbaint_t type, I suppose (lba integer type)
- Code: Select all
#ifdef CFG_64BIT_LBA
typedef uint64_t lbaint_t;
<snip>
#else
typedef ulong lbaint_t;
<snip>
#endif
/*
* Problems with CONFIG_SYS_64BIT_LBA:
*
* struct disk_partition.start in include/part.h is sized as ulong.
* When CONFIG_SYS_64BIT_LBA is activated, lbaint_t changes from ulong to uint64_t.
* For now, it is cast back to ulong at assignment.
*
* This limits the maximum size of addressable storage to < 2 Terra Bytes
*/
int get_partition_info_efi(block_dev_desc_t * dev_desc, int part,
disk_partition_t * info)
{
gpt_header gpt_head;
gpt_entry **pgpt_pte = NULL;
/* "part" argument must be at least 1 */
if (!dev_desc || !info || part < 1) {
printf("%s: Invalid Argument(s)\n", __FUNCTION__);
return -1;
}
/* This function validates AND fills in the GPT header and PTE */
if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
&(gpt_head), pgpt_pte) != 1) {
printf("%s: *** ERROR: Invalid GPT ***\n", __FUNCTION__);
return -1;
}
/* The ulong casting limits the maximum disk size to 2 TB */
info->start = (ulong) le64_to_int((*pgpt_pte)[part - 1].starting_lba);
/* The ending LBA is inclusive, to calculate size, add 1 to it */
info->size = ((ulong)le64_to_int((*pgpt_pte)[part - 1].ending_lba) + 1)
- info->start;
info->blksz = GPT_BLOCK_SIZE;
sprintf((char *)info->name, "%s%d", GPT_ENTRY_NAME, part);
minibike12 wrote:Again, nice work!
I am a silent watcher at the moment since i can't help with this.
I am happy to hear it when there is something i can help you with.
minibike12 wrote:Ok nice.
Prepair disk with gdisk and UIMAGE 59?
And flash the new U-boot the same way as previous 1.3.9?
Users browsing this forum: No registered users and 12 guests