luigifcruz / pisdr-image

🥧 A SDR Linux Distro for the Raspberry Pi and other SBC. Compatible out of the box with multiple SDR.
Other
956 stars 91 forks source link

PiSDR V5 image does not work on a Pi Zero (W) #65

Closed g4wsz closed 2 years ago

g4wsz commented 2 years ago

Describe the bug The image boots but binaries (eg gqrx) give "Illegal Instruction" on a Pi Zero.

To Reproduce Steps to reproduce the behavior: 1 Download the image.xz file, write it to SD card 2 Boot the image on a Pi Zero (W) 3 Try to run "gqrx"

Expected behavior Gqrx starts up

Screenshots If applicable, add screenshots to help explain your problem.

Device Version Pi Zero (W)

Additional context I tried this image first on a Pi Zero (W), then on a Pi 2B, where it worked (but understandably slowly). Finally I (bought and) tried PiSDR on a Pi 4 (2GB) and it works very well.

g4wsz commented 2 years ago

I have found (using gdb) that "gqrx" is failing in the UHD library. Looking at the stage4 build directory 05-pisdr-uhd run file I see this:

cd uhd/host mkdir -p build cd build cmake -DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \ -DCMAKE_C_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -Wno-psabi" \ -DCMAKE_ASM_FLAGS:STRING="-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15" \ -GNinja -DCMAKE_BUILD_TYPE=Release ../ ninja install Surely "arch=armv7-a" won't work for a Pi Zero target?

g4wsz commented 2 years ago

Using "readelf -A" on the files in /usr/local/lib I have determined that all the libraries installed there except libuhd are for armv6 architecture. The libuhd file seems to have been built for armv7 architecture, as suggested above. As such this distribution won't work on a Pi Zero (or Pi 1) IMHO.

luigifcruz commented 2 years ago

Thanks for filling this issue. I thought Zero was ARMv7 but I was wrong. I'll update the UHD script to compile an ARMv6 library.

g4wsz commented 2 years ago

Fantastic, thank you!

21salvador86 commented 2 years ago

is there any new update for raspberry zero?

21salvador86 commented 2 years ago

???

21salvador86 commented 2 years ago

thanx for you are interested in

luigifcruz commented 2 years ago

The fix for this issue is present in the upcoming release v6.0. Thanks for contributing!