bootloader change LibreELEC (Leia) 9.2.6

  • Hi, I am using the latest version on LibreElec. Due to the changes to the Raspberry PI4,

    I need the function so that the behavior corresponds to earlier models, where both 3V3 and 5V pins remain switched on after the "Sudo halt".

    As far as I could find out so far, I have to change the bootloader. A working one should be found somewhere on the net (but I haven't found it yet)

    I have no idea if it is possible to change the bootloader. It would be great if there was some way to implement this feature to pause and run Kodi via an external signal.

    Thanks for your support

  • Thanks ... Sorry, but I'm not familiar with Linux.

    Do you have any idea where I can find the necessary bootloader I need? I found links, but I can't take them

    thx for help

  • There are 2 things mixed, the bootloader itself and the bootloader configuration.

    I believe you already have the bootloader you need (although maybe not the latest available) installed.

    The firmware version check / update can be easily done from Kodi - Settings - Libreelec - Updates - Firmware Updates

    So you can easily upgrade the bootloader and VIA USB firmware to versions contained in your LE package which are quite fresh.

    A manual upgrade way is described here: RE: Is it possible already to set up a rpi4 with kernel 5.4?

    There's also outlined how to show the bootloader configuration. If you wish to edit it, you must be at least able to connect to your RPi through SSH client (Putty recommended) and use nano editor. Both Putty and nano are easy to use. Default username is root, password libreelec.

    After connecting to your LE, copy and paste these commands:

    cd /tmp

    vcgencmd bootloader_config > bootconf.txt

    nano bootconf.txt # edit the current bootloader configuration as you wish, then press CTRL+X, Y, ENTER to save file

    rpi-eeprom-config /tmp/pieeprom.bin --config /tmp/bootconf.txt --out /tmp/pieeprom

    rpi-eeprom-update -d -f /tmp/pieeprom

    reboot

    Edited once, last by ghtester (January 9, 2021 at 6:17 PM).

  • Thanks for your support! But I have no idea where to find a bootloader with the right behavior or what to change about the existing one.

    I just find the following:

    Raspberry Pi 4 bootloader configuration - Raspberry Pi Documentation

    Is that the right thing. And is the only thing what I have change is in the parts: I need a helping hand here. Thx !

    WAKE_ON_GPIO

    If 1 then sudo halt will run in a lower power mode until either GPIO3 or GLOBAL_EN are shorted to ground.

    Default: 1 (0 in original version of bootloader 2019-05-10)

    Version: All

    POWER_OFF_ON_HALT

    If 1 and WAKE_ON_GPIO=0 then sudo halt will switch off all PMIC outputs. This is lowest possible power state for halt but may cause problems with some HATs because 5V will still be on. GLOBAL_EN must be shorted to ground to boot.

    Pi 400 has a dedicated power button which operates even if the processor is switched off. This behaviour is enabled by default, however, WAKE_ON_GPIO=2 may be set to use an external GPIO power button instead of the dedicated power button.

    Default: 0

    Version: 2019-07-15

    #####################

    Edited once, last by satfan (January 13, 2021 at 10:12 PM).

  • Well, I tried to make the description of the procedure as simple as possible above (including the commands which you just need to run) and I almost don't know how to do it even easier ... :-/

    Are you at least able to connect to your RPi / Libreelec via the SSH console?

    If so, do it, then copy and paste these commands to SSH console and put the responses here:

    rpi-eeprom-update

    vcgencmd bootloader_version

    vcgencmd bootloader_config


    Edited once, last by ghtester (January 15, 2021 at 8:47 AM).

  • Thankyou ..

    As far as I understand that there is a chance, that I have the new, working version of the bootloader which supports a work_on_GPIO as I need it per default. I think somebody of you guys see that in a second .

    Thx for help !

  • thank you ... but now I have the problem to implent the script.

    See the thread:

    "listen for shutdown"

    the script looks like that it is working, but I did not get any reaction if I shorten Pin5-Pin6

    I get that strange message if I start in manually:

    Code
    LibreELEC:~/hyperion/bin # ./listen-for-shutdown.sh stop
    Stopping listen-for-shutdown.py
    
    LibreELEC:~/hyperion/bin # ./listen-for-shutdown.sh start
    Starting listen-for-shutdown.py
    LibreELEC:~/hyperion/bin # /storage/hyperion/bin/listen-for-shutdown.py:10: RuntimeWarning: A physical pull up resistor is fitted on this channel!
      GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)

    Edited once, last by satfan (January 17, 2021 at 10:02 AM).