Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a armhf container for raspberry pi zero compiling #667

Open
skast96 opened this issue Jul 7, 2021 · 0 comments
Open

Running a armhf container for raspberry pi zero compiling #667

skast96 opened this issue Jul 7, 2021 · 0 comments

Comments

@skast96
Copy link

skast96 commented Jul 7, 2021

Hello I am currently trying to emulate a raspberry pi zero with this Dockerfile:

FROM python:3.7.3-stretch
ENV QEMU_CPU=arm1176 #ENV Var recognized in order to emulate armv6.
ENV QEMU_MACHINE=versatilepb #Seems like its not used but is needed to emulate armhf

ENV CFLAGS=" -marm -mfpu=vfp -mtune=arm1176jzf-s -mfloat-abi=softfp"

COPY sources.list /etc/apt/sources.list

RUN wget https://archive.raspbian.org/raspbian.public.key -O - | apt-key add -

COPY . .

RUN python setup.py bdist --cythonize

The buildx command docker buildx build --platform=linux/arm/v6 -t skast/armv6 . --load

Basically it should import raspbian sources into the container and install all armhf related gcc compilers needed to "natively" build my cython packages.
The problem I ran into is that it seems that the container started with the command docker run --rm -it --platform=linux/arm/v6 skast/armv6 is armel, because on apt update with the imported raspbian commands it gives me this errors.

image

The uname -a command gives:
Linux 258b4dd0b814 5.12.13-arch1-2 #1 SMP PREEMPT Fri, 25 Jun 2021 22:56:51 +0000 armv6l GNU/Linux

What I need is a container that is running with multiarch, which emulates a raspberry pi zero but is not "completely" a raspberry pi like https://github.com/lukechilds/dockerpi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant