add hello world init program
This commit is contained in:
parent
427a0c997d
commit
29a669a7cb
3 changed files with 9 additions and 2 deletions
|
@ -12,7 +12,6 @@ mod program;
|
||||||
mod util;
|
mod util;
|
||||||
|
|
||||||
use core::panic::PanicInfo;
|
use core::panic::PanicInfo;
|
||||||
use program::shell;
|
|
||||||
|
|
||||||
use bootloader::{entry_point, BootInfo};
|
use bootloader::{entry_point, BootInfo};
|
||||||
use dev::memory;
|
use dev::memory;
|
||||||
|
@ -25,7 +24,8 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
||||||
int::init();
|
int::init();
|
||||||
memory::init(boot_info.physical_memory_offset, &boot_info.memory_map);
|
memory::init(boot_info.physical_memory_offset, &boot_info.memory_map);
|
||||||
println!("Finished initializations.");
|
println!("Finished initializations.");
|
||||||
shell::main();
|
program::shell::main();
|
||||||
|
// program::hello_world::main();
|
||||||
panic!("Exiting.")
|
panic!("Exiting.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
6
src/program/hello_world.rs
Normal file
6
src/program/hello_world.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
use crate::{print, println, util::spin};
|
||||||
|
|
||||||
|
pub fn main() -> ! {
|
||||||
|
println!("Hello World !");
|
||||||
|
spin()
|
||||||
|
}
|
|
@ -1 +1,2 @@
|
||||||
|
pub mod hello_world;
|
||||||
pub mod shell;
|
pub mod shell;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue