merge mainline
This commit is contained in:
commit
9038c767e3
9 changed files with 69 additions and 9 deletions
42
ChangeLog
42
ChangeLog
|
@ -1,3 +1,45 @@
|
||||||
|
2010-06-12 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
Avoid false positives in fs.lst, partmap.lst, and video.lst due to
|
||||||
|
prototype declarations.
|
||||||
|
|
||||||
|
* genmk.rb (PModule::rule): Define GRUB_LST_GENERATOR when
|
||||||
|
generating fs, partmap, and video lists.
|
||||||
|
* include/grub/fs.h (grub_fs_register): Omit prototype if
|
||||||
|
GRUB_LST_GENERATOR is defined.
|
||||||
|
* include/grub/partition.h (grub_partition_map_register): Likewise.
|
||||||
|
* include/grub/video.h (grub_video_register): Likewise.
|
||||||
|
|
||||||
|
2010-06-12 Javier Martín <lordhabbit@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/types.h: Check for GRUB_CPU_SIZEOF_LONG when appropriate.
|
||||||
|
|
||||||
|
2010-06-12 Thomas Schmitt <scdbackup@gmx.net>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Support --xorriso argument.
|
||||||
|
|
||||||
|
2010-06-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Use -graft-points instead of -pathspecs.
|
||||||
|
Suggested by: Thomas Schmitt.
|
||||||
|
|
||||||
|
2010-06-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in: Add --sort-weight arguments to xorriso.
|
||||||
|
Suggested by: Thomas Schmitt.
|
||||||
|
|
||||||
|
2010-06-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
custom.cfg support.
|
||||||
|
|
||||||
|
* conf/common.rmk (grub-mkconfig_SCRIPTS): Add 41_custom.
|
||||||
|
* util/grub.d/41_custom.in: New file.
|
||||||
|
|
||||||
|
2010-06-12 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* util/grub-mkrescue.in (make_image): Remove sh module, which has
|
||||||
|
been merged back into normal.
|
||||||
|
|
||||||
2010-06-11 Colin Watson <cjwatson@ubuntu.com>
|
2010-06-11 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* include/grub/efi/uga_draw.h (GRUB_EFI_UGA_GLT_MAX): Rename to ...
|
* include/grub/efi/uga_draw.h (GRUB_EFI_UGA_GLT_MAX): Rename to ...
|
||||||
|
|
|
@ -201,7 +201,7 @@ CLEANFILES += grub-gettext_lib
|
||||||
%: util/grub.d/%.in config.status
|
%: util/grub.d/%.in config.status
|
||||||
./config.status --file=$@:$<
|
./config.status --file=$@:$<
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
grub-mkconfig_SCRIPTS = 00_header 30_os-prober 40_custom
|
grub-mkconfig_SCRIPTS = 00_header 30_os-prober 40_custom 41_custom
|
||||||
ifneq (, $(host_kernel))
|
ifneq (, $(host_kernel))
|
||||||
grub-mkconfig_SCRIPTS += 10_$(host_kernel)
|
grub-mkconfig_SCRIPTS += 10_$(host_kernel)
|
||||||
endif
|
endif
|
||||||
|
|
6
genmk.rb
6
genmk.rb
|
@ -228,7 +228,7 @@ VIDEOFILES += #{video}
|
||||||
|
|
||||||
#{fs}: #{src} $(#{src}_DEPENDENCIES) genfslist.sh
|
#{fs}: #{src} $(#{src}_DEPENDENCIES) genfslist.sh
|
||||||
set -e; \
|
set -e; \
|
||||||
$(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} -DGRUB_LST_GENERATOR $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||||
| sh $(srcdir)/genfslist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
| sh $(srcdir)/genfslist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
#{parttool}: #{src} $(#{src}_DEPENDENCIES) genparttoollist.sh
|
#{parttool}: #{src} $(#{src}_DEPENDENCIES) genparttoollist.sh
|
||||||
|
@ -238,7 +238,7 @@ VIDEOFILES += #{video}
|
||||||
|
|
||||||
#{partmap}: #{src} $(#{src}_DEPENDENCIES) genpartmaplist.sh
|
#{partmap}: #{src} $(#{src}_DEPENDENCIES) genpartmaplist.sh
|
||||||
set -e; \
|
set -e; \
|
||||||
$(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} -DGRUB_LST_GENERATOR $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||||
| sh $(srcdir)/genpartmaplist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
| sh $(srcdir)/genpartmaplist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
#{handler}: #{src} $(#{src}_DEPENDENCIES) genhandlerlist.sh
|
#{handler}: #{src} $(#{src}_DEPENDENCIES) genhandlerlist.sh
|
||||||
|
@ -253,7 +253,7 @@ VIDEOFILES += #{video}
|
||||||
|
|
||||||
#{video}: #{src} $(#{src}_DEPENDENCIES) genvideolist.sh
|
#{video}: #{src} $(#{src}_DEPENDENCIES) genvideolist.sh
|
||||||
set -e; \
|
set -e; \
|
||||||
$(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} -DGRUB_LST_GENERATOR $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||||
| sh $(srcdir)/genvideolist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
| sh $(srcdir)/genvideolist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
|
@ -91,11 +91,13 @@ typedef int (*grub_fs_autoload_hook_t) (void);
|
||||||
extern grub_fs_autoload_hook_t EXPORT_VAR(grub_fs_autoload_hook);
|
extern grub_fs_autoload_hook_t EXPORT_VAR(grub_fs_autoload_hook);
|
||||||
extern grub_fs_t EXPORT_VAR (grub_fs_list);
|
extern grub_fs_t EXPORT_VAR (grub_fs_list);
|
||||||
|
|
||||||
|
#ifndef GRUB_LST_GENERATOR
|
||||||
static inline void
|
static inline void
|
||||||
grub_fs_register (grub_fs_t fs)
|
grub_fs_register (grub_fs_t fs)
|
||||||
{
|
{
|
||||||
grub_list_push (GRUB_AS_LIST_P (&grub_fs_list), GRUB_AS_LIST (fs));
|
grub_list_push (GRUB_AS_LIST_P (&grub_fs_list), GRUB_AS_LIST (fs));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
grub_fs_unregister (grub_fs_t fs)
|
grub_fs_unregister (grub_fs_t fs)
|
||||||
|
|
|
@ -77,12 +77,14 @@ char *EXPORT_FUNC(grub_partition_get_name) (const grub_partition_t partition);
|
||||||
|
|
||||||
extern grub_partition_map_t EXPORT_VAR(grub_partition_map_list);
|
extern grub_partition_map_t EXPORT_VAR(grub_partition_map_list);
|
||||||
|
|
||||||
|
#ifndef GRUB_LST_GENERATOR
|
||||||
static inline void
|
static inline void
|
||||||
grub_partition_map_register (grub_partition_map_t partmap)
|
grub_partition_map_register (grub_partition_map_t partmap)
|
||||||
{
|
{
|
||||||
grub_list_push (GRUB_AS_LIST_P (&grub_partition_map_list),
|
grub_list_push (GRUB_AS_LIST_P (&grub_partition_map_list),
|
||||||
GRUB_AS_LIST (partmap));
|
GRUB_AS_LIST (partmap));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
grub_partition_map_unregister (grub_partition_map_t partmap)
|
grub_partition_map_unregister (grub_partition_map_t partmap)
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
typedef signed char grub_int8_t;
|
typedef signed char grub_int8_t;
|
||||||
typedef short grub_int16_t;
|
typedef short grub_int16_t;
|
||||||
typedef int grub_int32_t;
|
typedef int grub_int32_t;
|
||||||
#if GRUB_CPU_SIZEOF_VOID_P == 8
|
#if GRUB_CPU_SIZEOF_LONG == 8
|
||||||
typedef long grub_int64_t;
|
typedef long grub_int64_t;
|
||||||
#else
|
#else
|
||||||
typedef long long grub_int64_t;
|
typedef long long grub_int64_t;
|
||||||
|
@ -69,7 +69,7 @@ typedef long long grub_int64_t;
|
||||||
typedef unsigned char grub_uint8_t;
|
typedef unsigned char grub_uint8_t;
|
||||||
typedef unsigned short grub_uint16_t;
|
typedef unsigned short grub_uint16_t;
|
||||||
typedef unsigned grub_uint32_t;
|
typedef unsigned grub_uint32_t;
|
||||||
#if GRUB_CPU_SIZEOF_VOID_P == 8
|
#if GRUB_CPU_SIZEOF_LONG == 8
|
||||||
typedef unsigned long grub_uint64_t;
|
typedef unsigned long grub_uint64_t;
|
||||||
#else
|
#else
|
||||||
typedef unsigned long long grub_uint64_t;
|
typedef unsigned long long grub_uint64_t;
|
||||||
|
@ -98,7 +98,7 @@ typedef grub_uint32_t grub_size_t;
|
||||||
typedef grub_int32_t grub_ssize_t;
|
typedef grub_int32_t grub_ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GRUB_CPU_SIZEOF_VOID_P == 8
|
#if GRUB_CPU_SIZEOF_LONG == 8
|
||||||
# define GRUB_ULONG_MAX 18446744073709551615UL
|
# define GRUB_ULONG_MAX 18446744073709551615UL
|
||||||
# define GRUB_LONG_MAX 9223372036854775807L
|
# define GRUB_LONG_MAX 9223372036854775807L
|
||||||
# define GRUB_LONG_MIN (-9223372036854775807L - 1)
|
# define GRUB_LONG_MIN (-9223372036854775807L - 1)
|
||||||
|
|
|
@ -264,6 +264,7 @@ typedef struct grub_video_adapter *grub_video_adapter_t;
|
||||||
|
|
||||||
extern grub_video_adapter_t EXPORT_VAR(grub_video_adapter_list);
|
extern grub_video_adapter_t EXPORT_VAR(grub_video_adapter_list);
|
||||||
|
|
||||||
|
#ifndef GRUB_LST_GENERATOR
|
||||||
/* Register video driver. */
|
/* Register video driver. */
|
||||||
static inline void
|
static inline void
|
||||||
grub_video_register (grub_video_adapter_t adapter)
|
grub_video_register (grub_video_adapter_t adapter)
|
||||||
|
@ -271,6 +272,7 @@ grub_video_register (grub_video_adapter_t adapter)
|
||||||
grub_list_push (GRUB_AS_LIST_P (&grub_video_adapter_list),
|
grub_list_push (GRUB_AS_LIST_P (&grub_video_adapter_list),
|
||||||
GRUB_AS_LIST (adapter));
|
GRUB_AS_LIST (adapter));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Unregister video driver. */
|
/* Unregister video driver. */
|
||||||
static inline void
|
static inline void
|
||||||
|
|
|
@ -42,6 +42,8 @@ rom_directory=
|
||||||
override_dir=
|
override_dir=
|
||||||
grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
|
grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
|
||||||
|
|
||||||
|
xorriso=xorriso
|
||||||
|
|
||||||
# Usage: usage
|
# Usage: usage
|
||||||
# Print the usage.
|
# Print the usage.
|
||||||
usage () {
|
usage () {
|
||||||
|
@ -54,6 +56,7 @@ Make GRUB rescue image.
|
||||||
--output=FILE save output in FILE [required]
|
--output=FILE save output in FILE [required]
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
--modules=MODULES pre-load specified modules MODULES
|
||||||
--rom-directory=DIR save rom images in DIR [optional]
|
--rom-directory=DIR save rom images in DIR [optional]
|
||||||
|
--xorriso=FILE use FILE as xorriso [optional]
|
||||||
--grub-mkimage=FILE use FILE as grub-mkimage
|
--grub-mkimage=FILE use FILE as grub-mkimage
|
||||||
|
|
||||||
$self generates a bootable rescue image with specified source files or directories.
|
$self generates a bootable rescue image with specified source files or directories.
|
||||||
|
@ -85,6 +88,8 @@ for option in "$@"; do
|
||||||
;;
|
;;
|
||||||
--grub-mkimage=*)
|
--grub-mkimage=*)
|
||||||
grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
|
grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
|
||||||
|
--xorriso=*)
|
||||||
|
xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;;
|
||||||
-*)
|
-*)
|
||||||
echo "Unrecognized option \`$option'" 1>&2
|
echo "Unrecognized option \`$option'" 1>&2
|
||||||
usage
|
usage
|
||||||
|
@ -173,7 +178,7 @@ EOF
|
||||||
tar -C ${memdisk_dir} -cf ${memdisk_img} boot
|
tar -C ${memdisk_dir} -cf ${memdisk_img} boot
|
||||||
rm -rf ${memdisk_dir}
|
rm -rf ${memdisk_dir}
|
||||||
$grub_mkimage -O ${platform} -d "${source_directory}" -m "${memdisk_img}" -o "$3" --prefix='(memdisk)/boot/grub' \
|
$grub_mkimage -O ${platform} -d "${source_directory}" -m "${memdisk_img}" -o "$3" --prefix='(memdisk)/boot/grub' \
|
||||||
search iso9660 configfile normal sh memdisk tar $4
|
search iso9660 configfile normal memdisk tar $4
|
||||||
rm -rf ${memdisk_img}
|
rm -rf ${memdisk_img}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +274,7 @@ if [ -e "${iso9660_dir}/boot/coreboot.elf" ] && [ -d "${rom_directory}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build iso image
|
# build iso image
|
||||||
xorriso -pathspecs on -as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source}
|
"${xorriso}" -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} --sort-weight 0 / --sort-weight 1 /boot ${source}
|
||||||
rm -rf ${iso9660_dir}
|
rm -rf ${iso9660_dir}
|
||||||
|
|
||||||
rm -f ${embed_img}
|
rm -f ${embed_img}
|
||||||
|
|
7
util/grub.d/41_custom.in
Normal file
7
util/grub.d/41_custom.in
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
cat <<EOF
|
||||||
|
if [ -f \$prefix/custom.cfg ]; then
|
||||||
|
source \$prefix/custom.cfg;
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue