Thanks @borpin running that test build and all your notes on what went wrong.
Sounds like in absence of a fix for the 8.1 issue using 8.0 may not be a bad idea for the next emonSD release?
I’ve just merged your pull requests, I will do a stable release
Did you see the log2ram update as well? There are a few PRs spread about that interact - not just the EmonScripts ones.
Can you test logrotate before creating the Image as I think there might still be issues there as the services create log folders sometimes and those permissions might not be correct. Logrotate is picky now.
@TrystanLea - did you manage to do the build on the zero? If you have worked things out and want someone to test things, then as I said earlier I’d be glad to help. In my own interests of course, as I’d like to run my new system on a Zero…
I created the partitions etc. Altered fstab. Then pulled the ‘master’ version of the install file.
Ran that, then edited main.sh. Had to change the username and I also commented out the wifi line and the lcd line. Then changed to 8.0 in the php.sh file.
Things still went haywire as php 8.0 was being installed. See below.
It’s weird but the illegal instructions seem to be in the script file after a sub-process in dpkg exits.
Get:9 https://packages.sury.org/php bullseye/main armhf php8.0 all 1:8.0.27-4+0~20230207.49+debian11~1.gbpe27adc [35.4 kB]
Fetched 3,633 kB in 3s (1,058 kB/s)
apt-listchanges: Reading changelogs...
(Reading database ... 47579 files and directories currently installed.)
Preparing to unpack .../libpcre2-8-0_10.40-1+0~20220713.16+debian11~1.gbpb6cec5_armhf.deb ...
Unpacking libpcre2-8-0:armhf (10.40-1+0~20220713.16+debian11~1.gbpb6cec5) over (10.36-2+deb11u1) ...
*E: Sub-process /usr/bin/dpkg exited unexpectedly*
*/opt/openenergymonitor/EmonScripts/install/php.sh: line 21: 9800 Illegal instruction sudo apt-get install -y php8.0-mysql*
/opt/openenergymonitor/EmonScripts/install/php.sh: line 23: 9801 Illegal instruction sudo apt-get install -y php8.0-gd php8.0-curl php-pear php8.0-dev php8.0-common php8.0-mbstring
/opt/openenergymonitor/EmonScripts/install/php.sh: line 25: 9802 Illegal instruction sudo pecl channel-update pecl.php.net
-------------------------------------------------------------
Redis configuration
-------------------------------------------------------------
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 7: 9806 Illegal instruction sudo apt-get install -y redis-server
-------------------------------------------------------------
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 23: 9807 Illegal instruction git clone https://github.com/phpredis/phpredis
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 13: cd: phpredis: No such file or directory
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 14: phpize: command not found
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 15: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 23: 9811 Illegal instruction sudo make install
-------------------------------------------------------------
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 19: php: command not found
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 23: 9817 Done printf "extension=redis.so"
9818 Illegal instruction | sudo tee /etc/php/$PHP_VER/mods-available/redis.ini 1>&2
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 23: 9819 Illegal instruction sudo phpenmod redis
/opt/openenergymonitor/EmonScripts/install/redis.sh: line 25: 9820 Illegal instruction sudo pip3 install redis
/
Yes I did the same and realised you need to completely remove the lines that change the package file in the php.sh script.
If it changes the package files it pulls php8.0 from that repo not the default repo. None of the repo will now work on ARMv6 chips (RPiOS made a change their end).
Can you also paste preformatted text (code/bash output etc) using the Ctl-E formatting (Preformatted in ribbon), please?
The log2ram /etc/logrotate.d/00_olddir file is still throwing a parse error when logrotate is run. Appears editing the file, add a line at the bottom and then closing it again seems to fix it.
Demandshaper is a cpu hog so stop and disable it (I suggest).
You must reboot after install.
But I have a running system on a PiZero
[edit3]
After pulling the right init.sh, you need to edit it to the master branch (I need to run the install process again )
Great stuff Brian, thanks for working through this - I won’t be able to run a test now until Tuesday - need the screen and it’s been coopted by the family
I think this is reasonably robust now. It just takes a while to do the first boot so be patient there. The install seems to work fine if you do all the bits (almost forgot a couple last time).
Those Git fixes are yet to be merged so need to do the manual fixes for now.
The Jul21 is not a Bullseye based release, which is half the reason for the Nov22 release. Jul21 is an old Raspbian base system that is really out of date now. Over 600 packages need updated and that isn’t good.
As I only need emonhub for the MBUS hat, I’ll start with RaspPiOs 32bit Lite, and manually install only emonhub using emonscripts (making relevant mods to ensure it doesn’t pull php8.1).
Good news.
Following the instructions above, on top of a base RaspPiOs 32bit Lite, worked like a charm.
I have a working emonhub ( I chose not to install the rest of emon* as I don’t need that).
This is a nice little solution for the M-BUS hat, and a nice bonus is sticking a USB Jeenode in one of the USB ports allows it to be a great RF relay for some dead spots in my house.
Thanks Brian (and everyone) for all the work on this.