Commit graph

275 commits

Author SHA1 Message Date
Colin Watson
897e62079e rename grub-fuse to grub-mount throughout configuration 2011-04-08 10:43:12 +01:00
Colin Watson
9aa6fcc17e fix duplicate --enable-grub-mkfont option; this should be --enable-grub-fuse instead 2011-04-08 10:38:41 +01:00
Robert Millan
89644ef113 Rename grub-fuse to grub-mount (with Vladimir's blessing) 2011-01-11 21:20:54 +01:00
Vladimir 'phcoder' Serbinenko
92bb078645 grub-fuse 2011-01-08 19:51:08 +01:00
Vladimir 'phcoder' Serbinenko
ec1dfd634e * configure.ac: Do CPU substitution even if it's specified explicitly.
Reported and tested by: Alain Greppin.
2011-01-08 00:44:38 +01:00
Colin Watson
72b7c7aa36 * configure.ac: Make error messages less confusing by testing for
-Wtrampolines rather than -Wno-trampolines (since -Wno-* is always
accepted, but produces a diagnostic if something else is wrong).
2010-11-16 15:50:20 +00:00
Vladimir 'phcoder' Serbinenko
03f80960cf Don't add -lgcc on i386 and x86_64.
* configure.ac (LIBS): Don't add -lgcc on i386 and x86_64.
	* conf/Makefile.common (LDADD_KERNEL): Likewise.
	* grub-core/Makefile.core.def (kernel): Use LDADD_KERNEL.
2010-11-14 23:36:20 +01:00
Vladimir 'phcoder' Serbinenko
779dc15bf6 * configure.ac: Add -Wno-trampolines when supported. 2010-11-14 17:13:44 +01:00
Robert Millan
d2bf06bf34 2010-11-07 Robert Millan <rmh@gnu.org>
On mips-yeeloong, build with -march=loongson2f when this flag is
	available (GCC >= 4.4).
	* conf/Makefile.common [COND_mips_yeeloong] (CFLAGS_PLATFORM): Remove
	`-march=mips3'.
	* configure.ac: For mips-yeeloong, add -march=loongson2f if available,
	or otherwise add -march=mips3.
2010-11-07 16:29:10 +01:00
Colin Watson
e1fd193905 Re-enable grub-extras.
* autogen.sh: Create symlinks to ${GRUB_CONTRIB} if necessary to
avoid confusing Automake.  Run autogen only twice, once for the top
level and once for grub-core.  Add Makefile.util.def and
Makefile.core.def from extra modules to the appropriate autogen
invocations.  If Makefile.common exists in an extra module, include
it in both Makefile.util.am and grub-core/Makefile.core.am;
similarly, include any Makefile.util.common file in Makefile.util.am
and any Makefile.core.common file in grub-core/Makefile.core.am.
* conf/Makefile.common ($(top_srcdir)/grub-core/Makefile.core.am):
Depend on $(top_srcdir)/grub-core/Makefile.gcry.def.
($(top_srcdir)/grub-core/Makefile.gcry.def): Remove.
* grub-core/Makefile.am: Remove inclusion of Makefile.gcry.am.
* gentpl.py (gvar_add): Turn GVARS into a set.
(global_variable_initializers): Sort global variables on output.
(vars_init): New function.
(first_time): Likewise.
(library): Ensure that non-global variable initialisations are
emitted before the first time we emit code for a library block.
Append to variables rather than setting them.  Only emit
noinst_LIBRARIES, BUILT_SOURCES, and CLEANFILES the first time for
each conditional path.
(program): installdir() emits an Autogen macro, so must be passed to
var_add rather than gvar_add.
(data): Likewise.
(script): Likewise.
(rules): New function, centralising handling for different target
types.  Set up Guile association lists for first_time and vars_init,
and send most output to a diversion so that variable initialisations
can be emitted first.
(module_rules): Use new rules function.
(kernel_rules): Likewise.
(image_rules): Likewise.
(library_rules): Likewise.
(program_rules): Likewise.
(script_rules): Likewise.
(data_rules): Likewise.
* configure.ac: Add AC_PROG_LN_S, for the benefit of ntldr-img.
* .bzrignore: Add contrib and grub-core/contrib.  Remove
grub-core/Makefile.gcry.am.
2010-09-24 09:48:27 +01:00
Vladimir 'phcoder' Serbinenko
6d0fa83c79 Support xz compression on yeeloong.
* Makefile.util.def (grub-mkimage): Add $(LIBLZMA).
	* configure.ac: Check for LZMA.
	* grub-core/Makefile.core.def (xz_decompress): New target.
	(none_decompress): Likewise.
	* grub-core/boot/decompressor/minilib.c: New file.
	* grub-core/boot/decompressor/none.c: Likewise.
	* grub-core/boot/decompressor/xz.c: Likewise.
	* grub-core/kern/mips/cache.S: Change to noreorder nomacro.
	* grub-core/kern/mips/cache_flush.S: Likewise.
	* grub-core/kern/i386/pc/lzma_decode.S: Remove dead code.
	* grub-core/kern/mips/startup.S: Move first stage to ...
	* grub-core/boot/mips/startup_raw.S: ...here. Change to noreorder
	nomacro.
	* grub-core/kern/mips/startup.S: Change to noreorder nomacro.
	* grub-core/lib/mips/relocator_asm.S: Change to noreorder nomacro.
	* grub-core/lib/xzembed/xz_dec_bcj.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically.
	* grub-core/lib/xzembed/xz_dec_lzma2.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically or use scratch. Don't check CRC32.
	* grub-core/lib/xzembed/xz_dec_stream.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically. Don't check CRC32.
	* include/grub/decompressor.h: New file.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_YEELOONG_RAW_SIZE):
	Removed.
	(GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE): New field.
	(GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE): Adjusted.
	(GRUB_KERNEL_MIPS_YEELOONG_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END): Likewise.
	(GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE): New define.
	* util/grub-mkimage.c (grub_compression_t): New type.
	(PLATFORM_FLAGS_DECOMPRESSORS): New flag.
	(image_target_desc): New field default_compression.
	(image_targets): Adjust yeeloong targets.
	(compress_kernel_xz) [HAVE_LIBLZMA]: New function.
	(compress_kernel): New parameter comp.
	(generate_image): Likewise. Handle new compression case.
	(options): New option --compression
	(help): Likewise.
	(main): Handle new option.
2010-09-23 02:10:44 +02:00
Vladimir 'phcoder' Serbinenko
2c44e493c7 Compressor part 2010-09-21 21:35:46 +02:00
Yves Blusseau
a4c1d277c1 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 11:42:30 +02:00
Vladimir 'phcoder' Serbinenko
df3367cc4a * configure.ac: Change version to 1.99~beta0. 2010-09-21 02:33:48 +02:00
Colin Watson
269004c158 Fix po directory handling.
* configure.ac: Create po/Makefile.in rather than po/Makefile.
* grub-core/gnulib/Makefile.am: Import gettext module.
* m4/gnulib-cache.m4: Likewise.
* m4/gnulib-comp.m4: Likewise.
* m4/gettext.m4: New file, from gnulib.
* m4/glibc2.m4: Likewise.
* m4/iconv.m4: Likewise.
* m4/intdiv0.m4: Likewise.
* m4/intl.m4: Likewise.
* m4/intldir.m4: Likewise.
* m4/intlmacosx.m4: Likewise.
* m4/intmax.m4: Likewise.
* m4/inttypes-pri.m4: Likewise.
* m4/lcmessage.m4: Likewise.
* m4/lib-ld.m4: Likewise.
* m4/lib-link.m4: Likewise.
* m4/lib-prefix.m4: Likewise.
* m4/lock.m4: Likewise.
* m4/nls.m4: Likewise.
* m4/po.m4: Likewise.
* m4/printf-posix.m4: Likewise.
* m4/progtest.m4: Likewise.
* m4/threadlib.m4: Likewise.
* m4/uintmax_t.m4: Likewise.
* m4/visibility.m4: Likewise.
* po/Makefile.am: Remove.
* po/Makefile.in.in: New file, from gettext.
($(DOMAIN).pot-update): Support POTFILES-shell.
* po/Makevars: New file.
* po/POTFILES-shell: Rename to ...
* po/POTFILES-shell.in: ... this.  Update.
* po/POTFILES: Rename to ...
* po/POTFILES.in: ... this.  Update.
* po/Rules-quot: New file, from gettext.
* po/boldquot.sed: Likewise.
* po/en@boldquot.header: Likewise.
* po/en@quot.header: Likewise.
* po/insert-header.sin: Likewise.
* po/quot.sed: Likewise.
* po/remove-potcdate.sin: Likewise.
2010-09-21 00:09:23 +01:00
Yves Blusseau
15c6926126 Use gnulib-tool to create gnulib source files.
* Add gnulib files generated by gnulib-tool in build-aux, m4 and
    grub-core/gnulib directories
    * .bzignore: Add **/.deps and autogenerated gnulib files
    * configure.ac: Assign auxiliary directory to build-aux, add invocation
    of gnulib macros, add grub-core/gnulib/Makefile
    * Makefile.am: Add gnulib directory in SUBDIRS (removing unnecessary .),
    include m4 directory to aclocal.
    * Makefile.util.def: Remove direct compilation of gnulib source files
    and use the new grub-core/gnulib/libgnu.a.
    * build-aux/config.rpath: move config.rpath from top directory to
    build-aux
    * conf/Makefile.common: Remove the macro _GL_UNUSED already defined
    in gnulib headers
    * conf/Makefile.extra-dist: Add m4/gnulib-cache.m4
    * grub-core/Makefile.core.def: Remove unnecessary extra_dist
    * grub-core/lib/posix_wrap/localcharset.h (locale_charset): Update
    header.
    * grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Return static
    string.
2010-09-20 12:35:33 +02:00
Vladimir 'phcoder' Serbinenko
742f9232e3 Split config.h for util and core.
* acinclude.m4 (HAVE_ASM_USCORE): Transformed into a variable.
	(ADDR32): Likewise.
	(DATA32): Likewise.
	(BSS_START_SYMBOL): Likewise.
	(END_SYMBOL): Likewise.
	(NEED_ENABLE_EXECUTE_STACK): Likewise. All users updated.
	(grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK): Removed.
	* config.h.in: New file.
	* configure.ac: Use config-util.h as config define file.
	Rename MACHINE into GRUB_MACHINE. All users updated.
	(NEED_REGISTER_FRAME_INFO): Transformed into a variable. All users
	updated.
	(NESTED_FUNC_ATTR): Likewise.
	Substitue new variables.
	(COND_HAVE_ASM_USCORE): New conditional.
	* grub-core/Makefile.am (ASM_PREFIX): New variable.
	(kernel_syms.lst): Use ASM_PREFIX.
	* grub-core/kern/emu/console.c: Include config-util.h.
	* grub-core/kern/emu/misc.c: Likewise.
	* grub-core/kern/emu/mm.c: Likewise.
	* include/grub/emu/misc.h: Likewise.
	* include/grub/libgcc.h: Likewise.
2010-09-19 22:22:43 +02:00
Yves Blusseau
10854d0d79 * configure.ac: Avoid some annoying error messages if freetype-config
program is not found.
2010-09-16 17:07:42 +02:00
Vladimir 'phcoder' Serbinenko
62a747cb00 * configure.ac: Disable emu-usb by default to prevent inadvertent
device takeover.
2010-09-14 00:21:52 +02:00
Vladimir 'phcoder' Serbinenko
fb53b340aa Fix sparc64.
* configure.ac (GRUB_KERNEL_MACHINE_LINK_ADDR): Removed.
	* grub-core/Makefile.core.def (kernel): Make ldflags just use the
	right address. Add sparc64_ieee1275_ldflags.
	* grub-core/loader/sparc64/ieee1275/linux.c: Remove leftover include.
	* util/grub-mkimagexx.c (locate_sections): Correct grub_host_to_target32
	to grub_host_to_target_addr
	(load_image): Likewise.
2010-09-13 16:49:50 +02:00
Yves Blusseau
b23ffd70eb Bash completion script for util commands
* Makefile.am:  Add util/bash-completion.d directory
    * configure.ac: Likewise.
    * util/bash-completion.d/Makefile.am: New file.
    * util/bash-completion.d/grub-completion.bash.in: Likewise.
2010-09-13 10:29:18 +02:00
Vladimir 'phcoder' Serbinenko
050abaeaa8 Fix emu on mipsel.
* conf/Makefile.common (CFLAGS_PLATFORM): Add -mflush-func
	=grub_cpu_flush_cache on all mips and not only yeeloong.
	* configure.ac (COND_mips): New conditional.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add libgcc on all
	platforms.
	* grub-core/kern/emu/cache.S (__mips__): Use _flush_cache.
	* grub-core/kern/emu/full.c (grub_arch_dl_init_linker)
	[GRUB_LINKER_HAVE_INIT]: New function.
	(grub_emu_post_init): Likewise.
	* grub-core/kern/emu/lite.c (grub_emu_post_init): Likewise.
	* grub-core/kern/emu/main.c: Use grub_emu_post_init.
	* include/grub/cache.h (_mips): Include mips/cache.h.
	* include/grub/disk.h [GRUB_UTIL || GRUB_MACHINE_EMU]: Add missing
	LVM and RAID prototypes.
	* include/grub/emu/misc.h (grub_emu_post_init): New proto.
	* include/grub/mips/time.h (grub_cpu_idle) [GRUB_MACHINE_EMU]: New
	function.
2010-09-11 16:58:06 +02:00
Robert Millan
c38fe9f48e 2010-09-10 Robert Millan <rmh@gnu.org>
Solaris support in grub_find_zpool_from_dir().  Thanks
	Seth Goldberg for referring to getextmntent() facility.
	
	* configure.ac: Check for getextmntent(), `sys/mnttab.h' and
	`sys/mkdev.h'.
	* grub-core/kern/emu/misc.c [HAVE_SYS_MNTTAB_H]: Include
	`<sys/mnttab.h>'.
	[HAVE_SYS_MKDEV_H]: Include `<sys/mkdev.h>'.
	[HAVE_GETEXTMNTENT] (grub_find_zpool_from_dir): Add getextmntent()
	method for finding zpool name.
2010-09-10 14:32:28 +02:00
Robert Millan
fb90b54648 2010-09-10 Robert Millan <rmh@gnu.org>
* configure.ac: Check for `struct statfs.f_fstypename' and
	`struct statfs.f_mntfromname'.
	
	* grub-core/kern/emu/misc.c (grub_find_zpool_from_dir): Conditionalize
	kFreeBSD-specific code.
2010-09-10 14:02:54 +02:00
Yves Blusseau
d87aedff34 * configure.ac: Define some useful variables. 2010-09-08 17:19:27 +02:00
Robert Millan
92f2aef045 2010-09-08 Robert Millan <rmh@gnu.org>
* configure.ac: Remove `--enable-grub-fstest' option.
	* Makefile.util.def (grub-fstest): Remove COND_GRUB_FSTEST condition.
	
	* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Use
	`grub-fstest' instead of `grub-probe' for readability verification.
	* util/grub-probe.c (probe): Remove readability verification kludge.
2010-09-08 14:37:19 +02:00
Vladimir 'phcoder' Serbinenko
9f915872ef * configure.ac: Clean LIBS variable after tests. 2010-09-03 03:26:22 +02:00
Vladimir 'phcoder' Serbinenko
61d720e535 * configure.ac: Check for dm_log_with_errno_init in libdevmapper and
echo if libdevmapper will be used.
2010-09-03 00:53:41 +02:00
Vladimir 'phcoder' Serbinenko
16bd6cfab2 Merge mainline into newreloc. For now without boot tests 2010-08-25 03:25:18 +02:00
BVK Chaitanya
f7711f5ef1 final touches 2010-08-23 13:23:56 +05:30
BVK Chaitanya
5815f2c19a picks 10_${host_kernel} script 2010-08-21 21:03:26 +05:30
BVK Chaitanya
c721825b4f build fixes for mips and ieee1275 platforms 2010-08-21 17:11:40 +05:30
BVK Chaitanya
bdf0d62321 review comments 2010-08-21 09:48:27 +05:30
BVK Chaitanya
771111e53d fix COND_APPLE_CC definition 2010-08-20 13:00:11 +05:30
BVK Chaitanya
07daa815af better fix for setjmp module 2010-08-20 11:39:47 +05:30
BVK Chaitanya
34980574fc minor cleanups 2010-08-19 17:50:05 +05:30
BVK Chaitanya
16c7cb32c8 merge with mainline 2010-08-19 16:54:00 +05:30
BVK Chaitanya
62f7d20835 fixed grub-emu build 2010-08-18 20:25:16 +05:30
BVK Chaitanya
019be613d0 fixed distcheck 2010-08-18 16:53:11 +05:30
Colin Watson
51f1f5afab * configure.ac: Move AM_INIT_AUTOMAKE after AC_CANONICAL_TARGET to
fix warnings from Autoconf.
2010-08-18 11:15:08 +01:00
BVK Chaitanya
2b6c00842d distcheck almost done 2010-08-18 11:57:51 +05:30
BVK Chaitanya
76ed06b921 moved configure.common back to configure.ac 2010-08-17 19:41:43 +05:30
BVK Chaitanya
6304d29255 working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
Robert Millan
d3dd9e80f6 2010-08-04 Robert Millan <rmh@gnu.org>
* configure.ac: Remove checks for getfsstat() and getmntany().
	Add checks for `<sys/param.h>' and `<sys/mount.h>'.
	* kern/emu/misc.c [HAVE_GETMNTANY]: Remove `<sys/mnttab.h>'.
	[HAVE_SYS_PARAM_H]: Include `<sys/param.h>'.
	[HAVE_SYS_MOUNT_H]: Include `<sys/mount.h>'.
	[HAVE_LIBZFS && HAVE_LIBNVPAIR] (find_mount_point_from_dir): Remove
	function.
	(grub_find_zpool_from_dir): Use statfs() instead of indirect matching
	via find_mount_point_from_dir() and getfsstat() / getmntany().
2010-08-04 14:45:58 +02:00
Robert Millan
62858144fe 2010-08-04 Robert Millan <rmh@gnu.org>
Support OpenSolaris in ZFS device resolution.
	
	* configure.ac: Check for getmntany().
	* kern/emu/misc.c [HAVE_GETMNTANY]: Include `<sys/mnttab.h>'.
	[HAVE_GETMNTANY] (grub_find_zpool_from_mount_point): Add OpenSolaris
	support.
2010-08-04 00:15:29 +02:00
Robert Millan
3169f4c76a 2010-07-31 Robert Millan <rmh@gnu.org>
* configure.ac: Check for `libzfs.h' and `libnvpair.h'.
	
	* include/grub/util/libnvpair.h: Include `<config.h>'.
	[HAVE_LIBNVPAIR_H]: Include `<libnvpair.h>' instead of
	declaring libnvpair prototypes ourselves.
	* include/grub/util/libzfs.h: Include `<config.h>'.
	[HAVE_LIBZFS_H]: Include `<libzfs.h>' instead of
	declaring libzfs prototypes ourselves.
	
	(libzfs_handle): Moved to ...
	* include/grub/util/misc.h (libzfs_handle): ... here.
	Include `<grub/util/libzfs.h>'.
2010-07-31 12:22:01 +02:00
Robert Millan
a184f9c801 2010-07-30 Robert Millan <rmh@gnu.org>
Enable `grub-probe -t device' resolution on ZFS.
	
	* configure.ac: Check for getfsstat(), libzfs and libnvpair.
	* include/grub/util/libnvpair.h: New file.
	* include/grub/util/libzfs.h: New file.
	
	* kern/emu/getroot.c: Include `<assert.h>' and `<error.h>'.
	[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Include `<grub/util/libzfs.h>' and
	`<grub/util/libnvpair.h>'.
	[HAVE_GETFSSTAT]: Include `<sys/mount.h>'.
	
	(find_mount_point_from_dir): New static function.
	[HAVE_LIBZFS && HAVE_LIBNVPAIR] (find_root_device_from_libzfs): New
	function.
	[HAVE_LIBZFS && HAVE_LIBNVPAIR] (grub_guess_root_device): Use
	find_root_device_from_libzfs() before ressorting to find_root_device().
	
	* include/grub/util/misc.h (grub_util_init_libzfs): New function
	prototype.
	* util/misc.c: Include `<grub/util/libzfs.h>'.
	(grub_util_init_libzfs): New function.
	[HAVE_LIBZFS] (libzfs_handle): New global variable.
	[HAVE_LIBZFS] (fini_libzfs): New static function.
	(grub_util_init_libzfs): New function.
	* util/grub-probe.c (main): Call grub_util_init_libzfs().
2010-07-30 21:43:12 +02:00
Robert Millan
9f841f5cbf 2010-07-29 Robert Millan <rmh@gnu.org>
* configure.ac: Remove grub-mkisofs checks.
2010-07-29 15:06:39 +02:00
Grégoire Sutre
57ebd41ef1 Avoid == in test command, it's not portable. 2010-07-05 00:45:14 +02:00
Vladimir 'phcoder' Serbinenko
2a1d16154d Merge mainline into newreloc 2010-06-24 21:22:40 +02:00