| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
- sudo
- bash
- system programming
- 시스템콜
- Git
- ubuntu20.04
- ssh
- SSH 에러
- MAN
- g++
- Child
- repo
- ubuntu
- 소스트리
- system call
- dash
- AZRUE
- Parent
- 상대경로
- strace
- NXP
- Go
- APT
- gcc
- Docker
- yocto
- linux
- 커널
- vm
- netstat
- Today
- Total
devsojang 님의 블로그
NXP i.MX Yocto 세팅 및 빌드하기 본문
NXP Yocto Guide(Rev. LF6.6.52_2.2.0) pdf 문서를 참고합니다.
OS : ubuntu 20.04
SSD or HDD 용량 : 최소 50GB 이상 (크면 클수록 좋음)
Host Packages 설치
다음과 같이 설치합니다.
$ sudo apt install curl gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping \
python3-git python3-jinja2 python3-subunit zstd liblz4-tool file locales libacl1
설치하면서 없는 Packages는 메세지 확인 후 추가로 설치하면 됩니다.
Repo 설정
다음과 같이 수행합니다.
$ mkdir ~/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
.bashrc 파일에 ~/bin 폴더의 경로를 추가합니다.
export PATH=~/bin:$PATH
Yocto Project 설정
Git 정보를 설정합니다.
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list
i.MX Yocto Project BSP를 다운로드 합니다.
$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u https://github.com/nxp-imx/imx-manifest-b imx-linux-scarthgap -m imx-6.6.52-2.2.0.xml
$ repo sync
Repo 초기화 중에 에러가 발생하면 .repo를 삭제하고 Repo 초기화 명령을 다시 실행하시면 됩니다.
다음 링크에서 지원되는 모든 메니페스트 파일 목록을 확인할 수 있습니다.
https://github.com/nxp-imx/imx-manifest/tree/imx-linux-scarthgap
GitHub - nxp-imx/imx-manifest: i.MX Release Manifest
i.MX Release Manifest. Contribute to nxp-imx/imx-manifest development by creating an account on GitHub.
github.com
이미지 빌드하기
이미지 빌드는 다음 명령어를 기반으로 합ㄴ다.
$ DISTRO=<distro name> MACHINE=<machine name> source imx-setup-release.sh -b <build dir>
DISTRO = <distro configuration name>은 meta-imx/meta-imx-sdk/conf/distro 디렉토리 내부에서 설정 파일드을 확인할 수 있습니다.

MACHINE = <machine configuration name>은 meta-freescale/conf/machine 디렉토리 내부에서 설정 파일들을 확인할 수 있습니다.

<build dir> = imx-setup-release.sh 스크립트로 생성되는 빌드 디렉토리 이름을 입력하면 됩니다.
예를 들어 i.MX 8M Quard EVK 보드에 wayland 기반의 이미지를 만든다면 다음과 같이 입력합니다.
$ DISTRO=fsl-imx-wayland MACHINE=imx8mq-evk source imx-setup-release.sh -b build-wayland
위와 같이 빌드를 설정 했다면 다음과 같이 Bitbake 명령을 사용해서 Yocto 이미지를 빌드합니다.
$ bitbake imx-image-full
Yocto 이미지와 Bitbake 옵션은 Yocto Guide 문서를 참고해서 사용하면 됩니다.
PC나 노트북에 사양과 설치된 환경에 따라 빌드 시간은 몇시간이 넘게 차이가 납니다.
많은 CPU 코어와 메모리를 충분히 사용하는게 정신 건강에 이롭습니다. ^^

'Yocto' 카테고리의 다른 글
| NXP Yocto 자료받기 (0) | 2025.01.17 |
|---|