谢谢你的回答。
我把文件改成这样, 就是把上面那段添加到system-user.dtsi
文件如下:
/include/ "system-conf.dtsi"
/ {
};
/ {
};
usb_0: usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2";
clocks =
dr_mode = "host";
interrupt-parent = ;
interrupts = <0 21 4>;
reg = <0xe0002000 0x1000>;
usb-phy = ;
};
usb_phy0: phy0 {
compatible = "ulpi-phy";
#phy-cells = <0>;
reg = <0xe0002000 0x1000>;
view-port = <0x170>;
drv-vbus;
}
结果报错如下:
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:14
Checking sstate mirror object availability: 100% |###############| Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: device-tree-xilinx+gitAUTOINC+f38738e568-r0 do_compile: Function failed: do_compile (log file is located at /home/liwenz/alinx/gpio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+f38738e568-r0/temp/log.do_compile.130709)
ERROR: Logfile of failure stored in: /home/liwenz/alinx/gpio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+f38738e568-r0/temp/log.do_compile.130709
Log data follows:
| DEBUG: Executing shell function do_compile
| Error: /home/liwenz/alinx/gpio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+f38738e568-r0/system-user.dtsi:7.8-20 syntax error
| FATAL ERROR: Unable to parse input tree
| WARNING: /home/liwenz/alinx/gpio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+f38738e568-r0/temp/run.do_compile.130709:1 exit 1 from 'dtc -I dts -O dtb -R 8 -p 0x1000 -b 0 -i /home/liwenz/alinx/gpio/build/../components/plnx_workspace/device-tree/device-tree -i /home/liwenz/alinx/gpio/build/tmp/work-shared/plnx-zynq7/kernel-source/include -i /home/liwenz/alinx/gpio/build/tmp/work-shared/plnx-zynq7/kernel-source/include -i /home/liwenz/alinx/gpio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+f38738e568-r0 -o ${DTS_NAME}.dtb `basename ${DTS_FILE}`.pp'
| ERROR: Function failed: do_compile (log file is located at /home/liwenz/alinx/gpio/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/device-tree/xilinx+gitAUTOINC+f38738e568-r0/temp/log.do_compile.130709)
ERROR: Task (/home/liwenz/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3004 tasks of which 2991 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/liwenz/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: Failed to build project
其实别人给我这么说的:
Please follow below steps.
1 . Open system-user.dtsi and add below device tree changes.
vim project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
/include/ "system-conf.dtsi"
/ {
};
&usb0 {
dr_mode = "host";
status = "okay";
};
&usb1 {
dr_mode = "host";
status = "okay";
};
petalinux-build
我这么做,可以 petalinux-build 但没有变化,还是看不到u 盘。
还有devicetree 在petalinux-build 后是不是有个结果文件,这样可以核对检查。
workproject/components/plnx_workspace/device-tree/device-tree 下有个
zynq-7000.dtsi 我以为他就是结果文件
上面推荐那么修改,这个文件没变化。 usb 段是这样的
usb0: usb@e0002000 {
compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
status = "disabled";
clocks = ;
interrupt-parent = ;
interrupts = <0 21 4>;
reg = <0xe0002000 0x1000>;
phy_type = "ulpi";
};
这里有个disabled , 但我发现串口, sd 都是disable 但他们可以用