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 <rosysong@rosinson.com> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
committed by
Petr Štetiar
parent
0340718863
commit
469e347f19
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user