[U-Boot] Can u-boot access Linux's mtd partition?

Ian Jeffray ijeffray at a2etech.com
Tue Mar 2 16:57:52 CET 2010


On 02/03/2010 15:33, Joe Culler wrote:

> 1. First, I set default CONFIG_ETHADDR(for example, 02:80:ad:20:31:e8)
>     in u-boot, then use flash writer to burn the flash on each board.
> 2. I have a program for burning mac address on Linux.
>     After booting linux kernel, my program can burn the mac address.
>     Reboot the system if burning the mac address successfully.
> 3. Since the mac address is already stored in mtd2, for example.
>     I want u-boot to detect the correct mac address I burned in mtd2
>     partition rather than the default setting 02:80:ad:20:31:e8.
>
> Is it the correct way I do or do you have any better idea? Thank you.

I just use U-Boot tools "fw_setenv" to update the U-Boot ETHADDR
variable from within Linux.   If you do this, it may be advisable
to move the environment out of the code sector in case of failure
during writeback.

http://www.denx.de/wiki/DULG/HowCanIAccessUBootEnvironmentVariablesInLinux

http://elinux.org/U-boot_environment_variables_in_linux

Ian.


More information about the U-Boot mailing list