2009-12-12 Robert Millan <rmh@aybabtu.com>
* gendistlist.sh (EXTRA_DISTFILES): Add `genvideolist.sh'. * genmk.rb (video): New variable. (CLEANFILES, VIDEOFILES): Add #{video}. (#{video}): New target rule. * genvideolist.sh: New file. * Makefile.in (pkglib_DATA): Add video.lst. (video.lst): New target rule. * util/grub-mkconfig.in: Initialize ${GRUB_VIDEO_BACKEND} using `video.lst'. * util/grub.d/30_os-prober.in: Replace `vbe' with ${GRUB_VIDEO_BACKEND}.
This commit is contained in:
parent
2a4bfcf0da
commit
dc0c71d974
7 changed files with 57 additions and 10 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2009-12-12 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
|
* gendistlist.sh (EXTRA_DISTFILES): Add `genvideolist.sh'.
|
||||||
|
* genmk.rb (video): New variable.
|
||||||
|
(CLEANFILES, VIDEOFILES): Add #{video}.
|
||||||
|
(#{video}): New target rule.
|
||||||
|
* genvideolist.sh: New file.
|
||||||
|
* Makefile.in (pkglib_DATA): Add video.lst.
|
||||||
|
(video.lst): New target rule.
|
||||||
|
* util/grub-mkconfig.in: Initialize ${GRUB_VIDEO_BACKEND} using
|
||||||
|
`video.lst'.
|
||||||
|
* util/grub.d/30_os-prober.in: Replace `vbe' with
|
||||||
|
${GRUB_VIDEO_BACKEND}.
|
||||||
|
|
||||||
2009-12-11 Robert Millan <rmh.grub@aybabtu.com>
|
2009-12-11 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
* THANKS: Add David Miller.
|
* THANKS: Add David Miller.
|
||||||
|
|
|
@ -169,7 +169,7 @@ endif
|
||||||
### General targets.
|
### General targets.
|
||||||
|
|
||||||
CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo
|
CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo
|
||||||
pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst
|
pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst
|
||||||
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
|
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
|
||||||
cat $(DEFSYMFILES) /dev/null \
|
cat $(DEFSYMFILES) /dev/null \
|
||||||
| $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
|
| $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
|
||||||
|
@ -190,6 +190,9 @@ handler.lst: $(HANDLERFILES)
|
||||||
parttool.lst: $(PARTTOOLFILES)
|
parttool.lst: $(PARTTOOLFILES)
|
||||||
cat $^ /dev/null | sort | uniq > $@
|
cat $^ /dev/null | sort | uniq > $@
|
||||||
|
|
||||||
|
video.lst: $(VIDEOFILES)
|
||||||
|
cat $^ /dev/null | sort | uniq > $@
|
||||||
|
|
||||||
ifneq (true, $(MAKEINFO))
|
ifneq (true, $(MAKEINFO))
|
||||||
info_INFOS += docs/grub.info
|
info_INFOS += docs/grub.info
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -19,6 +19,7 @@ EXTRA_DISTFILES="AUTHORS COPYING ChangeLog DISTLIST INSTALL NEWS README \
|
||||||
gendistlist.sh genfslist.sh genhandlerlist.sh geninit.sh \
|
gendistlist.sh genfslist.sh genhandlerlist.sh geninit.sh \
|
||||||
geninitheader.sh genkernsyms.sh.in genmk.rb genmoddep.awk \
|
geninitheader.sh genkernsyms.sh.in genmk.rb genmoddep.awk \
|
||||||
genmodsrc.sh genpartmaplist.sh genparttoollist.sh \
|
genmodsrc.sh genpartmaplist.sh genparttoollist.sh \
|
||||||
|
genvideolist.sh \
|
||||||
gensymlist.sh.in install-sh mkinstalldirs stamp-h.in"
|
gensymlist.sh.in install-sh mkinstalldirs stamp-h.in"
|
||||||
|
|
||||||
DISTDIRS="boot bus commands conf disk docs efiemu font fs hello hook include io \
|
DISTDIRS="boot bus commands conf disk docs efiemu font fs hello hook include io \
|
||||||
|
|
9
genmk.rb
9
genmk.rb
|
@ -193,6 +193,7 @@ endif
|
||||||
partmap = 'partmap-' + obj.suffix('lst')
|
partmap = 'partmap-' + obj.suffix('lst')
|
||||||
handler = 'handler-' + obj.suffix('lst')
|
handler = 'handler-' + obj.suffix('lst')
|
||||||
parttool = 'parttool-' + obj.suffix('lst')
|
parttool = 'parttool-' + obj.suffix('lst')
|
||||||
|
video = 'video-' + obj.suffix('lst')
|
||||||
dep = deps[i]
|
dep = deps[i]
|
||||||
flag = if /\.c$/ =~ src then 'CFLAGS' else 'ASFLAGS' end
|
flag = if /\.c$/ =~ src then 'CFLAGS' else 'ASFLAGS' end
|
||||||
extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end
|
extra_flags = if /\.S$/ =~ src then '-DASM_FILE=1' else '' end
|
||||||
|
@ -203,7 +204,7 @@ endif
|
||||||
-include #{dep}
|
-include #{dep}
|
||||||
|
|
||||||
clean-module-#{extra_target}.#{@rule_count}:
|
clean-module-#{extra_target}.#{@rule_count}:
|
||||||
rm -f #{command} #{fs} #{partmap} #{handler} #{parttool}
|
rm -f #{command} #{fs} #{partmap} #{handler} #{parttool} #{video}
|
||||||
|
|
||||||
CLEAN_MODULE_TARGETS += clean-module-#{extra_target}.#{@rule_count}
|
CLEAN_MODULE_TARGETS += clean-module-#{extra_target}.#{@rule_count}
|
||||||
|
|
||||||
|
@ -212,6 +213,7 @@ FSFILES += #{fs}
|
||||||
PARTTOOLFILES += #{parttool}
|
PARTTOOLFILES += #{parttool}
|
||||||
PARTMAPFILES += #{partmap}
|
PARTMAPFILES += #{partmap}
|
||||||
HANDLERFILES += #{handler}
|
HANDLERFILES += #{handler}
|
||||||
|
VIDEOFILES += #{video}
|
||||||
|
|
||||||
#{command}: #{src} $(#{src}_DEPENDENCIES) gencmdlist.sh
|
#{command}: #{src} $(#{src}_DEPENDENCIES) gencmdlist.sh
|
||||||
set -e; \
|
set -e; \
|
||||||
|
@ -238,6 +240,11 @@ HANDLERFILES += #{handler}
|
||||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||||
| sh $(srcdir)/genhandlerlist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
| sh $(srcdir)/genhandlerlist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
|
#{video}: #{src} $(#{src}_DEPENDENCIES) genvideolist.sh
|
||||||
|
set -e; \
|
||||||
|
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||||
|
| sh $(srcdir)/genvideolist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
"
|
"
|
||||||
end.join('')
|
end.join('')
|
||||||
end
|
end
|
||||||
|
|
26
genvideolist.sh
Normal file
26
genvideolist.sh
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2005,2008,2009 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This script is free software; the author
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
# Read source code from stdin and detect partmap names.
|
||||||
|
|
||||||
|
module=$1
|
||||||
|
|
||||||
|
# Ignore video.mod.
|
||||||
|
if test $module = video; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For now, this emits only a module name, if the module registers a partition map.
|
||||||
|
if grep -v "^#" | grep '^ *grub_video_register' >/dev/null 2>&1; then
|
||||||
|
echo $module
|
||||||
|
fi
|
|
@ -144,13 +144,9 @@ case x${GRUB_TERMINAL_OUTPUT} in
|
||||||
x | xgfxterm)
|
x | xgfxterm)
|
||||||
# If this platform supports gfxterm, try to use it.
|
# If this platform supports gfxterm, try to use it.
|
||||||
if test -e ${grub_prefix}/gfxterm.mod ; then
|
if test -e ${grub_prefix}/gfxterm.mod ; then
|
||||||
GRUB_VIDEO_BACKEND=
|
# FIXME: this should do something smarter than just loading first
|
||||||
for i in vbe ; do
|
# video backend.
|
||||||
if test -e ${grub_prefix}/$i.mod ; then
|
GRUB_VIDEO_BACKEND=$(head -n 1 ${grub_prefix}/video.lst || true)
|
||||||
GRUB_VIDEO_BACKEND=$i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -n "${GRUB_VIDEO_BACKEND}" ] ; then
|
if [ -n "${GRUB_VIDEO_BACKEND}" ] ; then
|
||||||
GRUB_TERMINAL_OUTPUT=gfxterm
|
GRUB_TERMINAL_OUTPUT=gfxterm
|
||||||
elif [ "${GRUB_TERMINAL_OUTPUT}" = "gfxterm" ] ; then
|
elif [ "${GRUB_TERMINAL_OUTPUT}" = "gfxterm" ] ; then
|
||||||
|
|
|
@ -120,7 +120,7 @@ menuentry "${LONGNAME} (on ${DEVICE})" {
|
||||||
EOF
|
EOF
|
||||||
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
insmod vbe
|
insmod ${GRUB_VIDEO_BACKEND}
|
||||||
do_resume=0
|
do_resume=0
|
||||||
if [ /var/vm/sleepimage -nt10 / ]; then
|
if [ /var/vm/sleepimage -nt10 / ]; then
|
||||||
if xnu_resume /var/vm/sleepimage; then
|
if xnu_resume /var/vm/sleepimage; then
|
||||||
|
|
Loading…
Reference in a new issue