Commit graph

1985 commits

Author SHA1 Message Date
William Bittner
82f6d455bb * util/import_unicode.py: Add missing brackets around string for
python 3 support.
2012-03-10 20:47:12 +01:00
Vladimir 'phcoder' Serbinenko
ec31677170 Fix IMSM handling on Fedora.
* util/getroot.c (grub_util_is_imsm): New function.
	(grub_util_get_dev_abstraction): Treat IMSM as simple device, not RAID.
2012-03-10 18:01:01 +01:00
Vladimir 'phcoder' Serbinenko
1039c8eba4 * util/grub.d/10_linux.in: Use stat if grub-probe on root fails.
* util/grub.d/20_linux_xen.in: Likewise.
	Based on Debian patch.
2012-03-10 15:21:25 +01:00
Vladimir 'phcoder' Serbinenko
6dd412cdcc * util/grub.d/10_linux.in: Fix syntax error resulting in
Richard Laager's patch.
	* util/grub.d/20_linux_xen.in: Propagate Richard Laager's patch.
2012-03-10 14:42:26 +01:00
Richard Laager
7eea167113 * util/grub.d/10_linux.in: Fix ZFS root passing. 2012-03-10 13:36:08 +01:00
Vladimir 'phcoder' Serbinenko
e8e0566b0c * grub-core/commands/videoinfo.c: Add TRANSLATORS comments.
* grub-core/commands/xnu_uuid.c: Likewise.
	* grub-core/loader/efi/appleloader.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-10 13:19:46 +01:00
Vladimir 'phcoder' Serbinenko
1acc5b1f3d * util/grub-mkfont.c (options): Use more appropriate "select" that
"set" for face index.
2012-03-10 13:16:41 +01:00
Vladimir 'phcoder' Serbinenko
35d7062040 * util/grub-editenv.c (options): Gettextize command summaries. 2012-03-10 13:12:45 +01:00
Vladimir 'phcoder' Serbinenko
6d790129fa * util/getroot.c (exec_pipe): Ensure that the child is not localised. 2012-03-10 13:05:21 +01:00
Vladimir 'phcoder' Serbinenko
005f46c94a * util/grub-install.in: Check for themes/starfield/theme.txt and not
themes/starfield.
2012-03-10 12:33:52 +01:00
Vladimir 'phcoder' Serbinenko
dd3907779e * util/grub-install.in: Fix install non-PreP IEEE1275 install. 2012-03-09 00:58:55 +01:00
Vladimir 'phcoder' Serbinenko
5fd1c522d4 * grub-core/commands/i386/pc/sendkey.c (GRUB_MOD_INIT): Fix confusing
message.
	* util/grub-install.in: Fix anf gettextize error message.
2012-03-09 00:56:22 +01:00
Vladimir 'phcoder' Serbinenko
fae01f6cfb * util/grub-fstest.c (options): Replace N with NUM and S with STRING.
Gettextize.
	* util/grub-mount.c (options): Likewise.
2012-03-08 19:09:05 +01:00
Vladimir 'phcoder' Serbinenko
61ac50ba80 * util/grub-mkstandalone.in: Propagate grub-mkimage.c change. 2012-03-06 15:53:02 +01:00
Vladimir 'phcoder' Serbinenko
abdd26dd20 * util/grub-install.in: Add missing dot at the end of sentence. 2012-03-06 15:45:30 +01:00
Vladimir 'phcoder' Serbinenko
bb51c6c647 * grub-core/commands/acpi.c: Add TRANSLATORS comments.
* grub-core/commands/gptsync.c: Likewise.
	* grub-core/commands/hashsum.c: Likewise.
	* grub-core/commands/i386/pc/sendkey.c: Likewise.
	* grub-core/commands/legacycfg.c: Likewise.
	* grub-core/io/gzio.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/tests/test_blockarg.c: Likewise.
	* grub-core/video/video.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-06 14:11:10 +01:00
Vladimir 'phcoder' Serbinenko
b2b149cbbd * util/grub-mkimage.c (help_filter): Add missing capitalisation. 2012-03-06 14:08:48 +01:00
Vladimir 'phcoder' Serbinenko
f2e243c078 * util/grub-kbdcomp.in: Change "layout" to "keyboard layout" in
description.
2012-03-06 14:06:14 +01:00
Vladimir 'phcoder' Serbinenko
09963c760d * util/grub-script-check.c (main): Fix a syntax error message which was
unclear.
2012-03-06 12:02:38 +01:00
Vladimir 'phcoder' Serbinenko
a50514a887 * util/grub-mkrescue.in (usage): Fix ROM capitalisation. 2012-03-06 12:00:57 +01:00
Vladimir 'phcoder' Serbinenko
97ebda9bc6 * util/grub-fstest.c (options): Remove OPTION_ARG_OPTIONAL from options
without argument.
	* util/grub-mount.c (options): Likewise.
2012-03-06 11:38:50 +01:00
Vladimir 'phcoder' Serbinenko
bbc5a342eb * util/grub-mkimage.c (generate_image): Unify diskboot.img size message. 2012-03-06 11:36:39 +01:00
Vladimir 'phcoder' Serbinenko
ef292a8775 * grub-core/net/http.c: Add TRANSLATORS comments.
* grub-core/normal/cmdline.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* grub-core/partmap/msdos.c: Likewise.
	* grub-core/parttool/msdospart.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/video/bitmap.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkimage.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-setup.c: Likewise.
2012-03-05 16:42:26 +01:00
Vladimir 'phcoder' Serbinenko
0fc19bd089 * util/grub-mount.c (fuse_init): Unify cryptomount and loopback messages
with similar messages in grub-fstest.
2012-03-05 16:39:16 +01:00
Vladimir 'phcoder' Serbinenko
d95862ef75 * util/grub-install.in: Unify "option requires an argument" message
with similar messages in other files.
	* util/grub-mkconfig.in: Likewise.
2012-03-05 16:37:29 +01:00
Vladimir 'phcoder' Serbinenko
b7308f90f5 * util/grub-set-default.in: Replace printf with gettext_printf (the
string in in question is already translated from grub-reboot)
2012-03-05 16:31:05 +01:00
Vladimir 'phcoder' Serbinenko
32bd735bd6 * util/grub-reboot.in (usage): Mention id posibility.
* util/grub-set-default.in (usage): Likewise.
2012-03-05 01:19:42 +01:00
Vladimir 'phcoder' Serbinenko
93b1cd79c8 Use sort -V by the idea of Georgi Georgiev.
* util/grub-mkconfig_lib.in (version_sort): New function.
	(version_test_numeric): Use version_sort.
2012-03-04 23:13:16 +01:00
Vladimir 'phcoder' Serbinenko
0cdc126ca2 Use submenus in grub-mkconfig.
* util/grub-mkconfig.in: Define GRUB_ACTUAL_DEFAULT.
	* util/grub-mkconfig_lib.in (grub_quote): New function.
	(gettext_printf): Use gettext and not gettext_quoted to fix several
	messages.
	* util/grub.d/10_hurd.in: Use submenus.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/grub.d/10_illumos.in: Add missing quoting.
	* util/grub.d/10_windows.in: Likewise.
2012-03-04 22:18:33 +01:00
Vladimir 'phcoder' Serbinenko
d9bef9bc43 Fix menu title instability bug.
* grub-core/commands/menuentry.c (options): New option --id.
	(grub_normal_add_menu_entry): New argument id. All users updated.
	(grub_cmd_menuentry): Handle --id.
	(grub_menu_init): Accept unknown arguments.
	* grub-core/normal/main.c (features): Add feature_menuentry_id and
	feature_menuentry_options.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Use id for
	saved_entry.
	(get_entry_number): Match with id as well.
	* include/grub/menu.h (grub_menu_entry): New member id.
	* util/grub-mkconfig_lib.in (grub_get_device_id): New function.
	* util/grub.d/00_header.in: Define menuentry_id_option.
	* util/grub.d/10_hurd.in: Define id.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-03-04 14:55:13 +01:00
Vladimir 'phcoder' Serbinenko
49de079bbe * grub-core/disk/diskfilter.c (is_lv_readable): New argument "easily".
All users updated. If easily=1 require raid-5/-6 to be full.
	(is_node_readable): Likewise.
	(scan_devices): Scan incomplete but readable LVs at the end.
	(grub_diskfilter_memberlist): Pull missing devices.
	(insert_array): Skip scanning until device is complete or scan is
	done otherwise.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Fix wrong
	check.
	* include/grub/diskfilter.h (grub_diskfilter_lv): New member scanned.
	* util/raid.c (grub_util_raid_getmembers): Handle "removed" disks.
2012-03-04 01:33:09 +01:00
Vladimir 'phcoder' Serbinenko
32107ec02a * util/grub-install.in: Load efivars unconditionally. 2012-03-03 23:15:18 +01:00
Vladimir 'phcoder' Serbinenko
805a8dccc8 * grub-core/commands/gptsync.c: Fix typographic quoting.
* grub-core/commands/ieee1275/suspend.c: Likewise.
	* grub-core/commands/parttool.c: Likewise.
	* grub-core/commands/search_wrap.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/gfxmenu/gui_label.c: Likewise.
	* grub-core/hello/hello.c: Likewise.
	* grub-core/kern/emu/main.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/normal/menu.c: Likewise.
	* grub-core/normal/menu_text.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub-setup.c: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-03 13:05:08 +01:00
Vladimir 'phcoder' Serbinenko
0c7d99c7c2 * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS comment.
* util/grub-install.in: Add missing quote in the comment.
2012-03-02 21:08:38 +01:00
Vladimir 'phcoder' Serbinenko
e7d2559bc1 * grub-core/commands/i386/pc/drivemap.c: Add TRANSLATORS comments.
* grub-core/commands/lsmmap.c: Likewise.
	* grub-core/commands/minicmd.c: Likewise.
	* grub-core/commands/mips/loongson/lsspd.c: Likewise.
	* grub-core/commands/regexp.c: Likewise.
	* grub-core/gdb/gdb.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkfont.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-03-02 15:09:10 +01:00
Vladimir 'phcoder' Serbinenko
e4b791fabe * util/getroot.c (grub_make_system_path_relative_to_its_root): Fix
absolutely unclear error message.
2012-03-02 14:58:53 +01:00
Vladimir 'phcoder' Serbinenko
fd1265cb29 * util/grub-mkstandalone.in: Remove confusing leftover print. 2012-03-02 14:56:47 +01:00
Vladimir 'phcoder' Serbinenko
8822a8a02b * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS
comments.
	* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
	VGA mode.
	* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
	comments.
	* util/grub-install.in (usage): Likewise.
	Spell ID in whole letters.
	Add missing ending dot.
	Quote variables.
	* util/grub-reboot.in: Fix capitalisation.
	* util/grub-set-default.in: Likewise.
2012-03-02 11:53:50 +01:00
Vladimir 'phcoder' Serbinenko
937fd0cc0c * util/getroot.c (strip_extra_slashes) [CYGWIN]: #ifdef-out.
(exec_pipe) [CYGWIN || MINGW32]: Likewise.
	(find_root_devices_from_poolname) [CYGWIN || MINGW32]: Likewise.
	(find_root_devices_from_libzfs) [CYGWIN || MINGW32]: Likewise.
	Disable -Werror for -Wdeprecated-declarations.
	(grub_guess_root_devices) [CYGWIN || MINGW32]: #ifdef-out.
	(get_dm_uuid) [!HAVE_DEVICE_MAPPER]: Likewise.
	(grub_util_get_dm_abstraction) [! __linux__]: #ifdef-out.
	(grub_util_get_grub_dev): Make luks handling dependent on
	HAVE_DEVICE_MAPPER and not __linux__.
	(get_win32_path): Fix format security.
	(grub_find_zpool_from_dir) [CYGWIN || MINGW32]: #ifdef-out.
	(grub_make_system_path_relative_to_its_root) [CYGWIN || MINGW32]:
	Don't try grub_find_zpool_from_dir.
	(grub_make_system_path_relative_to_its_root) [!__linux__]:
	#ifdef-out paresdir.
2012-03-02 11:36:07 +01:00
Vladimir 'phcoder' Serbinenko
1bab1ae335 * util/grub-pe2elf.c (usage): Add missing noreturn.
(write_section_data): Rename name to shname to avoid shadowing.
	(write_symbol_table): Rename name to symname to avoid shadowing.
	Fix write_reloc_section call.
2012-03-02 11:27:48 +01:00
Vladimir 'phcoder' Serbinenko
48afcb75fa * util/ieee1275/ofpath.c (my_isdigit): New function.
(trailing_digits): Use my_isdigit.
	(strip_trailing_digits): Likewise.
2012-03-02 11:21:01 +01:00
Vladimir 'phcoder' Serbinenko
88d51eff35 * util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
* grub-core/kern/emu/hostdisk.c (read_device_map): Likewise.
2012-03-02 11:18:11 +01:00
Vladimir 'phcoder' Serbinenko
9cc3ee5c2b * util/grub-install.in: Add missing gettext init.
* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-01 00:40:02 +01:00
Vladimir 'phcoder' Serbinenko
9d742bd431 * util/grub-mkimagexx.c (locate_sections): Support non-standard
ELF section gap.
	(load_image): Likewise.
2012-02-29 18:57:43 +01:00
Vladimir 'phcoder' Serbinenko
434814814b * util/getroot.c [__APPLE__]: Add missing includes.
(grub_util_biosdisk_is_floppy): Fix usage of undefined variable.
2012-02-29 14:14:08 +01:00
Vladimir 'phcoder' Serbinenko
3cb38f015f * util/grub-mkimage.c (generate_image): Silence spurious warning. 2012-02-29 14:12:41 +01:00
Vladimir 'phcoder' Serbinenko
d9dbf11e16 * util/ieee1275/ofpath.c: Rename devname to sys_devname everywhere to
avoid conflicts.
2012-02-29 14:10:04 +01:00
Vladimir 'phcoder' Serbinenko
0c42a45dcc * util/ieee1275/grub-ofpathname.c: Add missing config.h include. 2012-02-29 14:08:58 +01:00
Vladimir 'phcoder' Serbinenko
46c34eb096 * util/grub-setup.c (setup) [!__linux__]: Add missing file declaration
and grub_file_close call.
2012-02-29 14:07:53 +01:00
Vladimir 'phcoder' Serbinenko
99ce1597a4 Add LZSS Mach-O support (needed for new xnu kernelcache).
* grub-core/Makefile.core.def (xnu): Add file lzss.c
	* grub-core/loader/lzss.c: New file.
	* grub-core/loader/xnu.c (grub_xnu_load_driver): Close binaryfile
	on Mach-O open failure.
	* grub-core/loader/macho.c (grub_macho_close): Free uncompressedXX.
	Don't free cmdsXX in uncompressedXX is set.
	(grub_macho_file): Init new fields.
	New argument is_64bit. All users updated.
	Handle compressed. Error out if no suitable architecture is found.
	Don't close file.
	(grub_macho_open): New argument is_64bit. All users updated.
	* grub-core/loader/macho32.c: Add defines for new fields.
	* grub-core/loader/macho64.c: Likewise.
	* grub-core/loader/machoXX.c (grub_macho_contains_macho): Make static.
	(grub_macho_parse): Handle compressed.
	Defer actual processing if compressed.
	(grub_macho_cmds_iterate): Decompress if compressed. New argument
	"filename". All users updated.
	(grub_macho_size): New argument "filename". All users updated.
	(grub_macho_get_entry_point): Likewise.
	(grub_macho_load): Handle compressed.
	* include/grub/macho.h (grub_macho_lzss_header): New struct.
	(GRUB_MACHO_LZSS_OFFSET): New define.
	(grub_decompress_lzss): New proto.
	* include/grub/machoload.h (grub_macho_file): New fields to handle
	compressed.
	(grub_macho_contains_macho64): Remove proto.
	(grub_macho_contains_macho32): Likewise.
	* util/grub.d/30_os-prober.in: Use kernel cache if available.
2012-02-29 13:26:13 +01:00
Vladimir 'phcoder' Serbinenko
2702b4e4f7 Fix make dist.
* Makefile.am (starfield_theme_files): New var.
	(starfield_DATA): Use starfield_theme_files.
	(EXTRA_DIST): Add starfield_theme_files. Add starfield source files.
	Add bootcheck-related files.
	* conf/Makefile.extra-dist (EXTRA_DIST): Add several missing files.
	* docs/Makefile.am (EXTRA_DIST): Add font_char_metrics.png
	and font_char_metrics.txt.
	* grub-core/Makefile.core.def (kernel): Update extra_dist.
	(setjmp): Add lib/ia64/longjmp.S.
	* po/Makefile.in.in (DISTFILES): Add POTFILES-shell.in and grub.d.sed.
	* po/POTFILES.in: Regenerate.
	* po/Rules-swiss: use DISTFILES.common.extra2 and not
	DISTFILES.common.extra1.
	* util/devicemap.c: Removed.
	* grub-core/lib/i386/relocator_backward.S: Likewise.
	* util/import_gcry.py: Remove unused files. Add extra_dist for
	ChangeLog.
2012-02-28 12:58:57 +01:00
Vladimir 'phcoder' Serbinenko
7931dddfb8 * util/getroot.c (grub_find_root_devices_from_btrfs): Add
missing initialisation.
2012-02-28 04:25:13 +01:00
Colin Watson
e3c78337c3 * include/grub/partition.h (grub_partition_map): Change prototype of
embed to take a maximum value for nsectors.
	* include/grub/emu/hostdisk.h (grub_util_ldm_embed): Likewise.
	* include/grub/fs.h (grub_fs): Likewise.
	* grub-core/partmap/msdos.c (embed_signatures): New array.
	(pc_partition_map_embed): Check for and avoid sectors matching any
	of the signatures in embed_signatures, up to max_nsectors.
	* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restrict
	returned sector map to max_nsectors.
	* grub-core/disk/ldm.c (grub_util_ldm_embed): Likewise.
	* grub-core/fs/btrfs.c (grub_btrfs_embed): Likewise.
	* grub-core/fs/zfs/zfs.c (grub_zfs_embed): Likewise.
	* util/grub-setup.c (setup): Allow for the embedding area being
	split into multiple blocklists.  Tell dest_partmap->embed the
	maximum number of sectors we care about.
2012-02-27 22:25:39 +01:00
Vladimir 'phcoder' Serbinenko
e1e49678b9 * util/grub-install.in: Clarify strings.
Fix source dir check.
2012-02-27 21:36:58 +01:00
Vladimir 'phcoder' Serbinenko
984b973ffc * util/grub-install.in: Clarify strings.
Fix source dir check.
2012-02-27 21:31:58 +01:00
Richard Laager
f122e0d648 * util/getroot.c (grub_find_root_devices_from_mountinfo): Handle
"zfs" and "fuse.zfs" as synonyms.
2012-02-27 20:14:26 +01:00
Richard Laager
817e6abcd0 * util/grub.d/10_linux.in: Add ZFS-related arguments.
* util/grub.d/20_linux_xen.in: Likewise.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-02-27 19:07:09 +01:00
Richard Laager
897b741978 * util/getroot.c (find_root_devices_from_poolname): Handle vdevs
with full paths.
2012-02-27 17:42:48 +01:00
Richard Laager
a414bd1565 * util/getroot.c (grub_find_root_devices_from_mountinfo): Add missing
unescape.
2012-02-27 17:40:38 +01:00
Vladimir 'phcoder' Serbinenko
30ac48c452 Don't use insecure popen in getroot.
* util/getroot.c (get_mdadm_uuid): Move pipe logic to ...
	(exec_pipe): ... here.
	(find_root_devices_from_poolname): Use exec_pipe.
2012-02-27 17:37:23 +01:00
Vladimir 'phcoder' Serbinenko
53f13848f1 Remove platform and target_cpu replacement.
* configure.ac: Remove platform and target_cpu substitutions.
	* tests/util/grub-shell.in: Use modinfo.
	* util/powerpc/ieee1275/grub-mkrescue.in: Specify powerpc-ieee1275
	explicitly.
2012-02-27 16:46:52 +01:00
Vladimir 'phcoder' Serbinenko
90cb2803d4 Autodetect platform in grub-install but allow override.
* util/grub-install.in: Autodetect platform. Support --target and
	--directory. Read platform from modinfo.sh.
2012-02-27 16:06:18 +01:00
Vladimir 'phcoder' Serbinenko
b913642798 Support btrfs multi-volume probe.
* util/getroot.c (btrfs_ioctl_dev_info_args) [__linux__]: New struct.
	(btrfs_ioctl_fs_info_args) [__linux__]: Likewise.
	(BTRFS_IOC_DEV_INFO) [__linux__]: New define.
	(BTRFS_IOC_FS_INFO) [__linux__]: Likewise.
	(grub_find_root_devices_from_btrfs) [__linux__]: New function.
	(grub_find_root_devices_from_mountinfo) [__linux__]: Use
	grub_find_root_devices_from_btrfs if on btrfs.
2012-02-27 14:56:28 +01:00
Vladimir 'phcoder' Serbinenko
c36e5cd162 Remove any awareness of *.c util files about target.
* Makefile.util.def (grub-setup): Split to ...
	(grub-bios-setup): ... and this.
	(grub-sparc64-setup): ... and this.
	* configure.ac: Don't add machine_CPPFLAGS into HOST_CPPFLAGS.
	* docs/man/grub-setup.h2m: Split into ...
	* docs/man/grub-sparc64-setup.h2m: ... this.
	* docs/man/grub-bios-setup.h2m: ... and this.
	* include/grub/dl.h (grub_dl) [GRUB_UTIL]: Remove struct.
	* include/grub/elf.h (Elf_*) [GRUB_UTIL]: Remove types.
	(GRUB_TARGET_WORDSIZE) [GRUB_UTIL]: Remove.
	(grub_target_addr_t): Remove.
	(grub_target_size_t): Remove.
	(grub_target_ssize_t): Remove.
	* util/grub-install.in: Use new grub-*-setup.
	* util/grub-mkimagexx.c (Elf_Word): New define.
	(Elf_Half): Likewise.
	(Elf_Section): Likewise.
	(ELF_ST_TYPE): Likewise.
	* util/grub-setup.c: Switch from GRUB_MACHINE_SPARC64 to
	GRUB_SETUP_SPARC64 and from GRUB_MACHINE_PCBIOS to GRUB_SETUP_BIOS.
2012-02-27 14:24:22 +01:00
Vladimir 'phcoder' Serbinenko
6a3131243a * util/grub-mknetdir.in (grub_prefix): Removed.
(subdir): Use @bootdirname@ and @grubdirname@.
2012-02-27 11:08:17 +01:00
Vladimir 'phcoder' Serbinenko
2311c5caa9 Replace PACKAGE_TARNAME with PACKAGE in pkglibdir and pkgdatadir. 2012-02-27 11:04:50 +01:00
Vladimir 'phcoder' Serbinenko
8151bc82f7 Remove improper use of program_transform_name on pkglibrootdir.
* configure.ac (pkglibrootdir): Removed.
	(grub-mkimage): Replace PKGLIBROOTDIR with PKGLIBDIR.
	* util/grub-mkimage.c: Likewise.
2012-02-27 10:35:37 +01:00
Vladimir 'phcoder' Serbinenko
668f304f4d * util/grub-install.in: Use file identifier if no UUID is available
or user explicitly prompted for it.
2012-02-27 02:23:14 +01:00
Vladimir 'phcoder' Serbinenko
fc847818fc Don't transform PACKAGE_TARNAME following a discussion on autoconf
mailing list.

	* util/grub-install.in: Don't transform PACKAGE_TARNAME.
	* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkconfig_lib.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-02-26 18:37:54 +01:00
Vladimir 'phcoder' Serbinenko
47454da510 Remove GRUB_PREFIX.
* util/grub-mkconfig.in: Remove GRUB_PREFIX.
	* util/grub.d/00_header.in: Compute prefix in the only place it's still
	used for backward compatibility.
2012-02-26 18:21:31 +01:00
Vladimir 'phcoder' Serbinenko
22c7ce85fe Add new all_video module.
* grub-core/Makefile.am (moddep.lst): Make dependent on video.lst.
	* grub-core/Makefile.core.def (all_video): New module.
	* grub-core/genmoddep.awk: Generate dependency of all_video from
	video.lst.
	* grub-core/lib/fake_module.c: New file.
	* grub-core/normal/main.c (features): Add feature_all_video_module.
	* util/grub.d/00_header.in: Define locale_dir based on $prefix and
	don't do explicit search again.
	insmod all_video in load_video if available.
2012-02-26 18:09:07 +01:00
Vladimir 'phcoder' Serbinenko
67093bc0ed Another round of string clarification and adding TRANSLATORS comments. 2012-02-26 17:28:05 +01:00
Vladimir 'phcoder' Serbinenko
ad7b7b8527 * util/grub-mknetdir.in: Remove erroneous reference to install_device. 2012-02-26 17:23:26 +01:00
Vladimir 'phcoder' Serbinenko
a9c7fd1c6c Implement serial on IEEE1275 and EFI.
* docs/grub.texi (Platform-specific limitations): Fix the columen video
	on emu. Mention arc and emu as the only platforms without serial
	support.
	* grub-core/Makefile.core.def (serial): Enable on all terminfomodule and
	ieee1275 platforms.
	* grub-core/term/efi/serial.c: New file.
	* grub-core/term/ieee1275/serial.c: Likewise.
	* grub-core/term/serial.c (grub_serial_find): Disable direct port
	specification if no ns8250 driver is available.
	(grub_cmd_serial): Likewise.
	(GRUB_MOD_INIT) [GRUB_MACHINE_IEEE1275]: Init ofserial.
	(GRUB_MOD_INIT) [GRUB_MACHINE_EFI]: Init efiserial.
	* include/grub/efi/api.h (GRUB_EFI_SERIAL_IO_GUID): New define.
	(grub_efi_parity_type_t): New type.
	(grub_efi_stop_bits_t): Likewise.
	(grub_efi_serial_io_interface): New struct.
	* include/grub/serial.h (grub_serial_port): Make 'broken' field
	available for all interfaces.
	Add EFI and IEEE1275 fields.
	(grub_ofserial_init): New proto.
	(grub_efiserial_init): Likeiwse.
	* util/grub.d/00_header.in: Don't check for the presence of serial
	module.
2012-02-26 17:08:11 +01:00
Vladimir 'phcoder' Serbinenko
6a656b0ea5 Convert grub-emu to argp.
* grub-core/Makefile.core.def (kernel): Add kern/emu/argp_common.c on
	emu.
	* util/argp_common.c: Rename to ...
	* grub-core/kern/emu/argp_common.c: ... this. All users updated.
	Add missing includes.
	* grub-core/kern/emu/main.c: Convert to argp.
	* po/POTFILES.in: Regenerate.
	* util/grub-install.in (usage): Make first letter lowcase in messages
	for uniformity.
	* util/grub-setup.c (options): Likewise.
2012-02-25 01:15:29 +01:00
Vladimir 'phcoder' Serbinenko
6753c0ec3a * util/grub-install.in: Fix usage of wrong device for PreP install. 2012-02-24 12:35:38 +01:00
Vladimir 'phcoder' Serbinenko
4e27343fb0 * conf/Makefile.common (CFLAGS_GNULIB): Add
-Wno-unsafe-loop-optimizations.
	* configure.ac: Remove -Wmissing-declarations and -Wmissing-prototypes
	on tools.
	* grub-core/commands/legacycfg.c: Add pragma to skip
	-Wunsafe-loop-optimizations.
	(check_password_md5_real): Fix loop counter type.
	* grub-core/commands/testload.c (grub_cmd_testload): Fix over the EOF
	reading.
	* grub-core/disk/ldm.c (grub_util_get_ldm): Fix logic error.
	* grub-core/fs/zfs/zfs_sha256.c (zio_checksum_SHA256): Add safety
	loop condition.
	* grub-core/io/gzio.c: Add pragma to skip -Wunsafe-loop-optimizations.
	* grub-core/lib/LzmaEnc.c (GetOptimum): Avoid possible infinite loop.
	* grub-core/net/net.c (grub_net_route_address): Add safety loop
	condition.
	* grub-core/normal/charset.c (bidi_line_wrap): Likewise.
	* grub-core/normal/cmdline.c (grub_set_history): Fix loop types and
	avoid possible infinite loops.
	* grub-core/script/parser.y: Add pragma to skip -Wmissing-declarations
	and -Wunsafe-loop-optimizations.
	* grub-core/script/yylex.l: Likewise.
	* util/grub-mkfont.c: Add pragma to skip -Wunsafe-loop-optimizations.
	(print_glyphs): Avoid infinite loops.
	* util/grub-mkimage.c (compress_kernel_xz): Fix format security.
2012-02-24 12:30:32 +01:00
Vladimir 'phcoder' Serbinenko
274416e82f * grub-core/font/font.c (grub_font_load): Add support for default
path for fonts ($prefix/fonts).
	* grub-core/kern/corecmd.c (grub_core_cmd_insmod): Unify condition
	for checking if string is a path.
	* grub-core/normal/main.c (features): Add feature_default_font_path.
	* util/grub-mkconfig.in: Skip mangling of GRUB_FONT into GRUB_FONT_PATH.
	* util/grub.d/00_header.in: Use default directory if possible.
	* util/grub-install.in: Install unicode.pf2.
2012-02-24 11:18:06 +01:00
Vladimir 'phcoder' Serbinenko
fe42ce0924 * grub-core/fs/btrfs.c (find_device): Fix typos.
* grub-core/fs/zfs/zfs.c (read_device): Likewise.
	* util/grub-mkrelpath.c (argp_parser): Likewise.
	Reported by: Yuri Chornoivan.
2012-02-23 22:27:25 +01:00
Dalet Omega
c588497385 Starfield theme.
* Makefile.am: Define starfield_DATA and dejavu.pf2 generation.
	* conf/Makefile.common: Define starfielddir.
	* configure.ac: Configure starfield.
	* themes/starfield/COPYING.CC-BY-SA-3.0: New file.
	* themes/starfield/README: Likewise.
	* themes/starfield/blob_w.png: Likewise.
	* themes/starfield/boot_menu_c.png: Likewise.
	* themes/starfield/boot_menu_e.png: Likewise.
	* themes/starfield/boot_menu_n.png: Likewise.
	* themes/starfield/boot_menu_ne.png: Likewise.
	* themes/starfield/boot_menu_nw.png: Likewise.
	* themes/starfield/boot_menu_s.png: Likewise.
	* themes/starfield/boot_menu_se.png: Likewise.
	* themes/starfield/boot_menu_sw.png: Likewise.
	* themes/starfield/boot_menu_w.png: Likewise.
	* themes/starfield/slider_c.png: Likewise.
	* themes/starfield/slider_n.png: Likewise.
	* themes/starfield/slider_s.png: Likewise.
	* themes/starfield/src/blob_nw.xcf: Likewise.
	* themes/starfield/src/bootmenu/: Likewise.
	* themes/starfield/src/bootmenu/center.xcf: Likewise.
	* themes/starfield/src/bootmenu/corner.xcf: Likewise.
	* themes/starfield/src/bootmenu/side.xcf: Likewise.
	* themes/starfield/src/slider_c.xcf: Likewise.
	* themes/starfield/src/slider_n.xcf: Likewise.
	* themes/starfield/src/slider_s.xcf: Likewise.
	* themes/starfield/src/terminalbox/: Likewise.
	* themes/starfield/src/terminalbox/center.xcf: Likewise.
	* themes/starfield/src/terminalbox/corner.xcf: Likewise.
	* themes/starfield/src/terminalbox/side.xcf: Likewise.
	* themes/starfield/starfield.png: Likewise.
	* themes/starfield/terminal_box_c.png: Likewise.
	* themes/starfield/terminal_box_e.png: Likewise.
	* themes/starfield/terminal_box_n.png: Likewise.
	* themes/starfield/terminal_box_ne.png: Likewise.
	* themes/starfield/terminal_box_nw.png: Likewise.
	* themes/starfield/terminal_box_s.png: Likewise.
	* themes/starfield/terminal_box_se.png: Likewise.
	* themes/starfield/terminal_box_sw.png: Likewise.
	* themes/starfield/terminal_box_w.png: Likewise.
	* themes/starfield/theme.txt: Likewise.
2012-02-23 17:21:38 +01:00
Vladimir 'phcoder' Serbinenko
17d7332536 * util/grub.d/00_header.in: Add missing export theme. 2012-02-23 06:26:00 +01:00
Vladimir 'phcoder' Serbinenko
dbebaf9291 * util/ieee1275/ofpath.c: Remove include of malloc.h since stdlib is
already included.
	Reported by: Eren D.
2012-02-22 16:50:14 +01:00
Vladimir 'phcoder' Serbinenko
21ffe8f1dd * util/bin2h.c (usage): Add missing attribute noreturn. 2012-02-22 05:06:58 +01:00
Samuel Thibault
ac96441c81 2012-02-19 Samuel Thibault <samuel.thibault@ens-lyon.org>
* util/grub-mkconfig.in (GRUB_CMDLINE_GNUMACH): Export variable.
	* util/grub.d/10_hurd.in: Include GRUB_CMDLINE_GNUMACH in gnumach
	command line.
	* docs/grub.texi (Simple configuration): Document
	GRUB_CMDLINE_GNUMACH.
2012-02-19 17:06:00 +01:00
Vladimir 'phcoder' Serbinenko
d61386e21d Improve string. Gettextize. 2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
78dde88e8c * configure.ac: Remove -Winline altogether and -Wmissing-prototypes on
utils.
	* util/import_gcry.py: Add -Wno-strict-aliasing on checked modules.
2012-02-11 12:21:21 +01:00
Vladimir 'phcoder' Serbinenko
4786a90fee * grub-core/disk/diskfilter.c (grub_diskfilter_print_partmap)
[GRUB_UTIL]: New function.
	(insert_array) [GRUB_UTIL]: Store partmaps.
	* include/grub/diskfilter.h (grub_diskfilter_pv) [GRUB_UTIL]: New member
	partmaps.
	(grub_diskfilter_print_partmap) [GRUB_UTIL]: New proto.
	* util/grub-probe.c (probe_partmap): Call grub_diskfilter_print_partmap.
	(probe_abstraction): Print diskfilter and not raid.
	Reported by: Lennart Sorensen
2012-02-11 11:57:47 +01:00
Vladimir 'phcoder' Serbinenko
0b6225bd27 * util/grub-mkimage.c (generate_image): Explicitly init decompress_size.
* util/grub-mkimagexx.c (MASK3): New define.
	(add_value_to_slot_20b): Use MASK3.
	(add_value_to_slot_21): Likewise.
	(relocate_addresses): Fix format specification.
	(load_image): Explicitly init symtab_section.
2012-02-11 11:50:10 +01:00
Vladimir 'phcoder' Serbinenko
b055f8f676 * util/getroot.c (grub_find_root_devices_from_mountinfo): Fix types.
(grub_util_biosdisk_get_grub_dev): Fix format specification.
2012-02-11 11:41:22 +01:00
Grégoire Sutre
c8d9ead677 Source grub-mkconfig_lib from the build directory at build time. 2012-02-10 18:16:27 +01:00
Vladimir 'phcoder' Serbinenko
ebcecdf1c3 Increase warning level.
* conf/Makefile.common (CFLAGS_GNULIB): Add -Wno-redundant-decls
	-Wno-unreachable-code -Wno-conversion -Wno-old-style-definition.
	* configure.ac (HOST_CFLAGS): Add bunch of -W arguments.
	(TARGET_CFLAGS): Likewise.
	(HOST_CFLAGS): Add -Werror unless --disable-werror is activated.
	* grub-core/Makefile.core.def (decompressor_xz): Add
	-Wno-unreachable-code.
	(normal): Add -Wno-redundant-decls.
	(xzio): Add -Wno-unreachable-code.
	(lzopio): Add -Wno-redundant-decls -Wno-error.
	* grub-core/commands/acpi.c: Add exception to -Wcast-align.
	* grub-core/commands/lsacpi.c: Add exception to -Wcast-align.
	* grub-core/gensymlist.sh: Add exception to -Wmissing-format-attribute.
	* grub-core/kern/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/efi/efi.c (grub_efi_modules_addr): Likewise.
	* grub-core/kern/i386/coreboot/init.c: Add exception to
	-Wsuggest-attribute=noreturn.
	* grub-core/kern/ia64/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/ia64/dl_helper.c: Likewise.
	* grub-core/kern/mips/dl.c: Likewise.
	* grub-core/kern/sparc64/dl.c: Likewise.
	* grub-core/lib/LzmaEnc.c: Add exception to -Wshadow.
	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy): Likewise.
	(memcmp): Likewise.
	* grub-core/lib/pbkdf2.c: Add exception to -Wunreachable-code.
	* grub-core/loader/ia64/efi/linux.c: Add exception to -Wcast-align.
	* grub-core/loader/mips/linux.c: Likewise.
	* grub-core/loader/multiboot_elfxx.c: Likewise.
	* grub-core/script/parser.y: Add exception to -Wunreachable-code.
	* grub-core/video/sm712.c: Add exception to -Wcast-align.
	* util/import_gcry.py: Add -Wno-cast-align to modules checked by hand.
	* grub-core/font/font.c (grub_font_loader_init): Add explicit cast and
	fixme.
	* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
	* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_init):
	Fix prototype.
2012-02-10 16:48:48 +01:00
Vladimir 'phcoder' Serbinenko
102fae4a1c * util/grub-mount.c (fuse_init): Avoid improper use of strings.
* util/grub-fstest.c (fstest): Likewise.
2012-02-10 14:12:43 +01:00
Vladimir 'phcoder' Serbinenko
5ebd976935 * util/import_gcry.py: Include grub/crypto.h in init.c. 2012-02-10 13:58:53 +01:00
Vladimir 'phcoder' Serbinenko
495fc8c181 * util/grub-mkimage.c (compress_kernel_lzma): Respect format security.
(generate_image): Make prefix a const char *.
	Fix format specifications. Respect format security.
	Avoid void * arithmetics.
	Avoid shadowing.
	(argp_parser): Remove unused variable. Respect format security.
	* util/grub-mkimagexx.c (relocate_symbols): Avoid shadowing.
	(count_funcs) [!MKIMAGE_ELF64]: #if-out.
	(count_funcs): Remove unused variable.
	(relocate_addresses): Fix format specification.
	Disable x86-64 with elf32. Remove unused variables.
	(add_fixup_entry): Avoid shadowing.
	(make_reloc_section): Fix format specification.
	Use assert.
	(locate_sections): Fix format specifications.
	(load_image): Avoid shadowing.
2012-02-10 13:56:18 +01:00
Vladimir 'phcoder' Serbinenko
043c2ea33b * util/grub-setup.c (setup): Remove unused variable. Avoid shadowing.
Fix format specifications. Respect format security.
	Don't translate already translated grub_errmsg.
	(argp_parser): Remove unused variable
2012-02-10 13:49:24 +01:00
Vladimir 'phcoder' Serbinenko
3ec65a8187 * util/grub-mkrelpath.c (argp_parser): Remove unused variable. 2012-02-10 13:47:04 +01:00
Vladimir 'phcoder' Serbinenko
a4d9fe4a95 * util/grub-mkpasswd-pbkdf2.c (argp_parser): Remove unused variable.
(main): Likewise. Use xmalloc. Respect format security.
2012-02-10 13:44:57 +01:00
Vladimir 'phcoder' Serbinenko
15b81d49bc * util/grub-mklayout.c (console_grub_equivalence): Make "layout"
a const char *.
	(argp_parser): Remove unused variable.
2012-02-10 13:42:00 +01:00
Vladimir 'phcoder' Serbinenko
31731fc04f * util/grub-mkfont.c (grub_font_info): Make name a const char *.
(add_pixel): Make static.
	(add_font): Likewise.
	(write_string_section): Make name and str a const char *.
	(write_be16_section): Make name a const char *.
	(print_glyphs): Make static.
	(write_font_ascii_bitmap): Likewise.
	(write_font_width_spec): Likewise.
	(write_font_pf2): Likewise.
	(argp_parser): Remove unused variable.
	Respect format security.
	(main): Avoid shadowing. Respect format security.
2012-02-10 13:31:43 +01:00
Vladimir 'phcoder' Serbinenko
0809527b9d * util/grub-editenv.c (argp_parser): Make static.
(create_envblk_file): Use xmalloc.
	(open_envblk_file): Likewise.
	Resepect format security.
	(set_variables): Respect format security.
2012-02-10 13:26:19 +01:00
Vladimir 'phcoder' Serbinenko
45b0c8b797 * util/getroot.c (grub_find_device): Respect format security.
(get_mdadm_uuid): Remove unused variable.
	(grub_util_pull_device): Dont call gettext on already translated
	grub_errmsg.
	(find_system_device): Remove unused variable.
	(grub_util_get_grub_dev): Likewise.
	(grub_make_system_path_relative_to_its_root): Respect format security.
2012-02-10 13:17:12 +01:00
Vladimir 'phcoder' Serbinenko
1b024b4ea0 * util/grub-fstest.c (execute_command): Make first argument
a const char *.
	(read_file): Avoid shadowing.
	Reuse underlying error message if device open fails.
	(cmd_cmp): Respect format security.
	(root): Make const char *.
	(fstest): Remove args argument and use global copy.
	Respect format security.
	(argp_parser): Make static.
	(main): Make default_root const char *.
2012-02-10 13:08:59 +01:00
Vladimir 'phcoder' Serbinenko
5d1d4e288f * util/grub-mount.c (root): Make const char *.
(execute_command): Make first argument a const char *.
	(fuse_init): Respect format security.
	(argp_parser): Make static. Remove unused variable.
	(main):  Make default_root a const char *.
	Respect format security.
2012-02-10 13:03:21 +01:00
Vladimir 'phcoder' Serbinenko
36eb7379b3 * util/grub-probe.c (probe): Don't call gettext on already translated
grub_errmsg.
	Remove unused variables.
	(argp_parser): Remove unused variable.
2012-02-10 12:57:00 +01:00
Vladimir 'phcoder' Serbinenko
76fb2ea93b * util/grub-script-check.c (argp_parser): Remove unused variable.
(main): Rename read to curread to avoid shadowing.
2012-02-10 12:54:40 +01:00
Vladimir 'phcoder' Serbinenko
56c98584c7 * util/misc.c (grub_util_write_image_at): Fix format specification.
(grub_util_write_image): Likewise.
	(grub_script_execute_argument_to_string): Removed (unused).
	(grub_script_execute_menuentry): Likewise.
	(grub_putchar): Likewise.
2012-02-10 12:52:46 +01:00
Vladimir 'phcoder' Serbinenko
9a7428e638 * util/grub-editenv.c (print_var): Rename name to varname to
avoid shadowing.
	(main): Rename index to curindex to avoid shadowing.
	MAke filename a const char *.
2012-02-10 12:28:34 +01:00
Vladimir 'phcoder' Serbinenko
571e140e26 * util/grub-mkstandalone.in: Fix modules directory. 2012-02-09 14:45:56 +01:00
Vladimir 'phcoder' Serbinenko
a9d96eeb21 * util/grub-mkimage.c (image_targets): Set default_compression to lzma
on i386-pc target.
	(argp_parser): Accept "auto" as compression specification.
2012-02-09 14:43:21 +01:00
Vladimir 'phcoder' Serbinenko
d65f6b36de * util/grub-mknetdir.in: Use . rather than source for POSIX
compatibility.
2012-02-08 20:27:46 +01:00
Vladimir 'phcoder' Serbinenko
0a1e473c9b * util/grub-probe.c (main): Fix trailing space in compatibility hint. 2012-02-08 20:23:53 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
b5c1f9bf41 * grub-core/commands/minicmd.c (GRUB_MOD_INIT): Add missing SIZE
argument.
	* util/grub-fstest.c (options): Add missing DEVICE part.
2012-02-05 11:32:11 +01:00
Vladimir 'phcoder' Serbinenko
b525fd834d Clarify and unify messages.
* grub-core/commands/hashsum.c (options): Unify messages.
	* grub-core/commands/keystatus.c (GRUB_MOD_INIT): Don't mark a
	literal-only message as translatable.
	* grub-core/commands/lsacpi.c (GRUB_MOD_INIT): Likewise.
	* grub-core/loader/ia64/efi/linux.c (GRUB_MOD_INIT): Likewise.
	* grub-core/commands/legacycfg.c (GRUB_MOD_INIT): Add quoting around
	commands.
	* grub-core/commands/menuentry.c (options): Clarify that it's a keyboard
	key, not the key used to unlock. Clarify what it's used for.
	* grub-core/kern/emu/hostdisk.c (read_device_map): Unify error message.
	* grub-core/loader/xnu.c (grub_xnu_load_driver): Remove erroneous colon.
	* grub-core/script/main.c (GRUB_MOD_INIT): Clarify [n] to be [NUM].
	* util/grub-editenv.c (options): Unify "verbose" message.
	* util/grub-fstest.c (read_file): Unify error message.
	(fstest): Add quotes around commands.
	(options): Unify "verbose" message.
	* util/grub-install.in: Add quotes around variable name.
	* util/grub-kbdcomp.in: Unify error message.
	* util/grub-mkfont.c (main): Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mklayout.c (options): Unify "verbose" message.
	* util/grub-mkstandalone.in: Unify help and verbose messages.
	* util/grub-mount.c (options): Unify "verbose" message.
	* util/grub-probe.c (options): Likewise.
	* util/grub-script-check.c (options): Likewise.
	* util/grub-setup.c (setup): Unify no-terminator message.
	(options): Use DEVICE and not DEV.
	Unify "verbose" message.
	* util/ieee1275/ofpath.c (xrealpath): Unify error message.
2012-02-05 11:23:47 +01:00
Vladimir 'phcoder' Serbinenko
0ae70393ba Improve and unify messages.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Add argument
	name. All users updated.
	Print filename in error.
	(read_device_map): Print filename in error.
	* util/getroot.c (grub_guess_root_devices): Print filename in error.
	(grub_util_get_os_disk): Likewise.
	(grub_util_biosdisk_get_grub_dev): Likewise.
	(grub_util_check_block_device): Likewise.
	(grub_util_check_char_device): Likewise.
	(grub_make_system_path_relative_to_its_root): Likewise.
	* util/grub-editenv.c (create_envblk_file): Likewise.
	(open_envblk_file): Likewise.
	(write_envblk): Likewise.
	* util/grub-fstest.c (cmd_cp): Likewise.
	(cmd_cat): Likewise.
	(cmd_cmp): Likewise.
	* util/grub-menulst2cfg.c (main): Likewise.
	* util/grub-mkfont.c (write_font_ascii_bitmap): Likewise.
	(write_font_width_spec): Likewise.
	(write_font_pf2): Likewise.
	* util/grub-mkimage.c (generate_image): New argument outname.
	All users updated.
	Remove unreacheable message.
	(options): Unify messages.
	(help_filter): Likewise.
	* util/grub-mklayout.c (usage): Removed (unused).
	(main): Print filename in error.
	* util/grub-mkrescue.in: Fix wrong quoting.
	* util/grub-setup.c (setup): Print filename in error.
	* util/ieee1275/ofpath.c (vendor_is_ATA): Likewise.
	(check_sas): Likewise.
	* util/misc.c (grub_util_get_fp_size): Removed.
	(grub_util_get_image_size): Print filename in error.
	(grub_util_read_at): Removed.
	(grub_util_read_image): Print filename in error.
	(grub_util_load_image): Likewise.
	(grub_util_write_image_at): New argument filename. All users updated.
	Print filename in error.
	(grub_util_write_image): New argument filename. All users updated.
	Print filename in error.
	* util/raid.c (grub_util_raid_getmembers): Print filename in error.
	* util/resolve.c (grub_util_resolve_dependencies): Likewise.
2012-02-05 11:07:33 +01:00
Vladimir 'phcoder' Serbinenko
92cd0f6e45 Move platform-dependent files from $prefix to $prefix/$platform.
* config.h.in (GRUB_TARGET_CPU): New definition.
	(GRUB_PLATFORM): Likewise.
	* configure.ac: Define GRUB_TARGET_CPU and GRUB_PLATFORM.
	* grub-core/commands/parttool.c (grub_cmd_parttool): Update dir.
	* grub-core/efiemu/main.c (grub_efiemu_autocore): Likewise.
	* grub-core/kern/dl.c (grub_dl_load): Likewise.
	* grub-core/normal/autofs.c (read_fs_list): Likewise.
	* grub-core/normal/crypto.c (read_crypto_list): Likewise.
	* grub-core/normal/dyncmd.c (read_command_list): Likewise.
	* grub-core/normal/term.c (read_terminal_list): Likewise.
	* grub-core/gettext/gettext.c (grub_mofile_open_lang): Use
	$prefix/locale.
	(grub_gettext_init_ext): Likewise.
	* grub-core/normal/main.c (GRUB_MOD_INIT): Define grub_cpu and
	grub_platform.
	* util/grub-install.in: Update directories.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
2012-02-04 21:47:29 +01:00
Vladimir 'phcoder' Serbinenko
498453f661 * po/POTFILES.in: Regenerate.
* util/grub-install.in: Gettextize the strings missed in first pass.
2012-02-03 22:52:23 +01:00
Vladimir 'phcoder' Serbinenko
8be63f2ef6 * Makefile.util.def (grub-mkdevicemap): Removed.
* include/grub/emu/hostdisk.h (grub_util_get_os_disk): New proto.
	* include/grub/util/deviceiter.h: Removed.
	* util/deviceiter.c: Likewise.
	* util/getroot.c (grub_util_get_os_disk): New function.
	* util/grub-install.in: Remove grub-mkdevicemap. Use -t disk as
	replacement for EFI.
	* util/grub-mkdevicemap.c: Removed.
	* util/grub-probe.c (probe): Handle PRINT_DISK.
	(argp_parser): Handle -t disk.
2012-02-03 22:36:51 +01:00
Vladimir 'phcoder' Serbinenko
8e1e4e3903 * util/grub-mkfont.c: Migrate to argp.
* util/grub-mklayout.c: Likewise.
	* util/grub-mkpasswd-pbkdf2.c: Likewise.
	* util/grub-mkrelpath.c: Likewise.
	* util/grub-probe.c: Likewise.
	* util/grub-script-check.c: Likewise.
2012-02-03 21:45:43 +01:00
Vladimir 'phcoder' Serbinenko
4459819a52 * util/grub-reboot.in: Add missing datarootdir.
Add missing newline.
	* util/grub-set-default.in: Add missing datarootdir.
	* util/powerpc/ieee1275/grub-mkrescue.in: Add missing newline.
	* util/grub-mkrescue.in: Likewise.
2012-02-03 21:30:05 +01:00
Vladimir 'phcoder' Serbinenko
f65741c7a4 * util/grub.d/30_os-prober.in: Fix TRANSLATORS comment. 2012-02-03 21:25:10 +01:00
Vladimir 'phcoder' Serbinenko
c1a33466d8 * util/grub-kbdcomp.in: Add decent help and gettextize.
* docs/man/grub-kbdcomp.h2m: New file.
2012-02-03 21:22:12 +01:00
Vladimir 'phcoder' Serbinenko
c76899a0ea Migrate grub-mkimage.c to argp.
* Makefile.util.def (grub-mkimage): Add util/argp_common.c.
	(grub-setup): Likewise.
	* util/grub-setup.c (print_version): Move to ...
	* util/argp_common.c (print_version): ... here.
	* util/grub-setup.c (argp_program_version_hook): Move to ...
	* util/argp_common.c (argp_program_version_hook): ... here.
	* util/grub-setup.c (argp_parser): Add exit (1) on fatal error for
	safety.
	* util/grub-mkimage.c (main): Migrate to argp.
2012-02-03 21:18:37 +01:00
Vladimir 'phcoder' Serbinenko
57db0757f4 * util/grub-mkrescue.in: Use same message as
util/powerpc/ieee1275/grub-mkrescue.in with %s in place of command
	for better translations.
2012-02-03 14:45:45 +01:00
Vladimir 'phcoder' Serbinenko
18534ad91e * util/powerpc/ieee1275/grub-mkrescue.in: Gettextize. Unify the command
options with generic grub-mkrescue.in with the goal of future
	merge.
2012-02-03 14:38:39 +01:00
Grégoire Sutre
dc87d45a7a NetBSD disk wedge support. 2012-02-03 12:32:21 +01:00
Mark Wooding
055f856f71 * util/grub-mkconfig.in: Use umask rather than chmod to create
grub.cfg.new to avoid insecure grub.cfg.
2012-02-03 12:15:53 +01:00
Vladimir 'phcoder' Serbinenko
4a9f8346c9 * grub-core/commands/ls.c: Gettextize.
* grub-core/commands/setpci.c: Likewise.
        * grub-core/commands/videotest.c: Likewise.
        * grub-core/disk/geli.c: Likewise.
        * grub-core/kern/mm.c: Likewise.
        * grub-core/lib/relocator.c: Likewise.
        * grub-core/loader/efi/appleloader.c: Likewise.
        * grub-core/loader/i386/xnu.c: Likewise.
        * grub-core/loader/ia64/efi/linux.c: Likewise.
        * grub-core/loader/xnu.c: Likewise.
        * grub-core/net/dns.c: Likewise.
        * grub-core/net/net.c: Likewise.
        * grub-core/script/lexer.c: Likewise.
        * grub-core/script/parser.y: Likewise.
        * grub-core/script/yylex.l: Likewise.
        * util/getroot.c: Likewise.
        * util/grub-setup.c: Likewise.
2012-02-03 11:56:49 +01:00
Vladimir 'phcoder' Serbinenko
a32d5c712d * util/grub-mkstandalone.in: Fix help messages. Gettextize.
* util/grub-install.in: Gettextize.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo
	if not available.
	(grub_warn): Gettextize.
	* util/grub-mknetdir.in: Gettextize.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* po/POTFILES-shell.in: Regenerate.
2012-02-03 11:42:22 +01:00
Richard Laager
69edd81ab7 * util/grub-mkimage.c (main): Fix format-security warning.
* util/grub-mkrelpath.c (main): Likewise.
	* util/grub-probe.c (main): Likewise.
2012-02-03 11:07:18 +01:00
Richard Laager
65f08dbfe0 * util/grub-probe.c (probe): Don't crash on canonicalize_file_name
failure.
	Put back lost PRINT_DRIVE.
2012-02-03 11:02:06 +01:00
Richard Laager
e9084abefd * util/getroot.c (find_root_devices_from_libzfs): Fix compilation error.
(grub_guess_root_devices): Replace strlen with sizeof.
	Avoid crash.
	(find_root_devices_from_poolname): Remove unused variable.
	Handle raidzN.
2012-02-03 10:50:56 +01:00
Vladimir 'phcoder' Serbinenko
cf5f7ee788 Support install on multi-device filesystems.
* include/grub/emu/getroot.h (grub_guess_root_device): Renamed to ...
	(grub_guess_root_devices): ...this. Return char **. All users updated.
	* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo):
	Removed.
	* util/getroot.c (find_root_device_from_libzfs): Moved pool logic to ...
	(find_root_devices_from_poolname): ... here.
	(grub_find_root_devices_from_mountinfo): Return char **. Make static.
	Support zfs-fuse.
	(grub_guess_root_device): Rename to ...
	(grub_guess_root_devices): ... this. Return char **. All users updated.
	* util/grub-install.in: Handle multi-device filesystems.
	* util/grub-probe.c (probe). Make device_names a char **. Add delim
	argument. All users updated.
	Handle multi-device filesystems.
	Use 'delim' as separator.
	Remove device check to allow filesystems on file.
	(main): Support -0 argument. Handle multi-device.
	* util/grub-setup.c (setup): Remove root argument. Handle multi-device.
	Fix a cross-device check while on it.
	(arguments): Remove root_dev.
	(argp_parser): Remove -r.
	(main): Remove root_dev.
2012-02-03 10:35:28 +01:00
Vladimir 'phcoder' Serbinenko
63fe43f3c3 * util/getroot.c (grub_util_get_dm_node_linear_info): Fix memory leak.
* grub-core/disk/cryptodisk.c (cryptodisk_cleanup): Disable for
	now to avoid double free.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_dev): Rename to
	hostdisk.
	* include/grub/disk.h (grub_disk_dev_id): New id HOSTDISK.
	* util/grub-probe.c (escape_of_path): Always return a new copy.
	(print_full_name): Escape path.
	(probe): Don't call grub_util_devname_to_ofpath on NULL.
	Fix hints on abstractions.
2012-01-29 21:49:44 +01:00
Vladimir 'phcoder' Serbinenko
ebe2c96154 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device):
Don't add "root" line if no compatibility hont is available.
	Suggested by: Seth Goldberg.
2012-01-29 20:52:37 +01:00
Vladimir 'phcoder' Serbinenko
c30582ba5d * util/grub-pe2elf.c (ehdr): Make static.
(shdr): Likewise.
	(num_sections): Likewise.
	(offset): Likewise.
2012-01-29 18:53:38 +01:00
Vladimir 'phcoder' Serbinenko
5f47782c29 Eliminate ofpath limits and possible overflows.
* util/ieee1275/ofpath.c (grub_util_info) [STANDALONE]: New function.
	(OF_PATH_MAX): Removed.
	(MAX_DISK_CAT): New const.
	(find_obppath): Use allocated rather than preallocated buffer.
	Return result. Argument of_path removed. All users updated.
	Add missing fdstat.
	(xrealpath): New function.
	(block_device_get_sysfs_path_and_link): Remove sysfs argument.
	Allocate rather than use preallocated buffer. All users updated.
	(__of_path_common): Use allocated rather than preallocatecd buffer.
	Return result. Argument of_path removed. All users updated.
	(vendor_is_ATA): Read only needed part form the file.
	(check_sas): Allocate depending on contents rather than fixed.
	(main) [STANDALONE]: Handle NULL result.
2012-01-29 18:51:21 +01:00
Vladimir 'phcoder' Serbinenko
076e7c0fda Merge common RAID and LVM logic to an abstract diskfilter.
Add LDM support using the same framework.

	* Makefile.util.def (libgrubkern): Add grub-core/disk/ldm.c,
	grub-core/disk/diskfilter.c and grub-core/partmap/gpt.c.
	(libgrubmods): Remove grub-core/disk/raid.c and
	grub-core/partmap/gpt.c.
	* grub-core/Makefile.core.def (ldm): New module.
	(raid): Renamed to diskfilter. All users updated.
	* grub-core/disk/raid.c: Moved to ...
	* grub-core/disk/diskfilter.c: ... here.
	* grub-core/disk/diskfilter.c: Rename grub_raid_ to grub_diskfilter_.
	(lv_num): New var.
	(find_array): Renamed to ...
	(find_lv): ... this. Support multi-LV. Skip nameless LVs
	(grub_is_array_readable): Renamed to ...
	(grub_is_lv_readable): ... this. Support multinode hierarchy.
	(insert_array): New argument id.
	(is_node_readable): New function.
	(scan_device): Rename to ...
	(scan_disk): .. this. Restrict to one disk.
	(scan_devices): New function.
	(grub_diskfilter_iterate): Support multi-LV.
	Skip invisible and nameless LVs.
	(grub_diskfilter_memberlist): Support multi-LV.
	(grub_diskfilter_read_node): New function.
	(grub_raid_read): Most of logic moved to ...
	(read_segment): ... here
	(read_lv): New function.
	(grub_diskfilter_get_vg_by_uuid): New function.
	(grub_diskfilter_make_raid): Likewise.
	* grub-core/disk/ldm.c: New file.
	* grub-core/disk/lvm.c (vg_list): Removed.
	(lv_count): Likewise.
	(scan_depth): Likewise.
	(is_lv_readable): Likewise.
	(grub_lvm_getvalue): Advance pointer past the number.
	(find_lv): Removed.
	(do_lvm_scan): Refactored into ...
	(grub_lvm_detect): ... this. Support raid.
	(grub_lvm_iterate): Removed.
	(grub_lvm_memberlist): Likewise.
	(grub_lvm_open): Likewise.
	(grub_lvm_close): Likewise.
	(read_lv): Likewise.
	(read_node): Likewise.
	(is_node_readable): Likewise.
	(is_lv_readable): Likewise.
	(grub_lvm_read): Likewise.
	(grub_lvm_write): Likewise.
	(grub_lvm_dev): Use diskfilter
	(GRUB_MOD_INIT): Likewise.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Use
	new interface.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Likewise.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
	* grub-core/disk/raid5_recover.c (grub_raid5_recover): Use
	grub_diskfilter_read_node.
	Fix a bug with xor.
	* grub-core/disk/raid6_recover.c (grub_raid6_recover): Use
	grub_diskfilter_read_node.
	Support GRUB_RAID_LAYOUT_MUL_FROM_POS.
	* grub-core/kern/disk.c (grub_disk_dev_list): Make global.
	(grub_disk_dev_iterate): Move from here...
	* include/grub/disk.h (grub_disk_dev_iterate): ... to here. Inlined.
	* grub-core/kern/emu/hostdisk.c (grub_hostdisk_find_partition_start):
	Make global.
	(grub_hostdisk_find_partition_start): Likewise.
	(grub_hostdisk_os_dev_to_grub_drive): New function.
	(grub_util_biosdisk_get_osdev): Check that disk is biosdisk.
	* grub-core/kern/emu/hostdisk.c (make_device_name): Move to ...
	* util/getroot.c (make_device_name): ... here.
	* grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info):
	Move to ...
	* util/getroot.c (grub_util_get_dm_node_linear_info): ...here.
	* grub-core/kern/emu/hostdisk.c
	(convert_system_partition_to_system_disk): Move to ...
	* util/getroot.c (convert_system_partition_to_system_disk): ...here.
	* grub-core/kern/emu/hostdisk.c (device_is_wholedisk): Move to ...
	* util/getroot.c (device_is_wholedisk): ... here.
	* grub-core/kern/emu/hostdisk.c (find_system_device): Move to ...
	* util/getroot.c (find_system_device): ... here.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_present):
	Move to ...
	* util/getroot.c (grub_util_biosdisk_is_present): ...here.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev):
	Move to ...
	* util/getroot.c (grub_util_biosdisk_get_grub_dev): ... here.
	Handle LDM.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
	Move to ...
	* util/getroot.c (grub_util_biosdisk_is_floppy): ... here.
	* grub-core/partmap/gpt.c (grub_gpt_partition_map_iterate): Made global.
	* include/grub/disk.h (grub_disk_dev_id): Replaced RAID and LVM with
	DISKFILTER.
	* include/grub/raid.h: Renamed to ...
	* include/grub/diskfilter.h: ... this.
	* include/grub/diskfilter.h: Rename grub_raid_* to grub_diskfilter_*
	(GRUB_RAID_LAYOUT_*): Make into array.
	(GRUB_RAID_LAYOUT_MUL_FROM_POS): New value.
	(grub_diskfilter_vg): New struct.
	(grub_diskfilter_pv_id): Likewise.
	(grub_raid_member): Removed.
	(grub_raid_array): Likewise.
	(grub_diskfilter_pv): New struct.
	(grub_diskfilter_lv): Likewise.
	(grub_diskfilter_segment): Likewise.
	(grub_diskfilter_node): Likewise.
	(grub_diskfilter_get_vg_by_uuid): New proto.
	(grub_raid_register): Inline.
	(grub_diskfilter_unregister): Likewise.
	(grub_diskfilter_make_raid): New proto.
	(grub_diskfilter_vg_register): Likewise.
	(grub_diskfilter_read_node): Likewise.
	(grub_diskfilter_get_pv_from_disk) [GRUB_UTIL]: Likewise.
	* include/grub/emu/hostdisk.h (grub_util_get_ldm): New proto.
	(grub_util_is_ldm): Likewise.
	(grub_util_ldm_embed) [GRUB_UTIL]: Likewise.
	(grub_hostdisk_find_partition_start): Likewise.
	(grub_hostdisk_os_dev_to_grub_drive): Likewise.
	* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_LDM):
	New definition.
	(grub_gpt_partition_map_iterate): New proto.
	* include/grub/lvm.h (grub_lvm_vg): Removed.
	(grub_lvm_pv): Likewise.
	(grub_lvm_lv): Likewise.
	(grub_lvm_segment): Likewise.
	(grub_lvm_node): Likewise.
	* util/getroot.c [...]
	* util/grub-probe.c (probe_raid_level): Handle diskfilter.
	(probe_abstraction): Likewise.
	* util/grub-setup.c (setup): Remove must_embed. Support LDM.
	(main): Remove dead logic.
2012-01-29 14:28:01 +01:00
Vladimir 'phcoder' Serbinenko
692dabca8c * util/grub-install.in: Add missing \.
Reported by: gentoofan
2012-01-27 13:12:00 +01:00
Vladimir 'phcoder' Serbinenko
9e88df393a * util/grub-install.in: Fix an ARC bug.
Print a warning if no platform-specific setup is available.
2012-01-25 15:06:27 +01:00
Vladimir 'phcoder' Serbinenko
2e13ede59e Eliminate fixed limit on reed solomon decoder length.
* grub-core/boot/i386/pc/lnxboot.S: Scan for multiboot signature
	rather than hardcoding the address.
	* grub-core/boot/i386/pc/startup_raw.S: Add new data field
	no_reed_solomon_length.
	Move gate_a20 to no-reed-solomon part.
	Don't force a particular size of no reed-solomon part.
	* include/grub/offsets.h (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART):
	Removed.
	(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH): New define.
	* util/grub-setup.c (setup): Read no_rs_length from the image itself.
2012-01-24 14:39:29 +01:00
Vladimir 'phcoder' Serbinenko
87edb8940a Replace single-linked with double-linked lists. It results in more
compact and more efficient code.

	* grub-core/kern/list.c (grub_list_push): Moved from here ...
	* include/grub/list.h (grub_list_push): ... to here. Set prev.
	(grub_list_remove): Moved from here ...
	* include/grub/list.h (grub_list_remove): ... here. Use and set prev.
	(grub_prio_list_insert): Set prev.
	* include/grub/list.h (grub_list): Add prev. All users updated.
2012-01-24 13:31:12 +01:00
Vladimir 'phcoder' Serbinenko
48b391e9ab Handle newer autotools. Add some missing quotes while on it.
* Makefile.am (pkglib_DATA): Remove update-grub_lib.
	(pkglib_DATA): Move grub-mkconfig_lib from here ...
	(pkgdata_DATA): ... here.
	* Makefile.util.def (update-grub_lib): Removed.
	* conf/Makefile.common (pkglib_DATA): Removed.
	(pkglib_SCRIPTS): Likewise.
	(pkgdata_DATA): New variable.
	* tests/util/grub-shell-tester.in: Replace pkglib with pkgdata where
	needed.
	Add missing quotes.
	Remove unused variable while on it.
	* tests/util/grub-shell.in: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/update-grub_lib.in: Removed.
2012-01-24 13:17:36 +01:00
Paulo de Rezende Pinatti
668327923f * util/grub-install.in: Support dd'in into PreP partition.
* util/grub-probe.c (probe): Support discovering partition type.
	(main): Support -t msdos_parttype.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>

	Also-By: pfsmorigo <>
2012-01-23 19:33:40 +01:00
Vladimir 'phcoder' Serbinenko
3c76ea0c2c * util/grub.d/30_os-prober.in: Fix occurence of grub-probe instead of
grub_probe.
	Reported by: adamwill
2012-01-13 13:54:24 +01:00
Vladimir 'phcoder' Serbinenko
5da8dbc5bc * include/grub/unicode.h (grub_unicode_compact_range): Replace end with
len and make it smaller. All users updated.
	* util/import_unicode.py: Put length and not end character.
	Check length.
2011-12-25 16:03:42 +01:00
Vladimir 'phcoder' Serbinenko
a141ef409f Put recheck back 2011-12-24 13:37:28 +01:00
Vladimir 'phcoder' Serbinenko
93d0a00116 Fix IEEE1275 bugs in grub-probe 2011-12-24 02:54:28 +01:00
Vladimir 'phcoder' Serbinenko
2b5c1a0810 merge mainline into hints 2011-12-24 02:52:43 +01:00
Vladimir 'phcoder' Serbinenko
e77e325f6f * util/grub-install.in: Account for possible escaped comma in device
name.
2011-12-24 02:50:30 +01:00
Vladimir 'phcoder' Serbinenko
165099ea42 * util/ieee1275/ofpath.c (of_path_of_ide): Fix address for secondary
channel.
2011-12-24 02:46:47 +01:00
Vladimir 'phcoder' Serbinenko
2980502850 Fix few bugs and memory leaks 2011-12-23 19:25:24 +01:00
Vladimir 'phcoder' Serbinenko
17785932df merge mainline into hints 2011-12-23 18:49:00 +01:00
Vladimir 'phcoder' Serbinenko
6babad5e59 Initial integration of hints 2011-12-23 18:19:16 +01:00
Lukas Anzinger
a6120aca2e * util/grub-mkconfig_lib.in (version_test_gt): Fix variable names. 2011-12-23 12:01:25 +01:00
Vladimir 'phcoder' Serbinenko
b87f7ef26b * util/getroot.c (ESCAPED_PATH_MAX): New define.
(mountinfo_entry): Increase the field size to take escaping into
	account.
	(find_root_device_from_libzfs): Add one byte to size of strings for
	security.
2011-12-23 11:36:31 +01:00
Vladimir 'phcoder' Serbinenko
31355584f1 * grub-core/lib/reed_solomon.c (grub_reed_solomon_add_redundancy): Add
an assert.
	* util/grub-setup.c (setup): Likewise.
2011-12-23 10:23:41 +01:00
Keshav P R
86717cbe08 * util/grub-mkstandalone.in: Fix minor typo errors. 2011-12-22 13:05:19 +01:00
Vladimir 'phcoder' Serbinenko
c17e546cca * util/import_gcry.py: Skip _gcry_rmd160_mixblock and serpent_test. We
don't use them.
2011-12-15 20:33:32 +01:00
Vladimir 'phcoder' Serbinenko
ff6b18b618 * util/import_gcry.py: Don't add include camellia.h to camellia.c. It's
already there.
2011-12-15 20:32:02 +01:00
Vladimir 'phcoder' Serbinenko
70ffcc93ee * util/grub-mkimage.c (generate_image): Clean multiboot header to avoid
confusing ipxe.
2011-12-15 20:29:30 +01:00
Vladimir 'phcoder' Serbinenko
5ef5c51147 * util/grub-mkimage.c (generate_image): Decrease the higher limit
because of stack.
	* util/grub-setup.c (setup): Don't add redundancy past the higher load
	limit.
2011-12-15 19:39:41 +01:00
Colin Watson
112b483765 * util/getroot.c (find_root_device_from_libzfs): Use xasprintf. 2011-11-28 01:10:00 +00:00
Robert Millan
fd258e5cce 2011-11-25 Robert Millan <rmh@gnu.org>
* util/getroot.c [HAVE_LIMITS_H]: Include `<limits.h>'.
        (find_root_device_from_libzfs): Add zpool output parser to be used
        as fallback when libzfs isn't available.
2011-11-25 23:07:33 +01:00
Vladimir 'phcoder' Serbinenko
bc108a4a8a * util/grub-mount.c (argp_parser): Accept relative pathes.
* util/grub-fstest.c (argp_parser): Likewise.
2011-11-13 19:53:12 +01:00
Vladimir 'phcoder' Serbinenko
9edd7be26a Fix spaces handling in proc/self/mountinfo.
* util/getroot.c (unescape): New function.
	(grub_find_root_device_from_mountinfo): Use unescape.
2011-11-12 23:14:51 +01:00
Vladimir 'phcoder' Serbinenko
aa94b87027 Fix MIPS compilation.
* grub-core/boot/mips/startup_raw.S: Use GRUB_DECOMPRESSOR_*
	* include/grub/offsets.h: Rename decompressor fields from
	GRUB_KERNEL_* to GRUB_DECOMPRESSOR_*.
	* util/grub-mkimage.c (image_targets): Use new names.
2011-11-12 21:38:04 +01:00
Vladimir 'phcoder' Serbinenko
5fbdac149b Defer multiboot device parsing until we're in compressed part.
* grub-core/boot/i386/pc/lnxboot.S: Remove setting dos_part and
	bsd_part. setdevice has fallen into disuse.
	* grub-core/boot/i386/pc/startup_raw.S (dos_part): Removed.
	(bsd_part): Likewise.
	(boot_dev): New variable.
	(multiboot_trampoline): Don't parse multiboot device.
	Pass multiboot device in %edx.
	* grub-core/disk/i386/pc/biosdisk.c (GRUB_MOD_INIT): Parse
	grub_boot_device.
	* grub-core/kern/i386/pc/init.c (grub_machine_get_bootlocation):
	Likewise.
	* grub-core/kern/i386/pc/startup.S: Save edx.
	(grub_boot_drive): Removed.
	(grub_install_dos_part): Likewise.
	(grub_install_bsd_part): Likewise.
	(grub_boot_device): New variable.
	* include/grub/i386/pc/kernel.h (grub_install_dos_part): Removed.
	(grub_install_bsd_part): Likewise.
	(grub_boot_drive): Likewise.
	(grub_boot_device): New variable.
	* include/grub/offsets.h (GRUB_KERNEL_I386_PC_INSTALL_DOS_PART):
	Removed.
	(GRUB_KERNEL_I386_PC_INSTALL_BSD_PART): Likewise.
	(GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY): Moved lower.
	(GRUB_KERNEL_MACHINE_INSTALL_BSD_PART): Removed.
	(GRUB_KERNEL_MACHINE_INSTALL_DOS_PART): Likewise.
	* util/grub-install.in: Remove redundant condition.
2011-11-12 21:12:52 +01:00
Vladimir 'phcoder' Serbinenko
60240b8bc1 Use decompressors framework on i386-pc. It increases core size
by 46 bytes but improves compatibility and maintainability.

	* grub-core/Makefile.core.def (lzma_decompress): New image.
	(kernel): Add i386_pc_ldflags.
	* grub-core/kern/i386/pc/startup.S: Move intial part to ..
	* grub-core/boot/i386/pc/startup_raw.S: ... here. Pass pointers
	to real_to_prot, prot_to_real and device info.
	* include/grub/offsets.h: Renamed decompressor offsets.
	* util/grub-mkimage.c (grub_compression_t): New cmpression lzma.
	(image_target_desc): Remove raw_size and rename decompressor fields.
	(compress_kernel): Handle lzma.
	(generate_image): Handle decompressors on i386-pc.
2011-11-12 19:53:25 +01:00
Vladimir 'phcoder' Serbinenko
ae60d685fa fill attr on readdir 2011-11-12 01:20:23 +01:00
Vladimir 'phcoder' Serbinenko
d8e62bbeb9 gettextize 2011-11-12 01:19:06 +01:00
Vladimir 'phcoder' Serbinenko
f1f233ba43 Add crypto support to grub-mount 2011-11-12 00:56:20 +01:00
Vladimir 'phcoder' Serbinenko
b93f1278a3 merge mainline into fuse 2011-11-12 00:42:18 +01:00
Vladimir 'phcoder' Serbinenko
10f0117bf9 * grub-core/commands/efi/fixvideo.c: Gettextize.
* grub-core/commands/hashsum.c: Likewise.
	* grub-core/commands/i386/cmostest.c: Likewise.
	* grub-core/commands/i386/pc/drivemap.c: Likewise.
	* grub-core/commands/i386/pc/lsapm.c: Likewise.
	* grub-core/commands/i386/pc/sendkey.c: Likewise.
	* grub-core/commands/lsmmap.c: Likewise.
	* grub-core/commands/menuentry.c: Likewise.
	* grub-core/commands/mips/loongson/lsspd.c: Likewise.
	* grub-core/commands/setpci.c: Likewise.
	* grub-core/loader/i386/bsd.c: Likewise.
	* grub-core/loader/i386/linux.c: Likewise.
	* util/getroot.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/grub-fstest.c: Likewise.
	* util/grub-mkfont.c: Likewise.
	* util/grub-mkimage.c: Likewise.
	* util/grub-mkpasswd-pbkdf2.c: Likewise.
	* util/grub-pe2elf.c: Likewise.
	* util/grub-probe.c: Likewise.
	* util/grub-setup.c: Likewise.
	* util/ieee1275/ofpath.c: Likewise.
	* util/misc.c: Likewise.
	* util/raid.c: Likewise.
2011-11-12 00:34:14 +01:00
Robert Millan
566f779bd8 2011-11-11 Robert Millan <rmh@gnu.org>
* util/getroot.c (grub_util_get_geom_abstraction): Remove
        __attribute__((unused)) from `os_dev', which *is* being used.
2011-11-11 22:58:18 +01:00
Vladimir 'phcoder' Serbinenko
6e0632e28c * grub-core/commands/acpihalt.c: Gettextized.
* grub-core/commands/cacheinfo.c: Likewise.
	* grub-core/commands/cmp.c: Likewise.
	* grub-core/commands/efi/loadbios.c: Likewise.
	* grub-core/commands/gptsync.c: Likewise.
	* grub-core/commands/ieee1275/suspend.c: Likewise.
	* grub-core/commands/legacycfg.c: Likewise.
	* grub-core/commands/memrw.c: Likewise.
	* grub-core/commands/minicmd.c: Likewise.
	* grub-core/commands/parttool.c: Likewise.
	* grub-core/commands/time.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/disk/geli.c: Likewise.
	* grub-core/disk/i386/pc/biosdisk.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
	* grub-core/disk/lvm.c: Likewise.
	* grub-core/font/font_cmd.c: Likewise.
	* grub-core/fs/zfs/zfscrypt.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	* grub-core/gfxmenu/view.c: Likewise.
	* grub-core/kern/emu/hostdisk.c: Likewise.
	* grub-core/kern/emu/main.c: Likewise.
	* grub-core/kern/emu/misc.c: Likewise.
	* grub-core/kern/emu/mm.c: Likewise.
	* grub-core/kern/mips/arc/init.c: Likewise.
	* grub-core/kern/mips/loongson/init.c: Likewise.
	* grub-core/kern/partition.c: Likewise.
	* grub-core/lib/i386/halt.c: Likewise.
	* grub-core/lib/mips/arc/reboot.c: Likewise.
	* grub-core/lib/mips/loongson/reboot.c: Likewise.
	* grub-core/loader/i386/pc/chainloader.c: Likewise.
	* grub-core/loader/i386/xnu.c: Likewise.
	* grub-core/loader/multiboot.c: Likewise.
	* grub-core/net/bootp.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/normal/term.c: Likewise.
	* grub-core/partmap/bsdlabel.c: Likewise.
	* grub-core/parttool/msdospart.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/video/i386/pc/vbe.c: Likewise.
	* util/grub-menulst2cfg.c: Likewise.
	* util/grub-mkdevicemap.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-mkrelpath.c: Likewise.
	* util/grub-script-check.c: Likewise.
	* util/ieee1275/grub-ofpathname.c: Likewise.
	* util/resolve.c: Likewise.
2011-11-11 21:44:56 +01:00
Vladimir 'phcoder' Serbinenko
5b289bc5f6 * util/grub-macho2img.c: Add comment concerning gettext.
* grub-core/lib/legacy_parse.c: Likewise.
2011-11-11 20:52:41 +01:00
Vladimir 'phcoder' Serbinenko
c3591189b8 Remove local keyword.
* util/grub-mkconfig_lib.in (version_test_numeric): Remove local.
	(version_test_gt): Likewise.
	(version_find_latest): Likewise.
	(gettext_printf): Likewise.
	* util/grub.d/10_windows.in (get_os_name_from_boot_ini): Likewise.
2011-11-10 08:46:09 +01:00
Vladimir 'phcoder' Serbinenko
8a5a3a5b5a Fix several memory leaks.
* grub-core/fs/btrfs.c (grub_btrfs_dir): Fix memory leak.
	* grub-core/fs/cpio.c (grub_cpio_find_file): Likewise.
	(grub_cpio_dir): Likewise.
	* grub-core/fs/fat.c (grub_fat_label): Likewise.
	* grub-core/fs/jfs.c (grub_jfs_label): Likewise.
	* grub-core/fs/romfs.c (grub_romfs_close): Likewise.
	(grub_romfs_label): Likewise.
	* grub-core/fs/squash4.c (squash_mount): Use zalloc for safety.
	(squash_unmount): New function.
	(grub_squash_dir): Fix memory leak.
	(grub_squash_open): Likewise.
	(grub_squash_read): Likewise.
	(grub_squash_mtime): Likewise.
	* grub-core/fs/xfs.c (grub_xfs_open): Likewise.
	* grub-core/fs/zfs/zfs.c (check_pool_label): Likewise.
	* util/grub-fstest.c (fstest): Likewise.
2011-11-09 15:01:58 +01:00
Vladimir 'phcoder' Serbinenko
27610c3836 Fix FreeBSD compilation.
* grub-core/disk/geli.c (GRUB_MD_SHA256) [GRUB_UTIL]: Redefine in a way
	to avoid circular dependency.
	(GRUB_MD_SHA512) [GRUB_UTIL]: Likewise.
	* util/getroot.c (grub_util_follow_gpart_up): Move from here...
	* grub-core/kern/emu/hostdisk.c (+grub_util_follow_gpart_up): ... here.
2011-11-08 19:34:19 +01:00
Vladimir 'phcoder' Serbinenko
62ee9685a4 Merge mainline into fuse 2011-11-08 16:34:35 +01:00
Vladimir 'phcoder' Serbinenko
958ee22168 Illumos support.
* Makefile.util.def (10_illumos): New script.
	* configure.ac: Set COND_HOST_ILLUMOS.
	* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__sun__]:
	Support Illumos calls.
	(find_partition_start) [__sun__]: Likewise.
	(convert_system_partition_to_system_disk) [__sun__]: Likewise.
	(device_is_wholedisk) [__sun__]: Handle Illumos naming scheme.
	(grub_util_biosdisk_get_grub_dev) [__sun__]: Handle Illumos.
	* util/getroot.c (find_root_device_from_libzfs) [__sun__]: Return raw
	device.
	* util/grub-probe.c (probe) [__sun__]: Do character check.
	* util/grub.d/10_illumos.in: New file.
2011-11-08 12:38:30 +01:00
Vladimir 'phcoder' Serbinenko
78e08dc3cb * util/grub.d/10_kfreebsd.in: Use ${grub_mkrelpath} not grub-mkrelpath. 2011-11-08 12:06:27 +01:00
Vladimir 'phcoder' Serbinenko
ed746949af ZFS passphrase support 2011-11-06 16:30:52 +01:00
Vladimir 'phcoder' Serbinenko
2cdc899567 ZFS crypto key adding 2011-11-06 14:44:29 +01:00
Vladimir 'phcoder' Serbinenko
c7ba4f6984 Support BtrFS embedding.
* grub-core/fs/btrfs.c (grub_btrfs_embed) [GRUB_UTIL]: New function.
	(grub_btrfs_fs) [GRUB_UTIL]: Set embed.
	* include/grub/fs.h (grub_fs) [GRUB_UTIL]: New field embed.
	* util/grub-setup.c (setup): Use fs embedding if available.
	Add additional sanity check.
2011-11-05 14:47:25 +01:00
Vladimir 'phcoder' Serbinenko
455377d93d * util/grub-install.in: Fix condition for config_opt. 2011-11-05 12:15:07 +01:00
Philipp Matthias Hahn
182c872a7b * util/grub-mkrescue.in: Fix handling xorriso option. 2011-11-03 16:49:02 +01:00
crocket
9cc3581d7d * util/grub.d/10_linux.in: Add Slackware initrd naming. 2011-11-03 15:21:47 +01:00
Vladimir 'phcoder' Serbinenko
158dc1ea26 XZ CRC64 and SHA256 support.
* Makefile.util.def (libgrubmods): Add crc64.c.
	* grub-core/Makefile.core.def (crc64): New module.
	* grub-core/lib/crc64.c: New file.
	* grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_hash)
	[!GRUB_EMBED_DECOMPRESSOR]: Rename crc32_context to hash_context.
	Fix the type.
	(MAX_HASH_SIZE): New define.
	(xz_dec) [!GRUB_EMBED_DECOMPRESSOR]: Add generic hash fields.
	(dec_block) [!GRUB_EMBED_DECOMPRESSOR]: Handle non-crc32 hashes.
	(index_update) [!GRUB_EMBED_DECOMPRESSOR]: Likewise.
	(dec_index) [!GRUB_EMBED_DECOMPRESSOR]: Likewise.
	(crc32_validate) [!GRUB_EMBED_DECOMPRESSOR]: Rename to ...
	(hash_validate) [!GRUB_EMBED_DECOMPRESSOR]: ... this.
	Handle non-crc32 hashes.
	(hashes) [!GRUB_EMBED_DECOMPRESSOR]: New variable.
	(dec_stream_header): Handle non-crc32 hashes.
	(dec_stream_footer): Likewise.
	(dec_block_header): Likewise.
	(dec_main): Likewise.
	(xz_dec_init): Likewise.
	(xz_dec_reset): Likewise.
	(xz_dec_end): Likewise.
	* util/import_gcry.py: Add CRC64 line.
2011-11-03 15:13:30 +01:00
Vladimir 'phcoder' Serbinenko
42b2a706bf * util/grub-fstest.c (cmd_cp): Clarify error message.
(cmd_cmp): Likewise.
2011-10-30 13:18:22 +01:00
Vladimir 'phcoder' Serbinenko
3be82e10a9 fstest xnu_uuid subcommand.
* grub-core/commands/xnu_uuid.c (libgrubkrn): Add
	grub-core/commands/xnu_uuid.c.
	* util/grub-fstest.c (CMD_XNU_UUID): New enum value.
	(fstest): Handle xnu_uuid.
	(options): Document xnu_uuid.
	(argp_parser): Parse xnu_uuid.
2011-10-27 02:58:32 +02:00
Vladimir 'phcoder' Serbinenko
11e50e923a merge mainline into zfs 2011-10-26 19:26:24 +02:00
Vladimir 'phcoder' Serbinenko
534d769e57 * util/import_gcry.py: Automatically fix camellia.c and camellia.h. 2011-10-23 23:40:53 +02:00
Vladimir 'phcoder' Serbinenko
e084ba1895 * util/import_gcry.py: Accept space between # and include. 2011-10-23 23:39:00 +02:00
Vladimir 'phcoder' Serbinenko
18c575e5c5 * util/grub-setup.c: Add missing include. 2011-10-23 23:22:38 +02:00
Vladimir 'phcoder' Serbinenko
f8bc22a832 * util/ieee1275/grub-ofpathname.c: Add missing include. 2011-10-23 23:20:11 +02:00
Vladimir 'phcoder' Serbinenko
7a5c54a437 * util/grub-install.in: Add datarootdir as per automake manual
suggestion.
	* util/grub-mknetdir.in: Likewise.
2011-10-23 22:53:21 +02:00
Vladimir 'phcoder' Serbinenko
7bec1053db * util/grub.d/10_hurd.in: Add datarootdir as per automake manual
suggestion.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
2011-10-23 22:40:26 +02:00
Vladimir 'phcoder' Serbinenko
766f7d0809 Remove redundant grub_kernel_image_size.
* grub-core/kern/i386/coreboot/init.c (grub_machine_init): Use
	_edata and _start.
	* grub-core/kern/i386/coreboot/startup.S: Move multiboot header after
	the small code. It moves it only by few bytes but simplifies the code.
	* grub-core/kern/i386/pc/init.c (grub_machine_init): Use _edata and
	_start.
	* grub-core/kern/i386/pc/startup.S: Use _edata and _start.
	(grub_kernel_image_size): Removed.
	* grub-core/kern/i386/qemu/startup.S: Use _edata and _start.
	(grub_kernel_image_size): Removed.
	[APPLE_CC]: Remove apple compiler support. i386-qemu port can't be
	compiled with Apple toolchain.
	* grub-core/kern/sparc64/ieee1275/crt0.S: Remove leftover fields.
	* include/grub/i386/pc/kernel.h (grub_kernel_image_size): Removed.
	* include/grub/i386/qemu/kernel.h (grub_kernel_image_size): Removed.
	(grub_total_module_size): Likewise.
	* include/grub/offsets.h (GRUB_KERNEL_I386_PC_KERNEL_IMAGE_SIZE):
	Removed.
	(GRUB_KERNEL_I386_PC_COMPRESSED_SIZE): Put it lower.
	(GRUB_KERNEL_I386_PC_INSTALL_DOS_PART): Likewise.
	(GRUB_KERNEL_I386_PC_INSTALL_BSD_PART): Likewise.
	(GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY): Likewise.
	(GRUB_KERNEL_I386_QEMU_KERNEL_IMAGE_SIZE): Removed.
	(GRUB_KERNEL_SPARC64_IEEE1275_KERNEL_IMAGE_SIZE): Likewise.
	(GRUB_KERNEL_SPARC64_IEEE1275_COMPRESSED_SIZE): Likewise.
	* include/grub/sparc64/ieee1275/kernel.h (grub_kernel_image_size):
	Removed.
	(grub_total_module_size): Removed.
	* util/grub-mkimage.c (image_target_desc): Remove image_size.
	(image_targets): Likewise.
	Set .compressed_size to no field on sparc.
	(generate_image): Remove kernel_image_size handling.
2011-10-20 08:13:00 +02:00
Vladimir 'phcoder' Serbinenko
e55599dcbf * util/grub-install.in: Declare IEEE1275 as able to find out the disk
name.
2011-10-19 20:35:41 +02:00
Vladimir 'phcoder' Serbinenko
a97501d238 Make grub_prefix into module to fix the arbitrary limit and save
some space.

	* grub-core/kern/emu/main.c (grub_prefix): Removed.
	* grub-core/kern/i386/coreboot/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/efi/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/ieee1275/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/pc/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/qemu/startup.S (grub_prefix): Likewise.
	* grub-core/kern/ia64/efi/startup.S (grub_prefix): Likewise.
	* grub-core/kern/mips/startup.S (grub_prefix): Likewise.
	* grub-core/kern/powerpc/ieee1275/startup.S (grub_prefix): Likewise.
	* grub-core/kern/sparc64/ieee1275/crt0.S (grub_prefix): Likewise.
	* grub-core/kern/x86_64/efi/startup.S (grub_prefix): Likewise.
	* include/grub/ia64/efi/kernel.h: Removed.
	* include/grub/kernel.h: New module type OBJ_TYPE_PREFIX.
	(grub_prefix): Removed.
	* include/grub/offsets.h (GRUB_KERNEL_I386_PC_PREFIX): Removed.
	(GRUB_KERNEL_I386_PC_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_QEMU_PREFIX): Likewise.
	(GRUB_KERNEL_I386_QEMU_PREFIX_END): Likewise.
	(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX): Likewise.
	(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX_END): Likewise.
	(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX): Likewise.
	(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_LOONGSON_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_LOONGSON_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_EFI_PREFIX): Likewise.
	(GRUB_KERNEL_I386_EFI_PREFIX_END): Likewise.
	(GRUB_KERNEL_IA64_EFI_PREFIX): Likewise.
	(GRUB_KERNEL_IA64_EFI_PREFIX_END): Likewise.
	(GRUB_KERNEL_X86_64_EFI_PREFIX): Likewise.
	(GRUB_KERNEL_X86_64_EFI_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_COREBOOT_PREFIX): Likewise.
	(GRUB_KERNEL_I386_COREBOOT_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_MULTIBOOT_PREFIX): Likewise.
	(GRUB_KERNEL_I386_MULTIBOOT_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_IEEE1275_PREFIX): Likewise.
	(GRUB_KERNEL_I386_IEEE1275_PREFIX_END): Likewise.
	(GRUB_KERNEL_MACHINE_PREFIX): Likewise.
	(GRUB_KERNEL_MACHINE_PREFIX_END): Likewise.
	* grub-core/kern/main.c (grub_set_prefix_and_root): Retrieve grub_prefix
	from module.
	* util/grub-mkimage.c (image_target_desc): Removed prefix and
	prefix_end.
	(image_targets): Likewise.
	(generate_image): Put prefix as a module.
2011-10-18 15:21:51 +02:00
Vladimir 'phcoder' Serbinenko
177b960ea4 Fix python 3.x incompatibilities.
* gentpl.py: Put brackets around print strings.
	* util/import_gcry.py: Open explicitly as utf-8.
	Use in instead of has_key.
2011-10-16 11:53:27 +02:00
Robert Millan
8bcebcb8e4 2011-10-15 Robert Millan <rmh@gnu.org>
* util/getroot.c (grub_util_get_grub_dev): Fix OS selection #ifdefs.
2011-10-15 18:37:55 +02:00
Robert Millan
0017e5ef84 2011-10-15 Robert Millan <rmh@gnu.org>
Fix build problem on FreeBSD and GNU/kFreeBSD.

        * util/getroot.c [__FreeBSD_kernel__]: Include `<sys/mount.h>'.
2011-10-15 13:33:41 +02:00
Robert Millan
a98f4a0808 2011-10-09 Robert Millan <rmh@gnu.org>
LVM support for FreeBSD and GNU/kFreeBSD.

        * util/lvm.c (grub_util_lvm_isvolume): Enable on FreeBSD and
        GNU/kFreeBSD.
        (LVM_DEV_MAPPER_STRING): Move from here ...
        * include/grub/util/lvm.h (LVM_DEV_MAPPER_STRING): ... to here.
        * util/getroot.c: Include `<grub/util/lvm.h>'.
        (grub_util_get_dev_abstraction): Enable
        grub_util_biosdisk_is_present() on FreeBSD and GNU/kFreeBSD.
        Check for LVM abstraction on FreeBSD and GNU/kFreeBSD.
        (grub_util_get_grub_dev): Replace "/dev/mapper/" with
        `LVM_DEV_MAPPER_STRING'.  Enable LVM and mdRAID only on platforms that
        support it.
        * util/grub-setup.c (main): Check for LVM also on FreeBSD and
        GNU/kFreeBSD.
        * util/grub.d/10_kfreebsd.in: Load `geom_linux_lvm' kernel module
        when LVM abstraction is required for ${GRUB_DEVICE}.
2011-10-09 21:13:00 +02:00
Szymon Janc
709e61a55f merge trunk 2011-10-04 20:21:12 +02:00
Mario Limonciello
d1ab689de8 * util/misc.c (grub_util_get_disk_size) [__MINGW32__]: Strip trailing
slashes on PHYSICALDRIVE%d paths when making Windows CreateFile calls.
2011-09-29 10:39:44 +02:00
Mario Limonciello
cca7ccd8ff Remove extra declaration of sleep for mingw32.
* util/misc.c (sleep) [__MINGW32__]: Removed.
	* include/grub/util/misc.h (sleep) [__MINGW32__]: Likewise.
2011-09-29 10:32:24 +02:00
Andreas Born
2ded951ef7 Fix incorrect identifiers in bash-completion.
* util/bash-completion.d/grub-completion.bash.in
	(_grub_mkpasswd-pbkdf2): Rename to ...
	(_grub_mkpasswd_pbkdf2): ... this. All users updated.
	(_grub_script-check): Rename to ...
	(_grub_script_check): ... this. All users updated.
2011-09-28 14:19:21 +02:00
Colin Watson
2221ab6c62 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Return 1 for
*/README* as well as README*.
Reported by: Axel Beckert.
2011-09-05 13:58:33 +01:00
Vladimir 'phcoder' Serbinenko
4155e6974a * util/grub-install.in: Move cryptodisk logic to appropriate place. 2011-08-23 11:18:00 +02:00
Szymon Janc
9e07f21128 merge trunk 2011-08-20 20:21:36 +02:00
Szymon Janc
9a8d32a24f Add support for adler32 checksuming.
* grub-core/lib/adler32.c: New file.
* Makefile.util.def (library): Add grub-core/lib/adler32.c to common.
* util/import_gcry.py (cryptolist): Add adler32.
2011-08-20 18:24:54 +02:00
Szymon Janc
7dc3c6863e Add grub-fstest option to uncompress data for commands.
* util/grub-fstest.c (uncompress): New var.
(options): New option -u.
2011-08-20 13:04:38 +02:00
Vladimir 'phcoder' Serbinenko
14a2562cf7 Rename Fuloong into Fuloong 2F. Add new ID for Fuloong2E.
* grub-core/Makefile.core.def (fwstart_fuloong): Rename fwstart_fuloong
	into fwstart_fuloong2f. Use boot/mips/loongson/fuloong2f.S.
	* grub-core/boot/mips/loongson/fuloong.S: Rename to ...
	* grub-core/boot/mips/loongson/fuloong2f.S: ... this.
	(FULOONG): Rename to ...
	(FULOONG2F): ... this. All users updated.
	* grub-core/boot/mips/startup_raw.S (machtype_fuloong_str): Rename to
	(machtype_fuloong2f_str): ... this.
	(machtype_fuloong2e_str): New string.
	Check for machtype_fuloong2e_str.
	* grub-core/loader/mips/linux.c (loongson_machtypes)
	[GRUB_MACHINE_MIPS_LOONGSON]: Add GRUB_ARCH_MACHINE_FULOONG2E.
	* grub-core/term/serial.c (loongson_defserial)
	[GRUB_MACHINE_MIPS_LOONGSON]: New array.
	(grub_serial_register) [GRUB_MACHINE_MIPS_LOONGSON]: Use
	loongson_defserial.
	* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_FULOONG):
	Rename to ...
	(GRUB_ARCH_MACHINE_FULOONG2F): ... this.
	(GRUB_ARCH_MACHINE_FULOONG2E): New const.
	* util/grub-mkimage.c (image_target_desc): Rename IMAGE_FULOONG_FLASH
	to IMAGE_FULOONG2F_FLASH. All users updated.
	(image_targets): Rename images.
	* util/grub-mkstandalone.in: Accept fuloong2f and fuloong2e.
2011-08-19 22:46:11 +02:00
Vladimir 'phcoder' Serbinenko
5c144cc8b2 * util/grub-setup.c (main): Add missing gcry initialisation. 2011-08-16 16:19:06 +02:00
Mario Limonciello
828bc390d8 * util/grub-probe.c (probe): Canonicalise the path argument, fixing
use of "/path/.." as in grub-install for EFI as well as handling
symlinks correctly.
Fixes Debian bug #637768.
2011-08-15 23:30:11 +01:00
Colin Watson
5f60ccac6f * util/grub-probe.c: Remove duplicate #include. 2011-08-15 23:21:29 +01:00
Robert Millan
6dc212f953 2011-08-10 Robert Millan <rmh@gnu.org>
Detect LSI MegaRAID SAS (`mfi') devices on GNU/kFreeBSD.

        * util/deviceiter.c [__FreeBSD_kernel__] (get_mfi_disk_name): New
        function.
        [__FreeBSD_kernel__] (grub_util_iterate_devices): Scan for mfi    
        (/dev/mfid[0-9]+) devices using get_mfi_disk_name().
2011-08-10 22:24:02 +02:00
Colin Watson
303b6246a3 * util/grub-install.in: Don't source grub-mkconfig_lib until after
processing arguments (otherwise help2man fails when GRUB has not yet
been installed).
2011-07-26 11:59:47 +01:00
Vladimir 'phcoder' Serbinenko
41aa28ea2a New script grub-mkstandalone.
* Makefile.util.def (grub-mkstandalone): New script.
	* docs/man/grub-mkstandalone.h2m: New file.
	* util/grub-mkstandalone.in: Likewise.
2011-07-25 08:19:30 +02:00
Vladimir 'phcoder' Serbinenko
9222759765 * util/grub-install.in: Don't use uhci outside of x86. 2011-07-25 08:06:20 +02:00
Vladimir 'phcoder' Serbinenko
c77069f5ae * util/grub-mkrescue.in: Add missing quotes. 2011-07-25 07:57:29 +02:00
Colin Watson
8fc4fa45c5 Preferred resolution detection for VBE.
* grub-core/video/video.c (grub_video_edid_checksum): New function.
(grub_video_edid_preferred_mode): Likewise.  Try EDID followed by
the Flat Panel extension, in line with the X.org VESA driver.
* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_flat_panel_info):
New function.
(grub_vbe_bios_get_ddc_capabilities): Likewise.
(grub_vbe_bios_read_edid): Likewise.
(grub_vbe_get_preferred_mode): Likewise.
(grub_video_vbe_setup): When the mode is "auto", try to get the
preferred mode from VBE, and use the largest mode that is no larger
than the preferred mode (some BIOSes expose a preferred mode that is
not in their mode list!).  If this fails, fall back to 640x480 as a
safe conservative choice.
(grub_video_vbe_get_edid): New function.
(grub_video_vbe_adapter): Add get_edid.
* include/grub/video.h (struct grub_vbe_edid_info): New structure.
(struct grub_video_adapter): Add get_edid.
(grub_video_edid_checksum): Add prototype.
(grub_video_edid_preferred_mode): Likewise.
* include/grub/i386/pc/vbe.h (struct grub_vbe_flat_panel_info): New
structure.

* grub-core/commands/videoinfo.c (print_edid): New function.
(grub_cmd_videoinfo): Print EDID if available.

* util/grub.d/00_header.in (GRUB_GFXMODE): Default to "auto".  This
is more appropriate on a wider range of platforms than 640x480.
* docs/grub.texi (Simple configuration): Update GRUB_GFXMODE
documentation.
2011-07-21 19:46:44 +01:00
Vladimir 'phcoder' Serbinenko
ca5572a9ad * util/grub-install.in: Recognize ESP mounted at /boot/EFI. 2011-07-10 16:06:31 +02:00
Vladimir 'phcoder' Serbinenko
16a2bab03c * util/grub-install.in: Source grub-mkconfig_lib. 2011-07-10 15:32:43 +02:00
Vladimir 'phcoder' Serbinenko
2e418de646 Remove getroot.c from core on emu platform.
* grub-core/Makefile.core.def (kernel): Remove kern/emu/getroot.c and
	kern/emu/raid.c.
	* grub-core/kern/emu/main.c (main): Don't try to guess root device. It's
	useless.
	* grub-core/kern/emu/misc.c (get_win32_path): Moved from here...
	* util/getroot.c (get_win32_path): ... here.
	* grub-core/kern/emu/misc.c (fini_libzfs): Moved from here...
	* util/getroot.c (fini_libzfs): ... here.
	* grub-core/kern/emu/misc.c (grub_get_libzfs_handle): Moved from here...
	* util/getroot.c (grub_get_libzfs_handle): ... here.
	* grub-core/kern/emu/misc.c (grub_find_zpool_from_dir):
	Moved from here...
	* util/getroot.c (grub_find_zpool_from_dir): ... here.
	* grub-core/kern/emu/misc.c
	(grub_make_system_path_relative_to_its_root): Moved from here...
	* util/getroot.c (grub_make_system_path_relative_to_its_root): ... here.
	* grub-core/kern/emu/getroot.c: Moved from here ...
	* util/getroot.c: ... here. All users updated.
	* grub-core/kern/emu/raid.c: Moved from here ...
	* util/raid.c: ... here. All users updated.
2011-07-08 13:33:12 +02:00
Vladimir Serbinenko
a251b71915 LUKS and GELI support.
* Makefile.util.def (libgrubkern.a): Add grub-core/lib/crypto.c,
	grub-core/disk/luks.c, grub-core/disk/geli.c,
	grub-core/disk/cryptodisk.c, grub-core/disk/AFSplitter.c,
	grub-core/lib/pbkdf2.c, grub-core/commands/extcmd.c,
	grub-core/lib/arg.c.
	(libgrubmods.a): Remove gcrypts cflags and cppflags.
	Remove grub-core/commands/extcmd.c, grub-core/lib/arg.c,
	grub-core/lib/crypto.c, grub-core/lib/libgcrypt-grub/cipher/sha512.c,
	grub-core/lib/libgcrypt-grub/cipher/crc.c and grub-core/lib/pbkdf2.c.
	(grub-bin2h): Add libgcry.a.
	(grub-mkimage): Likewise.
	(grub-mkrelpath): Likewise.
	(grub-script-check): Likewise.
	(grub-editenv): Likewise.
	(grub-mkpasswd-pbkdf2): Likewise.
	(grub-pe2elf): Likewise.
	(grub-fstest): Likewise.
	(grub-mkfont): Likewise.
	(grub-mkdevicemap): Likewise.
	(grub-probe): Likewise.
	(grub-ofpath): Likewise.
	(grub-mklayout): Likewise.
	(example_unit_test): Likewise.
	(grub-menulst2cfg): Likewise.
	* autogen.sh (UTIL_DEFS): Add Makefile.utilgcry.def.
	* grub-core/Makefile.core.def (cryptodisk): New module.
	(luks): Likewise.
	(geli): Likewise.
	* grub-core/disk/AFSplitter.c: New file.
	* grub-core/disk/cryptodisk.c: Likewise.
	* grub-core/disk/geli.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
	* grub-core/kern/emu/getroot.c (get_dm_uuid): New function based on
	grub_util_is_lvm.
	(grub_util_get_dm_abstraction): New function.
	(grub_util_follow_gpart_up): Likewise.
	(grub_util_get_geom_abstraction): Likewise.
	(grub_util_get_dev_abstraction): Use new functions.
	(grub_util_pull_device): Pull GELI and LUKS.
	(grub_util_get_grub_dev): Handle LUKS and GELI.
	* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): New function.
	(grub_util_biosdisk_open): Use grub_util_get_fd_sectors.
	(follow_geom_up): Removed.
	(grub_util_fd_seek): New function.
	(open_device): Use grub_util_fd_seek.
	(nread): Rename to ..
	(grub_util_fd_read): ... this. All users updated.
	* grub-core/lib/crypto.c (grub_crypto_ecb_decrypt): A better prototype.
	(grub_crypto_cbc_decrypt): Likewise.
	(grub_crypto_hmac_write): Likewise.
	(grub_crypto_hmac_buffer): Likewise.
	(grub_password_get): Extend to util.
	* include/grub/crypto.h (gcry_cipher_spec) [GRUB_UTIL]:
	New member modname.
	(gcry_md_spec) [GRUB_UTIL]: Likewise.
	* include/grub/cryptodisk.h: New file.
	* include/grub/disk.h (grub_disk_dev_id): Rename LUKS to CRYPTODISK.
	* include/grub/emu/getroot.h (grub_dev_abstraction_types): Add
	LUKS and GELI.
	(grub_util_follow_gpart_up): New proto.
	* include/grub/emu/hostdisk.h (grub_util_fd_seek): Likewise.
	(grub_util_fd_read): Likewise.
	(grub_cryptodisk_cheat_mount): Likewise.
	(grub_util_cryptodisk_print_uuid): Likewise.
	(grub_util_get_fd_sectors): Likewise.
	* util/grub-fstest.c (mount_crypt): New var.
	(fstest): Mount crypto if requested.
	(options): New option -C.
	(argp_parser): Parse -C.
	(main): Init and fini gcry.
	* util/grub-install.in: Support cryptodisk install.
	* util/grub-mkconfig.in: Export GRUB_ENABLE_CRYPTODISK.
	* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Support
	cryptodisk.
	(prepare_grub_to_access_device): Likewise.
	* util/grub-mkpasswd-pbkdf2.c (main): Use grub_password_get.
	* util/grub-probe.c (probe_partmap): Support cryptodisk UUID probe.
	(probe_cryptodisk_uuid): New function.
	(probe_abstraction): Likewise.
	(probe): Use new functions.
	* util/import_gcry.py: Create Makefile.utilgcry.def.
	Add modname member.

	Also-By: Michael Gorven <michael@gorven.za.net>

	Also-By: Clemens Fruhwirth <clemens@endorphin.org>
2011-07-07 23:52:58 +02:00
Vladimir 'phcoder' Serbinenko
00542307eb merge mainline into lazy 2011-07-07 12:21:53 +02:00
Vladimir 'phcoder' Serbinenko
d53bf34924 merge mainline into net 2011-07-06 01:35:41 +02:00
Vladimir 'phcoder' Serbinenko
748ccabea1 MIPS qemu flash support.
* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]: Check
	magic.
	* grub-core/kern/mips/qemu_mips/init.c (probe_mem): New function.
	(grub_machine_init): Probe memory if its size isn't known.
	* util/grub-mkimage.c (image_targets): Add flash targets.
	(generate_image): Handle flash targets.
2011-07-05 21:42:36 +02:00
Vladimir 'phcoder' Serbinenko
145c7b4661 merge mainline into net 2011-07-05 20:40:39 +02:00
Vladimir 'phcoder' Serbinenko
275f8264e4 Prevent garbage from getting into aout header 2011-07-05 14:55:28 +02:00
Grégoire Sutre
77546584e1 Use @PACKAGE@ instead of hardcoded name when sourcing grub-mkconfig_lib. 2011-07-02 21:22:19 +02:00
Vladimir 'phcoder' Serbinenko
03a0046581 merge mainline into net 2011-07-02 18:52:50 +02:00
Vladimir 'phcoder' Serbinenko
b28c56559b * util/ieee1275/grub-ofpathname.c (main): Handle --help and --version
so that help2man doesn't fail.
2011-06-27 12:16:00 +02:00
Vladimir 'phcoder' Serbinenko
efff4b1cc3 * util/grub-mkrescue.in: Rename "ata" to "pata" and add ahci when
necessary.
2011-06-27 09:06:15 +02:00
Vladimir 'phcoder' Serbinenko
0ff2c51b82 mknetdir support for EFI 2011-06-26 22:47:05 +02:00
Vladimir 'phcoder' Serbinenko
e552d93a8b Add ofnet and tftp modules 2011-06-26 19:52:50 +02:00
Vladimir 'phcoder' Serbinenko
cf2bba0ef4 add missing quotes and fix variable name 2011-06-26 18:23:12 +02:00
Vladimir 'phcoder' Serbinenko
a27fe54f96 missing part of previous commit 2011-06-26 17:51:46 +02:00
Vladimir 'phcoder' Serbinenko
b1f9b7249a mknetdir support for ieee1275 2011-06-26 17:28:19 +02:00
Vladimir 'phcoder' Serbinenko
2a5e94d84a * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
partmap before abstraction.
2011-06-24 12:41:05 +02:00
Alexander Kurtz
535c191059 * util/grub-mkconfig_lib.in: Add missing quotes. 2011-06-24 12:38:24 +02:00
Vladimir 'phcoder' Serbinenko
5ab3f48a92 AHCI support.
* grub-core/Makefile.core.def (ata_pthru): Removed.
	(ahci): New module.
	(pata): Likewise.
	* grub-core/bus/usb/ohci.c (GRUB_MOD_FINI): Unregister preboot hook
	on unload.
	* grub-core/commands/hdparm.c (grub_hdparm_do_ata_cmd): Use ATA
	readwrite.
	(grub_hdparm_do_check_powermode_cmd): Likewise.
	(grub_hdparm_do_smart_cmd): Likewise.
	(grub_hdparm_set_val_cmd): Likewise.
	(grub_cmd_hdparm): Likewise. Check thta we have an ATA device.
	* grub-core/disk/ahci.c: New file.
	* grub-core/disk/ata.c: Factor out the low-level part into ...
	* grub-core/disk/pata.c: ... here.
	* grub-core/disk/ata_pthru.c: Contents moved to ...
	* grub-core/disk/pata.c: ... here.
	* grub-core/disk/scsi.c (grub_scsi_names): New array.
	(grub_scsi_iterate): Use grub_scsi_names.
	(grub_scsi_open): Likewise.
	* grub-core/kern/disk.c (grub_disk_ata_pass_through): Removed.
	* include/grub/ata.h (grub_ata_commands): Add DMA commands.
	(grub_ata_regs_t): New struct.
	(grub_disk_ata_pass_through_parms): Likewise.
	(grub_ata_device): Renamed to ...
	(grub_ata): ... this.
	(grub_ata_dev): New struct.
	Removed all low-level inline functions.
	* include/grub/scsi.h: Add PATA and AHCI subsystems.
	(grub_scsi_dev): Removed 'name' and 'id'. Added 'id' parameter to
	iterate hooks and open. All users updated.
	* util/grub-install.in: Handle AHCI disk module.
2011-06-24 00:07:55 +02:00
Vladimir 'phcoder' Serbinenko
fe12fd5b43 * util/ieee1275/ofpath.c (check_sas): Close fd.
(main): Free of_path.
	Reported by: David Volgyes <dvolgyes>.
2011-06-23 22:18:31 +02:00
Vladimir 'phcoder' Serbinenko
03147f4667 * util/grub-mkpasswd-pbkdf2.c (main): Don't double-close.
Reported by: David Volgyes <dvolgyes>.
2011-06-23 22:11:42 +02:00
Vladimir 'phcoder' Serbinenko
13548d26e9 * util/raid.c (grub_util_raid_getmembers): Close fd before returning.
Reported by: David Volgyes <dvolgyes>.
2011-06-23 21:06:50 +02:00
Vladimir 'phcoder' Serbinenko
77ba5392d0 New testload grub-fstest command 2011-06-23 08:45:12 +02:00
Robert Millan
881ac815d0 2011-06-16 Robert Millan <rmh@gnu.org>
Detect `ataraid' devices on GNU/kFreeBSD.  Fix for ATA devices using
        `ata' driver on kernel of FreeBSD 9.

        * util/deviceiter.c [__FreeBSD_kernel__] (get_ada_disk_name)
        (get_ataraid_disk_name): New functions.
        [__FreeBSD_kernel__] (grub_util_iterate_devices): Scan for ataraid
        (/dev/ar[0-9]+) and ada (/dev/ada[0-9]+) devices using
        get_ataraid_disk_name() and get_ada_disk_name().
2011-06-16 14:33:11 +02:00
Colin Watson
f35fa3a664 * util/grub-mkconfig.in: Export GRUB_CMDLINE_LINUX_XEN_REPLACE and
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT.
Reported by: Pawel Tecza.
2011-05-20 11:21:36 +01:00
Colin Watson
e806ce60ee merge trunk 2011-05-18 16:53:36 +01:00
Colin Watson
b84f26c549 * util/grub-mkrescue.in: Use portable `.' rather than non-portable
`source'.
2011-05-18 12:57:59 +01:00
Vladimir 'phcoder' Serbinenko
548937c6d6 merge mainline into ahci 2011-05-18 12:36:26 +02:00
Vladimir 'phcoder' Serbinenko
6ad6223e92 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-18 01:38:01 +02:00
Vladimir 'phcoder' Serbinenko
4959e11109 Use mipsel- rather than mips- in directories involving mipsel ports to
allow both endiannesses coexist.

	* configure.ac: proparate target_cpu=mipsel rather than resetting to
	mips. All conditions adjusted.
	* tests/util/grub-shell-tester.in: Remove gratuitious target_cpu
	variable.
	* util/grub-install.in: Adjust conditions to take renaming into account.
	* util/grub-mkimage.c (image_targets): Likewise. New target
	mips-qemu_mips-elf for bigendian mips.
2011-05-17 22:48:20 +02:00
Vladimir 'phcoder' Serbinenko
35341bbc96 Avoid unnecessary copying on MIPS.
* grub-core/boot/decompressor/none.c (grub_decompress_core): Exit
	early if src == dest.
	* util/grub-mkimage.c (generate_image): Arange for src == dest if
	compression is none.
2011-05-17 21:40:35 +02:00
Vladimir 'phcoder' Serbinenko
b772baedcd Reduce memory footprint on SGI by putting modules before the kernel
as opposed to after.

	* grub-core/Makefile.core.def (kernel): Increase linking address.
	(none_decompress): Likewise.
	(xz_decompress): Likewise.
	* grub-core/boot/mips/startup_raw.S: Use prewritten uncompression
	address.
	* grub-core/kern/mips/arc/init.c (grub_machine_init): Handle memory
	layout change.
	(grub_arch_modules_addr): New function.
	* grub-core/kern/mips/init.c (grub_arch_modules_addr): Moved from here...
	* grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): .. here
	* grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr): ... and
	here.
	* grub-core/kern/mips/startup.S (total_size): Rename to ...
	(grub_total_modules_size): ... this. Make global.
	[GRUB_MACHINE_ARC]: Don't attempt to move modules out of the bss.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_LOONGSON_UNCOMPRESSED_ADDR):
	New definition.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_UNCOMPRESSED_ADDR): Likewise.
	(GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_ADDR): Likewise.
	(GRUB_KERNEL_MACHINE_UNCOMPRESSED_ADDR): Likewise.
	(GRUB_KERNEL_MIPS_ARC_LINK_ADDR): Increased.
	* util/grub-mkimage.c (image_target_desc): New flag
	PLATFORM_FLAGS_MODULES_BEFORE_KERNEL.
	(image_targets): Set PLATFORM_FLAGS_MODULES_BEFORE_KERNEL on mips-arc.
	(generate_image): Handle images with modules before kernel.
2011-05-17 21:15:54 +02:00
Colin Watson
d064b83056 * util/grub.d/20_linux_xen.in: Honour GRUB_CMDLINE_LINUX_XEN_REPLACE
and GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT, which replace
GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT (complementing the
existing options which append).
* docs/grub.texi (Simple configuration): Document new options.
Reported by: Ian Jackson.  Fixes Debian bug #617538.
2011-05-17 18:10:29 +01:00
Colin Watson
3ca2b46645 * util/grub-fstest.c (cmd_cat): New function.
(fstest): Handle CMD_CAT.
(options): Add cat.
(argp_parser): Handle cat.
2011-05-17 18:03:59 +01:00
Vladimir 'phcoder' Serbinenko
b38c1d1442 Fix -O for qemu 2011-05-17 14:05:52 +02:00
Vladimir 'phcoder' Serbinenko
3666d5f636 merge mainline and various cleanups 2011-05-17 14:02:18 +02:00
Vladimir 'phcoder' Serbinenko
400b93718f SGI ARCS port.
* Makefile.util.def (libgrubmods.a): Add dvh.c.
	* conf/Makefile.common (CCASFLAGS_PLATFORM): Add -mips3 on all mips
	platforms.
	* configure.ac: New target mips-arc.
	* gentpl.py: Likewise.
	* grub-core/Makefile.am: Likewise.
	* grub-core/Makefile.core.def: Likewise.
	(xz_decompress): Remove -D GRUB_MACHINE_LINK_ADDR.
	(none_decompress): Likewise.
	(lsdev): New module.
	(datetime): Use lib/arc/datetime.c on ARC.
	(part_dvh): New module.
	* grub-core/commands/arc/lsdev.c: New file.
	* grub-core/disk/arc/arcdisk.c: Likewise.
	* grub-core/kern/mips/arc/init.c: Likewise.
	* grub-core/kern/mips/cache_flush.S: Don't flush non 4-byte
	aligned addresses.
	* grub-core/kern/mips/dl.c (grub_arch_dl_check_header): Fix bigendian
	support.
	(grub_arch_dl_relocate_symbols): Likewise.
	* grub-core/kern/mips/loongson/init.c (grub_get_rtc): Moved from here...
	* grub-core/kern/mips/init.c (grub_get_rtc): ... here.
	* grub-core/kern/mips/startup.S (grub_arch_cpuclock): Have on all
	platforms.
	* grub-core/lib/arc/datetime.c: New file.
	* grub-core/loader/mips/linux.c: Always include time.h. Don't include
	pci.h on non-loongson.
	(envp_off) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove.
	(grub_linux_boot): Set unused registers to 0.
	(grub_cmd_linux) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove envp.
	* grub-core/mmap/mips/loongson/uppermem.c: Moved from here ...
	* grub-core/mmap/mips/uppermem.c: ...here.
	* grub-core/partmap/dvh.c: New file.
	* grub-core/term/arc/console.c: Likewise.
	* grub-core/term/terminfo.c (ANSI_C0_STR): New const.
	(grub_terminfo_set_current): Add terminal "arc".
	(grub_terminfo_readkey): Support ARC sequences.
	* include/grub/arc/arc.h: New file.
	* include/grub/arc/console.h: Likewise.
	* include/grub/disk.h (grub_disk_dev_id): Add
	GRUB_DISK_DEVICE_ARCDISK_ID.
	* include/grub/mips/arc/kernel.h: New file.
	* include/grub/mips/arc/memory.h: Likewise.
	* include/grub/mips/arc/time.h: Likewise.
	* include/grub/mips/loongson/kernel.h (grub_halt): Moved from here ...
	* include/grub/mips/kernel.h (grub_halt): ... here.
	* include/grub/mips/loongson.h (GRUB_CPU_REGISTER_WRAP): Moved from
	here...
	* include/grub/mips/mips.h (GRUB_CPU_REGISTER_WRAP): ... here.
	(GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): Moved from here ...
	* include/grub/mips/mips.h (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): .. here
	* include/grub/mips/loongson/kernel.h (grub_reboot): Removed redundant
	proto.
	* include/grub/mips/loongson/memory.h (GRUB_ARCH_LOWMEMVSTART): Moved
	from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMVSTART): ... here.
	(GRUB_ARCH_LOWMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMPSTART): ... here.
	(GRUB_ARCH_LOWMEMMAXSIZE): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMMAXSIZE): ... here.
	(GRUB_ARCH_HIGHMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_HIGHMEMPSTART): ... here.
	(grub_phys_addr_t): Moved from here ...
	* include/grub/mips/memory.h (grub_phys_addr_t): ... here.
	(grub_vtop): Moved from here ...
	* include/grub/mips/memory.h (grub_vtop): ... here.
	(grub_map_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_map_memory): ... here.
	(grub_unmap_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_unmap_memory): ... here.
	(grub_machine_mmap_iterate): Moved from here ...
	* include/grub/mips/memory.h (grub_machine_mmap_iterate): ... here.
	(grub_mmap_get_lower): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_lower): ... here.
	(grub_mmap_get_upper): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_upper): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_get_rtc): Moved from
	here ...
	* include/grub/mips/time.h (grub_get_rtc): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_cpu_idle): Moved from
	here ...
	* include/grub/mips/time.h (grub_cpu_idle): ... here.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_ARC_LINK_ADDR): New
	definition.
	(GRUB_KERNEL_MIPS_ARC_LINK_ALIGN): Likewise.
	(GRUB_KERNEL_MIPS_ARC_COMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_ARC_MOD_ALIGN): Likewise.
	(GRUB_MACHINE_LINK_ADDR): Likewise.
	* include/grub/terminfo.h (GRUB_TERMINFO_READKEY_MAX_LEN): Increased
	to 6.
	* util/grub-install.in: Run dvhtool on ARC.
	* util/grub-mkimage.c (image_targets): Add mips-arc.
2011-05-17 09:17:38 +02:00
Vladimir 'phcoder' Serbinenko
276ef9be21 Fix install message 2011-05-16 21:50:24 +02:00
Vladimir 'phcoder' Serbinenko
0670a9751b merge mainline into ahci 2011-05-16 17:17:04 +02:00
Tristan Gingold
32297d5ff7 IA64 support.
* Makefile.util.def (libgrubmods.a): Add grub-core/kern/ia64/dl_helper.c
	* configure.ac: Add ia64-efi target.
	Probe for __ia64_trampoline, __udivsi3, __umoddi3, __udivdi3,
	__divsi3, __modsi3, __umodsi3, __moddi3 and __divdi3 symbols.
	* gentpl.py: Add ia64_efi platform.
	Rename x86_efi to efi and Add ia64-efi. All users updated.
	* grub-core/Makefile.am: Set KERNEL_HEADER_FILES for ia64-efi.
	* grub-core/Makefile.core.def (kernel.img): Add compile flags for ia64.
	Remove kern/generic/rtc_get_time_ms.c on EFI.
	Add kern/ia64/efi/startup.S, kern/ia64/efi/init.c, kern/ia64/dl.c,
	kern/ia64/dl_helper.c on ia64-efi.
	Add kern/emu/cache.c on emu.
	(linux): Use on loader/ia64/efi/linux.c on ia64.
	* grub-core/gensymlist.sh (grub_register_exported_symbols): Check
	whether symbol is a function.
	* grub-core/kern/dl.c [GRUB_MACHINE_EMU]: Include sys/mman.h.
	(grub_symbol): New field 'isfunc'.
	(grub_dl_resolve_symbol): Return whole symbol rather than just address.
	(grub_dl_register_symbol): New argument 'isfunc'. All users updated.
	(grub_dl_load_segments): Place all sections into the same region.
	[__ia64__]: Create trampolines and got.
	[GRUB_MACHINE_EMU]: Call mprotect.
	(grub_dl_resolve_symbols): Resolve symbol type as well.
	[__ia64__]: Create function descriptors.
	* grub-core/kern/efi/efi.c (grub_get_rtc): Renamed to ...
	(grub_rtc_get_time_ms): ... this. Expressions simplified.
	(grub_get_rtc): New function.
	* grub-core/kern/emu/cache.c [__ia64__]: New file.
	* grub-core/kern/emu/cache.S: Renamed to ...
	* grub-core/kern/emu/cache_s.S: ... this.
	[__ia64__]: Add a nop.
	* grub-core/kern/emu/full.c (grub_arch_dl_get_tramp_got_size)
	[__ia64__]: New function.
	* grub-core/kern/emu/lite.c [__ia64__]: Include ../ia64/dl.c.
	* grub-core/kern/ia64/dl.c: New file.
	* grub-core/kern/ia64/dl_helper.c: Likewise.
	* grub-core/kern/ia64/efi/init.c: New file.
	* grub-core/kern/ia64/efi/startup.S: Likewise.
	* grub-core/lib/efi/halt.c [__ia64__]: Don't try acpi.
	* grub-core/lib/ia64/longjmp.S: New file (from glibc).
	* grub-core/lib/ia64/setjmp.S: Likewise (from glibc).
	* grub-core/lib/setjmp.S [__ia64__]: Include ./ia64/setjmp.S.
	* grub-core/loader/ia64/efi/linux.c: New file.
	* include/grub/dl.h (GRUB_MOD_NAME): Redefined using C rather than asm.
	(GRUB_MOD_DEP): Likewise.
	(grub_dl) [__ia64__]: New fields got and tramp.
	(grub_dl): New field 'base'.
	(grub_dl_register_symbol): New argument isfunc. All users updated.
	(GRUB_IA64_DL_TRAMP_ALIGN): New definition.
	(GRUB_IA64_DL_TRAMP_SIZE): Likewise.
	(GRUB_IA64_DL_GOT_ALIGN): Likewise.
	(grub_ia64_dl_get_tramp_got_size): New proto.
	(GRUB_ARCH_DL_TRAMP_ALIGN) [__ia64__]: Likewise
	(GRUB_ARCH_DL_GOT_ALIGN) [__ia64__]: Likewise
	(grub_arch_dl_get_tramp_got_size) [__ia64__]: Likewise
	* include/grub/efi/api.h: Skip call wrappers on ia64.
	* include/grub/efi/pe32.h (GRUB_PE32_MACHINE_IA64): New definition.
	* include/grub/efi/time.h (GRUB_TICKS_PER_SECOND): Change to 1000.
	* include/grub/elf.h (ELF_ST_INFO): New definition.
	* include/grub/ia64/efi/kernel.h: New file.
	* include/grub/ia64/efi/memory.h: Likewise.
	* include/grub/ia64/efi/time.h: Likewise.
	* include/grub/ia64/kernel.h: Likewise.
	* include/grub/ia64/setjmp.h: Likewise (from glibc).
	* include/grub/ia64/time.h: New file.
	* include/grub/ia64/types.h: Likewise.
	* include/grub/libgcc.h (__udivsi3, __umodsi3, __umoddi3, __udivdi3,
	__moddi3, __divdi3, __divsi3, __modsi3, __ia64_trampoline):
	New protos.
	* include/grub/offsets.h (GRUB_KERNEL_IA64_EFI_PREFIX): New definition.
	(GRUB_KERNEL_IA64_EFI_PREFIX_END): Likewise.
	* include/grub/types.h (PRIxGRUB_ADDR): Likewise.
	* util/grub-mkimage.c (image_target_desc): New field pe_target.
	All users updated.
	(EFI64_HEADER_SIZE): New definition. All users updated.
	(image_targets): Add ia64-efi.
	* util/grub-mkimagexx.c (relocate_symbols): New arguments jumpers and
	jumpers_addr. All users updated.
	Create function descriptors.
	(count_funcs): New function.
	(unaligned_uint32): New struct.
	(MASK20): New definition.
	(MASK19): Likewise.
	(MASKF21): Likewise.
	(add_value_to_slot_20b): New function.
	(add_value_to_slot_21_real): Likewise.
	(add_value_to_slot_21): Likewise.
	(ia64_kernel_trampoline): New struct.
	(nopm): New variable.
	(jump): Likewise.
	(make_trampoline): New function.
	(relocate_addresses): Handle ia64.
	(make_reloc_section): Likewise.
	(load_image): Likewise.

	Also-By: Robert Millan <rmh.grub@aybabtu.com>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-05-15 11:22:59 +02:00
Vladimir 'phcoder' Serbinenko
bee1aeb9a1 merge mainline into sgi 2011-05-15 02:23:36 +02:00
Vladimir 'phcoder' Serbinenko
5d063cdc10 Fuloong support.
* configure.ac: Rename yeeloong platform to loongson. All users updated.
	* grub-core/Makefile.core.def (fwstart_fuloong): New image.
	* grub-core/boot/mips/loongson/fuloong.S: New file.
	* grub-core/boot/mips/loongson/fwstart.S: Wait for CS5536 to come up.
	Explicitly init CS5536.
	[FULOONG]: Don't use serial until CS5536 is available.
	Set GPIO based on dumps.
	(serial_hw_init) [FULOONG]: Handle CS5536 parts.
	[FULOONG]: Handle GPIO and memory controller differences.
	Parse machine type in $a2.
	* grub-core/boot/mips/startup_raw.S: Determine and save the
	architecture.
	* grub-core/bus/cs5536.c (gpiodump): Move to fwstart.S.
	(grub_cs5536_init_geode): Remove gpio part. Conditionalise DIVIL
	init on architecture type.
	* grub-core/kern/mips/loongson/init.c (grub_machine_init): Init
	SIS315E. Don't init at_keyboard on fuloong.
	(grub_halt): Support Fuloong.
	* grub-core/kern/mips/startup.S [LOONGSON]: Save $s7.
	* grub-core/loader/mips/linux.c (LOONGSON_MACHTYPE): Removed.
	(loongson_machtypes): New array.
	(grub_cmd_linux) [GRUB_MACHINE_MIPS_LOONGSON]: Pass the right machine
	type.
	* grub-core/term/ns8250.c (serial_get_divisor): New parameter port and
	config. All users updated. Handle CS5536 serial.
	* grub-core/term/serial.c (grub_serial_register): Conditionalise
	default port on machine type. Register serial as inactive.
	* grub-core/video/sis315pro.c: New file.
	* include/grub/cs5536.h (GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED): New
	definition.
	(GRUB_CS5536_MSR_MAILBOX_CONFIG): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART1_CONF): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART2_CONF): Likewise.
	* include/grub/mips/loongson.h (GRUB_CPU_LOONGSON_SHUTDOWN_GPIO): Rename
	to ...
	(GRUB_CPU_YEELOONG_SHUTDOWN_GPIO): ... this.
	* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_YEELOONG): New
	definition.
	(GRUB_ARCH_MACHINE_FULOONG): Likewise.
	(grub_arch_machine): New extern var.
	* include/grub/mips/loongson/serial.h
	(GRUB_MACHINE_SERIAL_DIVISOR_115200): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0_DIVISOR_115200): ... this.
	(GRUB_MACHINE_SERIAL_PORT): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0): ... this.
	(GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200): New definition.
	(GRUB_MACHINE_SERIAL_PORT1): Likewise.
	(GRUB_MACHINE_SERIAL_PORT2): Likewise.
	(GRUB_MACHINE_SERIAL_PORTS): Include ports 1 and 2.
	* include/grub/term.h (grub_term_register_input_inactive): New inline
	function.
	(grub_term_register_output_inactive): Likewise.
	* include/grub/video.h (grub_video_driver_id): New value
	GRUB_VIDEO_DRIVER_SIS315PRO.
	* util/grub-mkimage.c (image_target_desc): Rename name to dirname.
	New field "names". All users updated.
	New field value IMAGE_FULOONG_FLASH.
	(generate_image): USe separate fwstart hashes for yeeloong and fuloong.
2011-05-15 01:43:44 +02:00
Vladimir 'phcoder' Serbinenko
90c571a47f * util/grub.d/10_linux.in: Autoload gzio since it's needed on some
platforms if kernel is compressed.
2011-05-14 22:47:28 +02:00
Vladimir 'phcoder' Serbinenko
2217a1430e Handle module_license on windows.
* util/grub-pe2elf.c (MODLICENSE_SECTION): New definition. All following
	sections shifted.
	(insert_string): Make argument const char * instead of char *.
	(write_section_data): Handle long section names.
	Handle module_license.
2011-05-14 17:47:59 +02:00
Vladimir 'phcoder' Serbinenko
bda0e21993 * util/grub-mkimage.c (generate_image): Update hash. 2011-05-13 21:31:00 +02:00
Vladimir 'phcoder' Serbinenko
dd10ec9e60 sgimips grub-install partial support (untested) 2011-05-13 18:02:36 +02:00
Vladimir 'phcoder' Serbinenko
8906c3dd40 sgi support 2011-05-13 16:36:05 +02:00
Vladimir 'phcoder' Serbinenko
56dbe7b485 * util/grub.d/10_linux.in: Correctly handle the Linux in root. 2011-05-10 10:40:22 +02:00
Vladimir 'phcoder' Serbinenko
ea75312f31 * util/grub-mkimage.c (main): Explicitely flush and sync the output
before closing to ensure that it will be readable by grub-setup.
2011-05-09 16:27:09 +02:00
Vladimir 'phcoder' Serbinenko
2679b7249b Fix LTOFF relocation to functions (needed for trampolines) 2011-05-08 17:07:40 +02:00
Vladimir 'phcoder' Serbinenko
a988e7aa63 Fix 2 incorrect vaddr_offsets 2011-05-08 14:33:30 +02:00
Vladimir 'phcoder' Serbinenko
5452733f35 more or less functional ia64 grub-mkimage 2011-05-08 12:39:08 +02:00
Vladimir 'phcoder' Serbinenko
7c515bee14 * util/grub-mkpasswd-pbkdf2.c (main): Use /dev/urandom and not
/dev/random. /dev/urandom is good enough for our purposes (salting).
2011-05-05 01:32:04 +02:00
Vladimir 'phcoder' Serbinenko
ed660bd8ed * util/grub-mkrescue.in (process_input_dir): Include efiemu??.o. 2011-05-05 01:29:21 +02:00
Vladimir 'phcoder' Serbinenko
20a409405b Integrate geli into autoconfiguration system 2011-04-25 14:52:07 +02:00
Vladimir 'phcoder' Serbinenko
1a1f408f20 geli support 2011-04-24 00:00:29 +02:00
Vladimir 'phcoder' Serbinenko
8585e54bec factor cryptodisk part out 2011-04-23 18:00:42 +02:00
Vladimir 'phcoder' Serbinenko
4879d87871 fix bug caused by import_gcry modifications 2011-04-23 02:01:39 +02:00
Vladimir 'phcoder' Serbinenko
8306591ff3 support LUKS in shell libraries 2011-04-23 00:13:56 +02:00
Vladimir 'phcoder' Serbinenko
9d647e4e18 New -t luks_uuid 2011-04-22 23:51:16 +02:00
Vladimir 'phcoder' Serbinenko
50ad7d9cae luks grub-probe support 2011-04-22 23:39:36 +02:00
Vladimir 'phcoder' Serbinenko
2cb55e6f73 make grub_password_get work in userland 2011-04-22 21:46:00 +02:00
Vladimir 'phcoder' Serbinenko
4169260830 grub-fstest luks support 2011-04-22 19:44:41 +02:00
Vladimir 'phcoder' Serbinenko
dcd73ec05e add gcry to utils 2011-04-22 19:04:21 +02:00
Vladimir 'phcoder' Serbinenko
4defebbec8 automatic raid members addition 2011-04-22 13:55:30 +02:00
Vladimir 'phcoder' Serbinenko
e8f28d4c0e * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_flush):
New function.
	(grub_util_biosdisk_close): Use grub_util_biosdisk_flush.
	* include/grub/emu/hostdisk.h (grub_util_biosdisk_flush): New proto.
	* util/grub-setup.c (setup): Use grub_util_biosdisk_flush.
2011-04-19 22:39:14 +02:00
Vladimir 'phcoder' Serbinenko
a5102d9433 * util/grub-mkimage.c (generate_image): Add forgotten comma. 2011-04-18 17:47:21 +02:00
Vladimir 'phcoder' Serbinenko
f3fb7b36df * util/grub-mkimage.c (generate_image): Update fwstart.img hash after
performing the necessary test.
2011-04-18 09:31:13 +02:00
Colin Watson
2a861f38a7 Tell FUSE to run single-threaded, since GRUB code is not thread-safe.
Fixes Ubuntu bug #756297.
2011-04-14 20:27:27 +01:00
Colin Watson
e74c31125d * util/grub.d/10_linux.in: Add rootflags=subvol=<name> if / is on a
btrfs subvolume.
* util/grub.d/20_linux_xen.in: Likewise.
2011-04-13 12:57:26 +01:00
Colin Watson
0c67693394 * util/import_gcry.py: Fix typo. 2011-04-12 11:39:17 +01:00
Vladimir 'phcoder' Serbinenko
e745cf0ca6 Implement automatic module license checking according to new GNU
guidelines.

	* grub-core/kern/dl.c (grub_dl_check_license): New function.
	(grub_dl_load_core): Use grub_dl_check_license.
	* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
	(GRUB_MOD_LICENSE): Likewise.
	(GRUB_MOD_DUAL_LICENSE): Likewise.
	All modules updated.
2011-04-11 23:01:51 +02:00
Vladimir 'phcoder' Serbinenko
8a3bc88ea7 * util/grub-fstest.c (cmd_cmp): Check that sizes match. 2011-04-11 07:41:59 +02:00
Vladimir 'phcoder' Serbinenko
af869a4ab9 * util/grub-fstest.c (read_file): Report GRUB error if file opening
failed.
2011-04-11 07:40:53 +02:00
Colin Watson
5b3633002b Make grub-mount exit non-zero if opening the device or filesystem fails.
Translate GRUB error codes into OS error codes for FUSE.
2011-04-10 21:41:55 +01:00
Alexander Kurtz
cbac5b1ece * util/grub-mkconfig_lib.in: Add missing quotes. 2011-04-10 15:30:45 +02:00
Vladimir 'phcoder' Serbinenko
1ec652f4c4 * util/grub-mkimage.c (main): Handle special naming of yeeloong
directory.
2011-04-08 16:00:23 +02:00
Vladimir 'phcoder' Serbinenko
4ed4ce5820 correct Changelog spelling 2011-04-08 13:59:07 +02:00
Martin Zuther
6d1fa41fb4 * util/grub-mkconfig.in: Ignore emacsen backup. 2011-04-08 11:53:17 +02:00
Colin Watson
b0bfc5937d fix header comment 2011-04-08 10:31:32 +01:00
Vladimir 'phcoder' Serbinenko
2a961775e6 * util/grub.d/00_header.in: Don't use LANG unless unifont is available. 2011-04-06 13:18:11 +02:00
Vladimir 'phcoder' Serbinenko
09ceb9a592 * util/grub-install.in: Add a recommendation to use --recheck before
reporting bugs.
2011-04-03 15:37:24 +02:00
Alexey Shvetsov
fd7cd914c6 * util/grub.d/10_linux.in: Add gentoo-specific config filename.
* util/grub.d/20_linux_xen.in: Likewise.
2011-03-30 20:53:23 +02:00
Vladimir 'phcoder' Serbinenko
090b1b6ac6 * util/grub.d/10_linux.in: Try alternative config filenames where
we parse config file.
	* util/grub.d/20_linux_xen.in: Likewise.
2011-03-30 20:42:42 +02:00
Alexey Shvetsov
baad885c14 * util/grub.d/10_linux.in: Add gentoo-specific Linux and initrd names.
* util/grub.d/20_linux_xen.in: Likewise.
2011-03-30 19:22:28 +02:00
Vladimir 'phcoder' Serbinenko
fc8584825c Old macs search for boot.efi rather than for bootia32.efi.
* util/grub-install.in: Copy bootia32.efi to boot.efi.
	* util/grub-mkrescue.in: Likewise.
	Suggested by: Peter Jones.
2011-03-30 00:05:25 +02:00
Vladimir 'phcoder' Serbinenko
e1eb511d9a * util/grub.d/20_linux_xen.in: Accept old-style xen kernels. 2011-03-29 21:12:13 +02:00
Vladimir 'phcoder' Serbinenko
fc18f6a3cb * util/grub.d/10_linux.in: Skip vmlinux-* on x86 platforms. 2011-03-29 19:47:34 +02:00
Vladimir 'phcoder' Serbinenko
a307c0b206 * util/grub.d/10_kfreebsd.in: Allow ufs.ko to be missing as it's
per default compiled in kernel and prior to 8.0 isn't shipped at all.
2011-03-29 12:01:48 +02:00
Vladimir 'phcoder' Serbinenko
9f3677d3c1 * util/grub-setup.c: Copy the partition table zone if floppy support
is disabled, even if no partition table is found.

        Otherwise, the BIOS on Dell Latitude E series laptops will freeze
        during POST if an invalid partition table is contained in the PBR
        of the active partition when GRUB is installed to a partition.
2011-03-29 02:20:52 +02:00
Colin Watson
58ed62d221 Avoid consuming lots of space and time if the first partition is not near the start of the disk (Debian bug #619458, Ubuntu bug #691569). 2011-03-25 17:22:12 +00:00
Vladimir 'phcoder' Serbinenko
2da48d28d9 * util/grub-install.in: Correct the x86-64 name as x86_64. 2011-03-23 11:52:04 +01:00
Colin Watson
7bdeb3987a merge trunk 2011-03-14 22:01:32 +00:00
Vladimir 'phcoder' Serbinenko
54da1febce Rename mipsel-yeeloong to mipsel-loongson 2011-02-19 13:18:05 +01:00
Colin Watson
fee7cdd4e1 * util/grub.d/20_linux_xen.in: Bail out early if linux_list is
empty, since in that case we can only generate either nothing or a
syntactically invalid configuration file.
Reported by: Michal Suchanek.  Fixes Debian bug #612898.
2011-02-11 13:00:54 +00:00
Colin Watson
22b28eb3fe * util/grub-install.in: Remove unnecessary brackets from tr
arguments.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
Reported by: Jamie Heilman.  Fixes Debian bug #612564.
2011-02-09 11:23:11 +00:00
Vladimir 'phcoder' Serbinenko
3281d3d6d4 * util/grub-mkimage.c (generate_image): Refuse to create the images
bigger than the actual flash (512K) in Loongson machines. 512K is also
	the biggest chip supported by them.
2011-01-24 02:44:27 +01:00
Vladimir 'phcoder' Serbinenko
a9fa2a22d7 Integrate Fuloong firmware port into build system and grub-mkimage 2011-01-24 02:20:04 +01:00
Vladimir 'phcoder' Serbinenko
37f4f60828 * util/grub-install.in: Ignore install device on platforms
where it doesn't make sense. Always use UUIDs except on pc, efi and
	sparc64.
	Reported by: Daniel Kahn Gillmor.
2011-01-22 15:10:29 +01:00
Colin Watson
96e0a6ea97 * util/grub-mkconfig_lib.in (is_path_readable_by_grub): Consider a
path unreadable if `grub-probe -t abstraction' fails, for example if
memberlist fails on an LVM volume group.
Reported by: Darius Jahandarie.
2011-01-22 01:26:49 +00:00
Vladimir 'phcoder' Serbinenko
043603376e * util/grub-mkimage.c (generate_image): Check fwstart.img checksum
for safety.
2011-01-15 21:58:21 +01:00
Vladimir 'phcoder' Serbinenko
f1632d4dd0 Fix compilation on cygwin.
* conf/Makefile.common (STRIPFLAGS_KERNEL): Add -F elf32-i386 and
	-R .drectve on cygwin.
	* conf/i386-pc-cygwin-img-ld.sc: Merge rdata and pdata into data.
	* configure.ac: Use $(top_builddir) in TARGET_OBJ2ELF.
	(COND_CYGWIN): New condition.
	* grub-core/Makefile.am (%.mod): Set TARGET_OBJ2ELF.
	* grub-core/genmod.sh.in: Use ${TARGET_OBJ2ELF} and
	not @TARGET_OBJ2ELF@.
	* util/grub-pe2elf.c (write_symbol_table): Use pe_symtab->type and not
	type to determine whether aux is to be used.
2011-01-13 22:23:49 +01:00
Vladimir 'phcoder' Serbinenko
0b5e127b0d * util/ieee1275/ofpath.c (grub_util_devname_to_ofpath): Use the
realpath'ed device string.
	Handle floppy (somewhat).
	Issue error in unknown case rather than garbage.
	Reported by: Axel Beckert.
2011-01-12 19:58:32 +01:00
Vladimir 'phcoder' Serbinenko
173b71e9fe * util/grub.d/00_header.in (load_video): Handle the case when no video
drivers available.
	Thanks to: Axel Beckert.
2011-01-12 19:51:19 +01:00
Vladimir 'phcoder' Serbinenko
f8f479dbbb * util/grub-mkfont.c (write_font_pf2): Use appropriate type for data
variable. Fixes problem on big endian platforms.
2011-01-12 12:49:16 +01:00
Robert Millan
89644ef113 Rename grub-fuse to grub-mount (with Vladimir's blessing) 2011-01-11 21:20:54 +01:00
Colin Watson
86205c94c3 * util/grub-mklayout.c (console_grub_equivalences_shift): Terminate
with NULL.
(console_grub_equivalences_unshift): Likewise.
Reported by: Daniel Dehennin.
2011-01-11 09:08:57 -06:00
Vladimir 'phcoder' Serbinenko
c2fa6cbb42 * util/grub-menulst2cfg.c: Add missing include of misc.h. 2011-01-10 23:57:49 +01:00
Vladimir 'phcoder' Serbinenko
d570097a04 * util/grub-kbdcomp.in: Add missing prefix and exec_prefix variables.
Reported by: nebuchadnezzar.
2011-01-10 23:41:58 +01:00
Vladimir 'phcoder' Serbinenko
a508e77642 * util/grub-kbdcomp.in: Add missing transform and bindir variables.
Reported by: nebuchadnezzar.
2011-01-10 23:31:27 +01:00
Vladimir 'phcoder' Serbinenko
6fef99b4e4 * util/grub-mklayout.c (usage): Update help text. 2011-01-10 19:52:12 +01:00
Vladimir 'phcoder' Serbinenko
ce6bb3ee31 * util/grub-menulst2cfg.c (main): Trim the line. 2011-01-10 19:20:50 +01:00
Grégoire Sutre
1f060f399a Teach grub-mkconfig to load fs modules for NetBSD. 2011-01-10 01:08:40 +01:00
Grégoire Sutre
a21e5672fd Handle openbsd and netbsd types being in part_bsd module. 2011-01-09 23:23:25 +01:00
Vladimir 'phcoder' Serbinenko
92bb078645 grub-fuse 2011-01-08 19:51:08 +01:00
Vladimir 'phcoder' Serbinenko
014b68068d * util/grub-setup.c (setup): Handle NetBSD and OpenBSD disklabels.
Reported and tested by: Grégoire Sutre.
2011-01-07 13:27:34 +01:00
Colin Watson
80e9f2bce8 merge trunk 2011-01-05 11:57:17 +00:00
Vladimir 'phcoder' Serbinenko
4c3e4f37be * util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr
only when needed.
2011-01-05 01:28:28 +01:00
Vladimir 'phcoder' Serbinenko
092fd3a072 merge mainline into ahci 2011-01-03 16:03:13 +01:00
Vladimir 'phcoder' Serbinenko
469ee10a7f * util/grub-install.in: Correctly use bootloader_id and not
GRUB_DISTRIBUTOR on efibootmgr line.
2011-01-03 14:33:43 +01:00
Vladimir 'phcoder' Serbinenko
323a8e9c64 * util/grub-mkfont.c (main): Report errors in FT_New_Face. 2011-01-03 14:16:42 +01:00
phcoder
7021cb3e16 Fix incorrect usage of variables in grub-install 2011-01-03 13:48:33 +01:00
phcoder
bea3358389 First handling of ia64-efi in grub-mkimage 2011-01-03 13:46:36 +01:00
Vladimir 'phcoder' Serbinenko
0718f66d12 Discard a bunch of junk code 2011-01-03 00:56:28 +01:00
Vladimir 'phcoder' Serbinenko
0f35c665e6 merge mainline to ia64 2011-01-03 00:04:39 +01:00
Vladimir 'phcoder' Serbinenko
7edf63fce6 merge ia64-emu into ia64 2011-01-02 23:55:50 +01:00
Ian Campbell
1b394975e9 * util/grub.d/20_linux_xen.in (linux_entry): Correctly capitalize
Xen and reorder menu item wording to make it clearer that this entry
will launch Xen.  Print separate messages when loading Xen and
Linux.
2010-12-31 22:49:42 +00:00
Vladimir 'phcoder' Serbinenko
3d5f359d3b merge mainline into ahci 2010-12-26 11:20:12 +01:00
Vladimir 'phcoder' Serbinenko
c4855fdc79 * util/grub.d/30_os-prober.in: Don't emit drivemap directive for
Windows Server 2008.
	Reported by: Devin Giddings.
2010-12-25 18:16:01 +01:00
Vladimir 'phcoder' Serbinenko
d1e517eb20 extend --disk-module to AHCI and USB 2010-12-25 12:11:54 +01:00
Colin Watson
e925b2b6d4 merge parse-color 2010-12-23 12:22:20 +00:00
Colin Watson
4e01b6c821 * util/grub-mkconfig_lib.in (gettext_quoted): Add clarifying
comment.  Add an extra layer of quotation, requiring the output of
this function to be used in a printf format string.
(gettext_printf): New function.
* util/grub.d/10_hurd.in: Use gettext_printf where appropriate.
Extract translatable strings from here-documents and use a temporary
variable instead, so that xgettext can find them.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.

* po/grub.d.sed: New file.
* po/Makefile.in.in ($(DOMAIN).pot-update): Extract gettext_printf
arguments.  Set c-format flags on all strings extracted from
util/grub.d/ (xgettext refuses to include these itself for strings
it extracted from a shell file, but these really are c-format).
2010-12-21 12:49:29 +00:00
Vladimir 'phcoder' Serbinenko
5cf86f4b0f * util/grub-mkfont.c (main): Handle errors from FT_Set_Pixel_Sizes. 2010-12-18 22:47:50 +01:00
Colin Watson
e03f549b3e Preferred resolution detection for VBE.
* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_flat_panel_info):
New function.
(grub_vbe_bios_get_ddc_capabilities): Likewise.
(grub_vbe_bios_read_edid): Likewise.
(grub_vbe_edid_checksum): Likewise.
(grub_vbe_get_preferred_mode): Likewise.  Try EDID followed by the
Flat Panel extension, in line with the X.org VESA driver.
(grub_video_vbe_setup): When the mode is "auto", try to get the
preferred mode from VBE, and use the largest mode that is no larger
than the preferred mode (some BIOSes expose a preferred mode that is
not in their mode list!).  If this fails, fall back to 640x480 as a
safe conservative choice.
* include/grub/i386/pc/vbe.h (struct grub_vbe_flat_panel_info): New
structure.
(struct grub_vbe_edid_info): Likewise.
(grub_vbe_bios_get_flat_panel_info): Add prototype.
(grub_vbe_bios_get_ddc_capabilities): Likewise.
(grub_vbe_bios_read_edid): Likewise.

* util/grub.d/00_header.in (GRUB_GFXMODE): Default to "auto".  This
is more appropriate on a wider range of platforms than 640x480.
2010-12-14 16:22:19 +00:00
Colin Watson
1fb430f865 * grub-core/gettext/gettext.c (grub_gettext_init_ext): Factor out
.mo/.mo.gz opening sequence to ...
(grub_mofile_open_lang): ... here.
(grub_gettext_init_ext): If opening ll_CC fails, try ll.
* util/grub.d/00_header.in (grub_lang): Include country part of
locale.
Reported by: Mario Limonciello.
2010-12-10 11:45:08 +00:00
Vladimir 'phcoder' Serbinenko
fdfde32aa4 striped zpool support 2010-12-05 21:17:24 +01:00
BVK Chaitanya
bddc3ef623 * util/grub-script-check.c (main): Print script line number on
error.
2010-12-03 08:58:34 +05:30
BVK Chaitanya
c53c723762 print line number on error 2010-12-03 08:55:57 +05:30
Vladimir 'phcoder' Serbinenko
f420a80458 * util/grub-setup.c (setup): Stop recommending --force. People who
understand the dangers of blocklists are able to find this option
	anyway and the ones who don't shouldn't use it anyway.
2010-11-26 22:03:16 +01:00
Colin Watson
9be57a0dad Fix LVM-on-RAID probing.
* util/grub-probe.c (probe): Remember which disk was detected as
RAID (perhaps an LVM physical volume).  Use that disk's raidname
rather than that of the top-level disk.
2010-11-26 12:26:37 +00:00
Colin Watson
74f72a6415 * util/deviceiter.c (grub_util_iterate_devices): Save a bit of
effort by skipping "." and ".." entries up-front.
Suggested by: Michael Lazarev.
2010-11-24 19:43:32 +00:00
Colin Watson
b7fbac1214 * util/deviceiter.c (compare_devices): If the by-id link for a
device couldn't be resolved, fall back to sorting by the by-id link
rather than segfaulting.
Reported and tested by: Daniel Mierswa.
2010-11-23 17:42:06 +00:00
Colin Watson
1e44c52a69 * partmap/msdos.c (embed_signatures): New array.
(pc_partition_map_embed): Check for and avoid sectors matching any
of the signatures in embed_signatures.
* util/grub-setup.c (setup): Allow for the embedding area being
split into multiple blocklists.
2010-11-22 22:33:55 +00:00
Colin Watson
03df09c7c8 * util/grub-install.in: Fix parsing of --grub-mkrelpath= option. 2010-11-22 13:57:16 +00:00
Colin Watson
cf8ffc3825 * util/grub-install.in: Remove excessive quoting that broke
installations to RAID devices.
2010-11-22 12:20:57 +00:00
Vladimir 'phcoder' Serbinenko
65e93f6b84 * util/grub-install.in: Ignore empty partition table detection
instead of trying to include part_ module.
2010-11-14 16:15:41 +01:00
Vladimir 'phcoder' Serbinenko
bc5dd0b9ca * util/grub-mkconfig.in: Fix quoting. 2010-11-13 16:27:29 +01:00
Vladimir 'phcoder' Serbinenko
5f0c02b3d8 * util/grub-install.in: Handle filenames containing spaces.
Reported by: Jordan Uggla.
	Tested by: Jordan Uggla.
2010-11-13 16:03:29 +01:00
Vladimir 'phcoder' Serbinenko
4417aae6b7 * util/grub-mkconfig.in (grub_script_check): New variable.
Use grub_script_check instead of grub-script-check.
	Reported by: Barry Jackson.
2010-11-13 16:00:39 +01:00
Vladimir 'phcoder' Serbinenko
6972dea937 * util/grub-install.in: Replace useless recomendation to pass
--modules with a recomendation to report a bug.
2010-11-06 21:37:13 +01:00
Robert Millan
6c9e4c0c89 2010-11-05 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig.in: Remove gfxterm.mod probe (no longer
	needed).
2010-11-05 22:56:14 +01:00
Robert Millan
1a3aaff40f 2010-11-04 Robert Millan <rmh@gnu.org>
* util/deviceiter.c (grub_util_iterate_devices): Increase SCSI
	limit to 48 (to cope with Sun Fire X4500), and IDE limit to 96
	(its SATA disks are detected as slaveless IDE master drives on
	kFreeBSD).
	Reported by Carsten Aulbert.
2010-11-04 13:58:29 +01:00
Colin Watson
a75f4f62ae * util/bin2h.c (main): Fix spelling error in generated output. 2010-11-02 22:51:51 +00:00
Vladimir 'phcoder' Serbinenko
74aaf558ef * util/grub.d/10_hurd.in: Don't call savedefault on recovery entries.
* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
2010-11-01 12:49:40 +01:00
Vladimir 'phcoder' Serbinenko
f8729d984a * util/grub.d/10_linux.in: Add missing load_video with explicit
GRUB_GFXPAYLOAD_LINUX.
2010-11-01 12:36:00 +01:00
Vladimir 'phcoder' Serbinenko
95b9257e6e * util/grub-setup.c (setup): Refuse to do a cross-disk embeddingless
install rather than creating a broken install.
2010-10-26 12:40:35 +02:00
Vladimir 'phcoder' Serbinenko
26c53dc64c * util/grub-setup.c (argp): Remove misleading example of installing to
a partition.
2010-10-26 12:33:57 +02:00
Vladimir 'phcoder' Serbinenko
4171b3c5bc * util/grub-setup.c (setup): Clarify the error message. 2010-10-26 12:31:26 +02:00
Grégoire Sutre
b65ea15514 Make mktemp invocations portable. 2010-10-18 22:50:01 +02:00
BVK Chaitanya
6351c13140 fix built-in initramfs case 2010-10-18 13:38:42 +05:30
Vladimir 'phcoder' Serbinenko
fdf2ec9c8c * util/grub-setup.c (setup): New parameter allow_floppy.
(arguments): New member allow_floppy.
	(argp_parser): Handle --allow-floppy.
	(main): Pass allow_floppy.
	* util/grub-install.in: New option --allow-floppy passed though to
	grub-setup.
2010-10-17 00:35:14 +02:00
Vladimir 'phcoder' Serbinenko
861dfd4cb2 * util/grub-install.in: Handle partitionless disks. 2010-10-17 00:28:19 +02:00
Vladimir 'phcoder' Serbinenko
f77a8c2470 * util/grub-setup.c (setup): Don't clean blocklists before readability
verfification.
2010-10-17 00:25:23 +02:00
Robert Millan
2d5fed60d0 2010-10-15 Robert Millan <rmh@gnu.org>
* util/grub.d/10_linux.in (list): Expand "vmlinu[zx]" instances to
	guarantee compressed ones are processed first.
2010-10-15 12:06:13 +02:00
Robert Millan
219b35646a 2010-10-12 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig.in: Merge `GRUB_DISABLE_LINUX_RECOVERY' and
	`GRUB_DISABLE_NETBSD_RECOVERY' into a single `GRUB_DISABLE_RECOVERY'
	variable.  All references updated.
	
	* util/grub.d/10_kfreebsd.in: Support recovery boot entries.
2010-10-12 14:47:04 +02:00
Vladimir 'phcoder' Serbinenko
20c6bb7e9e Correctly distinguish mdraid flavours.
* grub-core/disk/raid.c (grub_raid_getname) [GRUB_UTIL]: New function.
	(insert_array): New argument raid.
	* include/grub/disk.h (grub_disk_dev) [GRUB_UTIL]: New member raidname.
	* include/grub/raid.h (grub_raid_array) [GRUB_UTIL]: New member driver.
	* util/grub-probe.c (probe): PRint raidname instead of plainly "mdraid".
2010-10-08 23:27:27 +02:00
Vladimir 'phcoder' Serbinenko
17821956e7 * util/grub-setup.c (main) [GRUB_MACHINE_IEEE1275]: Propagate argp
usage.
2010-09-30 19:27:28 +02:00
Vladimir 'phcoder' Serbinenko
b65830fae1 Write embedding zone using Reed-Solomon.
* Makefile.util.def (grub-setup): Add grub-core/lib/reed_solomon.c.
	* grub-core/Makefile.am (rs_decoder.S): New target.
	(kern/i386/pc/startup.S): Depend on rs_decoder.S.
	* grub-core/kern/i386/pc/startup.S (reed_solomon_redundancy): New field.
	(multiboot): Move to RS part.
	(post_reed_solomon): New label.
	(grub_boot_drive): Move to non-RS part since it's modified in memory
	on boot.
	Include rs_decoder.S.
	* grub-core/lib/reed_solomon.c: New file.
	* include/grub/offsets.h (GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY):
	New definition.
	(GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE): Removed.
	(GRUB_KERNEL_I386_PC_RAW_SIZE): Updated.
	(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): New definition.
	* include/grub/partition.h (grub_partition_map): Change prototype of
	embed to allow returning additional sectors.
	* include/grub/reed_solomon.h: New file.
	* util/grub-setup.c (setup): Handle Reed-Solomon.
2010-09-29 21:33:38 +02:00
Vladimir 'phcoder' Serbinenko
3ac9e79207 Multiple bugs correction for Reed-Solomon 2010-09-25 20:40:26 +02:00
Vladimir 'phcoder' Serbinenko
419cbeb06d hook Reed-Solomon into startup.S 2010-09-25 19:33:05 +02:00
Vladimir 'phcoder' Serbinenko
4f0de6881c C part of Reed-Solomon 2010-09-24 14:05:47 +02:00
Yves Blusseau
1d12cf2947 * grub-core/lib/LzFind.c: Add missing include.
* grub-core/lib/LzmaEnc.c: Likewise.
    * grub-core/script/lexer.c: Likewise.
    * grub-core/script/yylex.l: Likewise.
    * util/grub-macho2img.c: Likewise.
    * util/grub-menulst2cfg.c: Likewise.
    * util/grub-mklayout.c: Likewise.
    * util/grub-mkpasswd-pbkdf2.c
    * util/grub-mkrelpath.c: Likewise.
    * util/resolve.c: Likewise.
2010-09-24 09:19:57 +02: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
bf5f1dc6d2 Write total module size before compressing 2010-09-22 00:51:54 +02:00
Vladimir 'phcoder' Serbinenko
2c44e493c7 Compressor part 2010-09-21 21:35:46 +02:00
Vladimir 'phcoder' Serbinenko
758194b076 Allow compression algorithm specification 2010-09-21 20:30:28 +02:00
Colin Watson
5c5277839a * util/grub-install.in: Fix the bootloader ID option to be
consistently --bootloader-id, not --bootloader_id.
Reported by: KESHAV P.R.
2010-09-21 12:10:36 +01: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
Yves Blusseau
934d7e44b2 * util/grub-editenv.c: Update strings to avoid warnings when generating
grub.pot file.
    * util/grub-setup.c: Likewise.
2010-09-21 11:17:54 +02:00
Vladimir 'phcoder' Serbinenko
c5b4cd370e asm part for mips decompressor 2010-09-21 10:14:08 +02:00
Vladimir 'phcoder' Serbinenko
3e0fa5d0e0 * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Use UUID when possible. 2010-09-21 01:02:24 +02:00
Vladimir 'phcoder' Serbinenko
ade9bd6642 * util/grub.d/20_linux_xen.in: Use submenus. 2010-09-21 00:58:59 +02:00
Vladimir 'phcoder' Serbinenko
74342e312f Support some annoying BSD and Minix subpartitions.
* Makefile.util.def (libgrub.a): Add grub-core/partmap/bsdlabel.c.
	* grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name):
	Properly handle concatenation.
	* grub-core/kern/device.c (grub_device_iterate): Likewise.
	* grub-core/normal/completion.c (iterate_partition): Likewise.
	* grub-core/kern/disk.c (grub_disk_open): Make disk->name not
	contain partition. All users updated.
	* grub-core/partmap/bsdlabel.c (grub_netbsdlabel_partition_map): New
	struct.
	(grub_openbsdlabel_partition_map): Likewise.
	(bsdlabel_partition_map_iterate): Rename to ..
	(iterate_real): ... this. New arguments sector, freebsd and pmap.
	(bsdlabel_partition_map_iterate): New function.
	(netopenbsdlabel_partition_map_iterate): Likewise.
	(netbsdlabel_partition_map_iterate): Likewise.
	(openbsdlabel_partition_map_iterate): Likewise.
	(GRUB_MOD_INIT): Register new partmaps.
	(GRUB_MOD_FINI): Unregister new partmaps.
	* grub-core/partmap/msdos.c (pc_partition_map_iterate): Rename to ...
	(grub_partition_msdos_iterate): ... this. All users updated.
	Don't support embedding other than in a minix partition.
	* include/grub/msdos_partition.h (grub_partition_msdos_iterate): New
	proto.
	* include/grub/partition.h (grub_partition): New field msdostype.
	* util/grub-install.in: Handle openbsd and netbsd types being in
	part_bsd module.
2010-09-20 21:45:06 +02:00
Vladimir 'phcoder' Serbinenko
1e8d555b7d Split mdraid.mod into mdraid09.mod and mdraid1x.mod.
* Makefile.util.def (libgrub.a): Add grub-core/disk/mdraid1x_linux.c.
	* grub-core/Makefile.core.def (mdraid): Renamed to ...
	(mdraid09): ... this.
	(mdraid1x): New module.
	* grub-core/disk/mdraid_linux.c: Move 1.x parts ...
	* grub-core/disk/mdraid1x_linux.c: ...here. All users updated.
2010-09-20 20:09:31 +02:00
Colin Watson
dfe3b247a2 * util/grub-editenv.c (argp_parser): Don't pass translated strings
as printf format strings; the translations might contain '%' which
could cause a crash.
(main): Likewise.
* util/grub-fstest.c (argp_parser): Likewise.
* util/grub-setup.c (argp_parser): Likewise.
(main): Likewise.
2010-09-20 17:56:14 +01:00
Vladimir 'phcoder' Serbinenko
3286a4b4c2 Use argp in grub-fstest.
* util/grub-fstest.c: Don't include getopt.h.
	Include argp.h.
	(root): New variable.
	(args_count): Likewise.
	(nparm): Likewise.
	(num_disks): Likewise.
	(images): Likewise.
	(cmd): Likewise.
	(debug_str): Likewise.
	(args): Likewise.
	(options): Transformed to argp.
	(usage): Removed.
	(main): Split argument parsing into ...
	(argp_parser): ... this. Changed to argp format.
	(argp): New variable.
	(main): Use argp_parse.
2010-09-20 18:38:38 +02:00
Colin Watson
c982589f0c * util/grub-mkrescue.in: Add explicit root argument to --set to
prevent the UUID being interpreted as an argument to --set (matches
previous change to prepare_grub_to_access_device).
2010-09-20 13:14:44 +01:00
Yves Blusseau
6439b8ee81 * util/grub-editenv.c: Use argp instead of getopt. 2010-09-20 12:39:28 +02:00
Yves Blusseau
c5930ec832 * util/grub-setup.c: Use argp instead of getopt. 2010-09-20 12:37:37 +02:00
Szymon Janc
c55f50180d Remove crc.mod and move crc command to hashsum.mod.
Remove lib/crc.c - users updated to use gcrypt implementation.

	* grub-core/commands/crc.c: Removed.
	* grub-core/Makefile.core.def (crc): Module removed.
	* grub-core/commands/hashsum.c (aliases[]): Add crc alias.
	* grub-core/commands/hashsum.c (GRUB_MOD_INIT): Register crc command.
	* grub-core/commands/hashsum.c (GRUB_MOD_FINI): Unregister crc command.
	* grub-core/lib/crc.c: Removed.
	* include/grub/lib/crc.h: Removed.
	* Makefile.util.def (crc): Remove lib/crc.c
	* grub-core/Makefile.core.def (libgrub.a): Remove grub-core/lib/crc.c.
	* util/grub-fstest.c (cmd_crd): Use libgcrypt crc implementation.
	* Makefile.util.def (libgrub.a): Add grub-core/lib/libgcrypt-grub/cipher/crc.c.
	* Makefile.util.def (grub-fstest): Add CFLAGS_GCRY to cflags.
	* Makefile.util.def (grub-fstest): Add CPPFLAGS_GCRY to cppflags.
	* grub-core/efiemu/prepare.c (grub_efiemu_crc): Use libgcrypt crc implementation.
2010-09-20 01:40:58 +02:00
BVK Chaitanya
b524259bec merge with mainline 2010-09-19 18:54:45 +05:30
BVK Chaitanya
2f4e8053e0 * util/grub-mkconfig.in: Check the config script for syntax errors
before saving.
2010-09-19 08:49:25 +05:30
BVK Chaitanya
7431d7a49c merge with mainline 2010-09-19 08:45:38 +05:30
Colin Watson
75831c3419 * Makefile.util.def (grub-install): Use util/grub-install.in on all
platforms.
	* util/grub-install.in: Add EFI and IEEE1275 support.
	* util/i386/efi/grub-install.in: Removed.
	* util/ieee1275/grub-install.in: Likewise.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-19 01:32:27 +02:00
Vladimir 'phcoder' Serbinenko
eaf41b2592 * grub-core/commands/i386/cmostest.c (+parse_args): New function.
(grub_cmd_cmosclean): Likewise.
	(GRUB_MOD_INIT): Register command cmosclean.
	* util/grub-mkconfig.in: Export GRUB_BUTTON_CMOS_CLEAN.
	* util/grub.d/00_header.in: Handle GRUB_BUTTON_CMOS_CLEAN.
2010-09-19 01:15:44 +02:00
Carles Pina i Estany
1a9130dd3f Add keyboard layouts support.
* Makefile.util.def (grub-mklayout): New file.
	(grub-kbdcomp): New script.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES) [COND_mips_yeeloong]:
	Add keyboard_layouts.h.
	* grub-core/Makefile.core.def (kernel): Add commands/keylayouts.c and
	commands/boot.c on yeeloong.
	(keylayouts): New module.
	* grub-core/bus/usb/ohci.c
	* grub-core/bus/usb/uhci.c
	* grub-core/bus/usb/usbhub.c (rescan): New variable.
	(grub_usb_add_hub): Poll interrupt pipe for device handling.
	(attach_root_port): Likewise.
	(poll_nonroot_hub): Likewise.
	(grub_usb_poll_devices): Likewise.
	(detach_device): Close transfer.
	* grub-core/bus/usb/usbtrans.c (grub_usb_execute_and_wait_transfer): New
	function.
	(grub_usb_bulk_setup_readwrite): Likewise.
	(grub_usb_bulk_finish_readwrite): Likewise.
	* grub-core/commands/keylayouts.c: New file.
	* grub-core/commands/keystatus.c (grub_getkeystatus): New function.
	* grub-core/commands/menuentry.c (hotkey_aliases): All several new
	aliases.
	* grub-core/term/at_keyboard.c: Restructured to use keylayouts and
	support scancode 2.
	* grub-core/term/usb_keyboard.c: Restructured to use keylayouts.
	* include/grub/keyboard_layouts.h: New file.
	* util/grub-mklayout.c: New file.
	* util/grub-kbdcomp.in: Likewise.

	Also-By: Aleš Nesrsta <starous@volny.cz>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-19 01:01:35 +02:00
Vladimir 'phcoder' Serbinenko
9696382e79 GRUB-legacy configuration file support.
* Makefile.util.def (grub-menulst2cfg): New util.
	* docs/man/grub-menulst2cfg.h2m: New file.
	* grub-core/Makefile.core.def (legacycfg): New module.
	* grub-core/commands/legacycfg.c: New file.
	* grub-core/commands/menuentry.c (append_menu_entry): Rename to ...
	(grub_normal_add_menu_entry): ... this.
	* grub-core/commands/password.c (grub_cmd_password): Split main part to ...
	(grub_normal_set_password): ...this.
	* grub-core/commands/videoinfo.c (grub_cmd_videoinfo): Support MODE.
	* grub-core/loader/i386/linux.c (linux_vesafb_res): Move to ..,
	* grub-core/lib/i386/pc/vesa_modes_table.c: ... here.
	* grub-core/lib/legacy_parse.c: New file.
	* grub-core/normal/auth.c (grub_cmd_authenticate): New command.
	* include/grub/i386/pc/vesa_modes_table.h: New file.
	* include/grub/legacy_parse.h: Likewise.
	* include/grub/normal.h (grub_normal_add_menu_entry): New proto.
	* util/grub-menulst2cfg.c: New file.

	* grub-core/Makefile.core.def (lsapm): New module.
	* grub-core/commands/i386/pc/lsapm.c: New file.
	* grub-core/loader/i386/multiboot_mbi.c (make_mbi) [GRUB_MACHINE_PCBIOS]: Pass APM info.
	* grub-core/loader/multiboot_mbi2.c (make_mbi) [GRUB_MACHINE_PCBIOS]:
	Likewise.
	* include/grub/i386/pc/apm.h: New file.
	* include/multiboot.h (multiboot_apm_info): New struct.
2010-09-18 16:21:57 +02:00
Colin Watson
108538d8ff Support RAID on virtio devices, and others.
* grub-core/kern/emu/getroot.c [__MINGW32__] (find_root_device):
Rename to ...
[__MINGW32__] (grub_find_device): ... this.
[! __MINGW32__ && ! __CYGWIN__] (find_root_device): Rename to ...
[! __MINGW32__ && ! __CYGWIN__] (grub_find_device): ... this.  Use a
reasonable default if dir is NULL.
[! __MINGW32__ && __CYGWIN__] (find_cygwin_root_device): Rename to
...
[! __MINGW32__ && __CYGWIN__] (grub_find_device): ... this.
(grub_guess_root_device): Update callers.
* include/grub/emu/getroot.h (grub_find_device): Add prototype.
* util/raid.c (grub_util_getdiskname): Remove.
(grub_util_raid_getmembers): Use grub_find_device rather than
grub_util_getdiskname.
2010-09-16 14:55:28 +01:00
Colin Watson
c514c29712 Explicitly pass -d ${pkglibdir} to grub-mkimage, to make it easier to
run grub-install from the build directory.
2010-09-16 14:50:41 +01:00
Vladimir 'phcoder' Serbinenko
cb731b5e81 * util/grub-setup.c (setup): Fix incorrect container semantics. 2010-09-16 00:27:06 +02:00
Vladimir 'phcoder' Serbinenko
e50fca4a4c Move embedding routines to partmap sources files.
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot)
	[GRUB_UTIL]: New variable.
	(gpt_partition_map_iterate): Set part.parent.
	(gpt_partition_map_embed) [GRUB_UTIL]: New function.
	(grub_gpt_partition_map) [GRUB_UTIL]: Set .embed.
	* grub-core/partmap/msdos.c (pc_partition_map_embed) [GRUB_UTIL]:
	New function.
	(grub_msdos_partition_map) [GRUB_UTIL]: Set .embed.
	* include/grub/partition.h (grub_embed_type_t) [GRUB_UTIL]: New type.
	(grub_partition_map) [GRUB_UTIL]: New field embed.
	* util/grub-setup.c (grub_gpt_partition_type_bios_boot): Removed.
	(setup): Use ->embed.
2010-09-15 21:36:57 +02:00
Vladimir 'phcoder' Serbinenko
f00478b719 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): New
function.
	* include/grub/emu/hostdisk.h (grub_util_biosdisk_is_floppy): New proto.
	* util/grub-setup.c (setup): Use grub_util_biosdisk_is_floppy.
2010-09-15 15:30:43 +02:00
Vladimir 'phcoder' Serbinenko
76de44d8ac Merge mainline into install 2010-09-15 14:46:53 +02:00
Vladimir 'phcoder' Serbinenko
14437e8008 Allow install_device to be missing on non-pc and non-sparc 2010-09-15 14:45:08 +02:00
Yves Blusseau
2b94e3ff6e Add function to get completions from usage.
* util/bash-completion.d/grub-completion.bash.in: Add function to get
    completions from usage. Use LC_ALL=C to get options properly.
2010-09-15 11:46:16 +02:00
Vladimir 'phcoder' Serbinenko
0cb2f2813f merge mainline into legacy_parser 2010-09-15 11:43:59 +02:00
Vladimir 'phcoder' Serbinenko
d2ea455141 * grub-core/partmap/sun.c (sun_partition_map_iterate): Don't needlesly
allocate p.
2010-09-14 21:07:39 +02:00
Vladimir 'phcoder' Serbinenko
3c3b5040cd * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Add
explicit root argument to set to prevent UUID to be interpreted as
	argument to set.
2010-09-14 21:04:08 +02:00
Vladimir 'phcoder' Serbinenko
94564f81a8 * include/grub/disk.h (grub_disk): Remove has_partitions.
All users updated.
	* disk/loopback.c (grub_loopback): Remove has_partitions.
	All users updated.
	(options): Remove partitions. All users updated.
	* util/grub-fstest.c (fstest): Don't pass "-p" to loopback.
	* util/i386/pc/grub-setup.c (setup): copy partition table only when
	actual partition table is found.
2010-09-13 23:59:22 +02:00
Vladimir 'phcoder' Serbinenko
3352800b99 Remove readability checks (too many false negatives).
* util/grub-install.in: Remove readability checks.
	* util/grub-mkconfig.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Revert to old
	way.
2010-09-13 22:18:03 +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
Vladimir 'phcoder' Serbinenko
9b5b2541a2 grub-mknetdir script.
* Makefile.util.def (grub-mknetdir): New module.
	* tests/util/grub-shell.in: Support boot=net
	* util/grub-mknetdir.in: New file.
2010-09-13 14:03:05 +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
e64334df29 Support mixed inline and suffix commands 2010-09-12 15:50:52 +02:00
Vladimir 'phcoder' Serbinenko
64ad6157ae Fix bunch of memory problems and implement hdbias 2010-09-12 14:01:02 +02:00
Vladimir 'phcoder' Serbinenko
6c6850ae13 Implement hiddenmenu (not tested) 2010-09-12 02:55:24 +02:00
Vladimir 'phcoder' Serbinenko
bd9603071a Merge mainline into legacy_parser 2010-09-11 22:39:55 +02:00
Vladimir 'phcoder' Serbinenko
09695ab80c Fix few compile errors 2010-09-11 22:18:06 +02:00
Vladimir 'phcoder' Serbinenko
76e61597b4 Merge mainline into install 2010-09-11 17:28:46 +02:00
Vladimir Serbinenko
25761e13ee * util/grub-install.in (grub_partition): New variable.
Set prefix_drive on EFI and PC to (,$grub_partition) as last resort.
	* util/i386/pc/grub-setup.c (setup): Don't touch prefix.
	Fixes a bug reported by Yves Blusseau.
2010-09-11 17:21:48 +02:00
Vladimir 'phcoder' Serbinenko
038272a5c5 Merge mainline into install 2010-09-11 16:38:37 +02:00
Vladimir 'phcoder' Serbinenko
638f5f7ea1 Implement --bootloader-id 2010-09-11 16:37:00 +02:00
Colin Watson
5ed7d816b4 * util/grub-install.in: Don't try to verify core.img until after
running grub-mkimage to create it.
2010-09-10 23:15:56 +01:00
Robert Millan
90367e043d 2010-09-10 Robert Millan <rmh@gnu.org>
* util/grub.d/10_hurd.in: Add misc readability checks.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
2010-09-10 15:11:54 +02:00
Colin Watson
c452fa66dd * util/grub-install.in: ${imgext} won't be defined here until the
install branch is merged.  For the meantime, only verify core.img on
i386-pc and sparc64-ieee1275 platforms.
2010-09-10 13:47:16 +01:00
Robert Millan
66d4bea5cc 2010-09-10 Robert Millan <rmh@gnu.org>
* util/grub.d/10_kfreebsd.in: Fix ${kfreebsd_device} initialization
	on ZFS.  Now non-main filesystems are supported as / too.
2010-09-10 13:35:23 +02:00
Colin Watson
b6a690eeb8 * Makefile.util.def (libgrub.a): Move grub-core/kern/emu/hostfs.c
and grub-core/disk/host.c to ...
(grub-fstest): ... here.  Having the host disk implementation
present confuses grub-probe and other utility programs.
* util/grub-mkconfig.in: Only verify readability of grub.cfg.new
when writing to a file, not when writing to stdout.
2010-09-09 17:17:45 +01:00
Robert Millan
7bf45fdd31 2010-09-09 Robert Millan <rmh@gnu.org>
* util/grub-probe.c (probe): Fix a pair of unhandled error
	conditions.
2010-09-09 01:16:05 +02:00
Robert Millan
f637773235 2010-09-08 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Improve
	with (optional) parameters to specify device and relative path.
	* util/grub-install.in: Use is_path_readable_by_grub() to
	verify readability of a few critical files.
	* util/grub-mkconfig.in: Use is_path_readable_by_grub() to
	verify readability of grub.cfg.new.
2010-09-08 23:41:27 +02:00
Robert Millan
6b8e78aee3 2010-09-08 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Improve
	with (optional) parameters to specify device and relative path.
	* util/grub-install.in: Use is_path_readable_by_grub() to
	verify readability of a few critical files.
	* util/grub-mkconfig.in: Use is_path_readable_by_grub() to
	verify readability of grub.cfg.new.
2010-09-08 23:35:53 +02:00
Vladimir 'phcoder' Serbinenko
dedb5f9be2 merge mainline into nested 2010-09-08 20:40:27 +02:00
Yves Blusseau
c0e53ea537 Add new --boot-directory option to replace --root-directory
* util/grub-install.in: Add new --boot-directory option
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
2010-09-08 17:25:29 +02:00
Yves Blusseau
b9fe6ea2ea * util/grub-mkconfig.in: Use new variable. 2010-09-08 17:21:32 +02:00
Colin Watson
fdff6f0be9 For EFI, hardcode the partition number in the core image's prefix. 2010-09-08 14:11:45 +01:00
Vladimir 'phcoder' Serbinenko
6ed71f4831 merge mainline into install 2010-09-08 15:05:42 +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
Robert Millan
99fd620d5a 2010-09-08 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig.in: Pass `--device ${GRUB_DEVICE}' when
	initializing `GRUB_FS'.
2010-09-08 14:29:32 +02:00
Mario Limonciello
dc3d901cde Check for the EFI distributor case-insensitively, since efi_distributor is
always forced to lower-case.
Reported by: Mario Limonciello.
2010-09-08 13:07:21 +01:00
Colin Watson
f438a5be58 Set install_device for EFI before it's needed. 2010-09-08 12:54:38 +01:00
bvk.groups@gmail.com
75d8c629fc syntax check before overwriting 2010-09-07 11:18:53 +05:30
Vladimir 'phcoder' Serbinenko
88ae2ce160 Fix several powerpc-ieee1275 issues and one EFI one while on it 2010-09-06 23:03:25 +02:00
Vladimir 'phcoder' Serbinenko
88b87c9313 * grub-core/kern/emu/main.c (main): Reinit LVM and RAID.
* util/grub-probe.c (main): Likewise.
	* util/i386/pc/grub-setup.c (main): Likewise.
	* util/sparc64/ieee1275/grub-setup.c (main): Likewise.
	Reported and debugged by: alexxy
2010-09-05 23:24:57 +02:00
Jo Shields
d7ee3441eb * util/grub.d/30_os-prober.in: Add missing classes. 2010-09-05 22:43:43 +02:00
Vladimir 'phcoder' Serbinenko
122a9b2cd9 Merge mainline into legacy_parser 2010-09-05 20:44:42 +02:00
Vladimir 'phcoder' Serbinenko
fc2ef1172c * grub-core/io/gzio.c (grub_gzio_open): Removed "transparent" parameter.
Made static.
	(grub_gzfile_open): Removed. All users updated.
	(GRUB_MOD_INIT): New function.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/kern/file.c (grub_file_filters_all): New variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_open): Handle filters.
	* grub-core/loader/i386/bsd.c (GRUB_MOD_INIT): Load gzio.
	* grub-core/normal/main.c (GRUB_MOD_INIT): Likewise.
	* include/grub/file.h (grub_file_filter_id_t): New type.
	(grub_file_filter_t): Likewise.
	(grub_file_filters_all): New extern variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_filter_register): New inline function.
	(grub_file_filter_unregister): Likewise.
	(grub_file_filter_disable): Likewise.
	(grub_file_filter_disable_compression): Likewise.
	* include/grub/gzio.h: Removed.
2010-09-05 13:05:36 +02:00
Vladimir 'phcoder' Serbinenko
208b940054 Handle new names in grub-install 2010-09-04 01:19:11 +02:00
Vladimir 'phcoder' Serbinenko
c8e7bf5ff7 Compress grub_prefix.
* grub-core/boot/i386/pc/lnxboot.S: Use
	GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE.
	* grub-core/kern/i386/pc/startup.S: Move grub_prefix to compressed part.
	* include/grub/offsets.h: Rename GRUB_MACHINE_DATA_END to
	GRUB_MACHINE_PREFIX_END. All users updated.
	(GRUB_KERNEL_I386_PC_PREFIX): Set to GRUB_KERNEL_I386_PC_RAW_SIZE.
	(GRUB_KERNEL_I386_PC_PREFIX_END): Set to GRUB_KERNEL_I386_PC_PREFIX
	+ 0x40.
	(GRUB_KERNEL_I386_PC_RAW_SIZE): Decrease.
	* util/grub-mkimage.c (image_target_desc): Change data_end to
	prefix_end. All users updated.
2010-09-03 14:54:04 +02:00
Vladimir 'phcoder' Serbinenko
8395034bec Add i386-pc-pxe image target.
* util/grub-mkimage.c (image_target_desc): New enum value
	IMAGE_I386_PC_PXE.
	(image_targets): New target i386-pc-pxe.
	(generate_image): Handle i386-pc-pxe image.
2010-09-02 17:15:53 +02:00
Vladimir 'phcoder' Serbinenko
529cc99acf Add i386-pc-pxe image target.
* util/grub-mkimage.c (image_target_desc): New enum value
	IMAGE_I386_PC_PXE.
	(image_targets): New target i386-pc-pxe.
	(generate_image): Handle i386-pc-pxe image.
2010-09-02 16:07:52 +02:00
Colin Watson
4066f57f19 * util/grub-mkrescue.in (usage): Tidy up usage output (and hence
generated manual page) a little.
2010-09-01 10:32:34 +01:00
Vladimir 'phcoder' Serbinenko
6585de4c0c merge mainline into ia64 2010-08-31 21:47:26 +02:00
Vladimir 'phcoder' Serbinenko
70770806f3 Merge mainline into keylayouts 2010-08-31 14:12:34 +02:00
Vladimir 'phcoder' Serbinenko
5aaf2c18bd Merge mainline into keylayouts 2010-08-31 14:03:29 +02:00
Colin Watson
861d5b5c72 Import EFI patch by cjwatson 2010-08-30 21:00:48 +02:00
Vladimir 'phcoder' Serbinenko
6c2111e96c Adapt common grub-install for efi and use it 2010-08-30 20:27:59 +02:00
Vladimir 'phcoder' Serbinenko
11721d1926 Remove leftover embedding of font objects.
* include/grub/kernel.h (OBJ_TYPE_FONT): Removed.
	* util/grub-install.in (font): Removed.
	* util/grub-mkimage.c (generate_image): Remove font support. All users
	updated.
2010-08-30 20:23:04 +02:00
Vladimir 'phcoder' Serbinenko
00cf36062b Merge mainline into install 2010-08-30 19:58:00 +02:00
Vladimir 'phcoder' Serbinenko
37837d4ecb Remove leftover embedding of font objects.
* include/grub/kernel.h (OBJ_TYPE_FONT): Removed.
	* util/grub-install.in (font): Removed.
	* util/grub-mkimage.c (generate_image): Remove font support. All users
	updated.
2010-08-30 19:48:10 +02:00
Vladimir 'phcoder' Serbinenko
8111f933ec remove ieee1275/grub-install and adapt grub-install for ieee1275 2010-08-30 19:30:34 +02:00
Vladimir 'phcoder' Serbinenko
f0b05761f4 fix multiboot compilation 2010-08-29 00:46:36 +02:00
Vladimir 'phcoder' Serbinenko
fff175c77f Implement grub-menulst2cfg and fix many bugs in legacy_parser 2010-08-27 20:04:49 +02:00
Samuel Thibault
04ddcc6a88 2010-08-23 Samuel Thibault <samuel.thibault@ens-lyon.org>
* util/grub.d/30_os-prober.in: Fix conversion from grub-probe
	--target=drive output to Mach device name.
2010-08-23 22:41:14 +02:00
Vladimir 'phcoder' Serbinenko
400ef90dba Fix reversal of NPAGE and PPAGE when handling Linux keymaps 2010-08-23 20:40:06 +02:00
Vladimir 'phcoder' Serbinenko
9f5a5ad55a Fix RCTRL and RALT linux scancodes 2010-08-23 13:21:26 +02:00
Vladimir 'phcoder' Serbinenko
09206dc3d0 Macroify key constants 2010-08-22 23:56:41 +02:00
Vladimir 'phcoder' Serbinenko
5ea70ca5fa Support scancode set 2 2010-08-22 22:53:31 +02:00
BVK Chaitanya
d84666e6bb merge with mainline 2010-08-22 21:00:22 +05:30
Vladimir 'phcoder' Serbinenko
c32f26bce8 Make USB the main keylayout for simplicity 2010-08-22 16:06:09 +02:00
BVK Chaitanya
8427685faa *_sources now collect all values of all its groups 2010-08-21 14:27:31 +05:30
Vladimir 'phcoder' Serbinenko
0b335a9797 Fix cutting bits by implicit conversion to char 2010-08-20 23:33:41 +02:00
Vladimir 'phcoder' Serbinenko
fea90138d5 merge mainline into keylayouts 2010-08-20 22:13:19 +02:00
Robert Millan
21a313dedc 2010-08-20 Robert Millan <rmh@gnu.org>
Make kFreeBSD code more generic to support ext2fs as root, ufs as
	a separate module and maybe other interesting combinations.
	
	* util/grub.d/10_kfreebsd.in (load_kfreebsd_module): New function.
	(kfreebsd_entry): Use load_kfreebsd_module() to load modules.
	(kfreebsd_entry): Add generic filesystem module load routine.
	Map GRUB `ext2' to kFreeBSD `ext2fs'.
2010-08-20 16:36:07 +02:00
BVK Chaitanya
3d9d354297 generate gcry rules from import_gcry 2010-08-20 18:21:31 +05:30