pldmfw: Select CRC32 when PLDMFW is selected
authorSimon Horman <horms@kernel.org>
Fri, 13 Jun 2025 16:46:20 +0000 (17:46 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 16 Jun 2025 21:12:08 +0000 (14:12 -0700)
pldmfw calls crc32 code and depends on it being enabled, else
there is a link error as follows. So PLDMFW should select CRC32.

  lib/pldmfw/pldmfw.o: In function `pldmfw_flash_image':
  pldmfw.c:(.text+0x70f): undefined reference to `crc32_le_base'

This problem was introduced by commit b8265621f488 ("Add pldmfw library
for PLDM firmware update").

It manifests as of commit d69ea414c9b4 ("ice: implement device flash
update via devlink").

And is more likely to occur as of commit 9ad19171b6d6 ("lib/crc: remove
unnecessary prompt for CONFIG_CRC32 and drop 'default y'").

Found by chance while exercising builds based on tinyconfig.

Fixes: b8265621f488 ("Add pldmfw library for PLDM firmware update")
Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250613-pldmfw-crc32-v1-1-f3fad109eee6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
lib/Kconfig

index 6c1b8f1842678c13966768177781b2de04601bdd..37db228f70a99fb5cf563ec10f707cb605c4e508 100644 (file)
@@ -716,6 +716,7 @@ config GENERIC_LIB_DEVMEM_IS_ALLOWED
 
 config PLDMFW
        bool
+       select CRC32
        default n
 
 config ASN1_ENCODER