question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Native binaries for ARMv6 (Pi Zeros) are incompatible.

See original GitHub issue

As noted in issue #27, the native builds for ARMv6 (Pi Zeros and all Generation 1 models) are not working.
The 32-bit binaries compiled are not ARMv6 compatible.

This issue affects the following Raspberry Pi models

  • RPi 1 Model A
  • RPi 1 Model A+
  • RPi 1 Model B
  • RPi 1 Model B+
  • RPi Compute Module 1
  • RPi Zero
  • RPi Zero W

(from https://en.wikipedia.org/wiki/Raspberry_Pi)

Changes to native build happened here: https://github.com/Pi4J/pi4j-v2/commit/a7c29d098920a11d99217fe2b4a24c596709e9cf

I switched from ARM compiler toolchain available from RaspberryPi Tools to a newer GCC version 32-bit cross-compiler (gcc-arm-linux-gnueabihf) toolchain available in APT repositories.

REF: https://github.com/Pro/raspi-toolchain

By default, newer GCC versions do not create correct binaries for ARMv6. Even though you pass the correct -mcpu= flag to gcc, it will create startup code for the newer ARMv7 architecture. Running them on your RasPI Zero will cause an “Illegal Instruction” exception.

I probably need to instrument one of these custom toolchains in the build logic for building 32-bit rather than the default linarogcc-arm-linux-gnueabihf

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:36 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
savageautomatecommented, Jul 8, 2020

The GCC compiler is pretty old in the RaspberryPi Tools repo that I was originally using. So maybe first we can try the one published here and see if they work for ARMv6+FP.

I’ll try to get this working soon.

0reactions
hackerjimbocommented, Mar 25, 2021

Awesome news!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java on Raspbian - Raspberry Pi Forums
The armv6 binaries use the soft float ABI (armel) which is incompatible with Raspbian. Even their armv7 binaries use the soft float ABI ......
Read more >
List of the armcc error and warning messages - Arm Developer
The ARM Compiler Errors and Warnings Reference Guide provides lists of the errors and warnings that each of the compilation tools can generate....
Read more >
RaspberryPi - Debian Wiki
The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) and is thus incompatible with the Debian armhf...
Read more >
Adb for Raspberry pi | XDA Forums
For those who wish to simply use the binary, you can download it here... ... I found a build of Android4.0 for the...
Read more >
[SOLVED] Development on Raspberry Pi 4 - General Help
Also, wouldn't an “hf” native binary be identified somehow in the ... I would need something that's compatible also with pi zero or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found