• R/O
  • HTTP
  • SSH
  • HTTPS

immortalwrt: Commit

Mirror only - Please move to https://github.com/immortalwrt/immortalwrt


Commit MetaInfo

Revisãof5278bf820105c83267d6bc0ad3dfaf1d77a4681 (tree)
Hora2022-01-24 05:20:47
AutorDaniel Golle <daniel@makr...>
CommiterDaniel Golle

Mensagem de Log

mediatek: store random MAC address in U-Boot env on first boot

For devboards without a MAC address assigned from factory, store
the random MAC in U-Boot env on first boot to make it persistent.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Mudança Sumário

Diff

--- /dev/null
+++ b/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh
@@ -0,0 +1,14 @@
1+[ ! -e /etc/fw_env.config ] && exit 0
2+
3+. /lib/functions.sh
4+
5+case "$(board_name)" in
6+bananapi,bpi-r2|\
7+bananapi,bpi-r64|\
8+unielec,u7623-02)
9+ [ -z "$(fw_printenv -n ethaddr 2>/dev/null)" ] &&
10+ fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
11+ ;;
12+esac
13+
14+exit 0
Show on old repository browser