-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from TheSayOL/tty2
support tty
- Loading branch information
Showing
29 changed files
with
1,005 additions
and
37 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 |
---|---|---|
|
@@ -129,6 +129,7 @@ typedef struct {{ | |
"PROT_.+", | ||
"MS_.+", | ||
"MREMAP_.+", | ||
"GRND_.*", | ||
]; | ||
|
||
#[derive(Debug)] | ||
|
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 |
---|---|---|
|
@@ -31,3 +31,5 @@ | |
#include <sys/uio.h> | ||
#include <unistd.h> | ||
#include <dirent.h> | ||
|
||
#include <sys/random.h> |
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,10 @@ | ||
ruxgo_bld | ||
compile_commands.json | ||
.cache | ||
/rootfs/bin/* | ||
/rootfs/lib/* | ||
/rootfs/dev | ||
/rootfs/etc | ||
/rootfs/proc | ||
/rootfs/sys | ||
/rootfs/tmp |
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,24 @@ | ||
# busybox | ||
|
||
## Quick Start | ||
|
||
1. Compile `busybox` or get its ELF binary (using Musl), then copy to `rootfs/bin`. | ||
|
||
2. Copy the Musl dyanmic linker to `rootfs/lib`. | ||
|
||
3. modify `axbuild.mk`, like: | ||
|
||
```makefile | ||
app-objs=main.o | ||
|
||
ARGS = /bin/busybox,ls | ||
ENVS = | ||
V9P_PATH=${APP}/rootfs | ||
``` | ||
|
||
4. Run | ||
|
||
```sh | ||
# in the RuxOS main directory. | ||
make run ARCH=aarch64 A=apps/c/busybox V9P=y MUSL=y | ||
``` |
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,5 @@ | ||
app-objs=main.o | ||
|
||
ARGS = /bin/busybox,sh | ||
ENVS = | ||
V9P_PATH=${APP}/rootfs |
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,34 @@ | ||
[build] | ||
compiler = "gcc" | ||
app = "./busybox" | ||
|
||
[os] | ||
name = "ruxos" | ||
services = [ | ||
"alloc", | ||
"paging", | ||
"musl", | ||
"multitask", | ||
"fs", | ||
"pipe", | ||
"poll", | ||
"rtc", | ||
"virtio-9p", | ||
"irq", | ||
"signal", | ||
] | ||
ulib = "ruxmusl" | ||
develop = "y" | ||
|
||
[os.platform] | ||
name = "aarch64-qemu-virt" | ||
mode = "release" | ||
log = "debug" | ||
|
||
|
||
[os.platform.qemu] | ||
memory = "2g" | ||
v9p = "y" | ||
v9p_path = "./rootfs" | ||
args = "/bin/busybox,sh" | ||
qemu_log = "y" |
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,11 @@ | ||
paging | ||
alloc | ||
irq | ||
musl | ||
multitask | ||
fs | ||
pipe | ||
poll | ||
rtc | ||
signal | ||
virtio-9p |
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,7 @@ | ||
#include <stdio.h> | ||
#include <unistd.h> | ||
|
||
int main(int argc, char** argv, char**envp) { | ||
execv(argv[0], argv); | ||
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
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,9 @@ | ||
[package] | ||
name = "tty" | ||
version = "0.0.1" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
spinlock = { path = "../spinlock" } | ||
lazy_init = { path = "../lazy_init" } | ||
log = "0.4" |
Oops, something went wrong.