diff --git a/Makefile b/Makefile index 2d1e1add..a7238565 100644 --- a/Makefile +++ b/Makefile @@ -22,21 +22,19 @@ ifeq ($(target),coreboot) make -C ../coreboot distclean make -C ../coreboot defconfig KBUILD_DEFCONFIG=configs/config.starlabs_$(model) make -C ../coreboot - cp ../coreboot/build/coreboot.rom $@ -else ifeq ($(target),ami) - ./binaries/header.py --guid $(uefi) --bin $(version).rom --cap $@ - rm $(version).rom -else - exit 0 + mv ../coreboot/build/coreboot.rom $@ endif $(OUTPUT_DIR): mkdir -p $@ # Just the binary -$(OUTPUT_DIR)/$(version).$(file_type): $(version).$(file_type) +$(OUTPUT_DIR)/$(version).rom: $(version).rom mv $< $@ +$(OUTPUT_DIR)/$(version).cap: $(OUTPUT_DIR)/$(version).rom + ./binaries/header.py --guid $(uefi) --bin $< --cap $@ + # Standard CAB $(OUTPUT_DIR)/$(sku).$(target).metainfo.xml: $(OUTPUT_DIR) printf '$(metadata)' > $@ @@ -81,32 +79,30 @@ push_to_git: git commit -m "Added $(name) $(target) $(version)" git push +DEPENDENCIES = \ + $(OUTPUT_DIR) \ + $(OUTPUT_DIR)/release_notes.md \ + $(OUTPUT_DIR)/$(version).rom + # Master recipes to be called -ami-flashrom: $(OUTPUT_DIR) \ - $(OUTPUT_DIR)/release_notes.md \ - $(OUTPUT_DIR)/$(version).$(file_type) \ +ami-flashrom: $(DEPENDENCIES) \ $(OUTPUT_DIR)/$(target)-$(sku).cab $(MAKE) target_link="$(link)/$(version).$(file_type)" push_to_git -ami: $(OUTPUT_DIR) \ - $(OUTPUT_DIR)/release_notes.md \ - $(OUTPUT_DIR)/$(version).$(file_type) \ +ami: $(DEPENDENCIES) $(OUTPUT_DIR)/$(target)-$(sku).cab \ + $(OUTPUT_DIR)/$(version).cap \ $(OUTPUT_DIR)/efi-$(sku).zip $(MAKE) target_link="$(link)/$(version).$(file_type)" push_to_git -coreboot: $(OUTPUT_DIR) \ - $(OUTPUT_DIR)/release_notes.md \ - $(OUTPUT_DIR)/$(version).$(file_type) \ +coreboot: $(DEPENDENCIES) \ $(OUTPUT_DIR)/$(target)-$(sku).cab $(MAKE) target_link="$(link)/$(version).$(file_type)" push_to_git -ite: $(OUTPUT_DIR) \ - $(OUTPUT_DIR)/release_notes.md \ - $(OUTPUT_DIR)/$(version).$(file_type) \ +ite: $(DEPENDENCIES) \ $(OUTPUT_DIR)/efi-$(sku).zip $(MAKE) target_link="$(link)/$(version).$(file_type)" push_to_git diff --git a/make/Makefile.nsh_script b/make/Makefile.nsh_script index 53211511..6b032186 100644 --- a/make/Makefile.nsh_script +++ b/make/Makefile.nsh_script @@ -2,7 +2,7 @@ nsh_script = echo -off\n nsh_script += cls\n -nsh_script += set payload $(version).bin\n +nsh_script += set payload $(version).rom\n nsh_script += \n # nsh_script += echo "*******************************************************************"\n # nsh_script += echo ".d8888. d888888b .d8b. d8888b. db .d8b. d8888b. .d8888. "\n diff --git a/make/Makefile.targets b/make/Makefile.targets index 012a89ac..c08164b0 100644 --- a/make/Makefile.targets +++ b/make/Makefile.targets @@ -8,7 +8,7 @@ meta_format = pair meta_branch = false meta_guid_1 = $(superio1) meta_guid_2 = $(superio2) -file_type = bin +file_type = rom nsh_tool = ifu nsh_switch = 128 @@ -42,7 +42,7 @@ meta_type = X-System meta_format = triplet meta_branch = false meta_guid_1 = $(coreboot) -file_type = bin +file_type = rom endif