From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jeffray Date: Tue, 02 Mar 2010 15:57:52 +0000 Subject: [U-Boot] Can u-boot access Linux's mtd partition? In-Reply-To: <67a3f13e1003020733p5459c999r1f7346fd9cd8a92d@mail.gmail.com> References: <67a3f13e1003020733p5459c999r1f7346fd9cd8a92d@mail.gmail.com> Message-ID: <4B8D3580.60606@a2etech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.