[U-Boot] uboot env in mmc partition

Hannes Petermaier Hannes.Petermaier at br-automation.com
Wed Sep 3 15:06:33 CEST 2014


> 
> Hi Hannes,
Hi,

> 
> So I did as you had indicated and made some progress, so now, my 
#defines lookas below.
> #define CONFIG_SYS_MMC_ENV_DEV                0        /* device 0 */
> #define CONFIG_ENV_OFFSET                0x21900000
okay, since we don't have a 'CONFIG_SYS_MMC_ENV_PART' no partition switch 
within eMMC is performed.
So U-Boot reads/writes from Address 0x21900000 within the user-area of 
eMMC.

Can you supply your partition-layout ?

> 
> I calculated the env offset from the block number it was on based on the 
first
> block number of the partition.
Offset = block# * 512, okay ?

> 
> Doing this on uboot startup, I dontget 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 ?

Maybe the blockaddress of 0x21900000 (1099776 dec) is within the partition 
where zImage/dtb is stored.
Please double-check the CONFIG_ENV_OFFSET address.


best regards,
hannes




More information about the U-Boot mailing list