/***********************************************************************
 *                        I.MX6 MAC地址修改
 * 说明:
 *     I.MX6并没有设置好默认的MAC地址,虽然有自动生成MAC地址的方法,但
 * 如果出货量大的话,还是可能照成重复的,记录一下怎么设定MAC地址。
 * 
 *                                   2016-6-24 深圳 南山平山村 曾剑锋
 **********************************************************************/


cat install-recovery.sh
    #!/system/bin/sh
    
    # put other code here
    
    # modify the mac value for your target
    mac=00:11:22:33:44:55
    busybox ifconfig eth0 down
    busybox ifconfig eth0 hw ether $mac
    busybox ifconfig eth0 up


另外一种方法:
$ ip link set down dev eth0
$ ip link set dev eth0 address AA:BB:CC:DD:EE:FF
$ ip link set up dev eth0

 

相关文章:

  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
猜你喜欢
  • 2021-12-02
  • 2021-12-12
  • 2021-04-30
  • 2021-10-16
  • 2021-07-26
  • 2021-11-20
  • 2021-06-09
相关资源
相似解决方案