
From: Simon Glass <sjg@chromium.org> The ifeq/else/endif conditional for capsule_esl_file generation was incorrectly placed inside the recipe, causing malformed Makefile syntax that prevented proper dependency resolution. This resulted in build failures when CONFIG_EFI_CAPSULE_AUTHENTICATE was enabled because the capsule_esl_file target could not be created from the certificate file. Move the conditional to properly wrap the rule definitions, allowing Make to correctly parse and execute the capsule ESL generation rules. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Claude <noreply@anthropic.com> --- scripts/Makefile.lib | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 8300c8104ce..5abe428e752 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -409,17 +409,18 @@ capsule_esl_dtsi=.capsule_esl.dtsi quiet_cmd_capsule_esl_gen = ESL $@ cmd_capsule_esl_gen = cert-to-efi-sig-list $< $@ -$(obj)/capsule_esl_file: $(capsule_crt_file) +$(obj)/capsule_esl_file: $(srctree)/$(capsule_crt_file) ifeq ($(CONFIG_EFI_CAPSULE_CRT_FILE),"") $(error "CONFIG_EFI_CAPSULE_CRT_FILE is empty, EFI capsule authentication \ public key must be specified when CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled") else + $(Q)echo "Building capsule_esl_file: $@ from $<" $(call cmd,capsule_esl_gen) endif quiet_cmd_capsule_dtsi_gen = CAPSULE $@ cmd_capsule_dtsi_gen = \ - $(shell sed "s:ESL_BIN_FILE:$(abspath $<):" $(capsule_esl_input_file) > $@) + sed "s:ESL_BIN_FILE:capsule_esl_file:" $(capsule_esl_input_file) > $@ $(obj)/$(capsule_esl_dtsi): $(obj)/capsule_esl_file $(capsule_esl_input_file) $(call cmd,capsule_dtsi_gen) -- 2.43.0