Unify grub-mkrescue (except powerpc) and grrub-mknetdir across platforms

* grub-core/Makefile.am (platform_DATA): Add modinfo.sh.
	* grub-core/modinfo.sh.in: New file.
	* grub-core/Makefile.core.def (modinfo.sh): New script.
	* util/grub-mknetdir.in: Use modinfo.sh.
	* util/grub-mkrescue.in: Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-18 01:38:01 +02:00
parent 543a8f6ef9
commit 6ad6223e92
6 changed files with 27 additions and 10 deletions

View file

@ -1,3 +1,13 @@
2011-05-18 Vladimir Serbinenko <phcoder@gmail.com>
Unify grub-mkrescue (except powerpc) and grrub-mknetdir across platforms
* grub-core/Makefile.am (platform_DATA): Add modinfo.sh.
* grub-core/modinfo.sh.in: New file.
* grub-core/Makefile.core.def (modinfo.sh): New script.
* util/grub-mknetdir.in: Use modinfo.sh.
* util/grub-mkrescue.in: Likewise.
2011-05-17 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/ia64/dl_helper.c (grub_ia64_dl_get_tramp_got_size):

View file

@ -329,6 +329,7 @@ CLEANFILES += config.log syminfo.lst moddep.lst
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
platform_DATA += $(MOD_FILES)
platform_DATA += modinfo.sh
CLEANFILES += $(MOD_FILES)
if COND_ENABLE_EFIEMU

View file

@ -12,6 +12,12 @@ script = {
common = genmod.sh.in;
};
script = {
installdir = noinst;
name = modinfo.sh;
common = modinfo.sh.in;
};
kernel = {
name = kernel;

4
grub-core/modinfo.sh.in Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
grub_modinfo_target_cpu=@target_cpu@
grub_modinfo_platform=@platform@

View file

@ -27,12 +27,8 @@ libdir=@libdir@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
target_cpu=@target_cpu@
platform=@platform@
host_os=@host_os@
pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
localedir=@datadir@/locale
native_platform=@platform@
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
self=`basename $0`
@ -64,7 +60,7 @@ Install GRUB on your drive.
--subdir=DIR relative subdirectory on network server
--grub-mkimage=FILE use FILE as grub-mkimage
$self copies GRUB images into net_directory/subdir/${target_cpu}-${platform}
$self copies GRUB images into net_directory/subdir/target_cpu-platform
Report bugs to <bug-grub@gnu.org>.
EOF
@ -222,7 +218,8 @@ if [ "${override_dir}" = "" ] ; then
process_input_dir ${pc_dir} i386-pc
fi
else
process_input_dir ${override_dir} ${target_cpu}-${native_platform}
source "${override_dir}"/modinfo.sh
process_input_dir "${override_dir}" ${grub_modinfo_target_cpu}-${grub_modinfo_platform}
fi

View file

@ -27,8 +27,6 @@ libdir=@libdir@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
target_cpu=@target_cpu@
native_platform=@platform@
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
self=`basename $0`
@ -231,14 +229,15 @@ if [ "${override_dir}" = "" ] ; then
process_input_dir ${efi64_dir} x86_64-efi
fi
else
process_input_dir ${override_dir} ${target_cpu}-${native_platform}
source "${override_dir}"/modinfo.sh
process_input_dir "${override_dir}" ${grub_modinfo_target_cpu}-${grub_modinfo_platform}
multiboot_dir=
pc_dir=
efi32_dir=
efi64_dir=
coreboot_dir=
qemu_dir=
case "${target_cpu}-${native_platform}" in
case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
i386-multiboot) multiboot_dir=${override_dir} ;;
i386-coreboot) coreboot_dir=${override_dir} ;;
i386-qemu) qemu_dir=${override_dir} ;;