diff options
Diffstat (limited to 'userspace')
| -rw-r--r-- | userspace/Makefile | 5 | ||||
| -rw-r--r-- | userspace/init.c | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/userspace/Makefile b/userspace/Makefile index 53dab5f..0c41347 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -7,10 +7,10 @@ CFLAGS+=-w CFLAGS+=-std=gnu11 CFLAGS+=-O3 -PROGS=foolshell ls simple brainfuck add checker clear task1 task2 +PROGS=foolshell ls simple brainfuck add checker clear task1 task2 init ext2.img: $(PROGS) - dd if=/dev/zero of=ext2.img bs=512 count=5000 + dd if=/dev/zero of=ext2.img bs=512 count=7000 sudo mkfs.ext2 -O none ext2.img -F mkdir mnt sudo mount ext2.img mnt @@ -34,6 +34,7 @@ add: add.o checker: checker.o task1: task1.o task2: task2.o +init: init.o clean: -rm *.o $(PROGS) ext2.img diff --git a/userspace/init.c b/userspace/init.c new file mode 100644 index 0000000..d03d173 --- /dev/null +++ b/userspace/init.c @@ -0,0 +1,14 @@ +int main(int argc, char **argv) +{ + printf("Fool OS Init 0.1 \n"); + + int pid=fork(); + + while(1) + { + printf("I am pid: %i\n",pid); + } + return 0; +} + + |
