From 20bb50931c795554aec0f1adaf5fc020c22e2907 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Mon, 7 Mar 2022 17:51:32 +0800 Subject: [PATCH] libconfig: remove "no_i2c" feature, opt-level 's' --- Cargo.toml | 2 +- libconfig/Cargo.toml | 1 - libconfig/src/net_settings.rs | 6 ++---- szl/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c23f4aa..8f18210 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ members = [ panic = "abort" debug = true codegen-units = 1 -opt-level = 'z' +opt-level = 's' lto = true debug-assertions = false overflow-checks = false diff --git a/libconfig/Cargo.toml b/libconfig/Cargo.toml index 7e3649c..a490764 100644 --- a/libconfig/Cargo.toml +++ b/libconfig/Cargo.toml @@ -15,5 +15,4 @@ target_zc706 = [] target_coraz7 = [] target_redpitaya = [] target_kasli_soc = [] -no_i2c = [] ipv6 = [] diff --git a/libconfig/src/net_settings.rs b/libconfig/src/net_settings.rs index 0a16426..fa3079f 100644 --- a/libconfig/src/net_settings.rs +++ b/libconfig/src/net_settings.rs @@ -30,7 +30,7 @@ impl fmt::Display for NetAddresses { } } -#[cfg(all(feature = "target_kasli_soc", not(feature = "no_i2c")))] +#[cfg(feature = "target_kasli_soc")] fn get_address_from_eeprom() -> EthernetAddress { use libboard_zynq::i2c::{I2c, eeprom}; @@ -55,10 +55,8 @@ pub fn get_addresses(cfg: &Config) -> NetAddresses { let mut hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x55]); #[cfg(feature = "target_redpitaya")] let mut ipv4_addr = IpAddress::v4(192, 168, 1, 55); - #[cfg(all(feature = "target_kasli_soc", not(feature = "no_i2c")))] + #[cfg(feature = "target_kasli_soc")] let mut hardware_addr = get_address_from_eeprom(); - #[cfg(all(feature = "target_kasli_soc", feature = "no_i2c"))] - let mut hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x56]); #[cfg(feature = "target_kasli_soc")] let mut ipv4_addr = IpAddress::v4(192, 168, 1, 56); diff --git a/szl/Cargo.toml b/szl/Cargo.toml index 51ef256..b1a33ae 100644 --- a/szl/Cargo.toml +++ b/szl/Cargo.toml @@ -21,4 +21,4 @@ libboard_zynq = { path = "../libboard_zynq" } libsupport_zynq = { path = "../libsupport_zynq" } libcortex_a9 = { path = "../libcortex_a9" } libregister = { path = "../libregister" } -libconfig = { path = "../libconfig", features = ["no_i2c"] } +libconfig = { path = "../libconfig" }