summaryrefslogtreecommitdiffstats
path: root/initrd/programs
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-03-11 21:40:28 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-03-11 21:40:28 -0400
commit50392995d6e7f3a10fb74bb2f9073a4790f8933c (patch)
treec89b067b3bacf35e092af5c31fb6e6a08921f31c /initrd/programs
downloadjove-env-master.tar.gz
jove-env-master.tar.bz2
jove-env-master.zip
simple env with basic test init programHEADmaster
Diffstat (limited to 'initrd/programs')
-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;
+}