How does uboot set ethaddr when the correct fuses have a valid MAC address?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How does uboot set ethaddr when the correct fuses have a valid MAC address?

3,885 次查看
a_thomas
Contributor II

Hello,

I'm working on the processor IMX8DQXPRM. I have programmed the MAC Address to the fuses. When i boot the system, uboot complains that MAC Address is not set therefore, using a random address.

Is it right in understanding that the ethaddr variable of Uboot conveys the MAC address to Linux kernel?

Is there some kind of a CONFIG flag that needs to be set so that the Uboot's ethaddr variable reads the address from the fuses?

Is there some change in device tree to be made?

0 项奖励
回复
2 回复数

3,447 次查看
ykarafi
NXP Employee
NXP Employee

Dear Mr. Abel,

 

I am using the 4.14.78_1.0.0 Release, and I looked in it to get the answers for your questions.

 

  • Is it right in understanding that the ethaddr variable of U-Boot conveys the MAC address to Linux kernel? 

Yes, the ethaddr variable of U-boot conveys the Mac address to Linux

  • Is there some kind of a CONFIG flag that needs to be set so that the Uboot's ethaddr variable reads the address from the fuses?

In case a valid MAC address is programmed through the fuses, Uboot’s ethaddr variable reads it by default from fuses.

 

Below is the fuse map for MAC address from the reference manual of i.MX8QXP/DXP :

 

 MAC_FUSES_imx8qxp.jpg

Please note that writing fuses is an irreversible one time operation for all the 32 bits of a FUSE ROW.  

 

  • Is there some change in device tree to be made?

No changes need to be done in device tree, as U-boot is the one doing the fixups according to the configuration in : common/fdt_support.c

0 项奖励
回复

2,924 次查看
丶1u0
Contributor II

I have tried to edit the defconfig file and imx8mm_evk.h to add ethaddr and ipaddr... but I can't see them after I input printenv command.I want to read the MAC address from efuse and set the default environment.What should I do ? Can I try to edit a function to read the efuse value and return the MAC address ,and then use run_command("setenv xx:xx:....",0) to make it ?

0 项奖励
回复