Do not have systemwide dependency on echfs-utils

This commit is contained in:
Quinten Kock 2020-12-07 21:25:23 +01:00
parent 64b01f8433
commit b182f6406f
3 changed files with 10 additions and 4 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "ext/limine"]
path = ext/limine
url = https://github.com/limine-bootloader/limine
[submodule "ext/echfs"]
path = ext/echfs
url = https://github.com/echfs/echfs.git

View File

@ -27,17 +27,19 @@ bochs: $(KERNEL_HDD) ext/bochsrc
ext/limine/limine-install:
$(MAKE) -C ext/limine/ limine-install
ext/echfs/echfs-utils:
$(MAKE) -C ext/echfs/ echfs-utils
$(KERNEL_HDD): ext/limine/limine-install $(COMPONENTS)
$(KERNEL_HDD): ext/limine/limine-install ext/echfs/echfs-utils $(COMPONENTS)
@rm -f $(KERNEL_HDD)
@echo Creating $(KERNEL_HDD)
@dd if=/dev/zero bs=1M count=0 seek=64 of=$(KERNEL_HDD) status=none
@parted -s $(KERNEL_HDD) mklabel msdos
@parted -s $(KERNEL_HDD) mkpart primary 1 100%
@echfs-utils -m -p0 $(KERNEL_HDD) quick-format 32768 > /dev/null # silence UUID
@for f in $(COMPONENTS); do echo "Installing $$f ($$(du -h $$f/bin/$$f-$(ARCH) | cut -f1))"; echfs-utils -m -p0 $@ import $$f/bin/$$f-$(ARCH) $$f; done
@ext/echfs/echfs-utils -m -p0 $(KERNEL_HDD) quick-format 32768 > /dev/null # silence UUID
@for f in $(COMPONENTS); do echo "Installing $$f ($$(du -h $$f/bin/$$f-$(ARCH) | cut -f1))"; ext/echfs/echfs-utils -m -p0 $@ import $$f/bin/$$f-$(ARCH) $$f; done
@echo Installing bootloader
@echfs-utils -m -p0 $(KERNEL_HDD) import ext/limine.cfg limine.cfg
@ext/echfs/echfs-utils -m -p0 $(KERNEL_HDD) import ext/limine.cfg limine.cfg
@ext/limine/limine-install ext/limine/limine.bin $(KERNEL_HDD)
clean:

1
ext/echfs Submodule

@ -0,0 +1 @@
Subproject commit 1b492c58c4c5b4784f2228a8e1493fd508b61863