build/snippets/design.html · build/snippets/design.rst 공식 원문 ↗

Zephyr 3.7.0 · Build · Snippets

Snippet 설계

여러 application과 board에 build 설정을 안전하게 재사용하기 위한 원칙입니다.

Official pathbuild/snippets/design.html
Source filebuild/snippets/design.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

Repository 수정 없는 확장, 여러 snippet 조합, board별 특화와 순수 software 변경 지원을 정리합니다.

Extend

Repository 외부

Compose

여러 snippet

Specialize

Board · revision

Reuse

DRY

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 6F4304B0F10964DFFBD600C21616CE7A7D532C1E6000721B0D80022BEDCD4A0E
Snippets Design
###############

This page documents design goals for the snippets feature.
Further information can be found in `Issue #51834`_.

.. _Issue #51834: https://github.com/zephyrproject-rtos/zephyr/issues/51834

- **extensible**: for example, it is possible to add board support for an
  existing built-in snippet without modifying the zephyr repository

- **composable**: it is possible to use multiple snippets at once, for example
  using:

  .. code-block:: console

     west build -S <snippet1> -S <snippet2> ...

- **able to combine multiple types of configuration**: snippets make it possible
  to store multiple different types of build system settings in one place, and
  apply them all together

- **specializable**: for example, it is possible to customize a snippet's
  behavior for a particular board, or board revision

- **future-proof and backwards-compatible**: arbitrary future changes to the
  snippets feature will be possible without breaking backwards compatibility
  for older snippets

- **applicable to purely "software" changes**: unlike the shields feature,
  snippets do not assume the presence of a "daughterboard", "shield", "hat", or
  any other type of external assembly which is connected to the main board

- **DRY** (don't repeat yourself): snippets allow you to skip unnecessary
  repetition; for example, you can apply the same board-specific configuration
  to boards ``foo`` and ``bar`` by specifying ``/(foo|bar)/`` as a regular
  expression for the settings, which will then apply to both boards

Part 3

한국어 전문 번역

Snippet 설계 목표

Snippet 기능의 설계 목표이며 배경은 Zephyr issue #51834에서 확인할 수 있습니다.

  • Extensible: Zephyr repository를 수정하지 않고 기존 built-in snippet에 board 지원을 추가할 수 있어야 합니다.
  • Composable: 여러 snippet을 동시에 사용할 수 있어야 합니다.
west build -S <snippet1> -S <snippet2> ...
  • 여러 configuration 유형 결합: 서로 다른 build system setting을 한곳에 저장해 함께 적용합니다.
  • Specializable: 특정 board나 board revision에 맞게 snippet behavior를 바꿀 수 있습니다.
  • Future-proof와 backward-compatible: 이후 기능이 바뀌어도 오래된 snippet을 깨뜨리지 않아야 합니다.
  • 순수 software 변경에도 적용: Shield와 달리 daughterboard·shield·HAT 같은 외부 assembly 존재를 가정하지 않습니다.
  • DRY: 반복을 피합니다. Regular expression /(foo|bar)/ 하나로 foo와 bar board에 같은 설정을 적용할 수 있습니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.