# 修改分割區佈局

本節說明如何新增、刪除、修改或重新命名分區。為 UFS 和 eMMC 裝置定義分區的組態檔位於：

- `layers/meta-qcom-hwe/recipes-devtools/partition-utils/qcom-partition-confs/ufs/qcm6490-partitions.conf` (用於 UFS)
- `layers/meta-qcom-hwe/recipes-devtools/partition-utils/qcom-partition-confs/emmc/qcm6490-partitions.conf` (用於 eMMC)

若要新增分區，請在此檔案中新增行項目。若要移除分區，請刪除對應的項目以從要燒錄的映像中移除目標分區。

多數分割區對功能至關重要。欲深入瞭解此檔案在產生分區表時所扮演的角色，請參閱 [管理 Qualcomm Linux 中的分區](https://docs.qualcomm.com/doc/80-70020-27TC/topic/managing_partitions_in_qualcomm_linux.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

這會在 LUN0 中新增一項 4 MB 的分割區測試，以及您指定的 GUID。此分割區未燒錄任何影像檔，但在裝置開機後可作為原始分割區使用。隨著此分割區新增至 LUN0，將出現在下列選項中：

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

備註

為反映 `qcm6490-partitions.conf` 中的變更，請更新首選提供者設定。如需詳細資訊，請參閱 [修改分割磁碟](https://docs.qualcomm.com/doc/80-70020-27TC/topic/managing_partitions_in_qualcomm_linux.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

在 `build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-core-kit/$(image_name)` 中部署新的 `test1.bin` 二進位檔案。

## 下一步

- 自訂核心

    若要自訂核心，請參閱 [Qualcomm Linux 核心指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-3/)。

Last Published: Dec 23, 2025

[Previous Topic
自訂映像功能](https://docs.qualcomm.com/bundle/publicresource/80-70020-27TC/topics/customizing_image_features.md) [Next Topic
使用 devtool](https://docs.qualcomm.com/bundle/publicresource/80-70020-27TC/topics/use_of_devtool.md)