]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
master: Enable graphical boot and install unicode font
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 May 2021 16:14:32 +0000 (16:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 May 2021 16:14:32 +0000 (16:14 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/bricklayer-master

index eb6acf89787502f5fd942dd91539f8b33401b8e4..a30bba0445ed3e53459808f5201e5b23ef7ddd5c 100644 (file)
@@ -43,6 +43,8 @@ ZSTD_COMPRESSION_LEVEL=22
 
 # Grub modules to install
 GRUB_MODULES=(
+       all_video
+       gfxmenu
        iso9660
        linux
        linux16
@@ -170,18 +172,17 @@ make_grub_config() {
        cat > "${path}" <<EOF
 # Bricklayer GRUB configuration
 
-# Select the first entry
-set default=0
+# Load font
+loadfont unicode
+
+terminal_output gfxterm
+insmod gfxmenu
 
 # Try loading video output
-insmod efi_gop
-insmod efi_uga
-insmod video_bochs
-insmod video_cirrus
 insmod all_video
 
-# Keep resolution selected by the BIOS
-set gfxpayload=keep
+# Select the first entry
+set default=0
 
 # Wait for 60 seconds for the user to make a decision
 set timeout=60
@@ -489,12 +490,25 @@ mkimage() {
 
        # Generate GRUB configuration
        if ! make_grub_config "${tempdir}/boot/grub/grub.cfg" \
-                       "${PRETTY_NAME}" "${ID}" "${arch}"; then
+                       "${PRETTY_NAME}" "${ID}" "${arch}" "${label}"; then
                echo "Could not generate GRUB configuration" >&2
                rm -rf "${tempdir}"
                return 1
        fi
 
+       mkdir -p "${tempdir}/boot/grub/fonts"
+
+       # Install GRUB fonts
+       local font
+       for font in unicode.pf2; do
+               if ! cp -- "${buildsystem}/usr/share/grub/${font}" \
+                               "${tempdir}/boot/grub/fonts/${font}"; then
+                       echo "Could not install font '${font}'" >&2
+                       rm -rf "${tempdir}"
+                       return 1
+               fi
+       done
+
        # Master the ISO file
        if ! xorriso "${args[@]}"; then
                r=1