In the latest release of FTL (v5.2): Releases · pi-hole/FTL · GitHub there are 3 ARM builds:
pihole-FTL-arm-linux-gnueabi
pihole-FTL-arm-linux-gnueabihf
pihole-FTL-armel-native
Analyzed them with readelf command and it seems that both first two are hard-float and last is soft-float.
Question 1: Shouldn't pihole-FTL-arm-linux-gnueabi be soft-float ?
I do have an armv5 machine which is soft-float. Output of uname -a:
Linux debian-nas 4.20.6-kirkwood-tld-1 #1 PREEMPT Thu Jan 31 21:41:45 PST 2019 armv5tel GNU/Linux
When I'm installing pihole it downloads and installs pihole-FTL-arm-linux-gnueabi which is hard-float does not work on a soft-float machine.
Question 2: Is this a bug or is it normal ? I don't know if that build should either be soft-float or the installer detects the architecture wrong.
Finally, I checked out the source code at V5.2, built and installed the pihole-FTL binary and everything is working fine, but every time I do a pihole reconfigure (needed to fix when I mess up something) the installer states: Corruption detected and reinstalls again the wrong binary for my architecture.
So, Question 3: What can I do for the installer to not detect the binary as corrupted when is built and installed locally ?
These notations come from the days of when Pi-hole was still Raspberry Pi-focused. The Raspbian foundation denotes
arm-linux-gnueabi -> ARMv6 with hard-float (BCM2835 as used in Zero and Model 1)
arm-linux-gnueabihf -> ARMv8 with hard-float (BCM2837, BCM2837B0, BCM2711 as used in Model 2 B v1.2, 3 and 4)
since we use their official cross-compilers, this is what these point to. They all have hardware vector floating point support
This is intentional, see the reasons above.
Not much. However, you are not the first one to request support for ARMv5TE processors. We should not change our regular pihole-FTL-arm-linux-gnueabi from v6 hard-float to v5TE soft-float as this may lead to a significant drop in performance. However, I'm of good cheer that we can add a v5TE build on top. Stay tuned to this space for updates.
The reason is that the multiarch/debian-bootstrap container is an armv7l emulation:
$ docker run -it --rm multiarch/debian-debootstrap:armel-stretch-slim
root@d471d2b8697c:/# uname -a
Linux d471d2b8697c 5.4.0-45-generic #49~18.04.2-Ubuntu SMP Wed Aug 26 16:29:02 UTC 2020 armv7l GNU/Linux
I did some research on this and after some tweaking, the debian-armel build is now v4T-compliant:
I see. So as far as I can tell that should work on armv5te although it's not the right build.
Also, I don't know the build system process in this project, but I do have a buildroot setup used to crosscompile for this arch so if I can support with the buildroot config, a docker image with the toolchain and/or testing I would be glad to.
LE: Nevermind this, just saw your last post
Yes, that looks good. But I did not quite understand, did you manage to build this binary in the armv7l container ?
Yes, even when the emulated machine is a ARMv7 one, I can instruct the compiler to avoid opcodes that are only available in more recent processors. This time, I specifically asked the compiler to compile for ARMv5TE and the resulting binary was even ARMv4T.
You can compare the ARMv7 (page 25ff) and the ARMv4T instruction set if you want to know more.
has been merged, the development branch will already have a armv4t+-complaint binary. This will then automatically extend to the next release version as well.