In my changwang-cw56-58 x86-64-based board i have obtained default
root@ice_nas_new:~# cat /tmp/board.json
{
"model": {
"id": "changwang-cw56-58",
"name": "ChangWang CW56-58"
},
"network": {
"lan": {
"device": "eth0",
"protocol": "static"
},
"wan": {
"device": "eth1",
"protocol": "dhcp"
}
}
}
and it rather meaningles there while system could create properly all for ethernet interfaces
[ 5.606606] igc 0000:01:00.0 eth0: MAC: 1c:83:41:33:ae:ef
[ 5.706001] igc 0000:02:00.0 eth1: MAC: 1c:83:41:33:ae:f0
[ 5.805852] igc 0000:03:00.0 eth2: MAC: 1c:83:41:33:ae:f1
[ 5.906711] igc 0000:04:00.0 eth3: MAC: 1c:83:41:33:ae:f2
root@ice_nas_new:~# ls -la /sys/class/net | grep eth
lrwxrwxrwx 1 root root 0 Dec 31 13:22 eth0 -> ../../devices/pci0000:00/0000:00:01.3/0000:01:00.0/net/eth0
lrwxrwxrwx 1 root root 0 Dec 31 13:22 eth1 -> ../../devices/pci0000:00/0000:00:02.1/0000:02:00.0/net/eth1
lrwxrwxrwx 1 root root 0 Dec 31 13:22 eth2 -> ../../devices/pci0000:00/0000:00:02.2/0000:03:00.0/net/eth2
lrwxrwxrwx 1 root root 0 Dec 31 13:22 eth3 -> ../../devices/pci0000:00/0000:00:02.3/0000:04:00.0/net/eth3
Once i upgrade /etc/board.d/02_network to something meaninglful like
changwang-cw56-58)
ucidef_set_network_device_path "eth0" "pci0000:00/0000:00:01.3/0000:02:00.0"
ucidef_set_network_device_path "eth1" "pci0000:00/0000:00:02.1/0000:03:00.0"
ucidef_set_network_device_path "eth2" "pci0000:00/0000:00:02.2/0000:04:00.0"
ucidef_set_network_device_path "eth3" "pci0000:00/0000:00:02.3/0000:05:00.0"
ucidef_set_interfaces_lan_wan "eth1 eth2 eth3" "eth0"
;;
related to my board and obtained /tmp/board.json like:
{
"model": {
"id": "changwang-cw56-58",
"name": "ChangWang CW56-58"
},
"network_device": {
"eth0": {
"path": "pci0000:00/0000:00:01.3/0000:02:00.0"
},
"eth1": {
"path": "pci0000:00/0000:00:02.1/0000:03:00.0"
},
"eth2": {
"path": "pci0000:00/0000:00:02.2/0000:04:00.0"
},
"eth3": {
"path": "pci0000:00/0000:00:02.3/0000:05:00.0"
}
},
"network": {
"lan": {
"ports": [
"eth1",
"eth2",
"eth3"
],
"protocol": "static"
},
"wan": {
"device": "eth0",
"protocol": "dhcp"
}
}
}
system refuses it in next way:
[ 6.261351] igc 0000:01:00.0 eth0: MAC: 1c:83:41:33:ae:ef
[ 6.371562] igc 0000:02:00.0 eth1: MAC: 1c:83:41:33:ae:f0
[ 6.480844] igc 0000:03:00.0 eth2: MAC: 1c:83:41:33:ae:f1
[ 6.588947] igc 0000:04:00.0 eth3: MAC: 1c:83:41:33:ae:f2
[ 6.737021] igc 0000:01:00.0 eth4: renamed from eth0
[ 6.748247] igc 0000:02:00.0 eth5: renamed from eth1
[ 6.759857] igc 0000:03:00.0 eth6: renamed from eth2
[ 6.770728] igc 0000:04:00.0 eth7: renamed from eth3
and in sys classes net:
lrwxrwxrwx 1 root root 0 Dec 31 13:04 eth4 -> ../../devices/pci0000:00/0000:00:01.3/0000:01:00.0/net/eth4
lrwxrwxrwx 1 root root 0 Dec 31 13:04 eth5 -> ../../devices/pci0000:00/0000:00:02.1/0000:02:00.0/net/eth5
lrwxrwxrwx 1 root root 0 Dec 31 13:04 eth6 -> ../../devices/pci0000:00/0000:00:02.2/0000:03:00.0/net/eth6
lrwxrwxrwx 1 root root 0 Dec 31 13:04 eth7 -> ../../devices/pci0000:00/0000:00:02.3/0000:04:00.0/net/eth7
So, how it works, whats purpose and and how to get proper meaningful board.json without renamings of interfaces?