summaryrefslogtreecommitdiff
path: root/kernel/usrbin
diff options
context:
space:
mode:
authorJake Mannens <jake72360@gmail.com>2018-06-24 02:27:22 +1000
committerJake Mannens <jake72360@gmail.com>2018-06-24 02:27:22 +1000
commit97d3551106495fa18969e2690720b621ba5a9c0b (patch)
tree76967873f1f4209b940eadc77753bd67ef65e0b1 /kernel/usrbin
parentacba87c1e946118f0ba4308a7211199cf9b7cbb2 (diff)
Re-structured the source tree and modified makefiles accordingly.
Hopefully further separation will help to keep the code readable and understandable.
Diffstat (limited to 'kernel/usrbin')
-rw-r--r--kernel/usrbin/Makefile32
-rw-r--r--kernel/usrbin/lib.s10
-rw-r--r--kernel/usrbin/link.ld8
-rw-r--r--kernel/usrbin/main.c7
-rw-r--r--kernel/usrbin/print.c3
5 files changed, 0 insertions, 60 deletions
diff --git a/kernel/usrbin/Makefile b/kernel/usrbin/Makefile
deleted file mode 100644
index dd42909..0000000
--- a/kernel/usrbin/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-TARGET = usrbin_blob.o
-
-SRCS = $(wildcard *.c)
-ASMS = $(wildcard *.s)
-OBJS = $(SRCS:.c=.o) $(ASMS:.s=.o)
-
-CFLAGS = -m32 -I../../include -ffreestanding -nostdinc -nostdlib -fno-stack-protector -fno-pie
-LDFLAGS = -m elf_i386 -T link.ld
-ASMFLAGS = -f elf32
-
-CC = gcc $(CFLAGS)
-LD = ld $(LDFLAGS)
-ASM = nasm $(ASMFLAGS)
-
-all: build
-
-build: $(TARGET)
-
-.s.o:
- $(ASM) -o $*.o $^
-
-.c.o:
- $(CC) -c -o $*.o $^
-
-$(TARGET): $(OBJS)
- $(LD) -o usrbin.bin $(OBJS)
- objcopy -I binary -O elf32-i386 -B i386 usrbin.bin $(TARGET)
-
-clean:
- rm -f usrbin.bin
- rm -f $(OBJS)
- rm -f $(TARGET)
diff --git a/kernel/usrbin/lib.s b/kernel/usrbin/lib.s
deleted file mode 100644
index ffe4f5f..0000000
--- a/kernel/usrbin/lib.s
+++ /dev/null
@@ -1,10 +0,0 @@
-bits 32
-
-extern main
-
-section .entry
-init:
- call main
-.loop:
- ; loop forever
- jmp .loop
diff --git a/kernel/usrbin/link.ld b/kernel/usrbin/link.ld
deleted file mode 100644
index c1a7a42..0000000
--- a/kernel/usrbin/link.ld
+++ /dev/null
@@ -1,8 +0,0 @@
-OUTPUT_FORMAT(binary)
-SECTIONS
-{
- . = 0x100000;
- .text : { *(.entry); .*(.text) }
- .data : { *(.data) }
- .bss : { *(.bss) }
-}
diff --git a/kernel/usrbin/main.c b/kernel/usrbin/main.c
deleted file mode 100644
index 5cc7567..0000000
--- a/kernel/usrbin/main.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdint.h>
-
-extern int print(char*);
-
-void main(void) {
- print("We did it ma!\n");
-}
diff --git a/kernel/usrbin/print.c b/kernel/usrbin/print.c
deleted file mode 100644
index ea32cdf..0000000
--- a/kernel/usrbin/print.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <unistd.h>
-
-_syscall1(int, print, char*, s);