Skip to content

Commit

Permalink
Split of the capsule header
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-StarLabs committed Oct 9, 2023
1 parent 41df1b3 commit add0c37
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
34 changes: 15 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)' > $@
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion make/Makefile.nsh_script
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions make/Makefile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit add0c37

Please sign in to comment.