diff --git a/modules/axruntime/src/lib.rs b/modules/axruntime/src/lib.rs index 3da48db99..0a512db34 100644 --- a/modules/axruntime/src/lib.rs +++ b/modules/axruntime/src/lib.rs @@ -110,6 +110,8 @@ static INITED_CPUS: AtomicUsize = AtomicUsize::new(0); fn is_init_ok() -> bool { INITED_CPUS.load(Ordering::Acquire) == axconfig::SMP } + +#[cfg(feature = "alloc")] cfg_if::cfg_if! { if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] { unsafe fn get_boot_str() -> &'static str { @@ -129,21 +131,7 @@ cfg_if::cfg_if! { } } } -// fn get_boot_str() -> &'static str { -// if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { -// let cmdline_buf: &[u8] = &axhal::COMLINE_BUF; -// let mut len = 0; -// for c in cmdline_buf.iter() { -// if *c == 0 { -// break; -// } -// len += 1; -// } -// core::str::from_utf8(&cmdline_buf[..len]).unwrap() -// } else { -// dtb::get_node("chosen").unwrap().prop("bootargs").str() -// }; -// } + /// The main entry point of the ArceOS runtime. /// /// It is called from the bootstrapping code in [axhal]. `cpu_id` is the ID of