All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] uboot env in mmc partition
@ 2014-08-29 17:21 Naitik Amin
  2014-09-03 15:53 ` Stephen Warren
  0 siblings, 1 reply; 3+ messages in thread
From: Naitik Amin @ 2014-08-29 17:21 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] uboot env in mmc partition
  2014-08-29 17:21 [U-Boot] uboot env in mmc partition Naitik Amin
@ 2014-09-03 15:53 ` Stephen Warren
  2014-09-03 16:04   ` [U-Boot] [Suspected Spam] " Naitik Amin
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2014-09-03 15:53 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [Suspected Spam]  Re:  uboot env in mmc partition
  2014-09-03 15:53 ` Stephen Warren
@ 2014-09-03 16:04   ` Naitik Amin
  0 siblings, 0 replies; 3+ messages in thread
From: Naitik Amin @ 2014-09-03 16:04 UTC (permalink / raw)
  To: u-boot

HI Stephen,

Yes, I do understand that its not a good idea at all to use hardcoded 
addresses like that, if you pls list some steps on how can I use the sw 
level partition. That be great.



From:   Stephen Warren <swarren@wwwdotorg.org>
To:     Naitik Amin <Naitik.Amin@ametek.com>, u-boot at lists.denx.de, 
u-boot-request at lists.denx.de, 
Date:   09/03/2014 11:53 AM
Subject:        [Suspected Spam]  Re: [U-Boot] uboot env in mmc partition



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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-03 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-29 17:21 [U-Boot] uboot env in mmc partition Naitik Amin
2014-09-03 15:53 ` Stephen Warren
2014-09-03 16:04   ` [U-Boot] [Suspected Spam] " Naitik Amin

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.