Posts by screamnAbdab

    I've been getting familiar with the device tree. This is all new to me, by the way. I've found a couple examples for adding ir-receiver to the tree.

    Here's a simple ir_reciever section from linux/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt - Elixir - Bootlin

    Code
    ir: ir-receiver {
    		compatible = "gpio-ir-receiver";
    		gpios = <&gpio0 19 1>;
    		linux,rc-map-name = "rc-rc6-mce";
    	};

    I imagine I could modify this to use pin 18. I do not yet understand the rc-map-name purpose or the full gpios line enough to know if this is the only needed change. I am a bit confused as to why the pin needs to be defined in the device tree. Seems to me that this should be configurable at boot time.

    Here's a sample from libreelec patch for arm64 rockchip found at LibreELEC.tv/linux-0006-dts.patch at rockchip · LibreELEC/LibreELEC.tv · GitHub

    Code
    ir-receiver {
    		compatible = "gpio-ir-receiver";
                    gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
                    linux,rc-map-name = "rc-pine64";
                    pinctrl-0 = <&ir_int>;
                    pinctrl-names = "default";
    		status = "okay";
    	};


    This sample has many items that are a mystery to me. But I will play around with this and see what I can learn. Any further info anyone could provide to help me understand all of this and make successful changes for the tinkerboard would be greatly appreciated.

    Thanks!

    I am attempting to include the TinkerBoard C GPIO lib into the rockchip branch build. I've got it building/installing, but when I execute the command 'gpio' from the command line on the kodi server, I always get the following error, regardless of command line arguments:

    $LibreELEC:/# gpio readall

    /usr/bin/gpio: line 1: syntax error: unexpected ")"

    I have attached my package.mk file. Any guidance would be greatly appreciated.

    Thanks!

    package.mk.txt

    Thanks for helping. Got a bit farther. I am now getting the following error on build:

    gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead

    /usr/bin/ld.gold: fatal error: build/temp.linux-x86_64-2.7/source/py_gpio.o: unsupported ELF machine number 40

    collect2: error: ld returned 1 exit status

    error: command '/home/ben/http://LibreELEC.tv/build.LibreELEC-TinkerBoard.arm-9.0-devel/toolchain/bin/host-gcc' failed with exit status 1

    I have attached the full output if needed.

    Thanks again!gpio_lib_python-build.txt

    I am trying to build and include the TinkerBoard python gpio library in a custom LIbreElec build.

    Cloned rockchip branch and built it successfully in Ubuntu VM. Now I have created the following package.mk in /projects/Rockchip/packages/gpio_lib_python/ directory.

    I get the following error when executing:

    $ PROJECT=Rockchip DEVICE=TinkerBoard ARCH=arm scripts/build gpio_lib_python

    Any help would be greatly appreciated. Note that I have no idea what I'm doing. Would like to get gpio working on TinkerBoard so that I can use the gpio pins for IR remote control. (I know I could probably get some USB solution but I'm interested in getting this working using GPIO).

    Thanks.