diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-10-22 21:21:32 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-10-22 21:21:32 +0200 |
| commit | 55365e593c27b57c50a7369597bd14f110ba8cb6 (patch) | |
| tree | c88de36646fd9ebee7ed270fbd35285417715fe7 /userspace/Makefile | |
| parent | 95450710a8b8290a110686d78c2357d3920bcda5 (diff) | |
reading userprogramm from ext2 ramimage!
Diffstat (limited to 'userspace/Makefile')
| -rw-r--r-- | userspace/Makefile | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/userspace/Makefile b/userspace/Makefile index fc5e2dd..11eaa74 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -3,12 +3,30 @@ CC=i686-elf-gcc LD=i686-elf-ld -CFLAGS=-I/home/miguel/temp/fool-os-stuff/newlib-2.1.0/newlib/libc/include +CFLAGS=-I/home/miguel/temp/fool-os-stuff/newlib-2.1.0/newlib/libc/include 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 -all: foolshell.o crt0.o +ext2.img: userprog + dd if=/dev/zero of=ext2.img bs=512 count=200 + sudo mkfs.ext2 -O none ext2.img + mkdir mnt + sudo mount ext2.img mnt + sudo chown miguel mnt + mkdir mnt/miguel + echo "hello one" > mnt/miguel/test1.txt + echo "hello two" > mnt/test2.txt + cp userprog mnt/shell + sync + sudo umount mnt + rm mnt -rf + +userprog: foolshell.o crt0.o ${CC} -T linker.ld ${LDFLAGS} $< -Wl,--oformat,binary -o userprog + clean: - -rm *.o *.out userprog + -rm *.o *.out userprog ext2.img + + + |
