summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--argonone.install13
-rw-r--r--remove_virtual_env.patch15
4 files changed, 24 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5c3bfd0b3618..cbbafe8f4727 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,7 +10,7 @@ pkgbase = argonone-git
depends = i2c-tools
depends = lm_sensors
depends = python>=3.3
- depends = raspberrypi-userland-aarch64-git
+ depends = raspberrypi-firmware
depends = python-raspberry-gpio
provides = argonone
backup = etc/argononed.conf
@@ -19,7 +19,7 @@ pkgbase = argonone-git
source = remove_virtual_env.patch
source = argonone-i2c.conf
sha256sums = SKIP
- sha256sums = 387244f164aefd796da544aa13809544ac0b0b35e44ddaf5aa1155f915aefcf4
+ sha256sums = f49f356ec8f87570a57d07cccbec6d3811444eeaa75e59eac2d743912a95ea8b
sha256sums = 8bf7f83cd0d8bdd6f212177a7555b3bea7f60b0a34e662f56b0ad4954bb7daae
pkgname = argonone-git
diff --git a/PKGBUILD b/PKGBUILD
index aef643e45914..d2e45f10d195 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@ arch=('any')
url='https://download.argon40.com/argon1.sh'
license=('GPL3')
makedepends=('git')
-depends=('i2c-tools' 'lm_sensors' 'python>=3.3' 'raspberrypi-userland-aarch64-git' 'python-raspberry-gpio')
+depends=('i2c-tools' 'lm_sensors' 'python>=3.3' 'raspberrypi-firmware' 'python-raspberry-gpio')
provides=('argonone')
backup=('etc/argononed.conf' 'etc/modules-load.d/argonone-i2c.conf')
install=argonone.install
@@ -22,7 +22,7 @@ source=(
)
sha256sums=(
'SKIP'
- '387244f164aefd796da544aa13809544ac0b0b35e44ddaf5aa1155f915aefcf4'
+ 'f49f356ec8f87570a57d07cccbec6d3811444eeaa75e59eac2d743912a95ea8b'
'8bf7f83cd0d8bdd6f212177a7555b3bea7f60b0a34e662f56b0ad4954bb7daae'
)
diff --git a/argonone.install b/argonone.install
index 51273e87ae0e..e0dc31fedc61 100644
--- a/argonone.install
+++ b/argonone.install
@@ -1,12 +1,13 @@
pre_install() {
echo "Checking Hardware Model..."
if [[ $(grep -a "Raspberry Pi 3" /proc/device-tree/model) || $(grep -a "Raspberry Pi 4" /proc/device-tree/model) ]] ; then
- if [[ (! $(lsmod | grep i2c_dev)) || (! $(lsmod | grep i2c_bcm2835)) ]]; then
- echo "Please first enable i2C on your Raspberry Pi"
- echo " 1. Append dtparam=i2c_arm=on to your /boot/config.txt,"
- echo " if this file doesn't have the line."
- echo " 2. Reboot your device."
- echo " 3. Check the output of lsmod, i2c_dev and i2c_bcm2835 should appear."
+ echo "Enabling i2C..."
+ BOOT_CFG="/boot/config.txt"
+ if [[ ! -e "${BOOT_CFG}" ]]; then
+ touch "${BOOT_CFG}"
+ fi
+ if ! grep "dtparam=i2c_arm=on" "${BOOT_CFG}" >/dev/null 2>&1 ; then
+ echo "dtparam=i2c_arm=on" >> "${BOOT_CFG}"
fi
else
echo "Not a Raspberry Pi Model 3 or 4!"
diff --git a/remove_virtual_env.patch b/remove_virtual_env.patch
index 88613a25ff1d..152538c452ee 100644
--- a/remove_virtual_env.patch
+++ b/remove_virtual_env.patch
@@ -1,12 +1,23 @@
+diff --git a/argononed-poweroff.py b/argononed-poweroff.py
+index 0b0664e..dfa1dad 100755
+--- a/argononed-poweroff.py
++++ b/argononed-poweroff.py
+@@ -1,4 +1,4 @@
+-#!/opt/argonone/bin/python3
++#!/usr/bin/python3
+ # -*- coding: utf-8 -*-
+ # -*- mode: Python; tab-width: 4; indent-tabs-mode: nil; -*-
+ # PEP 8, PEP 263.
diff --git a/argononed.service b/argononed.service
-index d726b4b..1494058 100755
+index d726b4b..aea8a05 100755
--- a/argononed.service
+++ b/argononed.service
-@@ -5,6 +5,6 @@ After=multi-user.target
+@@ -5,6 +5,7 @@ After=multi-user.target
Type=simple
Restart=always
RemainAfterExit=true
-ExecStart=/opt/argonone/bin/python3 /opt/argonone/bin/argononed.py
+ExecStart=/usr/bin/python3 /usr/bin/argononed
++ExecStop=/usr/bin/python3 /usr/lib/systemd/system-shutdown/argononed-poweroff.py service-stop
[Install]
WantedBy=multi-user.target