grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/7] Initial support for U-Boot platforms


From: Leif Lindholm
Subject: Re: [PATCH 3/7] Initial support for U-Boot platforms
Date: Tue, 9 Apr 2013 10:37:52 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

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.
 
> === 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]