[U-Boot] can u-boot tools fw_{printenv, setenv} work with eMMC HW partition?
Andreas Bießmann
andreas.devel at googlemail.com
Fri Aug 23 14:44:53 CEST 2013
Dear Robert P. J. Day,
On 08/23/2013 02:25 PM, Robert P. J. Day wrote:
<snip>
> so it's clearly there, but i have no idea what i'd put in
> /etc/fw_env.config to refer to that partition.
>
> i tried adding the simple line:
>
> /dev/mmcblk1boot1 0x0 0x4000
>
> to (allegedly) represent a block device, but i got the error:
>
> # fw_printenv
> Cannot access MTD device /dev/mmcblk1boot: No such file or directory
> #
I think you stumble over this:
---8<---
abiessmann at punisher % grep -C 4 'struct envdev_s' tools/env/fw_env.c
typeof(y) _min2 = (y); \
(void) (&_min1 == &_min2); \
_min1 < _min2 ? _min1 : _min2; })
struct envdev_s {
char devname[16]; /* Device name */
ulong devoff; /* Device offset */
ulong env_size; /* environment size */
ulong erase_size; /* device erase size */
ulong env_sectors; /* number of environment sectors */
uint8_t mtd_type; /* type of the MTD device */
};
--->8---
An device name can only have 16 char by this declaration ;)
> so i'm guessing that was a really bad initial guess. i'm guessing i'd
> need to add a line referring to the existing device file /dev/mmcblk1,
> and add the actual HW partition offset and size, yes? i just have to
> figure out what that is, if that's the way it's done.
Dunno if that'd be all to support RAW eMMC partition. As long as thy
behave like raw MTD partition it should work out.
Best regards
Andreas Bießmann
More information about the U-Boot
mailing list