merge mtrunk into xnu

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-18 03:57:32 +01:00
commit 7ea73643f5
224 changed files with 43437 additions and 7593 deletions

View file

@ -22,6 +22,8 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
grub_prefix=`echo /boot/grub | sed ${transform}`
locale_dir=`echo /boot/grub/locale | sed ${transform}`
grub_lang=`echo $LANG | cut -d _ -f 1`
. ${libdir}/grub/grub-mkconfig_lib
@ -100,6 +102,15 @@ EOF
;;
esac
# Gettext variables and module
if [ "x${LANG}" != "xC" ] ; then
cat << EOF
set locale_dir=${locale_dir}
set lang=${grub_lang}
insmod gettext
EOF
fi
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
verbose=

View file

@ -18,9 +18,14 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
. ${libdir}/grub/grub-mkconfig_lib
. ${bindir}/gettext.sh
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR=@localedir@
case "${GRUB_DISTRIBUTOR}" in
Debian) OS="${GRUB_DISTRIBUTOR} GNU/kFreeBSD" ;;
*) OS="FreeBSD" ;;
@ -28,9 +33,12 @@ esac
kfreebsd_entry ()
{
cat << EOF
menuentry "$1" {
EOF
os="$1"
version="$2"
recovery="$3" # not used yet
args="$4" # not used yet
title="$(gettext "%s, with kFreeBSD %s")"
printf "menuentry \"${title}\" {\n" "${os}" "${version}"
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
@ -100,7 +108,7 @@ while [ "x$list" != "x" ] ; do
acpi_ko_rel_dirname=`make_system_path_relative_to_its_root $acpi_ko_dirname`
fi
kfreebsd_entry "${OS}, kFreeBSD ${version}"
kfreebsd_entry "${OS}" "${version}"
list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '`
done

View file

@ -18,9 +18,14 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
. ${libdir}/grub/grub-mkconfig_lib
. ${bindir}/gettext.sh
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR=@localedir@
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
@ -44,15 +49,22 @@ fi
linux_entry ()
{
cat << EOF
menuentry "$1" {
EOF
os="$1"
version="$2"
recovery="$3"
args="$4"
if ${recovery} ; then
title="$(gettext "%s, with Linux %s (recovery mode)")"
else
title="$(gettext "%s, with Linux %s")"
fi
printf "menuentry \"${title}\" {\n" "${os}" "${version}"
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro $2
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
@ -95,10 +107,10 @@ while [ "x$list" != "x" ] ; do
linux_root_device_thisversion=${GRUB_DEVICE}
fi
linux_entry "${OS}, with Linux ${version}" \
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}, with Linux ${version} (recovery mode)" \
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi

View file

@ -43,7 +43,7 @@ menuentry "${LONGNAME} (${2}-bit) (on ${DEVICE})" {
EOF
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
cat << EOF
insmod vbe
insmod ${GRUB_VIDEO_BACKEND}
do_resume=0
if [ /var/vm/sleepimage -nt10 / ]; then
if xnu_resume /var/vm/sleepimage; then
@ -138,11 +138,16 @@ EOF
LLABEL="${LONGNAME}"
fi
if [ "${LROOT}" != "${LBOOT}" ]; then
LKERNEL="${LKERNEL#/boot}"
LINITRD="${LINITRD#/boot}"
fi
cat << EOF
menuentry "${LLABEL} (on ${DEVICE})" {
EOF
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/")"
prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF