[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 2/2] build: Provide option for compressing images



Introduces a menu option to enable or disable the creation of
compressed images.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 Config.uk          | 7 +++++++
 plat/kvm/Linker.uk | 2 ++
 plat/xen/Linker.uk | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/Config.uk b/Config.uk
index 4c7a0ec2..c2e473ee 100644
--- a/Config.uk
+++ b/Config.uk
@@ -126,6 +126,13 @@ config OPTIMIZE_SYMFILE
        help
                Create a separate file with all symbol locations
 
+config OPTIMIZE_COMPRESS
+       bool "Compress images"
+       default y
+       help
+               Create compressed images. Please note that not all platforms
+               support compressing.
+
 config RECORD_BUILDTIME
        bool "Keep track of Building time"
        default n
diff --git a/plat/kvm/Linker.uk b/plat/kvm/Linker.uk
index d68f908e..54ae5e8e 100644
--- a/plat/kvm/Linker.uk
+++ b/plat/kvm/Linker.uk
@@ -47,9 +47,11 @@ ifeq ($(CONFIG_OPTIMIZE_SYMFILE),y)
        $(call build_cmd,NM,,$@.sym,\
               $(NM) -n $@.dbg > $@.sym)
 endif
+ifeq ($(CONFIG_OPTIMIZE_COMPRESS),y)
        $(call build_cmd,GZ,,$@.gz,\
               $(GZIP) -f -9 -c $@ >$@.gz)
 endif
+endif
 
 # register image to the build
 UK_IMAGES-$(CONFIG_PLAT_KVM) += $(KVM_IMAGE)
diff --git a/plat/xen/Linker.uk b/plat/xen/Linker.uk
index 3a4a7717..5bb75cf0 100644
--- a/plat/xen/Linker.uk
+++ b/plat/xen/Linker.uk
@@ -45,8 +45,10 @@ ifeq ($(CONFIG_OPTIMIZE_SYMFILE),y)
 endif
        $(call build_cmd,OBJCOPY,,$@,\
               $(OBJCOPY) -O binary $@.elf $@)
+ifeq ($(CONFIG_OPTIMIZE_COMPRESS),y)
        $(call build_cmd,GZ,,$@.gz,\
               $(GZIP) -f -9 -c $@ >$@.gz)
+endif
 else
        $(call build_cmd,LD,,$@.dbg,\
               $(LD) $(LDFLAGS) $(LDFLAGS-y) $(XEN_LDFLAGS) $(XEN_LDFLAGS-y) \
@@ -62,9 +64,11 @@ ifeq ($(CONFIG_OPTIMIZE_SYMFILE),y)
        $(call build_cmd,NM,,$@.sym,\
               $(NM) -n $@.dbg > $@.sym)
 endif
+ifeq ($(CONFIG_OPTIMIZE_COMPRESS),y)
        $(call build_cmd,GZ,,$@.gz,\
               $(GZIP) -f -9 -c $@ >$@.gz)
 endif
+endif
 
 # register image to the build
 UK_IMAGES-$(CONFIG_PLAT_XEN) += $(XEN_IMAGE)
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.