All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 3/7] Initial support for U-Boot platforms
Date: Tue, 09 Apr 2013 13:29:38 +0200	[thread overview]
Message-ID: <5163FBA2.7060501@gmail.com> (raw)
In-Reply-To: <20130409103752.GW23069@rocoto.smurfnet.nu>

[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]

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
> 




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2013-04-09 11:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-24 17:01 [PATCH 3/7] Initial support for U-Boot platforms Leif Lindholm
2013-03-30 16:20 ` Francesco Lavra
2013-03-30 16:43   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-03 16:24   ` Leif Lindholm
2013-04-03 18:05     ` Lennart Sorensen
2013-04-03 19:59       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-01  2:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-03 16:17   ` Leif Lindholm
2013-04-08 10:49     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-09 10:37       ` Leif Lindholm
2013-04-09 11:29         ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-05-02 19:25   ` Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5163FBA2.7060501@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=leif.lindholm@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.