From d7bc9e9d67c2e7a4d2006d2c48485b3265aea038 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 12 May 2021 14:37:57 +0100 Subject: [image] Support archive image formats independently of "imgextract" command Support for the zlib and gzip archive image formats is currently included only if the IMAGE_ARCHIVE_CMD is used to enable the "imgextract" command. The ability to transparently execute a single-member archive image without using the "imgextract" command renders this unintuitive: a user wanting to gain the ability to boot a gzip-compressed kernel image would expect to have to enable IMAGE_GZIP rather than IMAGE_ARCHIVE_CMD. Reverse the inclusion logic, so that archive image formats must now be enabled explicitly (via IMAGE_GZIP and/or IMAGE_ZLIB), with the archive image management commands dragged in as needed if any archive image formats are enabled. The archive image management commands may be explicitly disabled via IMAGE_ARCHIVE_CMD if necessary. This matches the behaviour of IBMGMT_CMD and similar options, where the relevant commands are included only when something else already drags in the underlying feature. Signed-off-by: Michael Brown --- src/config/config_archive.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/config/config_archive.c') diff --git a/src/config/config_archive.c b/src/config/config_archive.c index 84f21b956..746fc7e44 100644 --- a/src/config/config_archive.c +++ b/src/config/config_archive.c @@ -31,9 +31,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); PROVIDE_REQUIRING_SYMBOL(); -#ifdef IMAGE_ZLIB -REQUIRE_OBJECT ( zlib ); -#endif -#ifdef IMAGE_GZIP -REQUIRE_OBJECT ( gzip ); +#ifdef IMAGE_ARCHIVE_CMD +REQUIRE_OBJECT ( image_archive_cmd ); #endif -- cgit v1.2.3-55-g7522