]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Add rules to build in .ttf files
authorSimon Glass <sjg@chromium.org>
Fri, 15 Jan 2016 01:10:35 +0000 (18:10 -0700)
committerAnatolij Gustschin <agust@denx.de>
Sat, 30 Jan 2016 08:36:12 +0000 (09:36 +0100)
Add rules to allow TrueType files to be compiled into U-Boot for use on
the video console.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
scripts/Makefile.lib

index 1644f8c48d4b9d13ccfb9ed4b57320df0bcaebea..ad1d9b5d7dd25fd5a4357c93bc7c4818ba8c109d 100644 (file)
@@ -300,6 +300,27 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 
+# Fonts
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the font data
+quiet_cmd_S_ttf= TTF     $@
+# Modified for U-Boot
+cmd_S_ttf=                                             \
+(                                                      \
+       echo '.section .rodata.ttf.init,"a"';           \
+       echo '.balign 16';                              \
+       echo '.global __ttf_$(*F)_begin';               \
+       echo '__ttf_$(*F)_begin:';                      \
+       echo '.incbin "$<" ';                           \
+       echo '__ttf_$(*F)_end:';                        \
+       echo '.global __ttf_$(*F)_end';                 \
+       echo '.balign 16';                              \
+) > $@
+
+$(obj)/%.S: $(src)/%.ttf
+       $(call cmd,S_ttf)
+
 # ACPI
 # ---------------------------------------------------------------------------
 quiet_cmd_acpi_c_asl= ASL     $@