# 사용자 지정 항목

이 섹션에서는 다음 항목을 포함하여 Qualcomm Linux를 커스터마이즈 하는 데 필요한 지침을 제공합니다.

- 사용자 지정 컴퓨터 구성 추가
- 배포판 구성 수정
- 이미지 레시피 생성
- 커널 커스터마이즈 하기

## 사용자 지정 컴퓨터 구성 추가

사용자 지정 컴퓨터 구성을 추가하고 작업 영역을 다시 빌드하려면 다음을 수행하세요.

1. 컴퓨터를 추가하려면 `layers/meta-qcom-hwe/conf/machine/` 에서 새로운 컴퓨터 구성 파일을 추가합니다(예: `layers/meta-qcom-hwe/conf/machine/test-board.conf`).
2. 새로운 컴퓨터가 QCS6490 하드웨어 SoC를 사용 중인 경우 새로 만든 파일에서 다음 내용을 추가합니다.

#@TYPE: Machine
        #@NAME: TestBoard
        #@DESCRIPTION: Machine configuration for a development board, based on Qualcomm QCS6490
        
        require conf/machine/include/qcom-qcs6490.inc
        Copy to clipboard
3. 설정 환경 스크립트를 소싱합니다.

MACHINE=test-board DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment
        Copy to clipboard

참고

`meta-qcom-extras` 에 접근 권한이 있는 경우 `conf/bblayers.conf` 파일의 `EXTRALAYERS ?=` `${WORKSPACE}/layers/meta-qcom-extras` 에 추가하세요.
4. 추가된 컴퓨터에 대해 이미지를 빌드하려면 다음 명령어를 실행합니다.

bitbake qcom-multimedia-image
        Copy to clipboard

## 사용자 지정 배포판 구성 추가

다음 하위 섹션에서는 사용자 지정 배포판 구성을 추가하고 작업 영역을 다시 빌드하는 방법을 설명합니다.

### 퀄컴 정의 배포판 구성 개요

Qualcomm Linux에 대해 정의된 참조 배포판은 `<workspace>/layers/meta-qcom-distro/conf/distro/qcom-wayland.conf` 에 있습니다. 다음 명령어를 사용하여 DISTRO\_FEATURES 변수를 검사할 수 있습니다.

bitbake -e | grep ^DISTRO_FEATURES=
    Copy to clipboard

출력:

DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc  vfat seccomp pam overlayfs acl xattr selinux ptest security virtualization tpm wayland vulkan opengl systemd pulseaudio gobject-introspection-data ldconfig"
    Copy to clipboard

참고

[배포판 기능](https://docs.yoctoproject.org/5.0.6/singleindex.html#distro-features) 에서는 출력에 표시된 DISTRO\_FEATURES에 대해 설명합니다.

### 배포판 구성 추가

배포판 구성 파일을 추가하려면 다음을 수행하세요.

1. `test-distro.conf` 파일을 `<workspace>/layers/meta-qcom-distro/conf/distro` 에 추가합니다.
2. `qcom-wayland.conf` 와 동일한 내용, 즉 `cp qcom-wayland.conf test-distro.conf` 를 사용합니다.
3. `test-distro.conf` 파일에서 `DISTRO_NAME = "Test Reference Distro with Wayland"` 를 설정합니다.
4. `test-distro.conf` 파일에서 `DISTROOVERRIDES = "test-dist"` 를 설정합니다.
5. 다음과 같이 환경을 소싱하고 변수를 내보냅니다.

MACHINE="qcs6490-rb3gen2-core-kit" DISTRO="test-distro" source setup-environment
        Copy to clipboard

환경 소싱이 완료되면 현재 작업 영역 디렉토리가 `<workspace>/build-test-distro` 로 변경됩니다. 정의된 `test-distro` 가 적용되었는지 확인하려면 `conf/auto.conf` 파일을 열고 다음을 확인하세요.

# This configuration file is dynamically generated every time
    # set_bb_env.sh is sourced to set up a workspace.  DO NOT EDIT.
    #--------------------------------------------------------------
    DISTRO ?= "test-distro"
    Copy to clipboard

출력을 확인하려면 다음 명령어를 실행하세요.

bitbake -e | grep ^DISTROOVERRIDES=
    DISTROOVERRIDES="test-dist"
    Copy to clipboard

참고

`meta-qcom-extras` 에 접근 권한이 있는 경우 `conf/bblayers.conf` 파일의 `EXTRALAYERS ?=` `${WORKSPACE}/layers/meta-qcom-extras` 에 추가하세요.

이미지를 다시 빌드하려면 다음 명령어를 실행하세요.

bitbake qcom-multimedia-image
    Copy to clipboard

### DISTRO\_FEATURES 활성화 또는 비활성화

DISTRO\_FEATURES는 생성된 이미지에 포함되어야 하는 패키지를 확인하는 메커니즘을 제공합니다. 배포판의 `test-distro.conf` 구성 파일에서 설정하거나 추가하는 DISTRO\_FEATURES 변수를 통해 활성화하려는 기능을 선택할 수 있습니다. 자세한 내용은 [배포판 기능](https://docs.yoctoproject.org/5.0.6/singleindex.html#distro-features) 을 참조하세요.

참고

커뮤니티에서 정의한 기능을 선택하세요.

1. `test-distro.conf` 파일을 열고 다음 라인을 추가합니다.

DISTRO_FEATURES:append = " cramfs"
        Copy to clipboard
2. 변경 사항이 적용되었는지 테스트한 후 다시 빌드합니다.

bitbake -e | grep ^DISTRO_FEATURES=
        Copy to clipboard

    출력은 다음과 같습니다.

DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc  vfat seccomp pam overlayfs acl xattr selinux ptest security virtualization tpm usrmerge sota wayland vulkan opengl cramfs systemd pulseaudio gobject-introspection-data ldconfig"
        Copy to clipboard
3. 다시 빌드하려면 다음 명령어를 실행합니다.

bitbake qcom-multimedia-image
        Copy to clipboard

## 이미지 레시피 추가

**이미지 레시피 추가**

1. 이미지 레시피를 추가하려면 `<workspace>/layers/meta-qcom-distro/recipes-products/images` 로 디렉토리를 변경합니다.
2. 파일(예: `test-image.bb`)을 만들고 다음 내용을 추가합니다.

SUMMARY = "Test image"
        
        LICENSE = "BSD-3-Clause-Clear"
        
        IMAGE_FEATURES += "splash \
            tools-debug \
            debug-tweaks \
            enable-adbd \
        "
        
        inherit core-image features_check extrausers image-adbd image-qcom-deploy image-efi
        
        REQUIRED_DISTRO_FEATURES = "pam systemd"
        
        CORE_IMAGE_BASE_INSTALL += " \
            kernel-modules \
            packagegroup-filesystem-utils \
        "
        
        CORE_IMAGE_EXTRA_INSTALL += "overlayfs-qcom-paths"
        Copy to clipboard
3. 환경을 소싱합니다.

MACHINE=qcs6490-rb3gen2-core-kit DISTRO=qcom-wayland source setup-environment
        Copy to clipboard
4. 다음 단계는 선택 사항이며 작업 영역에 `meta-qcom-extras` 를 복제한 경우에만 적용됩니다.

    `conf/bblayer.conf` 파일을 열고 변경된 내용을 확인합니다.

    | 변경 전 | 변경 후 |
    | --- | --- |
    | # Add your overlay location to EXTRALAYERS<br>        # Make sure to have a conf/layers.conf in there<br>        EXTRALAYERS ?= ""<br>        Copy to clipboard | # Add your overlay location to EXTRALAYERS<br>        # Make sure to have a conf/layers.conf in there<br>        EXTRALAYERS ?= "${WORKSPACE}/layers/meta-qcom-extras"<br>        Copy to clipboard |
5. BitBake 명령어를 사용하여 빌드합니다.

bitbake test-image
        Copy to clipboard

생성되는 이미지는 다음과 같습니다.

build-qcom-wayland> $ ls tmp-glibc/deploy/images/qcs6490-rb3gen2-core-kit/test-image
    aop.mbn     gpt_backup0.bin  gpt_backup5.bin  gpt_main4.bin  kernel-modules.tgz  patch2.xml             prog_firehose_lite.elf  rawprogram2.xml  system.img    xbl_config.elf
    cpucp.elf   gpt_backup1.bin  gpt_main0.bin    gpt_main5.bin  logfs_ufs_8mb.bin   patch3.xml             qdl                     rawprogram3.xml  tz.mbn        xbl.elf
    devcfg.mbn  gpt_backup2.bin  gpt_main1.bin    hypvm.mbn      multi_image.mbn     patch4.xml             qupv3fw.elf             rawprogram4.xml  uefi.elf      XblRamdump.elf
    dtb.bin     gpt_backup3.bin  gpt_main2.bin    Image          patch0.xml          patch5.xml             rawprogram0.xml         rawprogram5.xml  uefi_sec.mbn  zeros_5sectors.bin
    efi.bin     gpt_backup4.bin  gpt_main3.bin    imagefv.elf    patch1.xml          prog_firehose_ddr.elf  rawprogram1.xml         shrm.elf         vmlinux
    Copy to clipboard

## 이미지 기능 커스터마이즈 하기

이 섹션에서는 이미지를 커스터마이즈 하는 방법에 대한 예시를 제공합니다.

**이미지에서 디스플레이 패키지 제거**

`layers/meta-qcom-distro/recipes-products/packagegroups/packagegroup-qcom-multimedia.bb`

| 변경 전 | 변경 후 |
| --- | --- |
| RDEPENDS:${PN}:append:qcom-custom-bsp = "\<br>        camera-server \<br>        packagegroup-qcom-audio \<br>        packagegroup-qcom-bluetooth \<br>        packagegroup-qcom-camera \<br>        packagegroup-qcom-display \<br>        packagegroup-qcom-fastcv \<br>        packagegroup-qcom-graphics \<br>        packagegroup-qcom-iot-base-utils \<br>        packagegroup-qcom-location \<br>        packagegroup-qcom-video \<br>        packagegroup-qcom-voiceai \<br>        "<br>    Copy to clipboard | RDEPENDS:${PN}:append:qcom-custom-bsp = "\<br>        camera-server \<br>        packagegroup-qcom-audio \<br>        packagegroup-qcom-bluetooth \<br>        packagegroup-qcom-camera \<br>        packagegroup-qcom-fastcv \<br>        packagegroup-qcom-graphics \<br>        packagegroup-qcom-iot-base-utils \<br>        packagegroup-qcom-location \<br>        packagegroup-qcom-video \<br>        packagegroup-qcom-voiceai \<br>        "<br>    Copy to clipboard |

`bitbake qcom-multimedia-image` 명령어를 실행하면 디스플레이 관련 패키지가 빌드에서 제거됩니다. `packagegroup-qcom-display.bb` 패키지 그룹의 내용이 이미지에서 제거됩니다.

**이미지에서 블루투스**^®^ **제거**

`layers/meta-qcom-distro/recipes-products/packagegroups/packagegroup-qcom-multimedia.bb`

| 변경 전 | 변경 후 |
| --- | --- |
| RDEPENDS:${PN}:append:qcom-custom-bsp = "\<br>       camera-server \<br>       packagegroup-qcom-audio \<br>       packagegroup-qcom-bluetooth \<br>       packagegroup-qcom-camera \<br>       packagegroup-qcom-display \<br>       packagegroup-qcom-fastcv \<br>       packagegroup-qcom-graphics \<br>       packagegroup-qcom-iot-base-utils \<br>       packagegroup-qcom-location \<br>       packagegroup-qcom-video \<br>       packagegroup-qcom-voiceai \<br>       "<br>    Copy to clipboard | RDEPENDS:${PN}:append:qcom-custom-bsp = "\<br>       camera-server \<br>       packagegroup-qcom-audio \<br>       packagegroup-qcom-camera \<br>       packagegroup-qcom-fastcv \<br>       packagegroup-qcom-graphics \<br>       packagegroup-qcom-iot-base-utils \<br>       packagegroup-qcom-location \<br>       packagegroup-qcom-video \<br>       packagegroup-qcom-voiceai \<br>       "<br>    Copy to clipboard |

`bitbake qcom-multimedia-image` 명령어를 실행하면 블루투스 관련 패키지가 빌드에서 제거됩니다. `packagegroup-qcom-bluetooth.bb` 패키지 그룹의 내용이 이미지 레시피에서 제거됩니다.

## 파티션 레이아웃 수정

이 섹션에서는 파티션을 추가, 삭제, 수정하거나 이름을 변경하는 방법을 설명합니다. UFS 기기의 파티션을 정의하는 구성 파일은 `layers/meta-qcom-hwe/recipes-devtools/partition-utils/qcom-partition-confs/qcm6490-partitions.conf` 에 있습니다. 파티션을 추가하려면 이 파일에 행 항목을 추가하세요. 파티션을 제거하려면 해당 항목을 삭제하여 플래시할 이미지 세트에서 대상 파티션을 제거하세요.

많은 파티션이 기능 실행에 매우 중요한 역할을 합니다. 이 파일이 파티션 테이블 생성에서 어떤 역할을 하는지 자세히 알아보려면 [Qualcomm Linux에서 파티션 관리](https://docs.qualcomm.com/doc/80-70018-27KO/topic/qualcomm_linux_software_components.html#managing-partitions-in-qualcomm-linux) 를 참조하세요.

**예시 1: 파티션 추가**

LUN0에 이름이 `test` 인 파티션을 추가하려면 LUN0 섹션 아래의 `qcm6490-partitions.conf` 에 다음 라인을 추가하세요.

--partition --lun=0 --name=test --size=4096KB --type-guid=1B81F7E6-F50D-419B-A739-2AEFF8DA3335
    Copy to clipboard

그러면 4MB 파티션 test와 사용자가 결정한 GUID가 LUN0에 추가됩니다. 이 파티션은 이미지로 플래시되지 않지만 기기가 부팅된 후 raw 파티션으로 사용할 수 있습니다. 이 파티션이 LUN0에 추가되면 다음 옵션 중 하나에 표시됩니다.

- `/dev/sda<N>`
- `/dev/disk/by-partlabel/test`

참고

`qcm6490-partitions.conf` 에 변경 사항을 반영하려면 기본 공급자를 업데이트하세요. 자세한 내용은 [파티션 수정](https://docs.qualcomm.com/doc/80-70018-27KO/topic/qualcomm_linux_software_components.html#modify-partition) 을 참조하세요.

**예시 2: 새로 생성된 파티션에 플래시할 바이너리가 있는 예시 파티션 추가**

LUN0에서 이름이 `test1` 인 파티션을 추가하려면 LUN0 섹션 아래의 `qcm6490-partitions.conf` 에 다음 라인을 추가하세요.

--partition --lun=0 --name=test --size=4096KB --type-guid=1B81F7E6-F50D-419B-A739-2AEFF8DA3335 --filename=test1.bin
    Copy to clipboard

새로운 `test1.bin` 바이너리를 `build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-core-kit/$(image_name)` 에 배포하세요.

## devtool 사용

다음 예시는 Qualcomm 소프트웨어 구성 요소의 devtool 사용법을 보여줍니다.

- **커널**

    [Yocto 지원](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-3/yocto-kernel-support.html) 을 참조하세요.
- **QDL 도구**

    생성된 작업 영역에서 QDL 소스를 수정하려면 devtool을 사용하세요.

devtool modify qdl
        INFO: Source tree extracted to <workspace>/build-qcom-wayland/workspace/sources/qdl
        INFO: Using source tree as build directory since that would be the default for this recipe
        INFO: Recipe qdl now set up to build from <workspace>/build-qcom-wayland/workspace/sources/qdl
        Copy to clipboard

    1. 다음 트리는 로컬에서 체크 아웃됩니다.

tree -L 2 build-qcom-wayland/workspace/
            build-qcom-wayland/workspace/
            ├── appends
            │   └── qdl_git.bbappend
            ├── conf
            │   └── layer.conf
            ├── README
            └── sources
                └── qdl
            Copy to clipboard
    2. 체크 아웃된 QDL 소스 트리를 검사합니다.

ls workspace/sources/qdl/
            firehose.c  LICENSE  Makefile  patch.c  patch.h  program.c  program.h  qdl.c  qdl.h  README  sahara.c  ufs.c  ufs.h  util.c
            Copy to clipboard
    3. `workspace/sources/qdl/` 에서 소스 트리를 변경하고 변경 사항을 빌드합니다.

devtool build qdl
            devtool build-image qcom-multimedia-image
            Copy to clipboard
    4. 생성된 이미지는 `build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-core-kit/qcom-multimedia-image` 경로에 있습니다.
- **Weston**

devtool modify weston
        INFO: Adding local source files to srctree...
        INFO: Source tree extracted to <workspace>/build-qcom-wayland/workspace/sources/pulseaudio
        INFO: Recipe weston now set up to build from <workspace>/build-qcom-wayland/workspace/sources/weston
        Copy to clipboard

    1. 다음 트리는 로컬에서 체크 아웃됩니다.

tree -L 2 build-qcom-wayland/workspace/
            build-qcom-wayland/workspace/
            ├── appends
            │   └── weston_10.0.2.bbappend
            ├── conf
            │   └── layer.conf
            ├── README
            └── sources
                └── weston
            Copy to clipboard
    2. 체크 아웃된 Weston 소스 트리를 검사합니다.

ls workspace/sources/weston/
            clients           COPYING      desktop-shell     include      libweston          meson.build        oe-local-files  pipewire    releasing.rst  tests  weston.ini.in
            compositor        data         doc               ivi-shell    libweston-desktop  meson_options.txt  oe-logs         protocol    remoting       tools  xwayland
            CONTRIBUTING.rst  DCO-1.1.txt  fullscreen-shell  kiosk-shell  man                notes.txt          oe-workdir      README.rst  shared         wcap
            Copy to clipboard
    3. `workspace/sources/weston/` 에서 소스 트리를 변경하고 변경 사항을 빌드합니다.

devtool build weston
            devtool build-image qcom-multimedia-image
            Copy to clipboard
    4. 생성된 이미지는 `build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-core-kit/qcom-multimedia-image` 경로에 있습니다.

## 커널 커스터마이즈 하기

커널을 커스터마이즈 하려면 [Qualcomm Linux 커널 가이드](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-3/) 를 참조하세요.

## 작업 영역에 써드파티 계층 추가

작업 영역에 써드파티 계층을 추가하려면 다음 단계를 수행하세요.

1. `<WORKSPACE>/layers/` 에서 계층을 복제합니다.
2. `layers/meta-qcom-distro/conf/bblayers.conf` 파일의 계층을 다음과 같이 `BBLAYERS` 변수의 일부로 추가합니다.

# These layers hold machine specific content, aka Board Support Packages
        BSPLAYERS ?= " \
          ${WORKSPACE}/layers/meta-testlayer \
          ${WORKSPACE}/layers/meta-qcom-hwe \
          ${WORKSPACE}/layers/meta-qcom \
        "
        Copy to clipboard

계층을 복제하고 추가하면 BitBake에서 계층을 구문 분석할 수 있습니다.

## 디버깅을 위한 빌드 생성

Yocto BitBake 빌드 명령을 실행하기 전에 디버그 빌드를 생성하여 `DEBUG_BUILD=1` 을 내보내려면 다음 명령어를 실행하세요.

DEBUG_BUILD=1 bitbake qcom-multimedia-image
    Copy to clipboard

`DEBUG_BUILD` 가 **1** 로 설정된 경우 사용되는 커널 defconfig 및 config 조각을 파악하려면 [커널 레시피](https://docs.qualcomm.com/doc/80-70018-27KO/topic/qualcomm_linux_metadata_layers_overview.html#kernel-recipes-section) 에서 커널 구성을 참조하세요.

## 가장 최적화된 부트 KPI를 위한 빌드 생성

기기에 맞는 최적의 부팅 시간을 설정하려면 `PERFORMANCE_BUILD` 변수를 사용하세요. `PERFORMANCE_BUILD` 변수가 **1** 로 설정된 경우 `KERNEL_CMDLINE_EXTRA` 를 수정하여 명령줄에서 **console** 옵션을 삭제합니다. `PERFORMANCE_BUILD` 변수는 `DEBUG_BUILD` 가 **0** 으로 설정된 경우에 적용됩니다.

`PERFORMANCE_BUILD` 변수가 부팅 시간에 어떻게 영향을 미치는지 파악하려면 다음 표를 참조하세요.

|  | PERFORMANCE\_BUILD=“0” | PERFORMANCE\_BUILD=“1” |
| --- | --- | --- |
| `DEBUG_BUILD=0` | UART의 콘솔이 활성화됨 | <ul class="simple"><br><li><p>UART의 콘솔이 비활성화됨</p></li><br><li><p>최적의 부팅 시간</p></li><br></ul> |
| `DEBUG_BUILD=1` | UART의 콘솔이 활성화됨 | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">DEBUG_BUILD</span></code> 가 <code class="docutils literal notranslate"><span class="pre">&quot;1&quot;</span></code> 로 설정된 경우 <code class="docutils literal notranslate"><span class="pre">PERFORMANCE_BUILD=&quot;1&quot;</span></code></p></li><br></ul> |

Last Published: Jul 30, 2025

[Previous Topic
Qualcomm Linux 소프트웨어 구성 요소](https://docs.qualcomm.com/bundle/publicresource/80-70018-27KO/topics/qualcomm_linux_software_components.md) [Next Topic
디버그](https://docs.qualcomm.com/bundle/publicresource/80-70018-27KO/topics/debug.md)