From: Gabriel Somlo Date: Thu, 19 Mar 2020 23:36:24 +0000 (-0400) Subject: bios: make SPI SDCard boot configs other than linux-on-litex-vexriscv X-Git-Tag: 24jan2021_ls180~548^2~4 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f90abea8ea47dc4fde0d3325eb3339930cc987f;p=litex.git bios: make SPI SDCard boot configs other than linux-on-litex-vexriscv When NOT on linux-on-litex-vexriscv, we load 'boot.bin' to MAIN_RAM_BASE, and jump to it. Signed-off-by: Gabriel Somlo --- diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index b132a812..24937ec1 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -505,11 +505,19 @@ void spisdcardboot(void) return; } +#if defined(CONFIG_CPU_TYPE_VEXRISCV) && defined(CONFIG_CPU_VARIANT_LINUX) 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); +#else + if(spi_sdcard_readFile("BOOT","BIN",MAIN_RAM_BASE)==0) { + printf("SD Card SPI boot failed\n"); + return; + } + boot(0, 0, 0, MAIN_RAM_BASE); +#endif } #endif