From f6d5f1c49b0e7d8e8ee5403c8a04f3020555f890 Mon Sep 17 00:00:00 2001 From: Ton van Overbeek Date: Sun, 2 Aug 2020 21:16:26 +0200 Subject: [PATCH] Update 64-bit instructions See issue #433 Make sure the executables (setuid wrappers and pijuiceboot) are rebuild for 64-bit --- Software/OS Support/ubuntu_server_64.MD | 46 +++++++++++++------ .../Setuid-Wrapper/build-setuid-progs.sh | 2 + 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/Software/OS Support/ubuntu_server_64.MD b/Software/OS Support/ubuntu_server_64.MD index e32a6dd1..9b95734e 100644 --- a/Software/OS Support/ubuntu_server_64.MD +++ b/Software/OS Support/ubuntu_server_64.MD @@ -1,27 +1,45 @@ # Installing PiJuice Software on Ubuntu Server 64-bit - https://ubuntu.com/download/raspberry-pi -1. Make sure you have the latest version of Kali Linux by running an update: -`sudo apt-get update` +1. Run the following script to build the pijuice packages for 64-bit (thanks to @MarkusLange): +``` +#!/bin/bash -2. Install the dependancies: -`sudo apt install i2c-tools lua5.3 build-essential` +cd $HOME -5. Clone the PiJuice repository from GitHub: -`git clone https://github.com/PiSupply/PiJuice.git` +sudo apt update +sudo apt install -y python3-smbus python3-pip python3-stdeb dh-systemd debhelper fakeroot python3-all +sudo pip3 install stem stdeb3 -6. Install pijuice-base: -`cd PiJuice/Software/Install` -`sudo dpkg -i pijuice-base_1.6_all.deb` +sudo git clone https://github.com/PiSupply/PiJuice.git -Fix broken packages: -`sudo apt --fix-broken install` +cd $HOME/PiJuice/Software/Source/Setuid-Wrapper +sudo ./build-setuid-progs.sh +sudo cp p* $HOME/PiJuice/Software/Source/bin + +cd $HOME/PiJuice/Software/Source/ +sudo ./pckg-pijuice.sh + +sudo cp $HOME/PiJuice/Software/Source/deb_dist_base/pi*.deb $HOME +sudo cp $HOME/PiJuice/Software/Source/deb_dist_gui/pi*.deb $HOME +cd $HOME +sudo rm -rf PiJuice +``` +2. Install the localpijuice-base: +`cd $HOME` +`sudo apt install pijuice-base_1.6_all.deb` + +3. Install the local pijuice-gui (if needed): +`cd $HOME` +`sudo apt install pijuice-gui_1.6_all.deb` + +4. Fix broken packages: +`sudo apt --fix-broken install` -7. Reboot and run PiJuice CLI: +5. Reboot and run PiJuice CLI or PiJUICE_CLI when on Desktop: `sudo reboot` Once rebooted run: -`pijuice_cli` +`pijuice_cli` or `pijuice_gui` diff --git a/Software/Source/Setuid-Wrapper/build-setuid-progs.sh b/Software/Source/Setuid-Wrapper/build-setuid-progs.sh index 3bb82cd6..4c8e550c 100755 --- a/Software/Source/Setuid-Wrapper/build-setuid-progs.sh +++ b/Software/Source/Setuid-Wrapper/build-setuid-progs.sh @@ -1,3 +1,5 @@ #!/bin/bash gcc -DFULL_PATH=\"/usr/bin/pijuice_gui.py\" -Wall -o pijuice_gui setuid-prog.c gcc -DFULL_PATH=\"/usr/bin/pijuice_cli.py\" -Wall -o pijuice_cli setuid-prog.c +# Also build pijuiceboot so all programs are build for the current architecture (32 or 64 bit) +gcc -Wall -o pijuiceboot ../../../Firmware/pijuiceboot.c