Part 1
요약·해설
Kconfig symbol, dependency, menu 구조와 생성 header의 역할을 연결합니다.
Symbol
Dependency
autoconf.h
Unused code 제거
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
40A9BEEAAAF95CA04350242D7FCCD69C1053936354E810C433693F5E0BD1DE52
.. _kconfig:
Configuration System (Kconfig)
*******************************
The Zephyr kernel and subsystems can be configured at build time to adapt them
for specific application and platform needs. Configuration is handled through
Kconfig, which is the same configuration system used by the Linux kernel. The
goal is to support configuration without having to change any source code.
Configuration options (often called *symbols*) are defined in :file:`Kconfig`
files, which also specify dependencies between symbols that determine what
configurations are valid. Symbols can be grouped into menus and sub-menus to
keep the interactive configuration interfaces organized.
The output from Kconfig is a header file :file:`autoconf.h` with macros that
can be tested at build time. Code for unused features can be compiled out to
save space.
The following sections explain how to set Kconfig configuration options, go
into detail on how Kconfig is used within the Zephyr project, and have some
tips and best practices for writing :file:`Kconfig` files.
.. toctree::
:maxdepth: 1
menuconfig.rst
setting.rst
tips.rst
preprocessor-functions.rst
extensions.rst
Users interested in optimizing their configuration for security should refer
to the Zephyr Security Guide's section on the :ref:`hardening`.
Part 3
한국어 전문 번역
Configuration system: Kconfig
Zephyr kernel과 subsystem은 application과 platform 요구에 맞게 build 시점에 구성할 수 있습니다. Linux kernel과 같은 Kconfig system을 사용하며 source code를 고치지 않고 configuration을 바꾸는 것이 목표입니다.
Configuration option은 흔히 symbol이라고 부르며 Kconfig file에 정의합니다. Symbol 사이의 dependency도 함께 정의해 유효한 configuration만 만들게 합니다. Interactive interface에서 찾기 쉽도록 menu와 submenu로 묶을 수 있습니다.
Kconfig 출력은 build 시 검사할 macro가 담긴 autoconf.h header입니다. 사용하지 않는 feature의 code를 compile 단계에서 제외해 image 공간을 줄일 수 있습니다.
이 절의 문서
- Interactive Kconfig interface
- Configuration 값 설정
- Kconfig 작성 tip과 best practice
- Custom Kconfig preprocessor 함수
- Kconfig 확장
Security를 위한 configuration 최적화는 Zephyr Security Guide의 hardening 절을 참고합니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.