[Odroid-N2+] GPIO Power Button

  • Found some Infos when using CoreELEC elsewhere

    ``````´´# set gpiopower in /flash/config.ini
    # Power Off and Wake Up using GPIO Key Button
    #   Valid options for Odroid N2/C4 are 476,477,478,479,480,481,483,484,485,486,487,488,489,490,491,492
    gpiopower=479

    But how to get it work on an N2+?

    The LibreELEC wiki has infos about adding entry's when using a RasPi
    https://wiki.libreelec.tv/configuration/config_txt

    Of course, when running a N2+ there is no config.txt to modify ,,,,

    So finally the question is how to get a gpio power switch recognized?

  • For shutdown / poweroff you can use a Python script to check the GPIO state (started from autostart.sh or as a Linux service). Example:

    You need the GPIO library to make this work. Maybe you'll find something similar to RPi Tools for your hardware.

  • Hello,

    I'm not familiar with python but I don't see anything about poweron in this script.
    And shutdown is not the problem, because it can be done via remote.

    But how to power on the N2 with the GPIO button?
    This is usually done via adding entrys to boot.ini ....

  • You can interrupt boot to enter the u-boot console and set things in the u-boot environment (env) if you ave a USB debug UART tool connected, but I don't think that will get you anywhere as I'm not sure mainline u-boot supports that kind of GPIO power-on control on Amlogic hardwar; the mainline codebase is rather minimal and focussed on not much beyond booting the board. I'd suggest asking Q's in the Armbian forums as their devs are more up on this kind of topic, and while LE is a little different to Armbian, they are also using upstream u-boot not the downstream vendor sources that CE are using.