forked from syswonder/ruxos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
631 additions
and
92 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
smp = 1 | ||
build_mode = release | ||
log_level = info | ||
|
||
Primary CPU 0 started. | ||
Found physcial memory regions: | ||
.text (READ | EXECUTE | RESERVED) | ||
.rodata (READ | RESERVED) | ||
.data .tdata .tbss .percpu (READ | WRITE | RESERVED) | ||
boot stack (READ | WRITE | RESERVED) | ||
.bss (READ | WRITE | RESERVED) | ||
free memory (READ | WRITE | FREE) | ||
Initialize global memory allocator... | ||
use TLSF allocator. | ||
Initialize kernel page table... | ||
Initialize platform devices... | ||
Primary CPU 0 init OK. | ||
Running argv tests... | ||
Argv tests run OK! | ||
Running environ tests... | ||
Environ tests run OK! | ||
Shutting down... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
alloc | ||
paging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
int main(int argc, char** argv) { | ||
puts("Running argv tests..."); | ||
if (argc != 3) puts("args num is wrong"); | ||
if (strcmp(argv[0], "envtest") || strcmp(argv[1], "test1") || strcmp(argv[2], "test2")) puts("argv is wrong"); | ||
if(argv[3] != NULL) puts("argv is wrong"); | ||
puts("Argv tests run OK!"); | ||
|
||
puts("Running environ tests..."); | ||
char *env1 = "env1", *ex1 = "ex1", *ex2 = "ex_2"; | ||
if(setenv(env1, ex1, 1) || strcmp(ex1, getenv(env1))) puts("set new env is wrong"); | ||
if(setenv(env1, ex2, 1) || strcmp(ex2, getenv(env1))) puts("set old env is wrong"); | ||
if(setenv(env1, ex1, 0) || strcmp(ex2, getenv(env1))) puts("override the old env is wrong"); | ||
if(strcmp("hello", getenv("world")) || strcmp("world", getenv("hello"))) puts("boot env is wrong"); | ||
puts("Environ tests run OK!"); | ||
return 0; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test_one "LOG=info ARGS=envtest,test1,test2 ENVS=hello=world,world=hello" "expect_info.out" | ||
rm -f $APP/*.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "dtb" | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["Leping Wang <xuehao14@126.com>"] | ||
description = "Device tree basic operations" | ||
license = "GPL-3.0-or-later OR Apache-2.0" | ||
homepage = "https://github.com/rcore-os/arceos" | ||
repository = "https://github.com/rcore-os/arceos/tree/main/crates/dtb" | ||
documentation = "https://rcore-os.github.io/arceos/dtb/index.html" | ||
|
||
[dependencies] | ||
fdt-rs = { version = "0.4.3", default-features = false } | ||
lazy_init = { path = "../../crates/lazy_init" } |
Oops, something went wrong.