Skip to content
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

Last generated images broke support for armv6l Pi devices #150

Open
wavvves opened this issue Dec 28, 2024 · 4 comments
Open

Last generated images broke support for armv6l Pi devices #150

wavvves opened this issue Dec 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@wavvves
Copy link

wavvves commented Dec 28, 2024

Raspberry Pi Model

Raspberry Pi 1 B

Describe The Bug

Generated images shipped with node v22.12.0 won't run homebridge on armv6l devices:

arromba@homebridge:/var/lib/homebridge $ sudo /opt/homebridge/bin/node -v
Illegal instruction

Although inspecting the file shows nothing wrong, I noticed for instance, in the node unnoficial-builds they are not providing tarballs for armv6l.

arromba@homebridge:/var/lib/homebridge $ file /opt/homebridge/bin/node
/opt/homebridge/bin/node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 4.4.255, with debug_info, not stripped
arromba@homebridge:/var/lib/homebridge $ ldd /opt/homebridge/bin/node
	/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v6l.so (0xb6f20000)
	libatomic.so.1 => /lib/arm-linux-gnueabihf/libatomic.so.1 (0xb6ef0000)
	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6f33000)
	libstdc++.so.6 => /lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6d20000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6cd9000)
	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6ca0000)
	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6f1d000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6b27000)
	/lib/ld-linux-armhf.so.3 (0xb6f41000)

Logs

No response

@wavvves wavvves added the bug Something isn't working label Dec 28, 2024
@wavvves
Copy link
Author

wavvves commented Dec 28, 2024

Is node being added part of this build process? If you can point me in the right direction, maybe I can open a pull request.

For anyone bumping into this issue, you can temporarily fix it by downgrading node to the latest v20:

wget https://unofficial-builds.nodejs.org/download/release/v20.18.1/node-v20.18.1-linux-armv6l.tar.gz
tar -xzf node-v20.18.1-linux-armv6l.tar.gz
sudo cp -r node-v20.18.1-linux-armv6l/* /opt/homebridge/
/opt/homebridge/bin/node -v
sudo npm rebuild -g --unsafe-perm homebridge
sudo hb-service restart

@NorthernMan54
Copy link
Contributor

NodeJS dropped support for armv6 with version 22. So unfortunately this is outside our control.

@wavvves
Copy link
Author

wavvves commented Dec 28, 2024

The documentation still mentions ‘32-bit for all RPi models,’ and I believe the same applies on the Homebridge docs as well. Even the RPi Imager allows flashing it for Pi 1. So, either we continue using Node v20 on Homebridge <v2 (since v2 will drop support for armv6), or the documentation needs to be updated to reflect these changes.

What was the reason to update it to ship with v22? 🤔

@NorthernMan54
Copy link
Contributor

NodeJS 22 went LTS in the fall so we moved as well to stay in sync and not fall behind in releases.

With the documentation you are correct and it needs review.

32 bit versus 64 bit is not dependant on CPU architecture, and you can still run 32 bit on other models.

With the armv6 architecture you have likely hit end of the road, as the next version of Homebridge UI removes support as well.

Our challenge is with the dependant modules as they drop support for things, we need to follow along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants