[U-Boot] [PATCH 02/19] Makefile: Add rules to build in .ttf files

Simon Glass sjg at chromium.org
Fri Jan 15 02:10:35 CET 2016


Add rules to allow TrueType files to be compiled into U-Boot for use on
the video console.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 scripts/Makefile.lib | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ed30bf5..cff84cf 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -297,6 +297,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     $@
-- 
2.6.0.rc2.230.g3dd15c0



More information about the U-Boot mailing list