Keep boot and grub directory names in sync with utils scripts
* configure.ac: Define GRUB_BOOT_DIR_NAME and GRUB_DIR_NAME macros. * config.h.in: Add previous macros. * include/grub/emu/misc.h (DEFAULT_DIRECTORY): Use previous macros. * util/grub-install.in: Use $bootdir and $grubdir variables.
This commit is contained in:
parent
4eff79d2f9
commit
a4c1d277c1
5 changed files with 22 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2010-09-21 Yves Blusseau <blusseau@zetam.org>
|
||||||
|
|
||||||
|
Keep boot and grub directory names in sync with utils scripts
|
||||||
|
|
||||||
|
* configure.ac: Define GRUB_BOOT_DIR_NAME and GRUB_DIR_NAME macros.
|
||||||
|
* config.h.in: Add previous macros.
|
||||||
|
* include/grub/emu/misc.h (DEFAULT_DIRECTORY): Use previous macros.
|
||||||
|
* util/grub-install.in: Use $bootdir and $grubdir variables.
|
||||||
|
|
||||||
2010-09-21 Colin Watson <cjwatson@ubuntu.com>
|
2010-09-21 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* grub-core/kern/emu/hostdisk.c (find_system_device): Only try to
|
* grub-core/kern/emu/hostdisk.c (find_system_device): Only try to
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
#define PACKAGE_NAME "@PACKAGE_NAME@"
|
#define PACKAGE_NAME "@PACKAGE_NAME@"
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||||
|
/* Default boot directory name" */
|
||||||
|
#define GRUB_BOOT_DIR_NAME "@bootdirname@"
|
||||||
|
/* Default grub directory name */
|
||||||
|
#define GRUB_DIR_NAME "@grubdirname@"
|
||||||
/* Define to 1 if GCC generates calls to __enable_execute_stack(). */
|
/* Define to 1 if GCC generates calls to __enable_execute_stack(). */
|
||||||
#define NEED_ENABLE_EXECUTE_STACK @NEED_ENABLE_EXECUTE_STACK@
|
#define NEED_ENABLE_EXECUTE_STACK @NEED_ENABLE_EXECUTE_STACK@
|
||||||
/* Define to 1 if GCC generates calls to __register_frame_info(). */
|
/* Define to 1 if GCC generates calls to __register_frame_info(). */
|
||||||
|
|
|
@ -187,9 +187,13 @@ case "$host_os" in
|
||||||
esac
|
esac
|
||||||
bootdirname=`echo "$bootdirname" | sed "$program_transform_name"`
|
bootdirname=`echo "$bootdirname" | sed "$program_transform_name"`
|
||||||
AC_SUBST(bootdirname)
|
AC_SUBST(bootdirname)
|
||||||
|
AC_DEFINE_UNQUOTED(GRUB_BOOT_DIR_NAME, "$bootdirname",
|
||||||
|
[Default boot directory name]")
|
||||||
|
|
||||||
grubdirname=`echo "$PACKAGE" | sed "$program_transform_name"`
|
grubdirname=`echo "$PACKAGE" | sed "$program_transform_name"`
|
||||||
AC_SUBST(grubdirname)
|
AC_SUBST(grubdirname)
|
||||||
|
AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname",
|
||||||
|
[Default grub directory name])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Checks for build programs.
|
# Checks for build programs.
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef GRUB_EMU_MISC_H
|
#ifndef GRUB_EMU_MISC_H
|
||||||
#define GRUB_EMU_MISC_H 1
|
#define GRUB_EMU_MISC_H 1
|
||||||
|
|
||||||
#include <config-util.h>
|
#include <config.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <grub/symbol.h>
|
#include <grub/symbol.h>
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
|
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
/* NetBSD uses /boot for its boot block. */
|
/* NetBSD uses /boot for its boot block. */
|
||||||
# define DEFAULT_DIRECTORY "/grub"
|
# define DEFAULT_DIRECTORY "/"GRUB_DIR_NAME
|
||||||
#else
|
#else
|
||||||
# define DEFAULT_DIRECTORY "/boot/grub"
|
# define DEFAULT_DIRECTORY "/"GRUB_BOOT_DIR_NAME"/"GRUB_DIR_NAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_DEVICE_MAP DEFAULT_DIRECTORY "/device.map"
|
#define DEFAULT_DEVICE_MAP DEFAULT_DIRECTORY "/device.map"
|
||||||
|
|
|
@ -561,9 +561,9 @@ $grub_mkimage ${config_opt} -d ${pkglibdir} -O ${mkimage_target} --output=${grub
|
||||||
|
|
||||||
# Backward-compatibility kludges
|
# Backward-compatibility kludges
|
||||||
if [ "${target_cpu}-${platform}" = "mips-yeeloong" ]; then
|
if [ "${target_cpu}-${platform}" = "mips-yeeloong" ]; then
|
||||||
cp ${grubdir}/core.${imgext} /boot/grub.elf
|
cp ${grubdir}/core.${imgext} ${bootdir}/grub.elf
|
||||||
elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ]; then
|
elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ]; then
|
||||||
cp ${grubdir}/core.${imgext} /boot/grub/grub
|
cp ${grubdir}/core.${imgext} ${grubdir}/grub
|
||||||
elif [ "${target_cpu}-${platform}" = "i386-efi" ] || [ "${target_cpu}-${platform}" = "x86_64-efi" ]; then
|
elif [ "${target_cpu}-${platform}" = "i386-efi" ] || [ "${target_cpu}-${platform}" = "x86_64-efi" ]; then
|
||||||
$grub_mkimage ${config_opt} -d ${pkglibdir} -O ${mkimage_target} --output=${grubdir}/grub.efi --prefix="" $modules || exit 1
|
$grub_mkimage ${config_opt} -d ${pkglibdir} -O ${mkimage_target} --output=${grubdir}/grub.efi --prefix="" $modules || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue