natsfr

Docker RPI4 Cross Compilation

May 9th, 2021 (edited)
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. apt install docker.io
  2. (add your user in the docker group)
  3.  
  4. wget https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-03-25/2021-03-04-raspios-buster-armhf.zip
  5. unzip 2021-03-04-raspios-buster-armhf.zip
  6.  
  7. udisksctl loop-setup --file 2021-03-04-raspios-buster-armhf.img --read-only
  8. >> Mapped file 2021-03-04-raspios-buster-armhf.img as /dev/loop23
  9.  
  10. sudo tar c -C /media/nats/rootfs . | docker image import - raspios:2021-buster
  11. >> sha256:7745a78147dd3252f00c6a9f6d533101f784dfc46c98327486afc4ba818378a6
  12.  
  13. This commande will allow docker to run arm system
  14. docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
  15.  
  16. docker create -it --name raspbian_test raspios:2021-buster bash
  17.  
  18. docker create -it --name raspbian_test_graphical -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY raspios:2021-buster bash
  19.  
  20. xhost +local:root
  21.  
  22. docker start -ai raspbian_test_graphical
  23.  
  24. ====== And you have a working docker arm rpi4 =====
  25.  
  26. Then apply this one
  27.  
  28. https://pastebin.com/XUsrTXzg
Add Comment
Please, Sign In to add comment