software/bios: Fix build error for targets with sdcard but without main_ram_base
sdcardboot_from_bin assumes that the MAIN_RAM_BASE is set which is not always the case. This commit deactivates the sdcardboot_from_bin support for targets without main-ram. In those cases, the boot_from_json method can still be used.
This commit is contained in:
parent
edd98c23cb
commit
6ca890ebc0
|
@ -800,6 +800,7 @@ static void sdcardboot_from_json(const char * filename)
|
||||||
boot(boot_r1, boot_r2, boot_r3, boot_addr);
|
boot(boot_r1, boot_r2, boot_r3, boot_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MAIN_RAM_BASE
|
||||||
static void sdcardboot_from_bin(const char * filename)
|
static void sdcardboot_from_bin(const char * filename)
|
||||||
{
|
{
|
||||||
uint32_t result;
|
uint32_t result;
|
||||||
|
@ -808,6 +809,7 @@ static void sdcardboot_from_bin(const char * filename)
|
||||||
return;
|
return;
|
||||||
boot(0, 0, 0, MAIN_RAM_BASE);
|
boot(0, 0, 0, MAIN_RAM_BASE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void sdcardboot(void)
|
void sdcardboot(void)
|
||||||
{
|
{
|
||||||
|
@ -824,9 +826,11 @@ void sdcardboot(void)
|
||||||
printf("Booting from boot.json...\n");
|
printf("Booting from boot.json...\n");
|
||||||
sdcardboot_from_json("boot.json");
|
sdcardboot_from_json("boot.json");
|
||||||
|
|
||||||
|
#ifdef MAIN_RAM_BASE
|
||||||
/* Boot from boot.bin */
|
/* Boot from boot.bin */
|
||||||
printf("Booting from boot.bin...\n");
|
printf("Booting from boot.bin...\n");
|
||||||
sdcardboot_from_bin("boot.bin");
|
sdcardboot_from_bin("boot.bin");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Boot failed if we are here... */
|
/* Boot failed if we are here... */
|
||||||
printf("SDCard boot failed.\n");
|
printf("SDCard boot failed.\n");
|
||||||
|
|
Loading…
Reference in New Issue