From 4bb810fc5d2e8735b1a51a921c4c2d960b3c8c32 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Tue, 27 Jun 2023 00:00:30 +0800 Subject: [PATCH] board/sifive/hifive-unleashed: include QEMU instructions in readme.txt The upstream QEMU 'sifive_u' machine supports running upstream U-Boot for the SiFive HiFive Unleashed board out of the box. Add the QEMU instructions for testing in readme.txt. Signed-off-by: Bin Meng Signed-off-by: Thomas Petazzoni --- board/sifive/hifive-unleashed/readme.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/board/sifive/hifive-unleashed/readme.txt b/board/sifive/hifive-unleashed/readme.txt index 3263913e9c..e9ccb26fa6 100644 --- a/board/sifive/hifive-unleashed/readme.txt +++ b/board/sifive/hifive-unleashed/readme.txt @@ -113,3 +113,20 @@ Booting the SPI flash on the board Make sure that the all DIP switches are set to the off position for default boot mode (MSEL mode = 0110) to boot from SPI flash. + +Testing under QEMU +================== + +The SD card image can be tested using QEMU: + +$ qemu-system-riscv64 -M sifive_u,msel=11 -smp 5 -m 8G \ + -display none -serial stdio -nic user \ + -bios output/images/u-boot-spl.bin \ + -drive file=output/images/sdcard.img,if=sd + +The SPI flash image can be tested with a slightly different command: + +$ qemu-system-riscv64 -M sifive_u,msel=6 -smp 5 -m 8G \ + -display none -serial stdio -nic user \ + -bios output/images/u-boot-spl.bin \ + -drive file=output/images/spi-nor.img,if=mtd