summaryrefslogtreecommitdiffstats
path: root/initrd/programs/init
diff options
context:
space:
mode:
Diffstat (limited to 'initrd/programs/init')
-rw-r--r--initrd/programs/init/Makefile8
-rw-r--r--initrd/programs/init/main.c9
2 files changed, 17 insertions, 0 deletions
diff --git a/initrd/programs/init/Makefile b/initrd/programs/init/Makefile
new file mode 100644
index 0000000..3a283de
--- /dev/null
+++ b/initrd/programs/init/Makefile
@@ -0,0 +1,8 @@
+CFILES := $(wildcard *.c)
+OFILES := $(patsubst %.c,%.o,$(CFILES))
+
+all: ${OFILES}
+ $(CC) $< -o $(OUT) -lc
+
+%.o : %.c
+ $(CC) -I$(ABIDIR) -g $(CFLAGS) -c $< -o $@
diff --git a/initrd/programs/init/main.c b/initrd/programs/init/main.c
new file mode 100644
index 0000000..870ad28
--- /dev/null
+++ b/initrd/programs/init/main.c
@@ -0,0 +1,9 @@
+#include "syscall.h"
+
+int
+main(int argc, char *argv[])
+{
+ _syscall_log("Hello, Userland!\n");
+ for(;;);
+ return 0;
+}