# 使用 devtool

以下範例顯示 Qualcomm 軟體元件的 devtool 使用方式：

- **核心**

    請參閱 [使用 Yocto 來開發核心](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-3/kernel-development.html#yocto-kernel-support)。
- **QDL 工具**

    使用 devtool 在建立的工作區中修改 QDL 原始碼。

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 Sourcetree：

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/` 下的 Sourcetree ，並建置您的更改：

devtool build qdl
            devtool build-image qcom-multimedia-image
            Copy to clipboard

    產生的影像位於 `build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-core-kit/qcom-multimedia-image` 路徑中。
- **Weston**

    使用 devtool 在建立的工作區中修改 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 Sourcetree：

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

    產生的影像位於 `build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-core-kit/qcom-multimedia-image` 路徑中。

Last Published: Dec 23, 2025

[Previous Topic
修改分割區佈局](https://docs.qualcomm.com/bundle/publicresource/80-70020-27TC/topics/modifying_partition_layout.md) [Next Topic
將第三方層新增至工作區](https://docs.qualcomm.com/bundle/publicresource/80-70020-27TC/topics/adding_third_party_layers_to_workspace.md)