grub: added gfxmode support
This commit is contained in:
parent
a6051acf94
commit
0950ba8012
37
features.in/grub/cfg.in/01gfxterm.cfg
Normal file
37
features.in/grub/cfg.in/01gfxterm.cfg
Normal file
@ -0,0 +1,37 @@
|
||||
function load_video {
|
||||
if [ x$feature_all_video_module = xy ]; then
|
||||
insmod all_video
|
||||
else
|
||||
insmod efi_gop
|
||||
insmod efi_uga
|
||||
insmod ieee1275_fb
|
||||
insmod vbe
|
||||
insmod vga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
fi
|
||||
}
|
||||
|
||||
font=${prefix}/fonts/unicode.pf2
|
||||
if loadfont "$font" ; then
|
||||
set gfxmode=auto
|
||||
load_video
|
||||
insmod gfxterm
|
||||
terminal_output gfxterm
|
||||
if [ -d ${prefix}/locale ]; then
|
||||
set locale_dir=${prefix}/locale
|
||||
insmod gettext
|
||||
fi
|
||||
insmod gfxmenu
|
||||
insmod jpeg
|
||||
insmod png
|
||||
if [ -f ${prefix}/themes/@grubtheme@/theme.txt ]; then
|
||||
set theme=${prefix}/themes/@grubtheme@/theme.txt;
|
||||
export theme
|
||||
fi
|
||||
set timeout_style=menu
|
||||
set menu_color_normal=white/black
|
||||
set menu_color_highlight=black/white
|
||||
set color_normal=white/black
|
||||
set color_highlight=black/white
|
||||
fi
|
@ -16,17 +16,12 @@ use/grub: ; @:
|
||||
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
|
||||
# UI is overwritten
|
||||
use/grub/ui/%: use/grub
|
||||
@$(call set,GRUB_UI,$*)
|
||||
@if [ "$*" == gfxboot ]; then \
|
||||
$(call add,STAGE1_PACKAGES,gfxboot); \
|
||||
$(call add,STAGE1_BRANDING,bootloader); \
|
||||
fi
|
||||
else
|
||||
use/grub/ui/%: use/grub; @:
|
||||
endif
|
||||
|
||||
use/grub/%.cfg: use/grub
|
||||
@$(call add,GRUB_CFG,$*)
|
||||
|
@ -19,6 +19,10 @@ ifndef GRUB_DIRECT
|
||||
GRUB_CFG := $(GRUB_CFG) $(SUBPROFILE_DIRS) defaults fwsetup_efi
|
||||
endif
|
||||
|
||||
ifdef GRUB_UI
|
||||
GRUB_CFG := $(GRUB_CFG) gfxterm
|
||||
endif
|
||||
|
||||
ifdef LOCALE
|
||||
GRUB_CFG := $(GRUB_CFG) lang
|
||||
endif
|
||||
@ -94,6 +98,8 @@ bootargs: clean
|
||||
@if [ $$(echo $(KFLAVOURS) | wc -w) -gt 1 ]; then \
|
||||
sed -i "s,@KFLAVOUR@,$(KFLAVOURS),g" $(DSTCFGS); \
|
||||
fi
|
||||
GRUBTHEME=$$(cut -d "-" -f2 <<< $(BRANDING)); \
|
||||
sed -i "s,@grubtheme@,$$GRUBTHEME,g" $(DSTCFGS); \
|
||||
|
||||
clean: copy
|
||||
@if [ "$(GRUB_UI)" = gfxboot ]; then \
|
||||
|
Loading…
Reference in New Issue
Block a user