[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/7] Initial support for U-Boot platforms
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH 3/7] Initial support for U-Boot platforms |
Date: |
Tue, 09 Apr 2013 13:29:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 |
On 09.04.2013 12:37, Leif Lindholm wrote:
> On Mon, Apr 08, 2013 at 12:49:18PM +0200, Vladimir '??-coder/phcoder'
> Serbinenko wrote:
>> On 03.04.2013 18:17, Leif Lindholm wrote:
>>
>>>>> + disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
>>>>>
>>>>> Is there any way to get size from uboot?
>>> Not that I've found. As in, not that can be relied on.
>>>
>>
>> di_stor.block_count works perfectly on my raspberry pi.
>> Any reason not to use it?
>
> I did at one point have a platform reporting 0 here, but otherwise
> functioning. This may have been platform initialisation issues though,
> and something that you may consider should be resolved there rather than
> dealt with in GRUB. I'm OK to include this.
>
That's surely a U-Boot bug but we're accustomed to workarounding
firmware bugs. I'm OK with special-casing 0.
>> === modified file 'grub-core/disk/uboot/ubootdisk.c'
>> --- grub-core/disk/uboot/ubootdisk.c 2013-04-07 00:41:07 +0000
>> +++ grub-core/disk/uboot/ubootdisk.c 2013-04-08 08:34:08 +0000
>> @@ -246,7 +246,7 @@
>> grub_dprintf ("ubootdisk", "(%s) blocksize=%d, log_sector_size=%d\n",
>> disk->name, d->block_size, disk->log_sector_size);
>>
>> - disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
>> + disk->total_sectors = devinfo->di_stor.block_count;
>> disk->data = d;
>>
>> return GRUB_ERR_NONE;
>
> /
> Leif
>
signature.asc
Description: OpenPGP digital signature