-
Notifications
You must be signed in to change notification settings - Fork 1
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
arm64 support #3
Comments
Not sure about this, if docker selects the correct platform correctly when building, but just to be sure add |
I have performed the test, observations and results:
Files: |
In regards to USB pass-through issues on MacOS:
|
Please change this line in the
to this:
and rebuild. |
So, with your help we managed to get it to run on MacOS. I have succesfully build fw for our project that runs on NCS v2.6.1. The build task however is VERY slow (which is kinda expected due to the fact that docker runs containers inside Linux VM on Mac OS). So containers are built and running as amd64 arch. I have commited the changes we did into Additional links (maybe useful):
|
@vid553 please try another thing: with your current setup on the The correct |
You are correct, both build scripts now succeed. I can build fw for the above mentioned NCS.
|
@vid553 Nice! That is great to know. Please commit this. I have an another test for you:
docker run -it --rm \
--privileged \
--volume "${HOME}":"${HOME}" \
--volume "${1}":"${HOME}"/workdir \
--volume /dev:/dev \
--workdir "${HOME}"/workdir \
--volume "/etc/group:/etc/group:ro" \
--volume "/etc/passwd:/etc/passwd:ro" \
--volume "/etc/shadow:/etc/shadow:ro" \
--user "$(id -u):$(id -g)" \
--device-cgroup-rule='c 166:* rmw' \
irnas/ncs-zephyr-v2.6.1-dev:latest There shouldn't be any errors at this point and you should be logged in the container with your host user, so running |
Nevermind my last comment, that command is not ok. Mounting the entire home folder is not a good idea. I am giving up on arm64 support for now. The main issue is that the UID and GID that are declared in the Dockerfile must match those of the host user, otherwise we get into the permission problems, where files that are created by the container user are not writable by the host user. So, the UID and GID must be modified to match the ones of the host. I know that this is possible in two ways:
Just to highlight one thing: this is not MacOS specific problem. Any Linux distro that creates a user with UID and GID set to something else than 1000:1000 will have this problem. |
Required changes to make it work manually are in branch |
Context
I have created a NCS docker image, however for the first release I will disable support for the arm64 architecture, since some of the packages that I expected to install (gcc-multilib) are not available there.
Since I expect more quirks with this setup I would appreciate some help from an engineer with MacOS laptop.
@vid553 @NejcKle can one of you help me testing this?
Test steps
ncs-zephyr
folder.gcc-multilib
from the list of the installed apt packages inDockerfile
(found at the top).build_ci.sh
andbuild_dev.sh
scripts../run.sh <path to west top dir of the ncs repo>
to enter docker environment.Ok, probably anything related to the device access won't work, USB pass-through Docker support in MacOS is a long standing issue.
Tell me how this goes and what needs to be changed.
The text was updated successfully, but these errors were encountered: