Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ IFWITOOL:=$(objutil)/cbfstool/ifwitool
IFITTOOL:=$(objutil)/cbfstool/ifittool
AMDCOMPRESS:=$(objutil)/cbfstool/amdcompress
ECCTOOL:=$(objutil)/ffs/ecc/ecc
SBSIGNTOOLS:=$(objutil)/sb-signing-utils
SBSIGNTOOLS:=$(objutil)/sb-signing-utils/create-container

$(obj)/cbfstool: $(CBFSTOOL)
cp $< $@
Expand Down Expand Up @@ -1162,6 +1162,8 @@ add_intermediate = \
$(1): $(obj)/coreboot.pre $(2) | $(INTERMEDIATE) \
$(eval INTERMEDIATE+=$(1)) $(eval PHONY+=$(1))

KEYLOC?=/tmp/keys

$(obj)/coreboot.rom: $(obj)/coreboot.pre $(RAMSTAGE) $(CBFSTOOL) $(ECCTOOL) $(SBSIGNTOOLS) $$(INTERMEDIATE)
@printf " CBFS $(subst $(obj)/,,$(@))\n"
# The full ROM may be larger than the CBFS part, so create an empty
Expand All @@ -1185,15 +1187,18 @@ endif # CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE
ifeq ($(CONFIG_ARCH_PPC64),y)
cp -r $(top)/3rdparty/sb-signing-utils/test/keys /tmp
@printf " SBSIGN $(subst $(obj)/,,$(@))\n"
cd $(SBSIGNTOOLS) && ./sign-with-local-keys.sh $(top)/$@ $(top)/$@.signed 2> /dev/null
$(SBSIGNTOOLS) -a $(KEYLOC)/hw_key_a.key -b $(KEYLOC)/hw_key_b.key -c $(KEYLOC)/hw_key_c.key \
-p $(KEYLOC)/hw_key_a.key --payload $(top)/$@ --imagefile $(top)/$@.signed
@printf " ECC $(subst $(obj)/,,$(@))\n"
$(ECCTOOL) --inject $(top)/$@.signed --output $(top)/$@.signed.ecc --p8
ifeq ($(CONFIG_BOOTBLOCK_IN_SEEPROM),y)
@printf " ECC bootblock\n"
$(ECCTOOL) --inject $(top)/$(objcbfs)/bootblock.bin --output $(obj)/bootblock.ecc --p8
else
@printf " SBSIGN bootblock\n"
cd $(SBSIGNTOOLS) && ./sign-with-local-keys.sh $(top)/$(objcbfs)/bootblock.bin $(top)/$(obj)/bootblock.signed 2> /dev/null
$(SBSIGNTOOLS) -a $(KEYLOC)/hw_key_a.key -b $(KEYLOC)/hw_key_b.key -c $(KEYLOC)/hw_key_c.key \
-p $(KEYLOC)/hw_key_a.key --payload $(top)/$(objcbfs)/bootblock.bin \
--imagefile $(top)/$(obj)/bootblock.signed
$(ECCTOOL) --inject $(top)/$@ --output $(top)/$@.ecc --p8
@printf " ECC bootblock\n"
dd if=$(obj)/bootblock.signed of=$(obj)/bootblock.signed.pad ibs=25486 conv=sync 2> /dev/null
Expand Down
5 changes: 3 additions & 2 deletions payloads/external/skiboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ skiboot_dir=$(CURDIR)/talos-skiboot
skiboot_git_repo=https://git.raptorcs.com/git/talos-skiboot
skiboot=$(skiboot_dir)/skiboot.lid
uimage=$(build_dir)/skiboot.uimage
skiboot_cross=$(or $(CROSS),powerpc64-linux-gnu-)

unexport $(COREBOOT_EXPORTS)

Expand All @@ -22,7 +23,7 @@ $(device_tree_blob): $(build_dir) $(device_tree_source)
dtc -I dts -O dtb -o $(device_tree_blob) $(device_tree_source)

$(skiboot): $(skiboot_dir)
$(MAKE) -C $(skiboot_dir) -j`nproc` CROSS=powerpc64-linux-gnu-
$(MAKE) -C $(skiboot_dir) -j`nproc` "CROSS=$(skiboot_cross)"

$(skiboot_dir):
git clone $(skiboot_git_repo) $(skiboot_dir)
Expand All @@ -37,6 +38,6 @@ distclean:

clean:
if [ -d $(skiboot_dir) ]; then \
$(MAKE) -C $(skiboot_dir) CROSS=powerpc64-linux-gnu- RM="rm -f" clean > /dev/null; \
$(MAKE) -C $(skiboot_dir) "CROSS=$(skiboot_cross)" RM="rm -f" clean > /dev/null; \
fi
rm -rf $(build_dir)