grub: add variable GRUB_GFXMODE

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