[OpenWrt-Devel] [PATCH 0/2] Make diag.sh more DTS generic so it could be reused

Petr Štetiar ynezz at true.cz
Tue Nov 27 12:22:46 EST 2018

I wanted to add status LEDs support to my imx6 based board and have
found out, that I could use diag.sh script found in ramips platform,
which seems to be also shared in a few other platforms:

 4801276bc2078c5bcf03003c831e3b0a target/linux/ramips/base-files/etc/diag.sh
 4801276bc2078c5bcf03003c831e3b0a target/linux/ipq40xx/base-files/etc/diag.sh
 4801276bc2078c5bcf03003c831e3b0a target/linux/ath79/base-files/etc/diag.sh

So I've extended the base diag.sh in a way, that if it detects any of
the DTS LED aliases, then it would use the generic DTS set_led_state

Perhaps we should take a look at other platforms using DTS, remove the diag.sh
and move the status LED definitions to DTS as well.

Run and build tested on imx6/apalis,ixora WIP[1].

1. https://github.com/ynezz/openwrt/tree/wip/imx6-apalis

Petr Štetiar (2):
  base-files: diag.sh: Make it more generic towards DTS so it could be
  ath79,ipq40xx,ramips: base-files: Remove duplicate diag.sh and use
    generic one

 package/base-files/files/etc/diag.sh        | 50 +++++++++++++++++++++++++++--
 target/linux/ath79/base-files/etc/diag.sh   | 45 --------------------------
 target/linux/ipq40xx/base-files/etc/diag.sh | 45 --------------------------
 target/linux/ramips/base-files/etc/diag.sh  | 45 --------------------------
 4 files changed, 48 insertions(+), 137 deletions(-)
 delete mode 100755 target/linux/ath79/base-files/etc/diag.sh
 delete mode 100755 target/linux/ipq40xx/base-files/etc/diag.sh
 delete mode 100644 target/linux/ramips/base-files/etc/diag.sh


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list