forked from M-Labs/artiq
bootloader: add no_flash_boot config option to force network boot
This commit is contained in:
parent
e2f9f59472
commit
9dc82bd766
|
@ -14,7 +14,7 @@ use board_misoc::{ident, cache, sdram, boot, mem as board_mem};
|
||||||
#[cfg(has_slave_fpga_cfg)]
|
#[cfg(has_slave_fpga_cfg)]
|
||||||
use board_misoc::slave_fpga;
|
use board_misoc::slave_fpga;
|
||||||
#[cfg(has_ethmac)]
|
#[cfg(has_ethmac)]
|
||||||
use board_misoc::{clock, ethmac, net_settings};
|
use board_misoc::{clock, ethmac, config, net_settings};
|
||||||
use board_misoc::uart_console::Console;
|
use board_misoc::uart_console::Console;
|
||||||
|
|
||||||
fn check_integrity() -> bool {
|
fn check_integrity() -> bool {
|
||||||
|
@ -420,9 +420,13 @@ pub extern fn main() -> i32 {
|
||||||
|
|
||||||
if startup() {
|
if startup() {
|
||||||
println!("");
|
println!("");
|
||||||
|
if !config::read_str("no_flash_boot", |r| r == Ok("1")) {
|
||||||
#[cfg(has_slave_fpga_cfg)]
|
#[cfg(has_slave_fpga_cfg)]
|
||||||
load_slave_fpga();
|
load_slave_fpga();
|
||||||
flash_boot();
|
flash_boot();
|
||||||
|
} else {
|
||||||
|
println!("Flash booting has been disabled.");
|
||||||
|
}
|
||||||
#[cfg(has_ethmac)]
|
#[cfg(has_ethmac)]
|
||||||
network_boot();
|
network_boot();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue