Create the sfs root directory if missing

Signed-off-by: Junjie Mao <junjie.mao@hotmail.com>
This commit is contained in:
Junjie Mao 2015-03-24 10:33:23 +08:00
parent b20d96a599
commit 2d1c2001f5
3 changed files with 7 additions and 0 deletions

1
.gitignore vendored
View File

@ -18,3 +18,4 @@ a.out
*.log *.log
*.exe *.exe
chytesting chytesting
disk0

View File

@ -273,6 +273,9 @@ $(foreach p,$(USER_BINS),$(eval $(call fscopy,$(p),$(SFSROOT)$(SLASH))))
$(SFSROOT): $(SFSROOT):
if [ ! -d "$(SFSROOT)" ]; then mkdir $(SFSROOT); fi if [ ! -d "$(SFSROOT)" ]; then mkdir $(SFSROOT); fi
$(SFSROOT):
$(V)$(MKDIR) $@
$(SFSIMG): $(SFSROOT) $(SFSBINS) | $(call totarget,mksfs) $(SFSIMG): $(SFSROOT) $(SFSBINS) | $(call totarget,mksfs)
$(V)dd if=/dev/zero of=$@ bs=1M count=128 $(V)dd if=/dev/zero of=$@ bs=1M count=128
@$(call totarget,mksfs) $@ $(SFSROOT) @$(call totarget,mksfs) $@ $(SFSROOT)

View File

@ -261,6 +261,9 @@ endef
$(foreach p,$(USER_BINS),$(eval $(call fscopy,$(p),$(SFSROOT)$(SLASH)))) $(foreach p,$(USER_BINS),$(eval $(call fscopy,$(p),$(SFSROOT)$(SLASH))))
$(SFSROOT):
$(V)$(MKDIR) $@
$(SFSIMG): $(SFSROOT) $(SFSBINS) | $(call totarget,mksfs) $(SFSIMG): $(SFSROOT) $(SFSBINS) | $(call totarget,mksfs)
$(V)dd if=/dev/zero of=$@ bs=1M count=128 $(V)dd if=/dev/zero of=$@ bs=1M count=128
@$(call totarget,mksfs) $@ $(SFSROOT) @$(call totarget,mksfs) $@ $(SFSROOT)