[技术问答] FAQ_MA35D1_Read MAC Address from OTP

[复制链接]
652|1
 楼主| 七毛钱 发表于 2023-1-5 14:00 | 显示全部楼层 |阅读模式
从OTP读取MAC地址
读取MAC地址之前,请先通过NuWriter_MA写入MAC地址
Yocto平台:
1.在U-Boot设备树中禁用默认MAC地址
  • ~/yocto/build/tmp-glibc/work/numaker_som_ma35d16a81-poky-linux/u-boot-ma35d1/2020.07-r0/git/arch/arm/dts$ vim ma35d1.dtsi
  • gmac0: ethernet@40120000 {
  • //        mac-address = [ 00 11 22 33 44 55 ];
  •     };
  •     gmac1: ethernet@40130000 {
  • //        mac-address = [ 00 11 22 33 44 66 ];
  •     };
复制代码
2.重新编译U-Boot,linux内核,并重新打包生成image文件
  • ~/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地址
  • ~/MA35D1_Buildroot$ vim ma35d1.dtsi
  • gmac0: ethernet@40120000 {
  • //        mac-address = [ 00 11 22 33 44 55 ];
  •     };
  •     gmac1: ethernet@40130000 {
  • //        mac-address = [ 00 11 22 33 44 66 ];
  •     };
复制代码
2.重新编译U-Boot,linux内核,并重新打包生成image文件
  • ~/MA35D1_Buildroot$ make uboot-rebuild linux-rebuild && make
复制代码

3.将image文件烧写到MA35D1
xinpian101 发表于 2023-1-8 21:45 | 显示全部楼层
配置好物理地址就可以方便实现网络通信了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

400

主题

2801

帖子

4

粉丝
快速回复 在线客服 返回列表 返回顶部