Skip to content

Commit 4372e7d

Browse files
Radxa-e52c. Device NIC port rename to match device labels and network LED config via radxa-e52c.conf (#8633)
* Add_to_radxa-e52c.conf 1. Add a network rule to rename interfaces to match device port labeling (wan,lan) 2. Add network activity LEDs config for wan and lan for radxa-e52c * Update config/boards/radxa-e52c.conf Coderabbitai suggested clean-up of function name. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update radxa-e52c.conf - fix typo. * Update radxa-e52c.conf - fix function consistency As recommended by EvilOlaf --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 9d0ed58 commit 4372e7d

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

config/boards/radxa-e52c.conf

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,45 @@ BOOT_FDT_FILE="rockchip/rk3588s-radxa-e52c.dtb"
88
BOOT_SCENARIO="spl-blobs"
99
BOOT_SOC="rk3588"
1010
IMAGE_PARTITION_TABLE="gpt"
11+
12+
function post_family_tweaks_bsp__radxa_e52c_enable_leds() {
13+
display_alert "Creating board support LEDs config for radxa-e52c."
14+
cat <<- EOF > "${destination}"/etc/armbian-leds.conf
15+
[/sys/class/leds/lan-led]
16+
trigger=netdev
17+
interval=52
18+
brightness=1
19+
link=1
20+
tx=0
21+
rx=1
22+
device_name=lan
23+
24+
[/sys/class/leds/wan-led]
25+
trigger=netdev
26+
interval=52
27+
brightness=1
28+
link=1
29+
tx=0
30+
rx=1
31+
device_name=wan
32+
33+
[/sys/class/leds/mmc0::]
34+
trigger=mmc0
35+
brightness=0
36+
37+
[/sys/class/leds/sys-led]
38+
trigger=heartbeat
39+
brightness=0
40+
invert=0
41+
42+
EOF
43+
44+
# add a network rule to rename interfaces to match device labeling.
45+
display_alert "Creating board support network rename rule to rename interfaces to match device labeling for radxa-e52c"
46+
mkdir -p "${destination}"/etc/udev/rules.d/
47+
cat <<- EOF > "${destination}"/etc/udev/rules.d/70-rename-lan.rules
48+
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="enP3p49s0", NAME="wan"
49+
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="enP4p65s0", NAME="lan"
50+
EOF
51+
}
52+

0 commit comments

Comments
 (0)