diff --git a/easy-fs-fuse/src/main.rs b/easy-fs-fuse/src/main.rs index 7363136..4daab49 100644 --- a/easy-fs-fuse/src/main.rs +++ b/easy-fs-fuse/src/main.rs @@ -7,7 +7,7 @@ use std::sync::Mutex; /// Use a block size of 512 bytes const BLOCK_SZ: usize = 512; -const BLOCK_NUM: usize = 16384; +const BLOCK_NUM: usize = 131072; //64*2048 /// Wrapper for turning a File into a BlockDevice struct BlockFile(Mutex); diff --git a/os1-ref/Cargo.toml b/os1-ref/Cargo.toml index ef61cb9..ea874c4 100644 --- a/os1-ref/Cargo.toml +++ b/os1-ref/Cargo.toml @@ -8,3 +8,7 @@ edition = "2018" [dependencies] log = "0.4" + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os1-ref/Makefile b/os1-ref/Makefile index 53e0591..5cc5762 100644 --- a/os1-ref/Makefile +++ b/os1-ref/Makefile @@ -46,4 +46,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner diff --git a/os1/Cargo.toml b/os1/Cargo.toml index ef61cb9..ea874c4 100644 --- a/os1/Cargo.toml +++ b/os1/Cargo.toml @@ -8,3 +8,7 @@ edition = "2018" [dependencies] log = "0.4" + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os1/Makefile b/os1/Makefile index e3c1ded..1094bbd 100644 --- a/os1/Makefile +++ b/os1/Makefile @@ -46,4 +46,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner diff --git a/os2-ref/Cargo.toml b/os2-ref/Cargo.toml index a122ae6..8a2e182 100644 --- a/os2-ref/Cargo.toml +++ b/os2-ref/Cargo.toml @@ -10,3 +10,7 @@ edition = "2018" lazy_static = { version = "1.4.0", features = ["spin_no_std"] } log = "0.4" riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os2-ref/Makefile b/os2-ref/Makefile index 59f3000..255aa89 100644 --- a/os2-ref/Makefile +++ b/os2-ref/Makefile @@ -55,4 +55,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner diff --git a/os2-ref/src/batch.rs b/os2-ref/src/batch.rs index 7f97793..67a8e18 100644 --- a/os2-ref/src/batch.rs +++ b/os2-ref/src/batch.rs @@ -3,7 +3,7 @@ use crate::trap::TrapContext; use lazy_static::*; const USER_STACK_SIZE: usize = 4096; -const KERNEL_STACK_SIZE: usize = 4096 * 2; +const KERNEL_STACK_SIZE: usize = 4096 * 20; const MAX_APP_NUM: usize = 16; const APP_BASE_ADDRESS: usize = 0x80400000; const APP_SIZE_LIMIT: usize = 0x20000; diff --git a/os2/Cargo.toml b/os2/Cargo.toml index a122ae6..8a2e182 100644 --- a/os2/Cargo.toml +++ b/os2/Cargo.toml @@ -10,3 +10,7 @@ edition = "2018" lazy_static = { version = "1.4.0", features = ["spin_no_std"] } log = "0.4" riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os2/Makefile b/os2/Makefile index 7224b08..4e8eef1 100644 --- a/os2/Makefile +++ b/os2/Makefile @@ -55,4 +55,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner diff --git a/os2/src/batch.rs b/os2/src/batch.rs index 7f97793..67a8e18 100644 --- a/os2/src/batch.rs +++ b/os2/src/batch.rs @@ -3,7 +3,7 @@ use crate::trap::TrapContext; use lazy_static::*; const USER_STACK_SIZE: usize = 4096; -const KERNEL_STACK_SIZE: usize = 4096 * 2; +const KERNEL_STACK_SIZE: usize = 4096 * 20; const MAX_APP_NUM: usize = 16; const APP_BASE_ADDRESS: usize = 0x80400000; const APP_SIZE_LIMIT: usize = 0x20000; diff --git a/os3-ref/Cargo.toml b/os3-ref/Cargo.toml index a79093c..7d9d980 100644 --- a/os3-ref/Cargo.toml +++ b/os3-ref/Cargo.toml @@ -11,3 +11,7 @@ buddy_system_allocator = "0.6" lazy_static = { version = "1.4.0", features = ["spin_no_std"] } log = "0.4" riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os3-ref/Makefile b/os3-ref/Makefile index f68b3ee..f85edc8 100644 --- a/os3-ref/Makefile +++ b/os3-ref/Makefile @@ -56,4 +56,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner diff --git a/os3-ref/src/config.rs b/os3-ref/src/config.rs index 45c0907..eec1dd0 100644 --- a/os3-ref/src/config.rs +++ b/os3-ref/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x20000; pub const MAX_APP_NUM: usize = 16; pub const APP_BASE_ADDRESS: usize = 0x80400000; diff --git a/os3/Cargo.toml b/os3/Cargo.toml index a79093c..7d9d980 100644 --- a/os3/Cargo.toml +++ b/os3/Cargo.toml @@ -11,3 +11,7 @@ buddy_system_allocator = "0.6" lazy_static = { version = "1.4.0", features = ["spin_no_std"] } log = "0.4" riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os3/Makefile b/os3/Makefile index 1aefac3..68d2b4f 100644 --- a/os3/Makefile +++ b/os3/Makefile @@ -56,4 +56,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner diff --git a/os3/src/config.rs b/os3/src/config.rs index 135382e..70cb487 100644 --- a/os3/src/config.rs +++ b/os3/src/config.rs @@ -1,5 +1,5 @@ pub const USER_STACK_SIZE: usize = 8192; -pub const KERNEL_STACK_SIZE: usize = 8192 * 2; +pub const KERNEL_STACK_SIZE: usize = 8192 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x20000; pub const MAX_APP_NUM: usize = 16; pub const APP_BASE_ADDRESS: usize = 0x80400000; diff --git a/os4-ref/Cargo.toml b/os4-ref/Cargo.toml index 0e54c72..cb79bb1 100644 --- a/os4-ref/Cargo.toml +++ b/os4-ref/Cargo.toml @@ -15,3 +15,7 @@ riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } spin = "0.9" lock_api = "=0.4.6" xmas-elf = "0.7.0" + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os4-ref/Makefile b/os4-ref/Makefile index bc3f19b..cb4668c 100644 --- a/os4-ref/Makefile +++ b/os4-ref/Makefile @@ -56,4 +56,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner \ No newline at end of file diff --git a/os4-ref/src/config.rs b/os4-ref/src/config.rs index 89696b3..1327189 100644 --- a/os4-ref/src/config.rs +++ b/os4-ref/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x30_0000; pub const MEMORY_END: usize = 0x80800000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os4/Cargo.toml b/os4/Cargo.toml index 0e54c72..cb79bb1 100644 --- a/os4/Cargo.toml +++ b/os4/Cargo.toml @@ -15,3 +15,7 @@ riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } spin = "0.9" lock_api = "=0.4.6" xmas-elf = "0.7.0" + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os4/Makefile b/os4/Makefile index 1380f3f..7af0b07 100644 --- a/os4/Makefile +++ b/os4/Makefile @@ -51,4 +51,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner diff --git a/os4/src/config.rs b/os4/src/config.rs index 3fe8084..81553ba 100644 --- a/os4/src/config.rs +++ b/os4/src/config.rs @@ -1,5 +1,5 @@ pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x30_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os5-ref/Cargo.toml b/os5-ref/Cargo.toml index 0e54c72..cb79bb1 100644 --- a/os5-ref/Cargo.toml +++ b/os5-ref/Cargo.toml @@ -15,3 +15,7 @@ riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } spin = "0.9" lock_api = "=0.4.6" xmas-elf = "0.7.0" + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os5-ref/Makefile b/os5-ref/Makefile index 0fd7fbe..b0f391c 100644 --- a/os5-ref/Makefile +++ b/os5-ref/Makefile @@ -52,4 +52,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner \ No newline at end of file diff --git a/os5-ref/src/config.rs b/os5-ref/src/config.rs index e2dcc10..d85290a 100644 --- a/os5-ref/src/config.rs +++ b/os5-ref/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x20_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os5/Cargo.toml b/os5/Cargo.toml index 8c7b4e2..e40fbcf 100644 --- a/os5/Cargo.toml +++ b/os5/Cargo.toml @@ -15,3 +15,7 @@ riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } spin = "0.9" xmas-elf = "0.7.0" lock_api = "=0.4.6" + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os5/Makefile b/os5/Makefile index 0fd7fbe..b0f391c 100644 --- a/os5/Makefile +++ b/os5/Makefile @@ -52,4 +52,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S + .PHONY: build env kernel clean run-inner \ No newline at end of file diff --git a/os5/src/config.rs b/os5/src/config.rs index a91541d..e4da309 100644 --- a/os5/src/config.rs +++ b/os5/src/config.rs @@ -1,5 +1,5 @@ pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x30_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os6-ref/Cargo.toml b/os6-ref/Cargo.toml index d38a1e0..4dcee45 100644 --- a/os6-ref/Cargo.toml +++ b/os6-ref/Cargo.toml @@ -16,3 +16,7 @@ lock_api = "=0.4.6" xmas-elf = "0.7.0" virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers" } easy-fs = { path = "../easy-fs" } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os6-ref/Makefile b/os6-ref/Makefile index 98e8087..39b8a79 100644 --- a/os6-ref/Makefile +++ b/os6-ref/Makefile @@ -61,4 +61,11 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -drive file=$(FS_IMG),if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -s -S + .PHONY: build env kernel clean fs-img + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os6-ref/src/config.rs b/os6-ref/src/config.rs index 851df0a..74432df 100644 --- a/os6-ref/src/config.rs +++ b/os6-ref/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x20_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os6/Cargo.toml b/os6/Cargo.toml index d38a1e0..4dcee45 100644 --- a/os6/Cargo.toml +++ b/os6/Cargo.toml @@ -16,3 +16,7 @@ lock_api = "=0.4.6" xmas-elf = "0.7.0" virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers" } easy-fs = { path = "../easy-fs" } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os6/Makefile b/os6/Makefile index 98e8087..7e27aa1 100644 --- a/os6/Makefile +++ b/os6/Makefile @@ -61,4 +61,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -drive file=$(FS_IMG),if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -s -S + .PHONY: build env kernel clean fs-img diff --git a/os6/src/config.rs b/os6/src/config.rs index 851df0a..74432df 100644 --- a/os6/src/config.rs +++ b/os6/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x20_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os7-ref/Cargo.toml b/os7-ref/Cargo.toml index d38a1e0..4dcee45 100644 --- a/os7-ref/Cargo.toml +++ b/os7-ref/Cargo.toml @@ -16,3 +16,7 @@ lock_api = "=0.4.6" xmas-elf = "0.7.0" virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers" } easy-fs = { path = "../easy-fs" } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os7-ref/Makefile b/os7-ref/Makefile index facaf77..7c4723e 100644 --- a/os7-ref/Makefile +++ b/os7-ref/Makefile @@ -61,4 +61,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -drive file=$(FS_IMG),if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -s -S + .PHONY: build env kernel clean fs-img diff --git a/os7-ref/src/config.rs b/os7-ref/src/config.rs index 851df0a..74432df 100644 --- a/os7-ref/src/config.rs +++ b/os7-ref/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x20_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os7/Cargo.toml b/os7/Cargo.toml index d38a1e0..4dcee45 100644 --- a/os7/Cargo.toml +++ b/os7/Cargo.toml @@ -16,3 +16,7 @@ lock_api = "=0.4.6" xmas-elf = "0.7.0" virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers" } easy-fs = { path = "../easy-fs" } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os7/Makefile b/os7/Makefile index facaf77..7c4723e 100644 --- a/os7/Makefile +++ b/os7/Makefile @@ -61,4 +61,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -drive file=$(FS_IMG),if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -s -S + .PHONY: build env kernel clean fs-img diff --git a/os7/src/config.rs b/os7/src/config.rs index 851df0a..74432df 100644 --- a/os7/src/config.rs +++ b/os7/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x20_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os8-ref/Cargo.toml b/os8-ref/Cargo.toml index d38a1e0..36e0e64 100644 --- a/os8-ref/Cargo.toml +++ b/os8-ref/Cargo.toml @@ -16,3 +16,8 @@ lock_api = "=0.4.6" xmas-elf = "0.7.0" virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers" } easy-fs = { path = "../easy-fs" } + +[profile.release] +debug = true +opt-level = 0 +# opt-level = "s" \ No newline at end of file diff --git a/os8-ref/Makefile b/os8-ref/Makefile index 7c3c6eb..c6b63f2 100644 --- a/os8-ref/Makefile +++ b/os8-ref/Makefile @@ -61,4 +61,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -drive file=$(FS_IMG),if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -s -S + .PHONY: build env kernel clean fs-img diff --git a/os8-ref/src/config.rs b/os8-ref/src/config.rs index 8562cd6..cc5222a 100644 --- a/os8-ref/src/config.rs +++ b/os8-ref/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x30_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000; diff --git a/os8/Cargo.toml b/os8/Cargo.toml index d38a1e0..4dcee45 100644 --- a/os8/Cargo.toml +++ b/os8/Cargo.toml @@ -16,3 +16,7 @@ lock_api = "=0.4.6" xmas-elf = "0.7.0" virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers" } easy-fs = { path = "../easy-fs" } + +[profile.release] +debug = true +opt-level = 0 \ No newline at end of file diff --git a/os8/Makefile b/os8/Makefile index 7c3c6eb..c6b63f2 100644 --- a/os8/Makefile +++ b/os8/Makefile @@ -61,4 +61,7 @@ debug: build tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \ tmux -2 attach-session -d +dbg: build + qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -drive file=$(FS_IMG),if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -s -S + .PHONY: build env kernel clean fs-img diff --git a/os8/src/config.rs b/os8/src/config.rs index 8562cd6..cc5222a 100644 --- a/os8/src/config.rs +++ b/os8/src/config.rs @@ -1,7 +1,7 @@ //! Constants used in rCore pub const USER_STACK_SIZE: usize = 4096 * 2; -pub const KERNEL_STACK_SIZE: usize = 4096 * 2; +pub const KERNEL_STACK_SIZE: usize = 4096 * 20; pub const KERNEL_HEAP_SIZE: usize = 0x30_0000; pub const MEMORY_END: usize = 0x88000000; pub const PAGE_SIZE: usize = 0x1000;