public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] uboot env in mmc partition
Date: Wed, 03 Sep 2014 09:53:51 -0600	[thread overview]
Message-ID: <5407398F.20204@wwwdotorg.org> (raw)
In-Reply-To: <OF169DD9B8.4FDAA4B7-ON85257D43.005ECECD-85257D43.005F59EB@LocalDomain>

On 08/29/2014 11:21 AM, Naitik Amin wrote:
> HI there,
>
> I recently made changes to my system, where I created a new partition on
> my mmc. (mmcblk0p4)
>
> Then i dd'd a uboot env image into this partition, updated the
> fw_env.config to point to /dev/mmcblk0p4. At this point, my fw_printenv
> and fw_setenv work good. So as a next step, I am tried to modify uboot to
> make it point to my env image in my new partition.
>
> I made below changes to my config header and rebuilt the uboot. On doing
> printenv from uboot, I dont see the same env that I pushed it from linux,
> infact I see it as its defined in the config header.
>
> Can some one help ?
>
> /* environment setting for MMC */
> #ifdef CONFIG_ENV_IS_IN_MMC
> #define CONFIG_SYS_MMC_ENV_DEV          0       /* device 0 */
> #define CONFIG_SYS_MMC_ENV_PART         4
> #define CONFIG_ENV_OFFSET               0       /* just after the MBR */
> #endif

I think you're confusing eMMC HW-level partitions (0=user data or 
mmcblk0, 1=mmcblk0boot0, 2=mmcblk0boot1) and SW-level (MBR/GPT) 
partitions within the user data area; /dev/mmcblk0p4.

CONFIG_SYS_MMC_ENV_PART applies to eMMC HW-level partitions.

I don't know if there's an environment variable that selects which 
SW-level partition to use. This is the feature you're looking for!

Later in the thread I saw:
#define CONFIG_ENV_OFFSET                0x21900000

That's not a good idea, since if someone repartitions the disk, that 
offset will be incorrect. Better would be to use (or add) SW-level 
partition support in the MMC environment code.

  reply	other threads:[~2014-09-03 15:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 17:21 [U-Boot] uboot env in mmc partition Naitik Amin
2014-09-03 15:53 ` Stephen Warren [this message]
2014-09-03 16:04   ` [U-Boot] [Suspected Spam] " Naitik Amin
     [not found] <OF169DD9B8.4FDAA4B7-ON85257D43.005ECECD-85257D43.005F598D@LocalDomain>
2014-08-29 19:06 ` [U-Boot] " 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
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

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=5407398F.20204@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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