]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
scripts: Introduce {quiet_,}cmd_bin2c
authorPierre-Clément Tosi <ptosi@google.com>
Wed, 11 May 2022 09:36:07 +0000 (10:36 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 6 Jun 2022 21:47:17 +0000 (17:47 -0400)
Add a make command to compile binary files as C data through bin2c with

    $(call,bin2c,<data_name_prefix>)

Note that this requires BUILD_BIN2C=y.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
scripts/Makefile.lib

index 3db2550085a1b45a338b837a35ee879a6090539d..c0a5bb9addc58171fd5d6fc146917b5acfdcddf0 100644 (file)
@@ -567,6 +567,11 @@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
 
 # Additional commands for U-Boot
 #
+# bin2c
+# ---------------------------------------------------------------------------
+quiet_cmd_bin2c = BIN2C   $@
+      cmd_bin2c = $(objtree)/scripts/bin2c $2 < $< > $@
+
 # mkimage
 # ---------------------------------------------------------------------------
 MKIMAGEOUTPUT ?= /dev/null