logging: bugfix #137: Init log module to enable logging macros

This commit is contained in:
Yifan Wu 2025-02-10 00:29:05 +08:00
parent fcf104f124
commit 6699e80a30
2 changed files with 52 additions and 1 deletions

View file

@ -31,6 +31,8 @@ extern crate alloc;
#[macro_use]
extern crate bitflags;
use log::*;
#[path = "boards/qemu.rs"]
mod board;
@ -40,6 +42,7 @@ mod config;
mod drivers;
pub mod fs;
pub mod lang_items;
mod logging;
pub mod mm;
pub mod sbi;
pub mod sync;
@ -67,7 +70,8 @@ fn clear_bss() {
/// the rust entry-point of os
pub fn rust_main() -> ! {
clear_bss();
println!("[kernel] Hello, world!");
logging::init();
info!("[kernel] Hello, world!");
mm::init();
mm::remap_test();
trap::init();