PowerBlock RPI4
-
Is it possible to use PowerBlock on my RPI4 with Batocera? I have tried to install it and receive the following errors:
ere is what I got: The fact that it states the service is not running makes me think it didn't work:
wget https://raw.githubusercontent.com/petrockblog/PowerBlock/master/install.sh --2024-02-22 04:58:12-- https://raw.githubusercontent.com/petrockblog/PowerBlock/master/install.sh Resolving raw.githubusercontent.com... 185.199.108.133, 185.199.109.133, 185.199.110.133, ... Connecting to raw.githubusercontent.com|185.199.108.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2394 (2.3K) [text/plain] Saving to: 'install.sh' install.sh 100%[=====================================>] 2.34K --.-KB/s in 0.003s 2024-02-22 04:58:13 (834 KB/s) - 'install.sh' saved [2394/2394] [root@BATOCERA /userdata/system]# chmod +x install.sh [root@BATOCERA /userdata/system]# ./install.sh ./install.sh: line 11: apt-get: command not found Error during installation of APT packages --2024-02-22 04:58:46-- https://github.com/petrockblog/PowerBlock/archive/master.zip Resolving github.com... 20.29.134.23 Connecting to github.com|20.29.134.23|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/petrockblog/PowerBlock/zip/refs/heads/master [following] --2024-02-22 04:58:47-- https://codeload.github.com/petrockblog/PowerBlock/zip/refs/heads/master Resolving codeload.github.com... 20.29.134.24 Connecting to codeload.github.com|20.29.134.24|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/zip] Saving to: 'petrockblock_powerblock_master.zip' petrockblock_powerblock_m [ <=> ] 10.89K --.-KB/s in 0.01s 2024-02-22 04:58:47 (950 KB/s) - 'petrockblock_powerblock_master.zip' saved [11155] Archive: petrockblock_powerblock_master.zip 1723c9b4b86e9fd1b930c30706a29f4a79f581c8 creating: PowerBlock-master/ inflating: PowerBlock-master/.gitignore inflating: PowerBlock-master/README.md inflating: PowerBlock-master/install.sh inflating: PowerBlock-master/install_libreelec.sh creating: PowerBlock-master/scripts/ creating: PowerBlock-master/scripts/libreelec/ extracting: PowerBlock-master/scripts/libreelec/autostart.sh inflating: PowerBlock-master/scripts/libreelec/powerblock.sh inflating: PowerBlock-master/scripts/powerblock inflating: PowerBlock-master/scripts/powerblockservice creating: PowerBlock-master/supplementary/ inflating: PowerBlock-master/supplementary/powerblockconfig.cfg extracting: PowerBlock-master/supplementary/powerblockswitchoff.sh inflating: PowerBlock-master/uninstall.sh ./install.sh: line 51: update-rc.d: command not found /etc/init.d/powerblock: 32: .: Can't open /lib/init/vars.sh Installation of PowerBlock service done. [SUCCESS] The PowerBlock driver executable is installed [ERROR] The PowerBlock service is not running You can find the configuration file at /etc/powerblockconfig.cfg.
-
ignore this read next post
-
@gerb45 I did a little bit of testing with Raspberry Pi OS on a Pi Zero 2w and a PowerBlock. This should work for a RPi4. You can add the following to config.txt to emulate the driver. (This way you don't have to worry about startup scripts.)
dtoverlay=gpio-poweroff,gpiopin=17,active_low=1,inactive_delay_ms=0 dtoverlay=gpio-shutdown,gpio_pin=18,active_low=0,gpio_pull=down
It seems to work identical, except that it indicates boot finished before boot actually finished. (Can anyone confirm this please?)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.