牛卧堂MCU技术交流

标题: FAQ_MA35D1_Read MAC Address from OTP [打印本页]

作者: admin    时间: 2022-12-22 10:17
标题: FAQ_MA35D1_Read MAC Address from OTP
从OTP读取MAC地址
读取MAC地址之前,请先通过NuWriter_MA写入MAC地址
Yocto平台:
1.在U-Boot设备树中禁用默认MAC地址
  1. ~/yocto/build/tmp-glibc/work/numaker_som_ma35d16a81-poky-linux/u-boot-ma35d1/2020.07-r0/git/arch/arm/dts$ vim ma35d1.dtsi

  2. gmac0: ethernet@40120000 {
  3. //        mac-address = [ 00 11 22 33 44 55 ];
  4.     };
  5.     gmac1: ethernet@40130000 {
  6. //        mac-address = [ 00 11 22 33 44 66 ];
  7.     };
复制代码
2.重新编译U-Boot,linux内核,并重新打包生成image文件
  1. ~/yocto/build$ bitbake u-boot-ma35d1 linux-ma35d1 –C compile && bitbake nvt-image-qt5 –c cleanall && bitbake nvt-image-qt5
复制代码
3.将image文件烧写到MA35D1

Buildroot平台:
1.在U-Boot设备树中禁用默认MAC地址
  1. ~/MA35D1_Buildroot$ vim ma35d1.dtsi

  2. gmac0: ethernet@40120000 {
  3. //        mac-address = [ 00 11 22 33 44 55 ];
  4.     };
  5.     gmac1: ethernet@40130000 {
  6. //        mac-address = [ 00 11 22 33 44 66 ];
  7.     };
复制代码
2.重新编译U-Boot,linux内核,并重新打包生成image文件
  1. ~/MA35D1_Buildroot$ make uboot-rebuild linux-rebuild && make
复制代码

3.将image文件烧写到MA35D1







欢迎光临 牛卧堂MCU技术交流 (http://www.nuvoton-mcu.com/) Powered by Discuz! X3.2