From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UPWkH-0003Lq-Bs for mharc-grub-devel@gnu.org; Tue, 09 Apr 2013 07:29:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPWkE-0003Lk-Ph for grub-devel@gnu.org; Tue, 09 Apr 2013 07:29:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPWk9-0002K8-Ka for grub-devel@gnu.org; Tue, 09 Apr 2013 07:29:46 -0400 Received: from mail-ee0-f51.google.com ([74.125.83.51]:59989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPWk9-0002Jp-EW for grub-devel@gnu.org; Tue, 09 Apr 2013 07:29:41 -0400 Received: by mail-ee0-f51.google.com with SMTP id c4so2772738eek.38 for ; Tue, 09 Apr 2013 04:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type; bh=t/Ree6lw9fKYf0Yq+NmXXupMzxqBkOWmHZ+q92Rd4Mk=; b=MJSNKa8zIz4R9/MWEgf23GOQbz8oV8KFtkJYpH2AT5jjBSwufud0lFNeNjAEPBQzBv RX/OW5nQWHROJLsAxBMfvItwO+HfYwQ5AN5yVpRt0mzuBLiNtq9/n57qqeyusMt4wE3S 3yzJOlZndEhhCenDFhr+AFeuNtoDuu8hi9bHOHrlepOw16qXv/nuBKxgTYx5RCZ5rRXd 4c01Asbna0uLLUqCl1TEvOq28ZiK7QigKEIjHhD0qrdNpa1V4o55He8I4lJGJ7lW0pPr CFQxo/WWC+3/FDRJ6smfCLmt9TfwTD6OWOFN0Zve5kw3wfhk5+Xnj3XlG5MDUurpOaeD 8p0w== X-Received: by 10.15.36.2 with SMTP id h2mr202224eev.2.1365506980391; Tue, 09 Apr 2013 04:29:40 -0700 (PDT) Received: from debian.x201.phnet (245-188.1-85.cust.bluewin.ch. [85.1.188.245]) by mx.google.com with ESMTPS id b5sm5713486eew.16.2013.04.09.04.29.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 04:29:39 -0700 (PDT) Message-ID: <5163FBA2.7060501@gmail.com> Date: Tue, 09 Apr 2013 13:29:38 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Leif Lindholm Subject: Re: [PATCH 3/7] Initial support for U-Boot platforms References: <5158EC3B.8050504@gmail.com> <20130403161722.GJ23069@rocoto.smurfnet.nu> <5162A0AE.5040909@gmail.com> <20130409103752.GW23069@rocoto.smurfnet.nu> In-Reply-To: <20130409103752.GW23069@rocoto.smurfnet.nu> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig00F3AC8F43FE431421AEFE7A" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.83.51 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 11:29:48 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig00F3AC8F43FE431421AEFE7A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09.04.2013 12:37, Leif Lindholm wrote: > On Mon, Apr 08, 2013 at 12:49:18PM +0200, Vladimir '??-coder/phcoder' S= erbinenko wrote: >> On 03.04.2013 18:17, Leif Lindholm wrote: >> >>>>> + disk->total_sectors =3D 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. >>> =20 >> >> di_stor.block_count works perfectly on my raspberry pi. >> Any reason not to use it? >=20 > 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 tha= n > dealt with in GRUB. I'm OK to include this. > =20 That's surely a U-Boot bug but we're accustomed to workarounding firmware bugs. I'm OK with special-casing 0. >> =3D=3D=3D 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=3D%d, log_sector_size=3D= %d\n", >> disk->name, d->block_size, disk->log_sector_size); >> =20 >> - disk->total_sectors =3D GRUB_DISK_SIZE_UNKNOWN; >> + disk->total_sectors =3D devinfo->di_stor.block_count; >> disk->data =3D d; >> =20 >> return GRUB_ERR_NONE; >=20 > / > Leif >=20 --------------enig00F3AC8F43FE431421AEFE7A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlFj+6IACgkQNak7dOguQglLkwEAg38CwOST/cT2KjpSCcN3b9yo b/U9OSssUAlh0Beh+FAA/AiyTAbZCQlZdiRk9cU+ZDIYMjaGL2l5dBfUQWIKp9M7 =Pqed -----END PGP SIGNATURE----- --------------enig00F3AC8F43FE431421AEFE7A--