livecd-tools/0004-Port-ROSA-theme.patch
Mikhail Novosyolov f46730429d Port ROSA theme
2020-05-28 14:41:34 +03:00

124 lines
5 KiB
Diff

From 91741ac9c6e726e2c104c15a79aaad76a3457595 Mon Sep 17 00:00:00 2001
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Date: Thu, 28 May 2020 14:40:47 +0300
Subject: [PATCH] Port ROSA theme
Ported from livecd-tools-21.1.efi.grub.cfg.patch
---
imgcreate/live.py | 56 +++++++++++++++++++++++++++++------------------
1 file changed, 35 insertions(+), 21 deletions(-)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 2f03efe..181353c 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -731,8 +731,10 @@ menu end
files = [("/boot/efi/EFI/*/BOOT%s.efi" % (self.efiarch,), "/EFI/BOOT/BOOT%s.EFI" % (self.efiarch,), True),
("/usr/share/grub2-efi/grubcd.efi", "/EFI/BOOT/grub%s.efi" % (self.efiarch,), True),
("/boot/grub2/fonts/unicode.pf2", "/EFI/BOOT/fonts/", True),
+ ("/boot/grub2/themes/rosa/*", "/EFI/BOOT/themes/rosa/"),
]
makedirs(isodir+"/EFI/BOOT/fonts/")
+ makedirs(isodir+"/EFI/BOOT/themes/rosa/")
for src, dest, required in files:
src_glob = glob.glob(self._instroot+src)
if not src_glob:
@@ -750,23 +752,33 @@ set default="1"
function load_video {
insmod efi_gop
insmod efi_uga
- insmod video_bochs
- insmod video_cirrus
- insmod all_video
}
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
+insmod part_msdos
insmod ext2
+insmod iso9660
+
+set gfxmode=1024x768,1024x600,800x600,640x480
+insmod gfxterm
+insmod gettext
+terminal_output gfxterm
+insmod gfxmenu
+loadfont /EFI/BOOT/themes/rosa/dejavu_sans_bold_14.pf2
+loadfont /EFI/BOOT/themes/rosa/dejavu_sans_mono_11.pf2
+loadfont /EFI/BOOT/themes/rosa/terminal_font_11.pf2
+insmod png
+set theme=/EFI/BOOT/themes/rosa/theme.txt
+export theme
+background_image -m stretch /EFI/BOOT/themes/rosa/terminal_background.png
set timeout=%(timeout)d
-### END /etc/grub.d/00_header ###
search --no-floppy --set=root -l '%(isolabel)s'
-### BEGIN /etc/grub.d/10_linux ###
""" %args
def __get_efi_image_stanza(self, **args):
@@ -774,7 +786,7 @@ search --no-floppy --set=root -l '%(isolabel)s'
args["rootlabel"] = "live:LABEL=%(fslabel)s" % args
else:
args["rootlabel"] = "CDLABEL=%(fslabel)s" % args
- return """menuentry '%(long)s' --class fedora --class gnu-linux --class gnu --class os {
+ return """menuentry '%(long)s' --class rosa --class gnu-linux --class gnu --class os {
linuxefi /isolinux/vmlinuz%(index)s root=%(rootlabel)s %(liveargs)s %(extra)s
initrdefi /isolinux/initrd%(index)s.img
}
@@ -788,30 +800,32 @@ search --no-floppy --set=root -l '%(isolabel)s'
cfg = ""
+ if os.path.exists(self._instroot + "/etc/system-release"):
+ long = subprocess.check_output("echo -n `sed 's, release .*$,,g' /etc/system-release`", shell=True)
+ else:
+ long = self.product
+
for index in range(0, 9):
# we don't support xen kernels
if os.path.exists("%s/EFI/BOOT/xen%d.gz" %(isodir, index)):
continue
+ cfg += """menuentry 'Boot from local drive' {
+ reboot
+}
+"""
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
liveargs = kernel_options,
- long = "Start " + self.product,
- extra = "", index = index)
- if checkisomd5:
- cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
- liveargs = kernel_options,
- long = "Test this media & start " + self.product,
- extra = "rd.live.check",
- index = index)
- cfg += """
-submenu 'Troubleshooting -->' {
-"""
+ long = "Start " + long,
+ extra = "rhgb splash=silent logo.nologo", index = index)
+ cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
+ liveargs = kernel_options,
+ long = "Install " + long,
+ extra = "install rhgb splash=silent logo.nologo", index = index)
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
liveargs = kernel_options,
- long = "Start " + self.product + " in basic graphics mode",
- extra = "nomodeset", index = index)
+ long = "Install " + long + " in basic graphics mode",
+ extra = "install nomodeset plymouth.enable=0", index = index)
- cfg+= """}
-"""
break
return cfg
--
2.25.1