diff --git a/Makefile b/Makefile index 0ccba10..326ff4e 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,13 @@ curPath:=$(abspath .) srcPath:=$(curPath)/src imgPath:=$(curPath)/sdcard -all: platform freertos +all: dir platform freertos + +dir: + @mkdir -p $(imgPath) include platform.mk include freertos.mk include linux.mk -.PHONY: all +.PHONY: dir all diff --git a/freertos.mk b/freertos.mk index 77d4184..df2b36b 100644 --- a/freertos.mk +++ b/freertos.mk @@ -2,6 +2,8 @@ freertos_src:=$(srcPath)/freertos freertos_dest_image:=$(imgPath)/freertos.bin -freertos $(freertos_dest_image): $(freertos_src) +$(freertos_dest_image): $(freertos_src) $(MAKE) -C $(freertos_src) PLATFORM=$(PLATFORM) - cp $(freertos_src)/build/$(PLATFORM)/freertos.bin $(freertos_dest_image) \ No newline at end of file + cp $(freertos_src)/build/$(PLATFORM)/freertos.bin $(freertos_dest_image) + +freertos: $(freertos_dest_image) \ No newline at end of file diff --git a/platform.mk b/platform.mk index 565e32d..5d71d4d 100644 --- a/platform.mk +++ b/platform.mk @@ -5,7 +5,7 @@ firmware_images:=$(curPath)/firmware-rpi atf_src:=$(srcPath)/arm-trusted-firmware atf_dest_image:=$(imgPath)/bl31.bin -atf_plat:=PLATFORM +atf_plat:=$(PLATFORM) uboot_src:=$(srcPath)/u-boot uboot_defconfig:=rpi_4_defconfig @@ -24,14 +24,9 @@ u-boot $(uboot_dest_image): $(uboot_src) $(firmware_images): git clone --depth 1 --branch $(firmware_version) $(firmware_repo) $(firmware_images) -sdcardDir: - @mkdir -p $(imgPath) - #instuctions:=$(bao_demos)/platforms/$(PLATFORM)/README.md -platform: sdcardDir $(uboot_dest_image) $(atf_dest_image) $(firmware_images) +platform: $(uboot_dest_image) $(atf_dest_image) $(firmware_images) # $(call print-instructions, $(instuctions), 1, false) # $(call print-instructions, $(instuctions), 2, false) -# $(call print-instructions, $(instuctions), 3, true) - -.PHONY: sdcardDir \ No newline at end of file +# $(call print-instructions, $(instuctions), 3, true) \ No newline at end of file