From 09711814731ead7e4a406425fabe639dcab028a0 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Fri, 24 May 2019 09:09:35 +0800 Subject: [PATCH] Fix compilation for rv32 --- kernel/src/arch/riscv32/board/virt/mod.rs | 7 +++++++ kernel/src/arch/riscv32/mod.rs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/kernel/src/arch/riscv32/board/virt/mod.rs b/kernel/src/arch/riscv32/board/virt/mod.rs index a20be5a..210b57c 100644 --- a/kernel/src/arch/riscv32/board/virt/mod.rs +++ b/kernel/src/arch/riscv32/board/virt/mod.rs @@ -1,3 +1,6 @@ +#[path = "../../../../drivers/gpu/fb.rs"] +pub mod fb; + use crate::memory::phys_to_virt; /// Mask all external interrupt except serial. @@ -16,3 +19,7 @@ pub unsafe fn enable_serial_interrupt() { UART16550.add(4).write_volatile(0x0B); UART16550.add(1).write_volatile(0x01); } + +pub fn probe_fb_info(_width: u32, _height: u32, _depth: u32) -> fb::FramebufferResult { + unimplemented!() +} diff --git a/kernel/src/arch/riscv32/mod.rs b/kernel/src/arch/riscv32/mod.rs index 185bfe4..b580fef 100644 --- a/kernel/src/arch/riscv32/mod.rs +++ b/kernel/src/arch/riscv32/mod.rs @@ -1,12 +1,12 @@ #[cfg(feature = "board_u540")] #[path = "board/u540/mod.rs"] -mod board; +pub mod board; #[cfg(feature = "board_rocket_chip")] #[path = "board/rocket_chip/mod.rs"] -mod board; +pub mod board; #[cfg(not(any(feature = "board_u540", feature = "board_rocket_chip")))] #[path = "board/virt/mod.rs"] -mod board; +pub mod board; pub mod compiler_rt; pub mod consts;