[LEDE-DEV] [PATCH 0/2] ramips: unify etc/board.d/01_leds configuration

p.wassi at gmx.at p.wassi at gmx.at
Sat Jul 23 07:20:19 PDT 2016


Hi,

for ramips, the etc/board.d/01_leds file uses different ways to
configure the LEDs. There are local functions to configure USB and
wifi LEDs, also the functions provided by lib/functions/uci-defaults.sh
are used. The mentioned local functions are rather restricted in their
parameters: for both USB and wifi, one can only pass the sysfs name
of the LED. You can't pass a parameter to specify which wifi device or
which USB device should be used to trigger the LED.

Therefore I propose two different approaches:
-) version A: get rid of the local functions and directly call
    ucidef_set_led_usbdev or ucidef_set_led_netdev from uci-default.sh
-) version B: enhance the local functions such that they can at least
    take an additional parameter to specify the triggering device

Current state:
mixed up completely, some devices use the local functions, other devices
make a direct call to ucidef functions due to the mentioned limitations.

Background:
I'm currently working on a device which needs a non-default triggering device
for USB. Since the local set_usb_led-function doesn't allow that, I'm forced
to use ucidef_set_led_usbdev for this purpose, which is Ok. It's just that
everything is mixed up and that's not what a *unified* configuration interface
should look like. (My personal favourite therefore is version A).

Best regars,
P. Wassi



More information about the Lede-dev mailing list