0

I am trying to follow this manual (https://earthly.dev/blog/cross-compiling-raspberry-pi/) to set up crosscompiling for RPi zero 2w running raspbian bullseye.

So far I have failed with any crosscompile setup for Rpi, however I have found out I do need to write a new driver - and I refuse to attempt that on the Zero.

However my Zero is obviously running on arm64 and not armhf, so I get error output

$ mk-sbuild --arch=$ARCH $RELEASE --debootstrap-mirror=http://archive.debian.org/debian/ --name=rpi-$RELEASE --debootstrap-mirror=http://archive.raspbian.org/raspbian/ --name=rpi-$RELEASE
/usr/sbin/qemu-debootstrap
W: qemu-debootstrap is deprecated. Please use regular debootstrap directly
I: Running command: debootstrap --arch=arm64 --variant=buildd --components=main,non-free,contrib --include=eatmydata --keyring=/home/$USER/raspbian-archive-keyring.gpg bullseye /home/$USER/chroots/rpi-bullseye-arm64 http://archive.raspbian.org/raspbian/ bullseye
I: Target architecture can be executed
I: Retrieving InRelease 
I: Checking Release signature
I: Valid Release signature (key id A0DA38D0D76E8B5D638872819165938D90FDDD2E)
E: Invalid Release file, no entry for main/binary-arm64/Packages

when running the suggested command

mk-sbuild --arch=$ARCH $RELEASE \
--debootstrap-mirror=http://archive.raspbian.org/raspbian/ \
--name=rpi-$RELEASE

The output of my target RPi zero, running the original raspbian:

 $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ dpkg --print-architecture arm64

so in the above command $ARCH=arm64 and $RELEASE=bullseye.

There is only armhf files http://archive.raspbian.org/raspbian/dists/

I do not think I should use those... where to get the arm64 ones? Or can anyone suggest another approach to build an SDK to develop drivers?

dtto
  • 1
  • Huh. That Earthly post looks suspiciously similar to a write-up that I did a while back: https://tttapa.github.io/Pages/Raspberry-Pi/C++-Development-RPiOS/index.html. I've successfully used those instructions on both armhf and arm64 systems. – tttapa Dec 28 '23 at 00:59

0 Answers0