
On Fri, 23 Aug 2013, Andreas Bießmann wrote:
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@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 ;)
good lord, you're right, that explains why the last character of the device file was getting mysteriously dropped. :-( so as a quick hack, i just did a "mknod" (i suspect a symlink would have worked just as well) to invent a shorter name, "/dev/mmcboot1", and got (predictably):
# fw_printenv Cannot get MTD information: Invalid argument #
which leads me into stefano's response which i just saw.
rday