1. 본 글은 아래의 공식 페이지를 이용해 작성하는 글입니다!

2. 저의 나름대로의 요약이니, 틀린 부분 지적 부탁드립니다!

3. 총 3개의 섹션으로 분리해서 나눠서 작성할 예정입니다.

Software – Yocto Project

GETTING STARTED: THE YOCTO PROJECT® OVERVIEW

yocto project(이하 YP)를 이해하기 위해서는 크게 2가지의 컴포넌트를 이해하셔야 합니다.

  1. OpenEmbedded 프로젝트(이하 OE)
  2. Poky
  3. YP

OE는 커스텀 리눅스 배포판을 빌드하기 위한 "빌드 시스템 프레임워크"입니다.

Openembedded.org

YP는 customized linux distribution을 제작하기 위한 프로젝트입니다. 그리고 주 프로덕트 타겟은 임베디드 프로덕트입니다. 일반적인 범용 PC가 주 타겟은 아닌듯합니다.

그리고 YP는 customized linux distribution을 빌드하기 위한 빌드 시스템으로, OE를 채택했습니다.

YP가 제공하는 여러 툴과 OE를 이용하여 빌드한 YP의 레퍼런스 distribution인 Poky가 탄생합니다.

Poky는 사실 BUILD EXAMPLE입니다. 이 example을 이용해 small embedded os를 제작할 수 있습니다. 즉, 리눅스 배포판을 제작할 수 있다는 것입니다. 그럼 example에는 뭐가 있다느 것일까요? 예시로 Bitbake라는 빌드 엔진, 그리고 core build system metadata가 있습니다.

특히 위에 2개는 recipeslayers라고 불립니다. 개발자는 이러한 것을 수정, 복사할 수 있습니다.

THE LAYER MODEL - THE KEY TO CUSTOMIZATION

YP는 임베디드 리눅스 제작을 위해 Layer Model 이라는 개발 모델을 가지고 있습니다.

레이어는 일종의 레포지토리입니다. 빌드 시스템에게 이것저것, 무엇을 해야하는지 알려주는 명령어 집합을 가지고 있습니다. 빌드 시스템은 이 명령어 집합들을 종합해서 리눅스 배포판을 제작하는 것입니다.

개발자는 이 레이어를 그대로 이용하는것에서 멈추지 않고, 수정과 삭제 또한 할 수 있습니다.

개발자는 레이어들을 논리적으로 분리해서 이용할 수도 있습니다. 예시로, 특정 벤더들이 내놓은 개발보드가 있다고 가정하겠습니다. 이러한 보드들의 BSP, GUI, Config, Middleware, application의 레이어를 분리할 수 있다는 것입니다. 이러한 것들은 특정 칩 벤더들에게 가능하면 제공받는것이 좋습니다. (ex STMicroelectronics)

이러한 YP layer들은 아래의 두 링크에서 확인할 수 있습니다.

  1. https://www.yoctoproject.org/software-overview/layers/
  2. http://layers.openembedded.org/

유의 사항으로 2번의 OE 링크 경우, 덜 검증된 부분이 있다고 합니다.

COMPONENTS AND TOOLS MAINTAINED BY THE YOCTO PROJECT

위 사진을 보면 meta-poky, meta-yocto-bsp, document 등의 것이 있는것을 확인할 수 있습니다. 이러한 것들은 유저의 커스텀 리눅스 개발을 위해 사용됩니다. 또한 YP 그 자체를 위해 이용되기도 합니다.

위 내용들을 종합하면 아래와 같습니다.

TERMS FOR REFERENCE

  • Configuration Files: Files which hold global definitions of variables, user defined variables and hardware configuration information. They tell the build system what to build and put into the image to support a particular platform.
  • Recipe: The most common form of metadata. A recipe will contain a list of settings and tasks (instructions) for building packages which are then used to build the binary image. A recipe describes where you get source code and which patches to apply. Recipes describe dependencies for libraries or for other recipes, as well as configuration and compilation options. They are stored in layers.
  • Layer: A collection of related recipes. Layers allow you to consolidate related metadata to customize your build, and isolate information for multiple architecture builds. Layers are hierarchical in their ability to override previous specifications. You can include any number of available layers from the Yocto Project and customize the build by adding your layers after them. The Layer Index is searchable for layers within Yocto Project.
  • Metadata: A key element of the Yocto Project is the meta-data which is used to construct a Linux distribution, contained in the files that the build system parses when building an image. In general, Metadata includes recipes, configuration files and other information refering to the build instructions themselves, as well as the data used to control what things get built and to affect how they are built. The meta-data also includes commands and data used to indicate what versions of software are used, and where they are obtained from, as well as changes or additions to the software itself (patches or auxiliary files) which are used to fix bugs or customize the software for use in a particular situation. OpenEmbedded Core is an important set of validated metadata.
  • OpenEmbedded-Core: oe-core is meta-data comprised of foundation recipes, classes and associated files that are meant to be common among many different OpenEmbedded-derived systems, including the Yocto Project. It is a curated subset of an original repository developed by the OpenEmbedded community which has been pared down into a smaller, core set of continuously validated recipes resulting in a tightly controlled and an quality-assured core set of recipes.
  • Poky: A reference embedded distribution and a reference test configuration created to 1) provide a base level functional distro which can be used to illustrate how to customize a distribution, 2) to test the Yocto Project components, Poky is used to validate Yocto Project, and 3) as a vehicle for users to download Yocto Project. Poky is not a product level distro, but a good starting point for customization. Poky is an integration layer on top of oe-core.
  • Build System - "Bitbake": a scheduler and execution engine which parses instructions (recipes) and configuration data. It then creates a dependency tree to order the compilation, schedules the compilation of the included code, and finally, executes the building of the specified, custom Linux image (distribution). BitBake is a make-like build tool. BitBake recipes specify how a particular package is built. They include all the package dependencies, source code locations, configuration, compilation, build, install and remove instructions. Recipes also store the metadata for the package in standard variables. Related recipes are consolidated into a layer. During the build process dependencies are tracked and native or cross-compilation of the package is performed. As a first step in a cross-build setup, the framework will attempt to create a cross-compiler toolchain (Extensible SDK) suited for the target platform.
  • Packages: The output of the build system used to create your final image.
  • Extensible Software Development Kit (ESDK): A custom SDK for application developers that allows them to incorporate their library and programming changes back into the image to make their code available to other apps developers.
  • Image: A binary form of a Linux distribution (operating system) intended to be loaded onto a device.

2편에서 추가로 작성하겠습니다!

'LINUX > yocto' 카테고리의 다른 글

yocto project 컨셉 이해(2)  (0) 2022.11.02
local.conf 주요 환경 변수  (0) 2022.02.22
욕토 프로젝트 시작하기  (0) 2022.02.22
욕토 프로젝트 용어  (0) 2021.07.08

+ Recent posts