Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-17064-1466468
OSKernel2023-ByteOS-2023
Commits
3f5258ad
Commit
3f5258ad
authored
2 years ago
by
啊队队队
Browse files
Options
Download
Patches
Plain Diff
fix log error, clear bss
parent
5769a49f
k210
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
byteos.bin
+0
-0
byteos.bin
kernel/src/main.rs
+16
-1
kernel/src/main.rs
kernel/src/tasks/initproc.rs
+2
-2
kernel/src/tasks/initproc.rs
with
18 additions
and
3 deletions
+18
-3
byteos.bin
+
0
−
0
View file @
3f5258ad
No preview for this file type
This diff is collapsed.
Click to expand it.
kernel/src/main.rs
+
16
−
1
View file @
3f5258ad
...
...
@@ -17,12 +17,27 @@ use hal;
use
kalloc
;
use
panic_handler
as
_
;
fn
clear_bss
()
{
extern
"C"
{
fn
sbss
();
fn
ebss
();
}
unsafe
{
core
::
slice
::
from_raw_parts_mut
(
sbss
as
usize
as
*
mut
u8
,
ebss
as
usize
-
sbss
as
usize
)
.fill
(
0
);
}
}
#[no_mangle]
fn
main
(
hart_id
:
usize
,
device_tree
:
usize
)
{
if
hart_id
!=
0
{
loop
{}
}
clear_bss
();
let
str
=
include_str!
(
"banner.txt"
);
println!
(
"{}"
,
str
);
...
...
@@ -48,7 +63,7 @@ fn main(hart_id: usize, device_tree: usize) {
devices
::
prepare_devices
();
// initialize filesystem
fs
::
init
();
//
fs::init();
// init kernel threads and async executor
tasks
::
init
();
...
...
This diff is collapsed.
Click to expand it.
kernel/src/tasks/initproc.rs
+
2
−
2
View file @
3f5258ad
...
...
@@ -227,10 +227,10 @@ pub async fn initproc() {
// command("busybox sh").await;
// command("busybox sh busybox_testcode.sh").await;
run_libc_test
()
.await
;
//
run_libc_test().await;
// run_all().await;
//
simple_shell().await;
simple_shell
()
.await
;
// command("helloworld").await;
// command("filelist").await;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets