From 20b3c34d47b126b11a25519ebf3ed0c0dbb574d3 Mon Sep 17 00:00:00 2001 From: Shaun Mulligan Date: Thu, 27 Jul 2017 20:16:13 +0200 Subject: [PATCH] add led blink support --- .../docker-resin-supervisor-disk.bbappend | 2 ++ .../resin-init/files/resin-init-board | 12 ++++++++++++ .../resin-init/resin-init-board.bbappend | 4 ++++ nanopi-neo-air.coffee | 2 +- orange-pi-lite.coffee | 2 +- 5 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 layers/meta-resin-allwinner/recipes-support/resin-init/files/resin-init-board create mode 100644 layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-board.bbappend diff --git a/layers/meta-resin-allwinner/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend b/layers/meta-resin-allwinner/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend index 8068ea6..ba4b0c2 100644 --- a/layers/meta-resin-allwinner/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend +++ b/layers/meta-resin-allwinner/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend @@ -1 +1,3 @@ LED_FILE_orange-pi-lite = "/sys/devices/platform/leds/leds/orangepi\:red\:status/brightness" + +LED_FILE_nanopi-neo-air = "/sys/class/leds/nanopi\:blue\:status/brightness" diff --git a/layers/meta-resin-allwinner/recipes-support/resin-init/files/resin-init-board b/layers/meta-resin-allwinner/recipes-support/resin-init/files/resin-init-board new file mode 100644 index 0000000..8c2dcf4 --- /dev/null +++ b/layers/meta-resin-allwinner/recipes-support/resin-init/files/resin-init-board @@ -0,0 +1,12 @@ +#!/bin/sh +# + +set -e + +# Enable bridge netfilter module +modprobe br_netfilter + +# disable status heartbeat led +echo none >/sys/class/leds/nanopi\:blue\:status/trigger + +exit 0 \ No newline at end of file diff --git a/layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-board.bbappend b/layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-board.bbappend new file mode 100644 index 0000000..621fda0 --- /dev/null +++ b/layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-board.bbappend @@ -0,0 +1,4 @@ + +FILESEXTRAPATHS_prepend_nanopi-neo-air := "${THISDIR}/files:" + +RDEPENDS_${PN}_append = " kmod" \ No newline at end of file diff --git a/nanopi-neo-air.coffee b/nanopi-neo-air.coffee index dd8d75c..7b5594d 100644 --- a/nanopi-neo-air.coffee +++ b/nanopi-neo-air.coffee @@ -14,7 +14,7 @@ module.exports = windows: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#windows' osx: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#on-mac-and-linux' linux: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#on-mac-and-linux' - supportsBlink: false + supportsBlink: true options: [ networkOptions.group ] diff --git a/orange-pi-lite.coffee b/orange-pi-lite.coffee index 55dc9ad..cb2d5d1 100644 --- a/orange-pi-lite.coffee +++ b/orange-pi-lite.coffee @@ -14,7 +14,7 @@ module.exports = windows: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#windows' osx: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#on-mac-and-linux' linux: 'http://docs.resin.io/#/pages/installing/gettingStarted.md#on-mac-and-linux' - supportsBlink: false + supportsBlink: true options: [ networkOptions.group ]