tttapa / docker-arm-cross-toolchain

Modern GCC cross-compilation toolchains for Raspberry Pi
https://tttapa.github.io/Pages/Raspberry-Pi
MIT License
86 stars 15 forks source link

RPi Zero W 2 64 bit #1

Closed Benimautner closed 2 years ago

Benimautner commented 2 years ago

Is there an image available for the rpi zero w 2? The readme says I am supposed to use aarch64-rpi3-linux-gnu, but when I do, I get cannot execute binary file: Exec format error

This is the file info for the cross-compiled executable: /usr/local/bin/python3.9: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 5.8.18, with debug_info, not stripped

This is uname -a Linux rpi 5.13.0-40-generic #45-Ubuntu SMP Tue Mar 29 14:48:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Did I install the wrong system image for my pi? Thanks for creating this project though, it's really useful for projects with large dependencies such as opencv!

tttapa commented 2 years ago

This is uname -a Linux rpi 5.13.0-40-generic #45-Ubuntu SMP Tue Mar 29 14:48:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

This is very odd. It's not clear to me why the Pi would report x86_64 as architecture. Which image did you install to the Pi?

Benimautner commented 2 years ago

Honestly, I might just do a reinstall. I might have messed something up. lsb_release -a

No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

and the file of an executable that works:

file /usr/bin/ls
/usr/bin/ls: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=81004d065160807541b79235b23eea0e00a2d44e, for GNU/Linux 3.2.0, stripped

So it seems as if the system is just a normal 32-bit install of Raspbian and uname -a is wrong. I installed the armv8-rpi3-linux-gnueabihf and it seems to work now. Thanks for your support!