Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Menggunakan beberapa DT
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Banyak vendor SoC dan ODM mendukung penggunaan beberapa hierarki perangkat (DT) di perangkat,
sehingga satu image dapat mendukung beberapa SKU atau konfigurasi. Dalam kasus tersebut, bootloader akan mengidentifikasi hardware dan memuat DT yang sesuai saat runtime:

Gambar 1. Beberapa overlay hierarki perangkat (DTO) di bootloader.
Catatan: Penggunaan beberapa DT tidak wajib.
Penyiapan
Untuk menambahkan dukungan bagi beberapa DT ke model DTO, siapkan daftar DT utama
dan daftar DT overlay lainnya.

Gambar 2. Implementasi DTO runtime untuk beberapa DT.
Bootloader harus dapat:
- Baca ID SoC dan pilih DT utama yang sesuai.
- Baca ID papan dan pilih kumpulan DT overlay yang sesuai.
Hanya satu DT utama yang harus dipilih untuk digunakan saat runtime. Beberapa DT overlay
dapat dipilih, tetapi DT tersebut harus kompatibel dengan DT utama yang dipilih. Menggunakan
beberapa overlay dapat membantu menghindari penyimpanan satu overlay per board dalam partisi DTBO
dan memungkinkan bootloader menentukan subset overlay yang diperlukan
berdasarkan ID board (atau mungkin dengan memeriksa periferal). Misalnya,
Papan A mungkin memerlukan perangkat yang ditambahkan oleh overlay 1, 3, dan 5, sedangkan
Papan B mungkin memerlukan perangkat yang ditambahkan oleh overlay 1, 4, dan 5.
Partisi
Untuk membuat partisi, tentukan lokasi tepercaya dan dapat diakses runtime bootloader
di memori flash untuk menyimpan DTB dan DTBO (bootloader harus dapat menemukan
file ini dalam proses pencocokan). Perlu diingat bahwa DTB dan DTBO tidak dapat
ada di partisi yang sama. Jika DTB/DTBO Anda berada di
partisi dtb
/dtbo
, gunakan struktur tabel dan format
header yang dijelaskan dalam format
partisi DTB dan DTBO.
Berjalan di bootloader
Untuk menjalankan:
- Identifikasi SoC dan muat .dtb yang sesuai dari
penyimpanan ke memori.
- Identifikasi board dan muat
.dtbo
yang sesuai dari penyimpanan ke memori.
- Tumpang-tindih
.dtb
dengan .dtbo
menjadi DT
gabungan.
- Mulai kernel dengan alamat memori DT yang digabungkan.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-26 UTC."],[],[],null,["# Use multiple DTs\n\nMany SoC vendors and ODMs support the use of multiple device trees (DTs) on a device,\nenabling one image to power multiple SKUs or configurations. In such cases, the\nbootloader identifies the hardware and loads the corresponding DT at runtime:\n\n**Figure 1.** Multiple device tree overlays (DTOs) in bootloader.\n\n**Note:** Using multiple DTs isn't mandatory.\n\nSet up\n------\n\nTo add support for multiple DTs to the DTO model, set up a list of main DTs\nand another list of overlay DTs.\n\n**Figure 2.** Runtime DTO implementation for multiple DTs.\n\nThe bootloader should be able to:\n\n- Read the SoC ID and select the corresponding main DT.\n- Read the board ID and select the set of overlay DTs accordingly.\n\nOnly one main DT should be selected for use at runtime. Multiple overlay DTs\nmay be selected but they must be compatible with the chosen main DT. Using\nmultiple overlays can help avoid storing one overlay per board within the DTBO\npartition and enable the bootloader to determine the subset of required overlays\nbased on the board ID (or possibly by probing the peripherals). For\nexample, Board A may need the devices added by the overlays 1, 3, and 5 while\nBoard B may need the devices added by the overlays 1, 4, and 5.\n\nPartition\n---------\n\nTo partition, determine a bootloader runtime-accessible and trusted location\nin flash memory to store the DTBs and DTBOs (bootloader must be able to locate\nthese files in the matching process). Keep in mind that DTBs and DTBOs cann't\nexist in the same partition. If your DTBs/DTBOs are in the\n`dtb`/`dtbo` partition, use the table structure and header\nformat detailed in [DTB and DTBO\npartition format](/docs/core/architecture/dto/partitions).\n\nRun in bootloader\n-----------------\n\nTo run:\n\n1. **Identify the SoC** and load the corresponding .dtb from storage into memory.\n2. **Identify the board** and load the corresponding `.dtbo` from storage into memory.\n3. Overlay the `.dtb` with the `.dtbo` to be a merged DT.\n4. Start kernel given the memory address of the merged DT."]]