Use bootloader to load initramfs

This commit is contained in:
LI Qing
2023-05-24 18:03:41 +08:00
committed by Tate, Hongliang Tian
parent dba89b508d
commit 902b0421c3
2 changed files with 15 additions and 8 deletions

View File

@ -44,10 +44,10 @@ pub mod tty;
mod util;
pub mod vm;
pub fn init() {
pub fn init(ramdisk: &[u8]) {
driver::init();
process::fifo_scheduler::init();
fs::initramfs::init(read_ramdisk_content()).unwrap();
fs::initramfs::init(ramdisk).unwrap();
}
fn init_thread() {
@ -78,10 +78,6 @@ fn init_thread() {
}
}
fn read_ramdisk_content() -> &'static [u8] {
include_bytes!("../../../../regression/ramdisk/build/ramdisk.cpio")
}
/// first process never return
#[controlled]
pub fn run_first_process() -> ! {