common: add a logo

toolchain_update
equation314 6 years ago
parent abf3418d24
commit 2e094d08bc

@ -19,6 +19,8 @@ pub extern "C" fn rust_main() -> ! {
// First init log mod, so that we can print log info. // First init log mod, so that we can print log info.
::logging::init(); ::logging::init();
super::fs::show_logo();
loop { loop {
print!(">> "); print!(">> ");
loop { loop {

@ -14,7 +14,21 @@ _binary_user_riscv_img_start:
_binary_user_riscv_img_end: _binary_user_riscv_img_end:
"#); "#);
const LOGO: &str = r#"
____ __ ____ _____
/ __ \ __ __ _____ / /_ / __ \/ ___/
/ /_/ // / / // ___// __// / / /\__ \
/ _, _// /_/ /(__ )/ /_ / /_/ /___/ /
/_/ |_| \__,_//____/ \__/ \____//____/
"#;
pub fn show_logo() {
println!("{}", LOGO);
}
pub fn shell() { pub fn shell() {
show_logo();
#[cfg(target_arch = "riscv32")] #[cfg(target_arch = "riscv32")]
let device = { let device = {
extern { extern {
@ -97,4 +111,4 @@ impl BlockedDevice for &'static ide::DISK1 {
let buf = unsafe { slice::from_raw_parts(buf.as_ptr() as *mut u32, ide::BLOCK_SIZE / 4) }; let buf = unsafe { slice::from_raw_parts(buf.as_ptr() as *mut u32, ide::BLOCK_SIZE / 4) };
self.0.lock().write(block_id as u64, 1, buf).is_ok() self.0.lock().write(block_id as u64, 1, buf).is_ok()
} }
} }

Loading…
Cancel
Save