summaryrefslogtreecommitdiff
path: root/userspace/sys
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/sys')
-rw-r--r--userspace/sys/Makefile1
-rw-r--r--userspace/sys/crt0.S3
-rw-r--r--userspace/sys/crt0.obin660 -> 660 bytes
-rw-r--r--userspace/sys/libfool.abin37292 -> 37550 bytes
-rw-r--r--userspace/sys/sys.c10
-rw-r--r--userspace/sys/sys.obin17956 -> 18236 bytes
-rw-r--r--userspace/sys/syscalls.c3
-rw-r--r--userspace/sys/syscalls.obin18572 -> 18544 bytes
-rw-r--r--userspace/sys/termios.h18
9 files changed, 33 insertions, 2 deletions
diff --git a/userspace/sys/Makefile b/userspace/sys/Makefile
index cdcd3b7..2e71714 100644
--- a/userspace/sys/Makefile
+++ b/userspace/sys/Makefile
@@ -17,7 +17,6 @@ crt0.o: crt0.S
crt_install: crt0.o
cp crt0.o $(SYSROOT)/usr/lib/
-
header_install:
cp termios.h $(SYSROOT)/usr/include/sys/
diff --git a/userspace/sys/crt0.S b/userspace/sys/crt0.S
index 025c21b..d09f8ca 100644
--- a/userspace/sys/crt0.S
+++ b/userspace/sys/crt0.S
@@ -5,6 +5,9 @@ _start:
pop %eax
mov %eax, environ
+pop %eax
+#mov %eax, _impure_ptr
+
call main
push environ
diff --git a/userspace/sys/crt0.o b/userspace/sys/crt0.o
index db292b0..1b71404 100644
--- a/userspace/sys/crt0.o
+++ b/userspace/sys/crt0.o
Binary files differ
diff --git a/userspace/sys/libfool.a b/userspace/sys/libfool.a
index 81a4f16..0823595 100644
--- a/userspace/sys/libfool.a
+++ b/userspace/sys/libfool.a
Binary files differ
diff --git a/userspace/sys/sys.c b/userspace/sys/sys.c
index adf6ff9..7639307 100644
--- a/userspace/sys/sys.c
+++ b/userspace/sys/sys.c
@@ -169,3 +169,13 @@ char *getlogin(void)
return NULL;
}
+int gtty()
+{
+ return -1;
+}
+
+int stty()
+{
+ return -1;
+}
+
diff --git a/userspace/sys/sys.o b/userspace/sys/sys.o
index d04089e..dc5a2e3 100644
--- a/userspace/sys/sys.o
+++ b/userspace/sys/sys.o
Binary files differ
diff --git a/userspace/sys/syscalls.c b/userspace/sys/syscalls.c
index 4b29451..c3ff909 100644
--- a/userspace/sys/syscalls.c
+++ b/userspace/sys/syscalls.c
@@ -1,6 +1,7 @@
#include "kernel/syscalls.h"
-char **environ;
+extern char **environ;
+//struct _reent *_impure_ptr;
// generic syscall interface!
int syscall(int call, int p1, int p2, int p3)
diff --git a/userspace/sys/syscalls.o b/userspace/sys/syscalls.o
index f8fd94b..a0a4265 100644
--- a/userspace/sys/syscalls.o
+++ b/userspace/sys/syscalls.o
Binary files differ
diff --git a/userspace/sys/termios.h b/userspace/sys/termios.h
index ff1e838..b6625be 100644
--- a/userspace/sys/termios.h
+++ b/userspace/sys/termios.h
@@ -1,2 +1,20 @@
typedef uint32_t speed_t;
typedef uint32_t DIR;
+
+#define B0 0000000 /* hang up */
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+