diff --git a/Kconfig b/Kconfig index a9331c4..ccb9bc9 100644 --- a/Kconfig +++ b/Kconfig @@ -19,6 +19,19 @@ menu "Building options" int "Verbosity of logs" default 7 + config COMPRESS_GZIP + bool "Compress the uniLoader image with gzip" + default y + help + Select this if you want to use gzip to compress the final uniLoader image. + + config COMPRESS_LZ4 + bool "Compress the uniLoader image with lz4" + default n + help + Select this if you want to use lz4 to compress the final uniLoader image. + This is required on some new MediaTek devices. + config EMBED_LINUX bool "Embed linux kernel and device tree" default y diff --git a/Makefile b/Makefile index 91c6cdf..d898cc4 100644 --- a/Makefile +++ b/Makefile @@ -399,10 +399,18 @@ quiet_cmd_uniloader_objcopy = OBJCOPY $@ quiet_cmd_gzip_uniloader = GZIP $@.gz cmd_gzip_uniloader = gzip -c uniLoader > uniLoader.gz +quiet_cmd_lz4_uniloader = LZ4 $@.lz4 + cmd_lz4_uniloader = lz4 uniLoader -l -f -q + uniLoader: $(uniloader-all) arch/$(ARCH)/linker.lds FORCE $(call if_changed,uniloader_link) $(call if_changed,uniloader_objcopy) +ifdef CONFIG_COMPRESS_GZIP $(call if_changed,gzip_uniloader) +endif +ifdef CONFIG_COMPRESS_LZ4 + $(call if_changed,lz4_uniloader) +endif # The actual objects are generated when descending, # make sure no implicit rule kicks in