From fb6f520e0b65c08d0c01eee75e5216540786ac6b Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 24 Dec 2022 21:22:08 +0100 Subject: user/ext2fs: basic ext2 read support --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a7e096b..93c73b2 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,11 @@ endef all: portdeps out/boot.iso check portdeps: out/libc.a out/libm.a src/user/lib/include/__errno.h -boot: all out/hdd - qemu-system-x86_64 -drive file=out/boot.iso,format=raw,media=disk $(QFLAGS) -serial stdio +boot: all out/fs.e2 + qemu-system-x86_64 \ + -drive file=out/boot.iso,format=raw,media=disk \ + -drive file=out/fs.e2,format=raw,media=disk \ + $(QFLAGS) -serial stdio test: all @# pipes for the serial @@ -97,9 +100,8 @@ out/fs/boot/grub/grub.cfg: grub.cfg @mkdir -p $(@D) @cp $< $@ -out/hdd: - @dd if=/dev/zero of=$@ bs=512 count=70000 - +out/fs.e2: + @mkfs.ext2 $@ 1024 > /dev/null define userbin_template = out/initrd/bin/amd64/$(1): src/user/linker.ld $(call from_sources, src/user/app/$(1)) out/libc.a @@ -109,6 +111,10 @@ endef USERBINS := $(shell ls src/user/app) $(foreach bin,$(USERBINS),$(eval $(call userbin_template,$(bin)))) +# don't build the example implementation from libext2 +out/obj/user/app/ext2fs/ext2/example.c.o: + @touch $@ + out/initrd/%: initrd/% @mkdir -p $(@D) @cp $< $@ -- cgit v1.2.3