All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 17/21] Makefile: add support to generate LZMA compressed u-boot image
@ 2020-01-17  7:46 Weijie Gao
  2020-01-17 12:28 ` Daniel Schwierzeck
  0 siblings, 1 reply; 2+ messages in thread
From: Weijie Gao @ 2020-01-17  7:46 UTC (permalink / raw)
  To: u-boot

This patch adds support for generating LZMA compressed u-boot image.
The compressed image can be used for SPL to reduce the size of the u-boot
binary.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
Changes since v1: none
---
 Makefile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Makefile b/Makefile
index 3f332e6885..8013cbd9f9 100644
--- a/Makefile
+++ b/Makefile
@@ -952,6 +952,9 @@ append = cat $(filter-out $< $(PHONY), $^) >> $@
 quiet_cmd_pad_cat = CAT     $@
 cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@
 
+quiet_cmd_lzma = LZMA    $@
+cmd_lzma = lzma -c -z -k -9 $< > $@
+
 cfg: u-boot.cfg
 
 quiet_cmd_cfgcheck = CFGCHK  $2
@@ -1334,6 +1337,16 @@ else
 UBOOT_BIN := u-boot.bin
 endif
 
+MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
+	-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
+	-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
+
+u-boot.bin.lzma: u-boot.bin FORCE
+	$(call if_changed,lzma)
+
+u-boot-lzma.img: u-boot.bin.lzma FORCE
+	$(call if_changed,mkimage)
+
 u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
 		$(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin \
 			$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),dts/dt.dtb) \
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2 17/21] Makefile: add support to generate LZMA compressed u-boot image
  2020-01-17  7:46 [PATCH v2 17/21] Makefile: add support to generate LZMA compressed u-boot image Weijie Gao
@ 2020-01-17 12:28 ` Daniel Schwierzeck
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Schwierzeck @ 2020-01-17 12:28 UTC (permalink / raw)
  To: u-boot



Am 17.01.20 um 08:46 schrieb Weijie Gao:
> This patch adds support for generating LZMA compressed u-boot image.
> The compressed image can be used for SPL to reduce the size of the u-boot
> binary.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
> ---
> Changes since v1: none
> ---
>  Makefile | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

-- 
- Daniel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-17 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17  7:46 [PATCH v2 17/21] Makefile: add support to generate LZMA compressed u-boot image Weijie Gao
2020-01-17 12:28 ` Daniel Schwierzeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.