see: https://wiki.st.com/stm32mpu/wiki/PC_prerequisites#Checking_Internet_access
1. stm32mp1 yocto 빌드용 docker image 만들기
$ vi Dockerfile
Code language: Shell Session (shell)
# 이전 포스트에서 만든 ssh 이미지를 사용하여 만든다.
FROM ssh
RUN apt update
# for debconf: unable to initialize frontend: Dialog
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# stm32mp1 yocto build env download
# see https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package
RUN apt install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 pylint xterm -y
RUN apt install make xsltproc docbook-utils fop dblatex xmlto -y
RUN apt install libmpc-dev libgmp-dev -y
RUN apt install libncurses5 libncurses5-dev libncursesw5-dev libssl-dev linux-headers-generic u-boot-tools device-tree-compiler bison flex g++ libyaml-dev libmpc-dev libgmp-dev -y
RUN apt install coreutils bsdmainutils sed curl bc lrzsz corkscrew cvs subversion mercurial nfs-common nfs-kernel-server libarchive-zip-perl dos2unix texi2html diffstat libxml2-utils -y
# install python
RUN apt install python -y
# install `repo`
RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /bin/repo
RUN chmod a+x /bin/repo
# install lub-usb
RUN apt install libusb-1.0-0-dev
Code language: Dockerfile (dockerfile)
2. 도커 이미지 빌드
$ docker build -t stm32mp1dev .
Code language: Shell Session (shell)
4. docker compose
$ vi docker-compose.yml
version: '2'
services:
stm32mp1:
privileged: true
image: stm32mp1dev
restart: always
volumes:
- develop:/home/<strong>userid</strong>/develop
- /dev:/dev
- /run/udev:/run/udev:ro
stdin_open: true
tty: true
volumes:
develop:
Code language: PHP (php)
3. SSH 연결
$docker network inspect stm32mp1_default
Code language: PHP (php)
you can find the container’s ip address
$ssh <strong>userid</strong>@ip
Code language: HTML, XML (xml)
4. USB(stlink) 설정
4-1 Stm32 programmer 다운로드
4-2 Stm32 programmer 설치
$sudo cp *.* /etc/udev/rules.d/
Code language: JavaScript (javascript)
udev 룰 파일들은 반드시 호스트 컴퓨터에 설치 되어야한다.
5. X forwarding
$ssh userid@ip -X
Code language: PHP (php)
$sudo vi /etc/ssh/sshd_config
X11UseLocalhost no
Code language: PHP (php)