From dfb2fe0b80390b045dfc8eb14e133df61015764d Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 3 Nov 2017 16:09:22 +0000 Subject: [PATCH] runtime: allow #[cfg(not(has_ethmac))] builds. --- artiq/firmware/runtime/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/artiq/firmware/runtime/lib.rs b/artiq/firmware/runtime/lib.rs index d66687f3a..3f874ebbd 100644 --- a/artiq/firmware/runtime/lib.rs +++ b/artiq/firmware/runtime/lib.rs @@ -36,6 +36,7 @@ macro_rules! borrow_mut { } mod config; +#[cfg(has_ethmac)] mod ethmac; #[cfg(has_rtio_core)] mod rtio_mgt; @@ -84,6 +85,17 @@ fn startup() { #[cfg(has_ad9154)] board::ad9154::init().expect("cannot initialize AD9154"); + #[cfg(has_ethmac)] + startup_ethernet(); + #[cfg(not(has_ethmac))] + { + info!("done"); + loop {} + } +} + +#[cfg(has_ethmac)] +fn startup_ethernet() { let hardware_addr; match config::read_str("mac", |r| r?.parse()) { Err(()) => {