[OpenWrt-Devel] [PATCH v5] Add support for Ubiquiti EdgeRouter X (UBNT-ERX)

John Crispin blogic at openwrt.org
Sat Dec 12 01:39:11 EST 2015

On 12/12/2015 07:33, Nikolay Martynov wrote:
>   Hi
>>> Doesn't work:
>>> * No GPIO leds. All leds are controlled by switch,
>>>   but stock firmware was able to control them.
>> Try enabling SWCONFIG_LEDS and configure the trigger with
>> ucidef_set_led_switch like other platforms have done.  This works for
>> me with a mt7620 board.
>   I've tried enabling SWCONFIG_LEDS and adding ucidef_set_led_switch
> but could ntot make it work. And it also doesn't seem to produce any
> log output. Is SWCONFIG_LEDS known to work with mt7621 switch? Is
> there something else I need to do to enable it?
>   Would this patch be acceptable without leds working? I will see if I
> can make them work later.

sure. we are opportunistic when it comes to patches ;)

as for the led support, you need to add an extra hook function so that
swconfig can read the per port traffic counters. it can then make gpio
leds flash based on those values.

the function to be added is called .get_port_stats if i am not mistaken.
i think the swconfig driver already reads the traffic counters in some
other place/context

>>> Flashing procedure.
>>> Stock firmware uses custom kernel patch to mount squashfs
>>> from a file that is located on UBIFS volume. This makes wiping
>>> out this volume from within stock firmware difficult.
>>> Instead this patch builds image that is flashable by stock firmware
>>> and contains initrams image (with minimal set of packages
>>> to fit into kernel partition). Once this is flashed one can reboot
>>> into initramfs OpenWrt and use sysupgrade to flash OpenWrt including
>>> rootfs into nand.
>>> Note: factory image is only built if initramfs image is enabled.
>> Most of these info should go to a wiki page for the device.
>   I was hoping to have these saved in commit message first and then
> see if I can create/update wiki page for this device.
>   I have other requested changes sitting it my git, so if lack of leds
> support is fine I'll resubmit.

ok, go for it ... leds are nice but not a blocker.

on a related matter .. does this unit have a locked down bootloader ?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list