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/dts
arm32 시스템을 사용하고 있으며 디렉터리가 없습니다 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/
아래 내용을 확인하세요! 이게 도움이 되길 바란다!