-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu/arm64 compatibility #433
Comments
@promethe42 The only problem are the setuid wrappers for pijuice_cli.py and pijuice_gui.py. |
I ran
$ ls
build-setuid-progs.sh pijuice_cli pijuice_gui setuid-prog.c but $ ./pijuice_cli stat: No such file or directory "No such file or directory" yet the binary file does exist and has +x.
|
Found the problem: the generated binary tries to run Now $ ./pijuice_cli
./pijuice_cli: /usr/bin/pijuice_cli.py has the wrong owner
The script should be owned by ubuntu. |
The following works:
but it's kinda weird that I can't run it directly. |
@promethe42 |
@promethe42 did you get this working? |
This little script worked for me, on an fresh ubuntu server 64bit.
|
Worked for me to, but I've no idea what to do next. I just want to be able to run pijuice_cli Thanks! |
@JohnMcW Install the pijuice-base and pijuice-gui deb packages which are in your home directory after running the script. |
And add If you want to use the Timerfunction so sync the RTC with the System-Clock and check it
|
Hi again, I thought I’d check that the PiJuice works in Raspbian – it does and I also updated the firmware to 1.4 But I need to use Ubuntu 18.04.4 64bit for Arm – so starting with a clean updated install, I ran the script above OK, then:
This installed fine!
Don't need/want this.
Not done as firmware is 1.4 But when I run: The GUI starts but errors with:
But:
Displays:
Any ideas? |
I do not know how i2c access is arranged on Ubuntu |
No, but I have now and it works! Thank you! |
Firmware v1.4 is about dtoverlay=i2c-bcm2708 |
Hi again. I'm trying to run a Python script - just using SW2 to test, but I'm getting an error (and I suspect it has something to do with permissions, so I thought I'd post here). This is the code:
Note that I've obfuscated some parameters in the init call above.
The script is executable and works fine when run manually. Any ideas? |
@JohnMcW The error log shows that pijuice_sys.py (= the pijuice service) has started your user function, but the |
Hi again @tvoverbeek - a colleague helped me resolve this - all I need to do was install the sentry software as root. PiJuice is now successfully running Python scripts! However, I have a few more questions (hope it's OK to ask here).
GPIO POWERED
DIRECT POWERED
Thank you |
Yes, for obvious reasons. To control the 5V supply to the Pi the power has to come from the PiJuice.
They are different from low charge and no power.
As explained in that post the watchdog gets reset by each I2C transaction to the PiJuice, provided the watchdog is enabled. To test it you need to make sure that no I2C transactions are made to the PiJuice and the watchdog is enabled. My post gave a way to make this possible in a controlled way. If for some reason the Pi goes haywire (endless loop on all cores) the PiJuice watchdog would kick in (again only if enabled). For the PiJuice watchdog reboot to work powering the PiJuice is the safest way. Note, the Pi has a built-in watchdog. See e.g. https://www.raspberrypi.org/forums/viewtopic.php?t=210974#p1458574. |
Hello, I managed to install pijujicebase on my Ubuntu 64-bit by following the script suggested by @MarkusLange. It seems that the executable is still a 32-bit version: Do you know how to compile it for 64-bit? Thank you! |
The source is here: https:/PiSupply/PiJuice/blob/master/Firmware/pijuiceboot.c |
Thank you very much, it worked ! |
@tvoverbeek PiJuice/Software/OS Support/ as universal for all/other Pi OS |
See issue #433 Make sure the executables (setuid wrappers and pijuiceboot) are rebuild for 64-bit
@MarkusLange Thanks for the suggestion. Updated the 64-bit instructions with a slightly modified version of your script. |
Thanks, from #498 (comment) sudo apt install dh-python is missing in Software/OS Support/ubuntu_server_64.MD for Ubuntu 20.04 |
@MarkusLange Added now. |
on Ubuntu 21.04 (Hirsute) the dh-systemd package has been completely removed, so it fails to compile there because of a missing dependency |
@goodelyfe if @tvoverbeek removes the dependencies to dh-systemd there is a way, or you can try this and install an backport from dh-systemd from groovy (20.10) the last one who has it. |
sudo apt-get install dh-systemd -t groovy ? or would it be sudo apt-get install dh-systemd -t groovy-backports either way i get: Reading package lists... Done Reading package lists... Done |
Has anyone happed to figure out how to get this to work on Ubuntu 21.04? |
Look under this one Ubuntu 21.04 (Hirsute) the dh-systemd package has been completely removed, fails to compile there because of a missing dependency New Line: |
Thank you for the answer. I'll have to test it on the weekend. I have to say that I'm rather disappointed in how complicated it is to install the software for this device. For the cost of it compared to other UPS options I expected a little more robust installation process. |
@CybrHare don't accuse @tvoverbeek for it the install-script for Ubuntu 64 is my fault it is not ready for 21.xx (works well for 20.xx). I don't know where the dh-systemd package went. Now I can confirm the install-script for Ubuntu 21.xx works if you change, After you grep it from git (sudo git clone https:/PiSupply/PiJuice.git) Run the next steps unchanged. |
dh-systemd has been integrated into debhelper. Anyay we will get the same problem when RaspberryPi OS moves to bullseye (with the same solution). |
@MarkusLange @CybrHare |
Thank you for the help. It's working now. One brief note Same for the gui install. |
Hi,
could you please provide some pointers/documentation on how to use the PiJuice software on Ubuntu/arm64.
All the software prebuilt/stored in this repo seams to be targeting
armhf
:$ file pijuice_cli pijuice_cli: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=6e5b1ad06aa0ad2a337fb3b585e28beac17df547, not stripped
Thank you for your help,
The text was updated successfully, but these errors were encountered: