> no, nor will there probably ever be due to the nature of u-boot ... every > single board can store its environment in different types of flash in > different sectors at different offsets in different magical ways ... there is > no common infrastructure to query such information from kernel/user space > > you should setup your mtd maps to create a separate partition for your u-boot > env sector and then use the mtd-utils package to read/write it from userspace
I do not fully agree with you: U-Boot already contains a firmware
version (fw_setenv and fw_printenv) of the U-Boot setenv and the
printenv commands.
[EMAIL PROTECTED] u-boot-1.2.0]$ find . -name fw_env.c
./tools/env/fw_env.c
It even operates similarly as busybox (tm) with argv[0] to distinguish
between setenv and printenv (I added a editenv to set multiple variables
at one pass only erasing one time the sector).
As for the querying of the information, strictly speaking, there is not
really a need for this since the developer needs to specify it in a
config file:
[EMAIL PROTECTED] u-boot-1.2.0]$ cat ../../flashfs/etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# MTD device name Device offset Env. size Flash sector
# size
/dev/mtd1 0x0000 0x20000 0x20000
/dev/mtd2 0x0000 0x20000 0x20000
That's not really different as e.g. httpd.conf...
Finally, strictly speaking, you don't need a seperate mtd sector for
your environment, you could e.g. store it at the end of you U-Boot
sectors. If that is wise, that's an entirely different matter of course.
--
greetz, marc
Is everybody aboard this ship kinkoid?
Chiana - A Bug's Life
chiana 2.6.18-4-ixp4xx #1 Tue Mar 27 18:01:56 BST 2007 GNU/Linux
signature.asc
Description: Digital signature
_______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
