06-20-2017 08:17 AM
For some reason the xilinx-v2017.1 branch of the kernel fails to detect the SD card in QEMU and thus is unable to mount the root filesystem. Here is a small script which builds the kernel and QEMU from the Xilinx sources and creates an SD card image from Arch Linux for the Zedboard.
qemu-xlnx.git/aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial /dev/null -serial mon:stdio -nographic -dtb BOOT.fs/devicetree.dtb -kernel BOOT.fs/zImage -drive if=sd,format=raw,index=0,file=IMAGE.dd -boot mode=5 -append "root=/dev/mmcblk0p2 ro rootwait rootfstype=ext4"
The xilinx-v2016.4 branch boots up just fine with the same script.
Any idea what changed between those branches or what I'm missing here?
Thanks in advance,
06-21-2017 01:21 AM
Same here, xilinx-v2016.04 works fine
mmc0: new SDHC card at address 4567 mmcblk0: mmc0:4567 QEMU! 7.40 GiB
but xilinx-v2017.1 does not
Waiting for root device /dev/mmcblk0p2... mmc0: Skipping voltage switch
03-31-2018 06:20 AM
After 10 hours of debugging, I found the problem to be in linux-xlnx/drivers/mmc/core/sd.c : the mmc_sd_get_cid() function calls mmc_set_signal_voltage() which always return an error, the modification I did was to set the return code of the function to zero, so that mmc_sd_get_cid() thinks it succeeded and bam, QEMU now is able to mount the rootfs successfully =).
Please let me reiterate my gratitude for your post, I was desperate and you motivated me to dig deeper.