Based on my investigation so far, I believe this is a devicetree issue. My
understanding of devicetrees at the moment is rudimentary. Please don't
assume I might know something basic.
I am working with a custom board based on the Xilinx zcu102-zynqmp
(aarch64) board. The build currently boots and runs fine on the actual
board. When I try to use runqemu to start an emulator, it hangs at
"waiting for root device /dev/mmcblk0p2" I have seen posts that suggest
this is a problem with mmc0 card detection like a wrong pin or something.
Some posts suggest it can be worked around by adding "broken-cd" to the
device configuration, telling the OS not to wait for the card detection.
To test this, I tried to modify the flattened devicetree from uboot and
boot with the "broken-cd" configuration, but it continues to hang at the
same place.
aliases {
...
mmc0 = "/amba/sdhci@ff160000";
...
}
runqemu slirp zcu102-zynqmp.....
ZynqMP> setenv bootargs $bootargs root=/dev/mmcblk0p2 rw rootwait earlycon
clk_ignore_unused
ZynqMP> fatload mmc 0 0x4000000 devicetree-gen5.dtb
ZynqMP> fatload mmc $sdbootdev:$partid 0x80000 Image #(sdbootdev=0,
partid=auto)
ZynqMP> fdt addr 0x4000000
ZynqMP> fdt resize 1024
ZynqMP> fdt set /amba/sdhci@ff160000 broken-cd
ZynqMP> fdt list /amba/sdhci@ff160000
sdhci@ff160000 {
broken-cd;
u-boot,dm-pre-reloc;
compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
status = "okay";
interrupt-parent = <0x00000004>;
interrupts = <0x00000000 0x00000030 0x00000004>;
reg = <0x00000000 0xff160000 0x00000000 0x00001000>;
clock-names = "clk_xin", "clk_ahb";
xlnx,device_id = <0x00000000>;
#stream-id-cells = <0x00000001>;
iommus = <0x00000009 0x00000870>;
power-domains = <0x0000001f>;
nvmem-cells = <0x0000001c>;
nvmem-cell-names = "soc_revision";
clocks = <0x00000003 0x00000036 0x00000003 0x0000001f>;
pinctrl-names = "default";
pinctrl-0 = <0x00000020>;
xlnx,mio_bank = <0x00000000>;
};
ZynqMP> booti 0x80000 - 0x4000000
....
.... waiting for root device /dev/mmcblk0p2 ....
I also tried building a non-custom build for the zcu102-zynqmp board and it
boots fine in qemu so this is definitely related to my devicetree or
configurations.
I have a bunch of questiions. Any help is appreciated.
What changes might I need to make to get this to boot in qemu?
Should I expect to need a different devicetree for qemu than for the custom
board?
How can I know what the differences should be?
How do I specify a different devicetree for qemu if necessary?
Thank you,
Derek
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#49302): https://lists.yoctoproject.org/g/yocto/message/49302
Mute This Topic: https://lists.yoctoproject.org/mt/73404278/21656
Group Owner: [email protected]
Unsubscribe:
https://lists.yoctoproject.org/g/yocto/leave/6691583/737036229/xyzzy
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-