configs: socfpga: stratix10: Disable mkeficapsule tool build
PATCH 1/1 configs: socfpga: stratix10: Disable mkeficapsule tool build
mkeficapsule tool will be built by default if EFI_LOADER is set due to external changes for U-Boot v2024.10 commit b7a625b1ce49 ("tools: Build mkeficapsule tool by default if EFI_LOADER is set")
This will cause compilation error on all our SoCFPGA devices, hence we will be disabling this config for now as we do not utilize this tool.
--- configs/socfpga_stratix10_atf_defconfig | 1 + configs/socfpga_stratix10_defconfig | 1 + 2 files changed, 2 insertions(+)
configs/socfpga_stratix10_atf_defconfig +1 -0
@@ -88,3 +88,4 @@ CONFIG_WDT=y # CONFIG_SPL_USE_TINY_PRINTF is not set CONFIG_PANIC_HANG=y CONFIG_SPL_CRC32=y +# CONFIG_TOOLS_MKEFICAPSULE is not set
configs/socfpga_stratix10_defconfig +1 -0
@@ -90,3 +90,4 @@ CONFIG_WDT=y # CONFIG_SPL_USE_TINY_PRINTF is not set CONFIG_PANIC_HANG=y CONFIG_SPL_CRC32=y +# CONFIG_TOOLS_MKEFICAPSULE is not set
Signature · 1 line
2.43.7
Quoted 6 lines · Boon Khai Ng
mkeficapsule tool will be built by default if
EFI_LOADERis set due to external changes for U-Boot v2024.10 commitb7a625b1ce49("tools: Build mkeficapsule tool by default ifEFI_LOADERis set")This will cause compilation error on all our SoCFPGA devices, hence we will be disabling this config for now as we do not utilize this tool.
Why / how is this failing to compile?
Signature · 1 line
Tom
Hi Tom,
Quoted 1 line
Why / how is this failing to compile?
When compile without disabling the mkeficapsule tool will hit into this error:
tools/mkeficapsule.c:20:10: fatal error: gnutls/gnutls.h: No such file or directory
#include <gnutls/gnutls.h>
^~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:113: tools/mkeficapsule.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:2201: tools] Error 2
We are not using that tools, I think we should just disable it.
Regards,
Boon Khai.
Quoted 8 lines · BOON KHAI
Hi Tom,
Quoted 1 line
Why / how is this failing to compile?
When compile without disabling the mkeficapsule tool will hit into this error:
tools/mkeficapsule.c:20:10: fatal error:gnutls/gnutls.h: No such file or directory
Quoted 8 lines
#include <gnutls/gnutls.h> ^~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:113:tools/mkeficapsule.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:2201: tools] Error 2We are not using that tools, I think we should just disable it.
That's a documented host dependency. We generally don't want to disable general tools even if, sigh, I see a few other boards are also doing this now.
Signature · 1 line
Tom
Hi Tom,
Quoted 7 lines
That's a documented host dependency. We generally don't want to disable general tools even if, sigh, I see a few other boards are also doing this now.
--
Tom
Can share the link to the documentation? I tried to search tool the U-Boot docs.u-boot.org but cant find any document related to the host dependency this is only what i found https://docs.u-boot.org/en/latest/build/tools.html
but didn't mention about mkeficapsule.
At the same time, i would like to clarify why this is more than just a missing host dependancy.
Since SoCFPGA does not support EFI capsule updates, the automatic enable of CONFIG_TOOLS_MKEFICAPSULE actually not reflecting the actual capability of the platform.
Disabling the tool explicitly in the defconfing is an accurate representation of this board's feature set, and this is not merely a build workaround,
and, according to https://adaptivesupport.amd.com/s/question/
0D54U000086ca7RSAQ/toolsmkeficapsulec2110-fatal-error- gnutlsgnutlsh-no-such-file-or-directory?language=en_US installing libgnutls-dev would suppress the error,
but this will leave a misleading configuration in place.
I'm curious, if the intent is that the TOOLS_MKEFICAPSULE should always be build, perhaps the correct fix upstream would be to make the gnutls dependency a hard Kconfig requirement?
Regards,
Boon Khai.
Quoted 7 lines · BOON KHAI
Hi Tom,
Quoted 5 lines
That's a documented host dependency. We generally don't want to disable general tools even if, sigh, I see a few other boards are also doing this now.
Quoted 7 lines
Quoted 2 lines
--
TomCan share the link to the documentation? I tried to search tool the U-Boot docs.u-boot.org but cant find any document related to the host dependency this is only what i found https://docs.u-boot.org/en/latest/build/tools.html
but didn't mention about mkeficapsule.
So in https://docs.u-boot.org/en/latest/build/gcc.html we list tls. That's not to say our docs could not be improved and expanded on, but it is there. But with that, you have a stronger point below.
Quoted 15 lines
At the same time, i would like to clarify why this is more than just a missing host dependancy.
Since SoCFPGA does not support EFI capsule updates, the automatic enable of
CONFIG_TOOLS_MKEFICAPSULEactually not reflecting the actual capability of the platform.Disabling the tool explicitly in the defconfing is an accurate representation of this board's feature set, and this is not merely a build workaround,
and, according to https://adaptivesupport.amd.com/s/question/
0D54U000086ca7RSAQ/toolsmkeficapsulec2110-fatal-error- gnutlsgnutlsh-no-such-file-or-directory?language=en_US installing libgnutls-dev would suppress the error,
Quoted 5 lines
but this will leave a misleading configuration in place.
I'm curious, if the intent is that the
TOOLS_MKEFICAPSULEshould always be build, perhaps the correct fix upstream would be to make the gnutls dependency a hardKconfigrequirement?
I've added the EFI Loader custodians to the thread as well. While I think tools-only_defconfig needs to enable TOOLS_MKEFICAPSULE (as this is what generic distributions should be using when building the userspace tools for a generic case, in order to have maximally useful tooling), I'm open to saying that it should be "default y if ..." some other symbol that means that a given platform has in fact configured the rest of the system to support capsule updates as, you're right. If a board hasn't done the rest of the work to use it, the tool is not useful.
Signature · 1 line
Tom
Hi Tom,
Thank you for the clarification and for looping in the EFI Loader custodians.
I'm okay with the implementation to improve the Kconfig logic to only enable CONFIG_TOOLS_MKEFICAPSULE by default on platforms that actually support EFI capsule updates would be the best long-term solution.
This would prevent misleading configurations and avoid unnecessary build failures on platforms that do not use the tool.
I'm happy to help test or review any proposed changes in this area.
In the meantime, could we set the setting
+# CONFIG_TOOLS_MKEFICAPSULE is not set
at the defonfig first? as I believe disabling the tool explicitly in the SoCFPGA defconfig remains the most accurate way to reflect the board's capabilities and avoid confusion for users.
Thanks again for the constructive discussion.
Regards,
Boon Khai
Hi Boon Khai,
Quoted 12 lines · BOON KHAI
Hi Tom,
Thank you for the clarification and for looping in the EFI Loader custodians.
I'm okay with the implementation to improve the
Kconfiglogic to only enableCONFIG_TOOLS_MKEFICAPSULEby default on platforms that actually support EFI capsule updates would be the best long-term solution.
This would prevent misleading configurations and avoid unnecessary build failures on platforms that do not use the tool.I'm happy to help test or review any proposed changes in this area.
Quoted 8 lines
In the meantime, could we set the setting
+#
CONFIG_TOOLS_MKEFICAPSULEis not setat the defonfig first? as I believe disabling the tool explicitly in the SoCFPGA defconfig remains the most accurate way to reflect the board's capabilities and avoid confusion for users.
I agree with the rationale discussed in this thread: Stratix10 SoCFPGA platforms are not using UEFI capsule update flows today, so defaulting CONFIG_TOOLS_MKEFICAPSULE on solely via CONFIG_EFI_LOADER does not reflect what we ship or test, and it pulls in a GNUTLS host dependency that is easy to hit in minimal build environments.
Disabling CONFIG_TOOLS_MKEFICAPSULE explicitly in the Stratix10 defconfigs is therefore an accurate representation of the board feature set, not only a workaround for missing host packages.
I'm fine with this going in as an interim measure while the broader Kconfig/default discussion (default y only when capsule update is actually in use) is handled separately with the EFI custodians as Tom suggested.
Please post a v2 with an updated commit message that briefly states:
(1) the observed failure (missing gnutls/gnutls.h when building the tool),
(2) that SoCFPGA Stratix10 does not use EFI capsule updates, and
(3) that this explicitly disables the host tool to match that.
Thanks.
Best regards,
Tien Fong
Tom Rini
Reviewed-byQuoted 42 lines · Tien Fong
Hi Boon Khai,
Quoted 12 lines · BOON KHAI
Hi Tom,
Thank you for the clarification and for looping in the EFI Loader custodians.
I'm okay with the implementation to improve the
Kconfiglogic to only enableCONFIG_TOOLS_MKEFICAPSULEby default on platforms that actually support EFI capsule updates would be the best long-term solution.
This would prevent misleading configurations and avoid unnecessary build failures on platforms that do not use the tool.I'm happy to help test or review any proposed changes in this area.
Quoted 8 lines
In the meantime, could we set the setting
+#
CONFIG_TOOLS_MKEFICAPSULEis not setat the defonfig first? as I believe disabling the tool explicitly in the SoCFPGA defconfig remains the most accurate way to reflect the board's capabilities and avoid confusion for users.
I agree with the rationale discussed in this thread: Stratix10 SoCFPGA platforms are not using UEFI capsule update flows today, so defaulting
CONFIG_TOOLS_MKEFICAPSULEon solely viaCONFIG_EFI_LOADERdoes not reflect what we ship or test, and it pulls in a GNUTLS host dependency that is easy to hit in minimal build environments.Disabling
CONFIG_TOOLS_MKEFICAPSULEexplicitly in the Stratix10 defconfigs is therefore an accurate representation of the board feature set, not only a workaround for missing host packages.I'm fine with this going in as an interim measure while the broader Kconfig/default discussion (default y only when capsule update is actually in use) is handled separately with the EFI custodians as Tom suggested.
Quoted 4 lines
Please post a v2 with an updated commit message that briefly states:
(1) the observed failure (missinggnutls/gnutls.hwhen building the tool),
(2) that SoCFPGA Stratix10 does not use EFI capsule updates, and
(3) that this explicitly disables the host tool to match that.
And you can add my:
to the v2 as well, thanks!
Signature · 1 line
Tom