From 463736887fbb6439fe5e676f6fd7990adc6bb727 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 23 Oct 2014 08:41:34 +0200 Subject: added execve syscall --- userspace/Makefile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'userspace/Makefile') diff --git a/userspace/Makefile b/userspace/Makefile index a26d554..ceba7d0 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -8,7 +8,7 @@ LDFLAGS=-L/home/miguel/temp/fool-os-stuff/newlib-build-clean/i686-elf/newlib/ \ -L/home/miguel/temp/fool-os-stuff/newlib-build-clean/i686-elf/libgloss/libnosys/ \ -lnosys -ext2.img: userprog +ext2.img: shell simple dd if=/dev/zero of=ext2.img bs=512 count=200 sudo mkfs.ext2 -O none ext2.img -F mkdir mnt @@ -17,16 +17,24 @@ ext2.img: userprog mkdir mnt/miguel echo "hello one" > mnt/miguel/test1.txt echo "hello two" > mnt/test2.txt - cp userprog mnt/shell + cp shell mnt + cp simple mnt sync sudo umount mnt rm mnt -rf -userprog: foolshell.o crt0.o - ${CC} -T linker.ld ${LDFLAGS} $< -Wl,--oformat,binary -o userprog +shell: foolshell.o crt0.o + ${CC} -T linker.ld ${LDFLAGS} $< -Wl,--oformat,binary -o shell + +simple: simple.o crt0.o + ${CC} -T linker.ld ${LDFLAGS} $< -Wl,--oformat,binary -o simple clean: - -rm *.o *.out userprog ext2.img + -rm *.o *.out shell simple ext2.img + +umount: + sudo umount mnt + rm mnt -rf -- cgit v1.2.3