1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

stage debug code for output

This commit is contained in:
Jackey-Huo 2019-05-02 21:32:19 +08:00
parent 2d047c67be
commit e594a4af32
4 changed files with 16 additions and 2 deletions

View File

@ -44,10 +44,17 @@ pub extern "C" fn rust_main(hartid: usize, device_tree_paddr: usize) -> ! {
} }
println!( println!(
"Hello RISCV! in hart {}, device tree @ {:#x}", "Hello fucking RISCV! in hart {}, device tree @ {:#x}",
hartid, device_tree_vaddr hartid, device_tree_vaddr
); );
//while true {
//let fuck_char = get_char_fuck();
//if fuck_char as u8 != 254 {
//print!("{0}", fuck_char as char);
//}
//}
crate::logging::init(); crate::logging::init();
interrupt::init(); interrupt::init();
memory::init(device_tree_vaddr); memory::init(device_tree_vaddr);
@ -74,6 +81,10 @@ fn others_main() -> ! {
crate::kmain(); crate::kmain();
} }
fn get_char_fuck() -> char {
io::getchar()
}
static AP_CAN_INIT: AtomicBool = AtomicBool::new(false); static AP_CAN_INIT: AtomicBool = AtomicBool::new(false);
#[cfg(not(feature = "board_u540"))] #[cfg(not(feature = "board_u540"))]

View File

@ -19,6 +19,7 @@ pub fn add_user_shell() {
// //
// #[cfg(not(target_arch = "x86_64"))] // #[cfg(not(target_arch = "x86_64"))]
let init_shell = "/busybox"; //from docker-library let init_shell = "/busybox"; //from docker-library
println!("use the fucking up busybox");
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
let init_envs = let init_envs =
@ -42,10 +43,12 @@ pub fn add_user_shell() {
pub fn add_user_shell() { pub fn add_user_shell() {
let cmdline = CMDLINE.read(); let cmdline = CMDLINE.read();
let inode = ROOT_INODE.lookup(&cmdline).unwrap(); let inode = ROOT_INODE.lookup(&cmdline).unwrap();
println!("not use the fucking up busybox");
processor().manager().add(Thread::new_user( processor().manager().add(Thread::new_user(
&inode, &inode,
cmdline.split(' ').map(|s| s.into()).collect(), cmdline.split(' ').map(|s| s.into()).collect(),
Vec::new(), Vec::new(),
Vec::new(),
)); ));
} }

0
tools/addr2line.py Normal file → Executable file
View File

2
user

@ -1 +1 @@
Subproject commit 05f0efd3fda084109e4b6da8ff30ecb1557a267f Subproject commit 8dbc0edb935a62d748aaac39258d4a985de0ae17