Skip to content

Commit

Permalink
chore(os): 删除 ch1 默认的 os 目录
Browse files Browse the repository at this point in the history
进度更新:构建用户态执行环境,准备切换到 Linux 环境。
  • Loading branch information
Programmer authored and codingmidnight committed Oct 30, 2024
1 parent 04207e9 commit ea750a1
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 427 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added bootloader/.DS_Store
Binary file not shown.
8 changes: 2 additions & 6 deletions os/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# os/.cargo/config
[build]
target = "riscv64gc-unknown-none-elf"

[target.riscv64gc-unknown-none-elf]
rustflags = [
"-Clink-arg=-Tsrc/linker.ld", "-Cforce-frame-pointers=yes"
]
target="riscv64gc-unknown-none-elf"
6 changes: 0 additions & 6 deletions os/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
[package]
name = "os"
version = "0.1.0"
authors = ["Yifan Wu <[email protected]>"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
log = "0.4"
[profile.release]
debug = true
75 changes: 0 additions & 75 deletions os/Makefile

This file was deleted.

79 changes: 0 additions & 79 deletions os/src/boards/qemu.rs

This file was deleted.

34 changes: 0 additions & 34 deletions os/src/console.rs

This file was deleted.

12 changes: 0 additions & 12 deletions os/src/entry.asm

This file was deleted.

18 changes: 2 additions & 16 deletions os/src/lang_items.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
//! The panic handler

use crate::sbi::shutdown;
use core::panic::PanicInfo;

#[panic_handler]
/// panic handler
fn panic(info: &PanicInfo) -> ! {
if let Some(location) = info.location() {
println!(
"[kernel] Panicked at {}:{} {}",
location.file(),
location.line(),
info.message().unwrap()
);
} else {
println!("[kernel] Panicked: {}", info.message().unwrap());
}
shutdown()
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
48 changes: 0 additions & 48 deletions os/src/linker.ld

This file was deleted.

45 changes: 0 additions & 45 deletions os/src/logging.rs

This file was deleted.

Loading

0 comments on commit ea750a1

Please sign in to comment.