Closed mwallnoefer closed 3 years ago
Unfortunately the systemd service still stops in a warning:
Mar 07 10:37:43 edison systemd[1]: blink-led.service: Start request repeated too quickly.
Mar 07 10:37:43 edison systemd[1]: blink-led.service: Failed with result 'exit-code'.
Mar 07 10:37:43 edison systemd[1]: Failed to start Edison Arduino board LED Blinker.
Okay, I am fine with disabling it (at the systemd
level?).
Just a question: this does not interfere with the Arduino functionality, correct?
I don't think so. The kernel does 'take' (hog) the LED ping, so it can not be used for anything else.
I have tried to determine the location where the systemd link (runtime -> unit) gets added during build, but I cannot find it. It does not seem to happen in the receipt.
meta-intel-edison/meta-intel-edison-distro/recipes-core/post-install/files/post-install.sh?
But this should run only once. Ah, wait: https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#ref-classes-systemd
It's enabled by default, we need to turn it off.
It's enabled by default, we need to turn it off.
I am reconsidering this. The problem is when the led.aml is loaded the kernel hogs the led pin, so blink-led should enable the led mux and terminate without error as the kernel already controls the led. But when led.aml is not loaded blink-led should run normally.
So this is a bug in blink-led that we need to fix.
Fixed I hope (5ad238581a4f85a65ad6585f24e20f380dac4b85) and force pushed to master and zeus.
Just as a follow-up this patch would disable the blink-led.service per default. I guess that a manual run for a one-time diagnosis would be better than an automatic launch at each start-up, since the LED could also be used by the oobe wifi detection. Second, it is just wasted energy consumption...
diff --git a/meta-intel-edison-distro/recipes-support/blink-led/blink-led_0.1.bb b/meta-intel-edison-distro/recipes-support/blink-led/blink-led_0.1.bb
index 0e84904..7ae255f 100644
--- a/meta-intel-edison-distro/recipes-support/blink-led/blink-led_0.1.bb
+++ b/meta-intel-edison-distro/recipes-support/blink-led/blink-led_0.1.bb
@@ -7,6 +7,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
inherit systemd
SYSTEMD_SERVICE_${PN} = "blink-led.service"
+SYSTEMD_AUTO_ENABLE = "disable"
RDEPENDS_${PN} = "libgpiod-python"
Ah thanks. Yes in the past blink-led needed to run continuously, but now we have a kernel module.
By default 'heart-beat' runs, because we load the kernel module here and because we load the leds.asl table (which defines the pin as a led pin here.
So we could drop de service entirely and replace it by a script that loads another module and sets it up. We have ledtrig-activity ledtrig-default-on ledtrig-gpio ledtrig-heartbeat ledtrig-oneshot ledtrig-timer
For instance modprobe ledtrig-timer
and
~# cat /sys/class/leds/heartbeat/trigger
none rfkill-any rfkill-none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock disk-activity disk-read disk-write ide-disk cpu cpu0 cpu1 mmc0 mmc1 mmc2 [heartbeat] rfkill0 rfkill1 timer
echo timer > /sys/class/leds/heartbeat/trigger
will make it blink 0.5s on/0.5s off and echo 50 > /sys/class/leds/heartbeat/delay_on
will make it flash similarly to the current blink-service when run by pushing the PWR button 3x quickly (triggering oobe).
Of course return back to hearbeat is echo heartbeat > /sys/class/leds/heartbeat/trigger
I'll take this one and fix it in dunfell.
I hope it's working for you?
This issue was ok I think 🤔, I still had problems with mraa: #123.
The
blink-led
example fails on branch zeus with the following exception: