aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/config.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2021-05-12 14:37:57 +0100
committerMichael Brown <mcb30@ipxe.org>2021-05-12 14:50:34 +0100
commitd7bc9e9d67c2e7a4d2006d2c48485b3265aea038 (patch)
tree60fac3a69815dba47ec3f9af67c15a7420bb5fea /src/config/config.c
parent62f732207e7cbd226a11b85581c2c33e1e6be409 (diff)
downloadipxe-d7bc9e9d67c2e7a4d2006d2c48485b3265aea038.tar.gz
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/config/config.c')
-rw-r--r--src/config/config.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/config/config.c b/src/config/config.c
index dd1fceb92..a81866132 100644
--- a/src/config/config.c
+++ b/src/config/config.c
@@ -182,6 +182,12 @@ REQUIRE_OBJECT ( efi_image );
#ifdef IMAGE_SDI
REQUIRE_OBJECT ( sdi );
#endif
+#ifdef IMAGE_ZLIB
+REQUIRE_OBJECT ( zlib );
+#endif
+#ifdef IMAGE_GZIP
+REQUIRE_OBJECT ( gzip );
+#endif
/*
* Drag in all requested commands
@@ -284,9 +290,6 @@ REQUIRE_OBJECT ( cert_cmd );
#ifdef IMAGE_MEM_CMD
REQUIRE_OBJECT ( image_mem_cmd );
#endif
-#ifdef IMAGE_ARCHIVE_CMD
-REQUIRE_OBJECT ( image_archive_cmd );
-#endif
/*
* Drag in miscellaneous objects