ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.91k stars 1.9k forks source link

如何批量修改Mac地址 #513

Closed satanxts closed 2 years ago

satanxts commented 2 years ago

请问能否通过修改 /boot 目录下的 emmc_autoscript 文件或者 uEnv.txt 文件实现同时修改eth wlan 和 BT 的MAC地址?需要使用什么参数?

多台n1刷完系统后mac变成相同的,一项一项改起来非常麻烦。

再次感谢 ophub 大佬!

ophub commented 2 years ago

https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/common-files/rootfs/etc/network/interfaces

这是mac地址自定义,你可以在armbian-install里面加一句重新生成一个新的,这样就不会一个固件重复了

https://github.com/ophub/amlogic-s9xxx-armbian/blob/c09b842f0670d21c2566b2e6578156e6238aaf0b/rebuild#L594-L623

satanxts commented 2 years ago

感谢大佬 通过修改 etc/network/interfaces 和 usr/lib/firmware/brcm/brcmfmac43455-sdio.phicomm,n1.txt 实现了 eth 和 wlan 的地址更改

但是 BT 的地址还是没有变化,不知道接下来怎么操作了。机型n1

ophub commented 2 years ago

https://github.com/ophub/amlogic-s9xxx-armbian/commit/0b05c70b33cb6ed0c2efd666ed22360c8f3bb02e

拉最新的这个安装文件,我添加了安装时生成新的mac地址的自动处理功能,适合拿一个固件批量安装多个设备

蓝牙地址每个设备都不一样吧?这个不需要修改吧? hcitool dev | awk '$0=$2'

satanxts commented 2 years ago

主要是想改成原装的mac地址 总之感谢大佬

ophub commented 2 years ago

删除自定义文件就是原MAC:rm -f /etc/network/interfaces