デバイスツリーソースを含む(.dtsi)ファイルはどこにありますか?

デバイスツリーソースを含む(.dtsi)ファイルはどこにありますか?

USBエンドポイントがどのように定義されているのか、そしてデバイスツリーの詳細を学ぶために私のデバイスツリーを見てみましょう。私は現在BeagleBone Blackイメージを使用しており、am335x-boneblack-uboot-univ.dtbデバイスツリーblobから起動していると思います。以下では、デバイスが起動時に提供する出力を表示できます。

U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **


U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2082 bytes read in 28 ms (72.3 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.19.94-ti-r42 ...
10095592 bytes read in 657 ms (14.7 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/4.19.94-ti-r42/am335x-boneblack-uboot-univ.dtb ...
174145 bytes read in 53 ms (3.1 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: uboot loading of [/lib/firmware/BB-ADC-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_adc=1]...
uboot_overlays: loading /lib/firmware/am335x-osd3358-mt-01.dtbo ...
5769 bytes read in 1078 ms (4.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BBBW-WL1835-00A0.dtbo ...
3536 bytes read in 1650 ms (2 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1614 bytes read in 1351 ms (1000 Bytes/s)
uboot_overlays: uboot loading of [/lib/firmware/BB-HDMI-TDA998x-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_video=1]...
uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo ...
3653 bytes read in 1216 ms (2.9 KiB/s)
loading /boot/initrd.img-4.19.94-ti-r42 ...
7051030 bytes read in 468 ms (14.4 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:6b9716 88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f946000, end 8ffff716 ... OK
   Loading Device Tree to 8f8b6000, end 8f945fff ... OK

Starting kernel ...

am335x-boneblack-uboot-univ.dtsソースファイルを見た後、そこにいくつかの.dtsiインクルードファイルがあることがわかります。 .dts ファイルは次のとおりです。

/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-bone-common-univ.dtsi"

/ {
    model = "TI AM335x BeagleBone Black";
    compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
};

&sgx {
    status = "okay";
};

&cpu0_opp_table {
    /*
    * All PG 2.0 silicon may not support 1GHz but some of the early
    * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
    * to support 1GHz OPP so enable it for PG 2.0 on this board.
    */
    oppnitro-1000000000 {
        opp-supported-hw = <0x06 0x0100>;
    };
};

&ldo3_reg {
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
};

&mmc1 {
    vmmc-supply = <&vmmcsd_fixed>;
};

.dtsiインクルードファイルが見つかる場所と、そのファイルに残りのデバイスツリー情報が含まれているかどうかを知りたいです。たぶんこれは私が見なければならないデバイスツリーではないかもしれません。私の/boot/dtbs/4.19.94-ti-r42ディレクトリには多すぎてよくわかりません。

私の研究によると、.dtsiファイルはここに保存されているようですが、arch/arm/boot/dtsarm32システムを使用しており、ディレクトリはありませんarch

デバイスツリーの編集について詳しくは、ありがとうございます。

詳細については、uEnv.txtファイルを参照してください。

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.19.94-ti-r42
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
uboot_overlay_addr0=/lib/firmware/am335x-osd3358-mt-01.dtbo
uboot_overlay_addr1=/lib/firmware/BB-BBBW-WL1835-00A0.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

ディレクトリの内容は次のとおりです/boot/dtbs/4.19.94-ti-r42

debian@beaglebone:~$ ls /boot/dtbs/4.19.94-ti-r42/
am335x-abbbi.dtb
am335x-baltos-ir2110.dtb
am335x-baltos-ir3220.dtb
am335x-baltos-ir5221.dtb
am335x-base0033.dtb
am335x-boneblack-audio.dtb
am335x-boneblack-bbb-exp-c.dtb
am335x-boneblack-bbb-exp-r.dtb
am335x-boneblack-bbbmini.dtb
am335x-boneblack.dtb
am335x-boneblack-prusuart.dtb
am335x-boneblack-roboticscape.dtb
am335x-boneblack-uboot.dtb
am335x-boneblack-uboot-univ.dtb
am335x-boneblack-wireless.dtb
am335x-boneblack-wireless-roboticscape.dtb
am335x-boneblack-wl1835mod.dtb
am335x-boneblue.dtb
am335x-bone.dtb
am335x-bonegreen.dtb
am335x-bonegreen-gateway.dtb
am335x-bonegreen-wireless.dtb
am335x-bonegreen-wireless-uboot-univ.dtb
am335x-bone-uboot-univ.dtb
am335x-chiliboard.dtb
am335x-cm-t335.dtb
am335x-evm.dtb
am335x-evmsk.dtb
am335x-icev2.dtb
am335x-icev2-prueth.dtb
am335x-lxm.dtb
am335x-moxa-uc-8100-me-t.dtb
am335x-nano.dtb
am335x-osd3358-sm-red.dtb
am335x-pdu001.dtb
am335x-pepper.dtb
am335x-phycore-rdk.dtb
am335x-pocketbeagle.dtb
am335x-revolve.dtb
am335x-sancloud-bbe.dtb
am335x-sbc-t335.dtb
am335x-shc.dtb
am335x-sl50.dtb
am335x-wega-rdk.dtb
am437x-cm-t43.dtb
am437x-gp-evm.dtb
am437x-gp-evm-hdmi.dtb
am437x-idk-evm.dtb
am437x-sbc-t43.dtb
am437x-sk-evm.dtb
am43x-epos-evm.dtb
am43x-epos-evm-hdmi.dtb
am5729-beagleboneai.dtb
am5729-beagleboneai-roboticscape.dtb
am572x-idk.dtb
am574x-idk.dtb
am57xx-beagle-x15.dtb
am57xx-beagle-x15-revb1.dtb
am57xx-beagle-x15-revc.dtb
am57xx-cl-som-am57x.dtb
am57xx-sbc-am57x.dtb
dra71-evm.dtb
dra72-evm.dtb
dra72-evm-revc.dtb
dra76-evm.dtb
dra7-evm.dtb
omap5-cm-t54.dtb
omap5-igep0050.dtb
omap5-sbc-t54.dtb
omap5-uevm.dtb

ベストアンサー1

探しているファイルはdtsi実際のソースディレクトリにあります。いいえブートマウント。この場合、ファイルは """ファイルdtsiにコンパイルされます。dtbこれはCヘッダーファイルのように機能し、 ' dts'ファイルに "追加"されてから ' dtb'にコンパイルされます。

armの場合は、Linuxのソースコードで以下のarch/arm/boot/dts/内容を確認してください!これが役立つことを願っています!

おすすめ記事