Setting gpio for sd card activity led

I am sure this is a simple thing that you would think has been covered plenty, but I swear I have read over countless posts and I cant get this to work. I found this SD card activity external LED - #9 by JackOrms which seems to be exactly what I want, but I cant for the life of me figure out how to get these commands to “import” the dts file ive written. I have put the file in the dt folder under the correct folder for my aml-s905x-cc and run “make” in the dir for the wiring tool, but it doesnt seem to do anything with my file. ive tried putting the dts file in the wiring tool folder and calling it directly with make or ldto, it just says


ive tried the same without ./ and I get the same message. I cant find any information that tells me what my missing step is!!! help appreciated.

You need to put ledactivity in the libre-computer/aml-s905x-cc/dt/ directory and then run make. Afterwards, you can enable by running sudo ./ldto enable ledactivity

I put the script in that dir, run make, it doesnt do anything with my script. I call the script manualy from make, it just says nothing to be done.

You are missing build-essentials package or the device-tree-compiler package.

ive installed both of those, now I get this
root@MAINRIG:/opt/libretech-wiring-tool/libre-computer/aml-s905x-cc/dt# cat ledactivity.dts
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-gxl-gpio.h>

/ {
compatible = “libretech,cc”, “amlogic,s905x”, “amlogic,meson-gxl”,“gpio-leds”;
fragment@0 {
target-path = “/leds”;
overlay {
SD_status@0 {
label = “statusLED”;
gpios = <&gpio GPIOX_5 GPIO_ACTIVE_HIGH>;
linux,default-trigger = “mmc1”;
};
};
};
};
root@MAINRIG:/opt/libretech-wiring-tool/libre-computer/aml-s905x-cc/dt# cd -
/opt/libretech-wiring-tool
root@MAINRIG:/opt/libretech-wiring-tool# make
CC libre-computer/aml-s905x-cc/dt/ledactivity.dts
DTC libre-computer/aml-s905x-cc/dt/ledactivity.pre.dts
Error: libre-computer/aml-s905x-cc/dt/ledactivity.dts:8.14-15 syntax error
FATAL ERROR: Unable to parse input tree
make: *** [Makefile:25: libre-computer/aml-s905x-cc/dt/ledactivity.dtbo] Error 1
rm libre-computer/aml-s905x-cc/dt/ledactivity.pre.dts
root@MAINRIG:/opt/libretech-wiring-tool#

It’s telling you there’s a syntax error on line 14 of your overlay. Your compatible = "gpio-leds" is wrong as is SD_status@0. See https://boot.libre.computer/ci/aml-s905x-cc.dts

I dont see how gpio-leds is wrong? its in this dts you linked. I changed the compatible statement to the one at the begining of your link, with and without gpio-leds it says “nothing to be done”

  1. Indent properly.
  2. It explicitly tells you what line is wrong. You have no semicolon.

the problem earlier in my post was the " was the wrong character somehow, it looked like a " but slightly different. the script I posted just now does not give any indication of whats wrong, it just says “theres nothing to be done”. im sure its obvious to you because you are accustomed to looking at this stuff. I am not a programmer and my scripting abilities on linux are green.

this is the current state of my script:

Just run make in the root directory per the readme.

Im telling you its not working…

edit:
I had been working in the folder install.sh installed it to in /opt. I ran make from the local git clone and it worked… I dont fully understand how make works I think.

image

and my script still doesnt work. I reverted to the script found in the link I posted initially and it also doesnt work :woozy_face:

What does dmesg say when you enable it after compiling?

after running ./ldto enable ledactivity
image