diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index 4cf698cf4..b132a8126 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -494,22 +494,22 @@ void romboot(void) void spisdcardboot(void) { - printf("SD Card via SPI Initialising\n"); - if(spi_sdcard_goidle() == 0) { - printf("SD Card Timeout\n"); - return; - } - - if(spi_sdcard_readMBR() == 0) { - printf("SD Card MBR Timeout\n"); - return; - } - - if(spi_sdcard_readFile("IMAGE","",MAIN_RAM_BASE+KERNEL_IMAGE_RAM_OFFSET)==0) return; - if(spi_sdcard_readFile("ROOTFS~1","CPI",MAIN_RAM_BASE+ROOTFS_IMAGE_RAM_OFFSET)==0) return; - if(spi_sdcard_readFile("RV32","DTB",MAIN_RAM_BASE+DEVICE_TREE_IMAGE_RAM_OFFSET)==0) return; - if(spi_sdcard_readFile("EMULATOR","BIN",EMULATOR_RAM_BASE)==0) return; - - boot(0,0,0,EMULATOR_RAM_BASE + EMULATOR_IMAGE_RAM_OFFSET); + printf("SD Card via SPI Initialising\n"); + if(spi_sdcard_goidle() == 0) { + printf("SD Card Timeout\n"); + return; + } + + if(spi_sdcard_readMBR() == 0) { + printf("SD Card MBR Timeout\n"); + return; + } + + if(spi_sdcard_readFile("IMAGE","",MAIN_RAM_BASE+KERNEL_IMAGE_RAM_OFFSET)==0) return; + if(spi_sdcard_readFile("ROOTFS~1","CPI",MAIN_RAM_BASE+ROOTFS_IMAGE_RAM_OFFSET)==0) return; + if(spi_sdcard_readFile("RV32","DTB",MAIN_RAM_BASE+DEVICE_TREE_IMAGE_RAM_OFFSET)==0) return; + if(spi_sdcard_readFile("EMULATOR","BIN",EMULATOR_RAM_BASE)==0) return; + + boot(0,0,0,EMULATOR_RAM_BASE + EMULATOR_IMAGE_RAM_OFFSET); } #endif