From 469e347f19ce9eefdc16f421b8e1f18ed60c310c Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 15 Aug 2019 15:13:27 +0200 Subject: base-files: provide option to specify label MAC address in board.d For many devices, MAC addresses cannot be retrieved via the device tree alias. To still provide the label MAC address for those, this implements a second mechanism that will put the address into uci config. Note that this stores the actual MAC address, whereas in DTS we reference the bearing device. This is based on the work of Rosy Song Signed-off-by: Adrian Schmutzler --- package/base-files/files/lib/functions/uci-defaults.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'package/base-files/files/lib/functions/uci-defaults.sh') diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 2fb7555969..c2c6dc3fdc 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -307,6 +307,14 @@ ucidef_set_interface_macaddr() { ucidef_set_interface "$network" macaddr "$macaddr" } +ucidef_set_label_macaddr() { + local macaddr="$1" + + json_select_object system + json_add_string label_macaddr "$macaddr" + json_select .. +} + ucidef_add_atm_bridge() { local vpi="$1" local vci="$2" -- cgit v1.2.3