PENTA SATA HAT INSTALL FAILS on ROCK3a :-((

I spent some time thinking about refactoring it. It does work. I’ll upload a temporary version and then refactor it.

3 Likes

Good to know :slight_smile:
But where can the refactoring be found?

Please have a try

curl -sL https://rock.sh/get-rockpi-penta | sudo -E bash -

Refactoring hasn’t started yet, and the code can be found on Github.

OK Latest Retry apart from two warnings I will have to investigate, all seems to have installed an Executed as Designed from here.
**karl@rock-3a:~$ sudo curl -sL https://rock.sh/get-rockpi-penta | sudo -E bash -
[sudo] password for karl:

*** Penta SATA Hat Install for ROCK Pi 4 / ROCK 3

*** Tested distributions:
*** - ROCK Pi 4
*** Armbian 20.05.4 focal
*** Armbian 20.05.3 buster
*** Debian 9 Desktop (radxa official image)
*** Ubuntu Server 18.04 (radxa official image)
*** - ROCK 3
*** Debian 10 Desktop (radxa official image)
*** Ubuntu Server 20.04 (radxa official image)

*** Please report problems to setq@radxa.com and we will try to fix.

deb http://apt.radxa.com/focal-testing/ focal main
OK
Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Hit:3 http://ppa.launchpad.net/mraa/mraa/ubuntu focal InRelease
Hit:4 http://apt.radxa.com/focal-testing focal InRelease
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-security/main Sources [196 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [747 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [625 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports focal-updates/main Sources [459 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1039 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [842 kB]
Fetched 4244 kB in 4s (1207 kB/s)
Reading package lists… Done

Package(s) gcc python3-dev python3-setuptools python3-pip python3-pil is required.

Would you like to apt-get install the packages? [Y/n] Y
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
cpp cpp-9 gcc-9 gcc-9-base libasan5 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libexpat1-dev libgcc-9-dev libimagequant0 libisl22 libitm1 liblsan0 libmpc3 libpython3-dev
libpython3.8-dev libtsan0 libubsan1 libwebpdemux2 linux-libc-dev python-pip-whl python3-distutils python3-lib2to3 python3-wheel python3.8-dev zlib1g-dev
Suggested packages:
cpp-doc gcc-9-locales gcc-multilib make manpages-dev automake libtool flex bison gdb gcc-doc gcc-9-doc glibc-doc python-pil-doc python3-pil-dbg python-setuptools-doc
Recommended packages:
manpages manpages-dev python3-olefile build-essential
The following NEW packages will be installed:
cpp cpp-9 gcc gcc-9 gcc-9-base libasan5 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libexpat1-dev libgcc-9-dev libimagequant0 libisl22 libitm1 liblsan0 libmpc3 libpython3-dev
libpython3.8-dev libtsan0 libubsan1 libwebpdemux2 linux-libc-dev python-pip-whl python3-dev python3-distutils python3-lib2to3 python3-pil python3-pip python3-setuptools python3-wheel
python3.8-dev zlib1g-dev
0 upgraded, 34 newly installed, 0 to remove and 6 not upgraded.
Need to get 29.0 MB of archives.
After this operation, 125 MB of additional disk space will be used.

WARNING: The directory ‘/home/karl/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

WARNING: The directory ‘/home/karl/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

zip_safe flag not set; analyzing archive contents…
Moving Adafruit_PureIO-1.1.5-py3.8.egg to /usr/local/lib/python3.8/dist-packages
Adding Adafruit-PureIO 1.1.5 to easy-install.pth file

Installed /usr/local/lib/python3.8/dist-packages/Adafruit_PureIO-1.1.5-py3.8.egg
Finished processing dependencies for Adafruit-SSD1306==1.6.2
/home/karl
(Reading database … 70461 files and directories currently installed.)
Preparing to unpack /tmp/tmp.ccN80JytFH …
Removed /etc/systemd/system/multi-user.target.wants/rockpi-penta.service.
Unpacking rockpi-penta (0.10) over (0.10) …
Setting up rockpi-penta (0.10) …
Created symlink /etc/systemd/system/multi-user.target.wants/rockpi-penta.service → /lib/systemd/system/rockpi-penta.service.

still peta sata head fails to initiate even after reboot
Services rockpi-penta.service

Rockpi SATA Hat
Status
Failed to start Automatically starts Path /lib/systemd/system/rockpi-penta.service
Requires system.slicesysinit.target-.mount
Wanted By multi-user.target
Conflicts shutdown.target
Before shutdown.targetmulti-user.target
After system.slicebasic.targetsysinit.targetsystemd-journald.socket-.mount

Service Logs January 13, 2022 :

2:56 PM Failed to start Rockpi SATA Hat. systemd
2:56 PM rockpi-penta.service: Failed with result ‘exit-code’. systemd
2:56 PM rockpi-penta.service: Start request repeated too quickly. systemd
2:56 PM Stopped Rockpi SATA Hat. systemd
2:56 PM rockpi-penta.service: Scheduled restart job, restart counter is at 5. systemd
2:56 PM rockpi-penta.service: Failed with result ‘exit-code’. systemd
2:56 PM rockpi-penta.service: Main process exited, code=exited, status=1/FAILURE systemd
2:56 PM ValueError: Error initialising PWM on pin python3
2:56 PM this = _mraa.new_Pwm(pin, owner, chipid) python3
2:56 PM File “/usr/local/lib/python3.8/dist-packages/mraa.py”, line 579, in init :frowning:

Please let me know the result of cat /boot/uEnv.txt and try installing again, it may have been fixed.

Before retry :

verbosity=7
overlay_prefix=rockchip
rootfstype=ext4
fdtfile=rockchip/rk3568-rock-3-a.dtb
overlays= rk3568-can1-m0 rk3568-pwm8-m0-fan rk3568-pwm15-m0 rk3568-i2c3-m0
rootuuid=904e53b0-d795-415f-8020-2ed2ef1d9e9d
initrdsize=0x9e2bcf
kernelversion=4.19.193-24-rockchip-g526c758e05e0
initrdimg=initrd.img-4.19.193-24-rockchip-g526c758e05e0
kernelimg=vmlinuz-4.19.193-24-rockchip-g526c758e05e0

next Try:
root@rock-3a:/home/karl# curl -sL https://rock.sh/get-rockpi-penta | sudo -E bash -

*** Penta SATA Hat Install for ROCK Pi 4 / ROCK 3

*** Tested distributions:
*** - ROCK Pi 4
*** Armbian 20.05.4 focal
*** Armbian 20.05.3 buster
*** Debian 9 Desktop (radxa official image)
*** Ubuntu Server 18.04 (radxa official image)
*** - ROCK 3
*** Debian 10 Desktop (radxa official image)
*** Ubuntu Server 20.04 (radxa official image)

*** Please report problems to setq@radxa.com and we will try to fix.

deb http://apt.radxa.com/focal-testing/ focal main
OK
Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Hit:3 http://ppa.launchpad.net/mraa/mraa/ubuntu focal InRelease
Hit:4 http://apt.radxa.com/focal-testing focal InRelease
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-security/main Sources [196 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [747 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [625 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports focal-updates/main Sources [459 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1039 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [842 kB]
Fetched 4244 kB in 4s (1194 kB/s)
Reading package lists… Done
running install
running bdist_egg
running egg_info
creating Adafruit_SSD1306.egg-info
writing Adafruit_SSD1306.egg-info/PKG-INFO
writing dependency_links to Adafruit_SSD1306.egg-info/dependency_links.txt
writing requirements to Adafruit_SSD1306.egg-info/requires.txt
writing top-level names to Adafruit_SSD1306.egg-info/top_level.txt
writing manifest file ‘Adafruit_SSD1306.egg-info/SOURCES.txt’
reading manifest file ‘Adafruit_SSD1306.egg-info/SOURCES.txt’
writing manifest file ‘Adafruit_SSD1306.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/Adafruit_SSD1306
copying Adafruit_SSD1306/init.py -> build/lib/Adafruit_SSD1306
copying Adafruit_SSD1306/SSD1306.py -> build/lib/Adafruit_SSD1306
creating build/bdist.linux-aarch64
creating build/bdist.linux-aarch64/egg
creating build/bdist.linux-aarch64/egg/Adafruit_SSD1306
copying build/lib/Adafruit_SSD1306/init.py -> build/bdist.linux-aarch64/egg/Adafruit_SSD1306
copying build/lib/Adafruit_SSD1306/SSD1306.py -> build/bdist.linux-aarch64/egg/Adafruit_SSD1306
byte-compiling build/bdist.linux-aarch64/egg/Adafruit_SSD1306/init.py to init.cpython-38.pyc
byte-compiling build/bdist.linux-aarch64/egg/Adafruit_SSD1306/SSD1306.py to SSD1306.cpython-38.pyc
creating build/bdist.linux-aarch64/egg/EGG-INFO
copying Adafruit_SSD1306.egg-info/PKG-INFO -> build/bdist.linux-aarch64/egg/EGG-INFO
copying Adafruit_SSD1306.egg-info/SOURCES.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying Adafruit_SSD1306.egg-info/dependency_links.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying Adafruit_SSD1306.egg-info/requires.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying Adafruit_SSD1306.egg-info/top_level.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents…
creating dist
creating ‘dist/Adafruit_SSD1306-1.6.2-py3.8.egg’ and adding ‘build/bdist.linux-aarch64/egg’ to it
removing ‘build/bdist.linux-aarch64/egg’ (and everything under it)
Processing Adafruit_SSD1306-1.6.2-py3.8.egg
Removing /usr/local/lib/python3.8/dist-packages/Adafruit_SSD1306-1.6.2-py3.8.egg
Copying Adafruit_SSD1306-1.6.2-py3.8.egg to /usr/local/lib/python3.8/dist-packages
Adafruit-SSD1306 1.6.2 is already the active version in easy-install.pth

Installed /usr/local/lib/python3.8/dist-packages/Adafruit_SSD1306-1.6.2-py3.8.egg
Processing dependencies for Adafruit-SSD1306==1.6.2
Searching for Adafruit-GPIO==1.0.6
Best match: Adafruit-GPIO 1.0.6
Processing Adafruit_GPIO-1.0.6-py3.8.egg
Adafruit-GPIO 1.0.6 is already the active version in easy-install.pth

Using /usr/local/lib/python3.8/dist-packages/Adafruit_GPIO-1.0.6-py3.8.egg
Searching for spidev==3.5
Best match: spidev 3.5
Processing spidev-3.5-py3.8-linux-aarch64.egg
spidev 3.5 is already the active version in easy-install.pth

Using /usr/local/lib/python3.8/dist-packages/spidev-3.5-py3.8-linux-aarch64.egg
Searching for Adafruit-PureIO==1.1.5
Best match: Adafruit-PureIO 1.1.5
Processing Adafruit_PureIO-1.1.5-py3.8.egg
Adafruit-PureIO 1.1.5 is already the active version in easy-install.pth

Using /usr/local/lib/python3.8/dist-packages/Adafruit_PureIO-1.1.5-py3.8.egg
Finished processing dependencies for Adafruit-SSD1306==1.6.2
/home/karl
(Reading database … 70461 files and directories currently installed.)
Preparing to unpack /tmp/tmp.RIzGCh98wD …
Removed /etc/systemd/system/multi-user.target.wants/rockpi-penta.service.
Unpacking rockpi-penta (0.10) over (0.10) …
Setting up rockpi-penta (0.10) …
Created symlink /etc/systemd/system/multi-user.target.wants/rockpi-penta.service → /lib/systemd/system/rockpi-penta.service.

Still not starting properly: :frowning:
root@rock-3a:/home/karl# systemctl stop rockpi-penta.service
root@rock-3a:/home/karl# systemctl start rockpi-penta.service
root@rock-3a:/home/karl# systemctl status rockpi-penta.service
● rockpi-penta.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-01-14 10:04:08 UTC; 7s ago
Process: 17924 ExecStart=/usr/bin/python3 /usr/bin/rockpi-penta/main.py on (code=exited, status=1/FAILURE)
Main PID: 17924 (code=exited, status=1/FAILURE)

Jan 14 10:04:08 rock-3a systemd[1]: rockpi-penta.service: Scheduled restart job, restart counter is at 5.
Jan 14 10:04:08 rock-3a systemd[1]: Stopped Rockpi SATA Hat.
Jan 14 10:04:08 rock-3a systemd[1]: rockpi-penta.service: Start request repeated too quickly.
Jan 14 10:04:08 rock-3a systemd[1]: rockpi-penta.service: Failed with result ‘exit-code’.
Jan 14 10:04:08 rock-3a systemd[1]: Failed to start Rockpi SATA Hat.

and after cat /boot/uEnv.txt
verbosity=7
overlay_prefix=rockchip
rootfstype=ext4
fdtfile=rockchip/rk3568-rock-3-a.dtb
overlays=rk3568-can1-m0 rk3568-pwm8-m0-fan rk3568-pwm15-m0 rk3568-i2c3-m0
rootuuid=904e53b0-d795-415f-8020-2ed2ef1d9e9d
initrdsize=0x9e2bcf
kernelversion=4.19.193-24-rockchip-g526c758e05e0
initrdimg=initrd.img-4.19.193-24-rockchip-g526c758e05e0
kernelimg=vmlinuz-4.19.193-24-rockchip-g526c758e05e0

same error as above
my uEnv.txt is:

overlay_prefix=rockchip
rootfstype=ext4
fdtfile=rockchip/rk3568-rock-3-a.dtb
overlays=rk3568-pwm8-m0-fan rk3568-pwm15-m0 rk3568-i2c3-m0
rootuuid=1d19f1cb-da86-4be9-b579-82f8cfb99026
initrdsize=0x8aa4a1
kernelversion=4.19.193-26-rockchip-gfc6004006609
initrdimg=initrd.img-4.19.193-26-rockchip-gfc6004006609
kernelimg=vmlinuz-4.19.193-26-rockchip-gfc6004006609

UPD:
It worked after restart

[sudo] password for rock:
● rockpi-penta.service - Rockpi SATA Hat
     Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-01-14 15:49:54 UTC; 12min ago
   Main PID: 335 (python3)
      Tasks: 5 (limit: 8600)
     Memory: 29.8M
     CGroup: /system.slice/rockpi-penta.service
             ├─335 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
             ├─455 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
             ├─456 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
             ├─457 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
             └─458 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on

Jan 14 15:49:54 rock-3a systemd[1]: Started Rockpi SATA Hat.
Jan 14 15:49:54 rock-3a libmraa[335]: libmraa version v2.1.0-16-g9aa7ac1 initialised by user 'root' with EUID 0
Jan 14 15:49:54 rock-3a libmraa[335]: gpio: platform doesn't support chardev, falling back to sysfs
Jan 14 15:49:54 rock-3a libmraa[335]: libmraa initialised for platform 'Radxa ROCK 3 Model A' of type 31

UPD 2:
Button seems won’t working
Also, I don’t have any HDDs to test front LEDs

Mine still is dysfunctional :frowning:
but SATA Slots all are functional
I can use fstab, samba and nfs :wink: plus rsync., :slight_smile:
The data performance is quite satisfactioning. :slight_smile:
Still I do not dare do close the box, as the cooling-fan on the hat is not functional and I’m still booting from the SDCARD. :frowning:

Sorry for Knocking at your door
The Penta SATA Hat.service on Rock 3A still cannot be activated :frowning:
Do you have ANY news for us regarding a practical solution besides waiting ?

Please have a try sudo apt install libmraa --reinstall

No change, removed libmraa and installed it again … found same version.
No change to curl -sL https://rock.sh/get-rockpi-penta | sudo -E bash -
Still no running penta sata service :/(

Can u please, send photos of your rock pi in all dimensions?
Did u connect this thing aswell?


I think, penta hat didnt work me aswell untill i connect it (but i cant be sure)
i followed this guide https://hardware.developpez.com/dossiers/NAS/RockPi-3-Penta-Sata-Hat/#LI-A-1

● rockpi-penta.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-01-18 19:41:38 UTC; 1s ago
Main PID: 634 (python3)
Tasks: 2 (limit: 8600)
Memory: 11.3M
CGroup: /system.slice/rockpi-penta.service
├─634 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
└─639 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on

Jan 18 19:41:38 rock-3a systemd[1]: Started Rockpi SATA Hat.
Jan 18 19:41:38 rock-3a libmraa[634]: libmraa version v2.1.0-20-g9ea5a29 initialised by user ‘root’ with EUID 0
Jan 18 19:41:38 rock-3a libmraa[634]: gpio: platform doesn’t support chardev, falling back to sysfs
Jan 18 19:41:38 rock-3a libmraa[634]: libmraa initialised for platform ‘Radxa ROCK 3 Model A’ of type 31
Jan 18 19:41:38 rock-3a libmraa[634]: pwm_init: pwm0 already exported, continuing
rock@rock-3a:~$ sudo apt install libmraa --reinstall
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reinstallation of libmraa is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
rock@rock-3a:~$ sudo apt install libmraa
Reading package lists… Done
Building dependency tree
Reading state information… Done
libmraa is already the newest version (1.6).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

@setq ur updated script work… but not completly :slight_smile:

Fan is spining for me, but oled is not

p.s. button on hat not working aswell (tried to double press for turning on/off fan – no result)

Another update:

  1. i add every single i2c overlay in /boot/uEnv.txt
  2. sudo shutdown now
  3. turn on

    fan is working, oled is working
    button - not responding

rockpi-penta.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-penta.service; enabled; vendor p
reset: enabled)
Active: active (running) since Tue 2022-01-18 20:33:02 UTC; 1min
44s ago
Main PID: 339 (python3)
Tasks: 5 (limit: 8600)
Memory: 28.7M
CGroup: /system.slice/rockpi-penta.service
├─339 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
├─446 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
├─447 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
├─448 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on
└─450 /usr/bin/python3 /usr/bin/rockpi-penta/main.py on

Jan 18 20:33:02 rock-3a systemd[1]: Started Rockpi SATA Hat.
Jan 18 20:33:03 rock-3a libmraa[339]: libmraa version v2
.1.0-20-g9ea5a29 initialised by user ‘root’ with EUID 0
Jan 18 20:33:03 rock-3a libmraa[339]: gpio: platform doe
sn’t support chardev, falling back to sysfs
Jan 18 20:33:03 rock-3a libmraa[339]: libmraa initialise
d for platform ‘Radxa ROCK 3 Model A’ of type 31

Is it the same error message? @Karl-W

Thank you for your feedback. We’ll fix it later. @Rekkid