diff --git a/Makefile b/Makefile index feea48a..e494153 100644 --- a/Makefile +++ b/Makefile @@ -47,15 +47,17 @@ PYPP = /usr/bin/pypp $(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ $(OBJCOPY) -S $(OBJCOPYFLAGS) $@ -fs/%.elf: source/crt0.o source/%.o +fs/%.elf: source/crt0.o source/%.o fs/init.config $(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ $(OBJCOPY) -S $(OBJCOPYFLAGS) $@ fs/%: % + test -d fs || mkdir fs ln -s ../$< $@ clean: rm -f *.o boot-programs/*.o $(BUILT_SOURCES) $(ARCH_CLEAN_FILES) + rm -rf fs/ debug: stty -F $(SERIAL) raw 9600 diff --git a/mips/nanonote/Makefile.arch b/mips/nanonote/Makefile.arch index 79cdf92..184ac9a 100644 --- a/mips/nanonote/Makefile.arch +++ b/mips/nanonote/Makefile.arch @@ -44,7 +44,7 @@ boot_threads = $(standard_boot_programs) $(sd_boot_programs) threadlist = mips/nanonote/threadlist-sd ARCH_CXXFLAGS = -DNUM_THREADS=4 all: iris-sd.tar -iris-sd.tar: $(addprefix fs/,$(addsuffix .elf,$(programs))) iris.raw init.config +iris-sd.tar: $(addprefix fs/,$(addsuffix .elf,$(programs))) iris.raw fs/init.config mkimage -A mips -T kernel -a $(load) -e a$(shell /bin/sh -c '$(OBJDUMP) -t iris.elf | grep __start$$ | cut -b2-8') -n Iris -d iris.raw fs/uimage | sed -e 's/:/;/g' cd fs && tar cvf ../$@ uimage init.config $(addsuffix .elf,$(programs)) --dereference endif