public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter A. Bigot <pab@pabigot.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] uboot env in mmc partition
Date: Wed, 03 Sep 2014 09:23:52 -0500	[thread overview]
Message-ID: <54072478.4020804@pabigot.com> (raw)
In-Reply-To: <OF6F4F7ACC.29A26012-ONC1257D48.004DFA77-C1257D48.004E3BDF@br-automation.com>

On 09/03/2014 09:14 AM, Hannes Petermaier wrote:
>> On 09/03/2014 07:54 AM, Naitik Amin wrote:
>>> Hi Hannes,
>>>
>>> So I did as you had indicated and made some progress, so now, my
> #defines
>>> look as below.
>>> #define CONFIG_SYS_MMC_ENV_DEV          0       /* device 0 */
>>> #define CONFIG_ENV_OFFSET               0x21900000
>>>
>>> I calculated the env offset from the block number it was on based on
> the
>>> first block number of the partition.
>>>
>>> Doing this on uboot startup, I dont get the warning saying, using
> default
>>> environment. Neither it complained abt crc error. So it liked it
> seems.
>>> But what it did is it trashed the partition which had my dtb and
> zImage.
>>> Its a completely different partition. So after that, the bootup gets
>>> halted. Any ideas ? What may have trashed the partition ?
>> Look at: http://www.mail-archive.com/u-boot at lists.denx.de/msg146396.html
>>
>> and see if that's relevant, specifically the second patch which restores
>> the mmc device offset calculations to the values that correspond to the
>> partition number that's represented in the device structure.
>>
>> Peter
> Hi Peter,
> i don't think that your patch has influence on this issue, due to no
> partition switching is done anymore.

That may be the case: I missed most of the previous discussion of this 
issue.  All I know is that if mmc->part_num is 0 when the MMC 
environment code is entered, then when it leaves the capacity and lba 
fields of the device are no longer correct.  So it'd seemed plausible 
that if mmc_switch_part were invoked somewhere when looking for an 
environment partition it could explain an anomaly with subsequent use of 
the device.

> Further i would like to check your patch series, i am not sure if there is
> everything ok.
> I will do so tommorow - i am right in thinking that you are using MMC not
> eMMC ?

There is eMMC on the BeagleBone I'm using, but it's been zeroed and is 
not used.  The problem arises in SPL mode on a uSD card with two 
partitions neither of which is an environment.  For full context see the 
meta-ti email thread referenced in the cover letter.

Peter

  reply	other threads:[~2014-09-03 14:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF169DD9B8.4FDAA4B7-ON85257D43.005ECECD-85257D43.005F598D@LocalDomain>
2014-08-29 19:06 ` [U-Boot] uboot env in mmc partition Naitik Amin
2014-09-01  4:54   ` Hannes Petermaier
2014-09-02 12:21     ` Naitik Amin
2014-09-03  5:13       ` Hannes Petermaier
2014-09-03 12:54         ` Naitik Amin
2014-09-03 13:06           ` Hannes Petermaier
2014-09-03 13:52           ` Peter A. Bigot
2014-09-03 14:14             ` Hannes Petermaier
2014-09-03 14:23               ` Peter A. Bigot [this message]
2014-09-03 14:38                 ` Naitik Amin
2014-09-03 15:54                   ` Sachin Verma
2014-09-03 16:03                     ` Naitik Amin
2014-09-03 19:17               ` Naitik Amin
2014-08-29 17:21 Naitik Amin
2014-09-03 15:53 ` Stephen Warren

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=54072478.4020804@pabigot.com \
    --to=pab@pabigot.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox