aboutsummaryrefslogtreecommitdiff
path: root/projects/grub/grub-helper
diff options
context:
space:
mode:
authorLeah Rowe <info@minifree.org>2017-09-08 11:04:19 +0000
committerGogs <gogitservice@gmail.com>2017-09-08 11:04:19 +0000
commit559ec4e17265b1bcec0d168cbb399fa935e3bf85 (patch)
tree96c2923079b8bca2e33d3636d85fabceef6406b1 /projects/grub/grub-helper
parent4c46577f91de37c09cfb37bc828eddb43df60ffc (diff)
parentff48c844bf6af40a3c91122106a98af2912382fc (diff)
downloadlibrebootfr-559ec4e17265b1bcec0d168cbb399fa935e3bf85.tar.gz
librebootfr-559ec4e17265b1bcec0d168cbb399fa935e3bf85.zip
Merge branch 'building-fonts' of kragle/libreboot into master
Diffstat (limited to 'projects/grub/grub-helper')
-rwxr-xr-xprojects/grub/grub-helper26
1 files changed, 26 insertions, 0 deletions
diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper
index 3e1420ac..e7e8a1fe 100755
--- a/projects/grub/grub-helper
+++ b/projects/grub/grub-helper
@@ -17,6 +17,9 @@
ARCH='arch'
CONFIG='config'
+FONTS='fonts'
+FONT_FILE='font-file'
+FONT_PROJECT='font-project'
FORMAT='format'
MODMIN='modules-minimal'
PLATFORM='platform'
@@ -27,6 +30,14 @@ grub_arch() {
project_file_contents "${project}" "${CONFIGS}" "${ARCH}" "$@"
}
+grub_font_file() {
+ project_file_contents "${project}" "${CONFIGS}" "${FONT_FILE}" "$@"
+}
+
+grub_font_project() {
+ project_file_contents "${project}" "${CONFIGS}" "${FONT_PROJECT}" "$@"
+}
+
grub_format() {
project_file_contents "${project}" "${CONFIGS}" "${FORMAT}" "$@"
}
@@ -60,6 +71,21 @@ grub_copy_modules() {
cp -a "${grub_module_dir}"/*.@(mod|lst) "${keep_dir}"
}
+grub_build_font() {
+ # Font project-specific filenames and paths
+ local font_file="$(grub_font_file "${FONTS}" "$@")"
+ local font_project="$(grub_font_project "${FONTS}" "$@")"
+ local font_build_dir="${root}/${BUILD}/${font_project}"
+
+ local grub_mkfont="${sources_path}/grub-mkfont"
+
+ # GRUB font directory for outputting the built PF2 file
+ mkdir -p "${build_path}/${FONTS}"
+
+ "${grub_mkfont}" --output="${build_path}/${FONTS}/${font_file%.*}.pf2" \
+ "${font_build_dir}/${font_file}"
+}
+
grub_build_utils() {
(
# If arch and/or platform files don't exist,