summaryrefslogtreecommitdiff
path: root/userspace/sys
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2015-05-13 23:58:39 +0200
committerMichal Idziorek <m.i@gmx.at>2015-05-13 23:58:39 +0200
commitb74c5c8fb4de3b2847bc942e57dcf8f0dea705be (patch)
treefa0a9001cffa64c9193689066bf296dc3df7f844 /userspace/sys
parent9a60edf72a3112adae4a914134da1adaf472ad5d (diff)
fixed libc and 'userspace'
Diffstat (limited to 'userspace/sys')
-rw-r--r--userspace/sys/Makefile41
-rw-r--r--userspace/sys/crt0.obin0 -> 660 bytes
-rw-r--r--userspace/sys/libfool.abin0 -> 7420 bytes
-rw-r--r--userspace/sys/sys.c2
-rw-r--r--userspace/sys/sys.obin0 -> 3744 bytes
-rw-r--r--userspace/sys/syscalls.obin0 -> 2948 bytes
-rw-r--r--userspace/sys/termios.h2
7 files changed, 25 insertions, 20 deletions
diff --git a/userspace/sys/Makefile b/userspace/sys/Makefile
index 5e217fa..cdcd3b7 100644
--- a/userspace/sys/Makefile
+++ b/userspace/sys/Makefile
@@ -1,29 +1,32 @@
+SYSROOT=/home/miguel/opt/foolos
CC=i686-foolos-gcc
CFLAGS=
-CFLAGS+=-I../..
CFLAGS+=-w
-
+CFLAGS+=-I../..
+CFLAGS+=-gstabs
OBJECTS=sys.o syscalls.o crt0.o
-full: clean library_install crt_install
+
+full: clean library_install crt_install header_install
+
all: $(OBJECTS)
-library_install: all
- mkdir temp
- mv *.o temp
- cp /home/miguel/temp/sysroot/usr/lib/libc.a .
- ar x libc.a
- rm libc.a
-# rm lib_a-environ.o
- cp temp/sys*.o .
- ar rs libc.a *.o
- mv libc.a /home/miguel/temp/sysroot/usr/lib/libc.a
- cp temp/*.o .
- rm temp -rf
-
-crt_install: all
- cp crt0.o /home/miguel/temp/sysroot/usr/lib/
+crt0.o: crt0.S
+
+crt_install: crt0.o
+ cp crt0.o $(SYSROOT)/usr/lib/
+
+
+header_install:
+ cp termios.h $(SYSROOT)/usr/include/sys/
+
+libfool.a: sys.o syscalls.o
+ ar rcs libfool.a sys.o syscalls.o
+
+library_install: libfool.a
+ cp libfool.a $(SYSROOT)/usr/lib/
+
clean:
- -rm *.o
+ -rm *.o *.a
diff --git a/userspace/sys/crt0.o b/userspace/sys/crt0.o
new file mode 100644
index 0000000..db292b0
--- /dev/null
+++ b/userspace/sys/crt0.o
Binary files differ
diff --git a/userspace/sys/libfool.a b/userspace/sys/libfool.a
new file mode 100644
index 0000000..31fee46
--- /dev/null
+++ b/userspace/sys/libfool.a
Binary files differ
diff --git a/userspace/sys/sys.c b/userspace/sys/sys.c
index 25dff7b..adf6ff9 100644
--- a/userspace/sys/sys.c
+++ b/userspace/sys/sys.c
@@ -1,7 +1,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/termios.h>
+#include <termios.h>
// CODE FOR Stack Smashing Protector, TODO: MOVE / and do not duplicate
diff --git a/userspace/sys/sys.o b/userspace/sys/sys.o
new file mode 100644
index 0000000..14413b2
--- /dev/null
+++ b/userspace/sys/sys.o
Binary files differ
diff --git a/userspace/sys/syscalls.o b/userspace/sys/syscalls.o
new file mode 100644
index 0000000..371b8af
--- /dev/null
+++ b/userspace/sys/syscalls.o
Binary files differ
diff --git a/userspace/sys/termios.h b/userspace/sys/termios.h
new file mode 100644
index 0000000..ff1e838
--- /dev/null
+++ b/userspace/sys/termios.h
@@ -0,0 +1,2 @@
+typedef uint32_t speed_t;
+typedef uint32_t DIR;