Linux/Embedded

Yocto Project Poky Compile & Execute

Hans_S_92 2023. 3. 13. 09:08

문서는 Yocto 프로젝트를 사용하여 일반적인 이미지 빌드 프로세스를 안내한다.

문서는 특정 하드웨어를 위한 빌드 구성방법을 소개한다. 

Embedded OS 참조한 포키를 빌드하기 위한 Yocto Project 사용하게 것이다.

 

  • System Requirements

  매뉴얼은 현재 릴리즈된 욕토 프로젝트에 대한 정보를 제공하며, 욕토 프로젝트에 대해서 이해한   효과적으로 사용할 있다.

  • Required Packages for the Build Host( Ubuntu )
sudo apt install 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 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool
  • 문서 : 욕토 프로젝트 문서 매뉴얼을 구축하기 위해 필요한 패키지( 딱히 필요 없을 같어)
$ sudo apt install make python3-pip inkscape texlive-latex-extra
$ sudo pip3 install sphinx sphinx_rtd_theme pyyam
l
  • 패키지 버전확인
    • Git 1.8.3.1  이상
    • tar 1.28  이상
    • python 3.6.0 이상
    • gnu make 4.0 이상
  • Use Git to Clone Poky

Build Host Packages 셋팅이 완료 되었다면, 포키 저장소에서 카피본이 필요하다. 아래의 커멘드를 따라서 설치한다.

git clone git://git.yoctoproject.org/poky
출처: <https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html>

  Poky 설치한 디렉토리로 이동한 Branch 확인한다. 예를 들어 코드네임인 "langdale" 브랜치를 로컬 브랜치로 전환한다. 원격 브랜치와 Sync 맞출 있도록 다음과 같이 명령어를 쓴다.

 

$ cd poky
$ git branch -a
.
.
.
remotes/origin/HEAD -> origin/master
remotes/origin/dunfell
remotes/origin/dunfell-next
.
.
.
remotes/origin/gatesgarth
remotes/origin/gatesgarth-next
.
.
.
remotes/origin/master
remotes/origin/master-next
.
.
.

 
$ git checkout -t origin/langdale -b my-langdale
Branch
'my-langdale' set up to track remote branch 'langdale' from 'origin'.
Switched to a new branch
'my-langdale'

 
$ git pull
 
출처: <https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html>
  • 빌드 환경 설정 초기화

$ source oe-init-build-env

  • 로컬 구성 요소 파일

├── bblayers.conf => Layter 설정

├── local.conf =>  하드웨어 다운로드 위치 설정

└── templateconf.cfg => 모름.

  • 빌드 시작

  $ bitbake core-image-sato

  • Simulate Your Image Using QEMU

$ runqemu qemux86-64