grub: add variable GRUB_GFXMODE

parent 57eabebd
......@@ -21,6 +21,8 @@
* BOOTLOADER -- isolinux (реализовано с оглядкой на grub/grub4);
* GRUB_GFXMODE — разрешение интерфейса grub (например, 1920x1080,auto)
* GRUB_UI -- тип интерфейса (если указан gfxboot, то графический,
иначе текстовый);
......
......@@ -15,7 +15,7 @@ function load_video {
if [ -z "$GRUB_TERMINAL" ]; then
font=unicode
if loadfont "$font"; then
set gfxmode=auto
set gfxmode=@GRUB_GFXMODE@
load_video
insmod gfxterm
terminal_output gfxterm
......
......@@ -12,6 +12,7 @@ use/grub: sub/stage1 $(ISOHYBRID:%=use/isohybrid)
use/grub/ui/%: use/grub
ifeq (,$(filter-out i586 x86_64 aarch64 loongarch64,$(ARCH)))
@$(call set,GRUB_UI,$*)
@$(call try,GRUB_GFXMODE,auto)
@if [ "$*" == gfxboot ]; then \
$(call add,STAGE1_BRANDING,bootloader); \
$(call add,STAGE1_PACKAGES,grub-common); \
......
......@@ -99,6 +99,9 @@ bootargs: clean
@if [ -n "$(LOCALES)" ]; then \
sed -i "s,@LOCALES@,$(LOCALES),g" $(DSTCFGS); \
fi
@if [ -n "$(GRUB_GFXMODE)" ]; then \
sed -i "s|@GRUB_GFXMODE@|$(GRUB_GFXMODE)|g" $(DSTCFGS); \
fi
@GRUBTHEME=$(GRUBTHEME); \
[ -n "$$GRUBTHEME" ] || GRUBTHEME=$$(cut -d "-" -f2 <<< $(BRANDING)); \
sed -i "s,@grubtheme@,$$GRUBTHEME,g" $(DSTCFGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment