Commit graph

4130 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
6991503094 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
Return 0 if disk isn't biosdisk.
2011-09-28 14:07:53 +02:00
Grégoire Sutre
20fd15f9db Add LIBUTIL for grub-mkrelpath and grub-fstest. Fixes build on NetBSD. 2011-09-17 23:40:10 +02:00
Grégoire Sutre
1a7d7db97f Get sector size from disk label for NetBSD. 2011-09-17 23:01:48 +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
ca51c4a04f * grub-core/kern/mips/loongson/init.c (grub_machine_init): Handle the
case of less than 256 MiB of RAM.
2011-08-23 11:20:56 +02:00
Vladimir 'phcoder' Serbinenko
ab80f326f4 * grub-core/commands/wildcard.c (make_regex): Handle @. 2011-08-23 11:19:26 +02: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
ab178c084a * acinclude.m4: Use AC_LANG_PROGRAM macro to generate source code for
AC_LANG_CONFTEST macros.
2011-08-20 21:10:00 +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
Szymon Janc
fe8d4a7bc2 * grub-core/loader/i386/linux.c (grub_linux_setup_video): Add
GRUB_VIDEO_DRIVER_RADEON_FULOONG2E to switch case statement.
2011-08-20 11:58:41 +02:00
Szymon Janc
a5219af189 * grub-core/io/gzio.c (grub_gzio_open): Always return original io if
file type was not recognized correctly (not gzip or corrupted).
2011-08-20 11:48:46 +02:00
Vladimir 'phcoder' Serbinenko
f87abff538 * grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong.
* include/grub/cs5536.h (GRUB_CS5536_MSR_DIVIL_RESET): New definition.
2011-08-19 23:11:09 +02:00
Vladimir 'phcoder' Serbinenko
d94497eaca * grub-core/Makefile.core.def (kernel): Add video/radeon_fuloong2e.c on
loongson.
	* grub-core/kern/mips/loongson/init.c (grub_machine_init): Init
	video_radeon_fuloong2e.
	* grub-core/video/radeon_fuloong2e.c: New file.
	* include/grub/video.h (grub_video_id_t): Add new ID
	GRUB_VIDEO_DRIVER_RADEON_FULOONG2E.
2011-08-19 23:08:36 +02:00
Vladimir 'phcoder' Serbinenko
0d1fd0113b * include/grub/mips/loongson.h (GRUB_CPU_LOONGSON_COP0_PRID): New
define.
	* grub-core/kern/mips/loongson/init.c (grub_machine_init): Check
	that PRID matches the detected subplatform and reset the subplatform
	if it doesn't.
2011-08-19 23:04:18 +02:00
Vladimir 'phcoder' Serbinenko
84beb0eeb9 * grub-core/kern/misc.c (grub_vprintf): Fix a bug on malloc failure. 2011-08-19 22:59:24 +02:00
Vladimir 'phcoder' Serbinenko
1227c13390 Fix PCI iterating on functions >= 4.
* grub-core/bus/pci.c (grub_pci_iterate): Remove useless ghost skipping.
	* include/grub/mips/loongson/pci.h (GRUB_LOONGSON_OHCI_GHOST_FUNCTION):
	Removed.
	(GRUB_LOONGSON_EHCI_GHOST_FUNCTION): Likewise.
	(grub_pci_read): Fix bitmask.
	(grub_pci_read_word): Likewise.
	(grub_pci_read_byte): Likewise.
	(grub_pci_write): Likewise.
	(grub_pci_write_word): Likewise.
	(grub_pci_write_byte): Likewise.
2011-08-19 22:56:49 +02:00
Vladimir 'phcoder' Serbinenko
9594c6897e * configure.ac: Don't impose march=loongson2f on loongson platform. (It
can still be specified in TARGET_CFLAGS)
2011-08-19 22:49:48 +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
Szymon Janc
b526cbb6fa Make enable of disk cache statistics code configurable.
* configure.ac: --enable-cache-stats added.
* config.h.in (DISK_CACHE_STATS): New define.
* grub-core/Makefile.core.def (cacheinfo): New command.
* include/grub/disk.h(grub_disk_cache_get_performance): New function.
* grub-core/commands/cacheinfo.c: New file.
* grub-core/commands/minicmd.c (grub_rescue_cmd_info): Updated and
moved to cacheinfo.c.
* grub-core/kern/disk.c: Use DISK_CACHE_STATS to disable disk cache
debug code.
* include/grub/disk.h: Likewise.
2011-08-19 21:28:09 +02:00
Szymon Janc
fb739ccd79 * Makefile.am (AUTOMAKE_OPTIONS): = Added -Wno-portability flag.
* grub-core/Makefile.am: Likewise.
2011-08-19 20:06:42 +02:00
Vladimir 'phcoder' Serbinenko
2bba8cfd55 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_iterate): Skip with
non-zero pull.
2011-08-16 23:12:20 +02:00
Vladimir 'phcoder' Serbinenko
43526629e5 * grub-core/fs/jfs.c (grub_jfs_read_file): New parameter ino.
All users updated.
	(grub_jfs_lookup_symlink): Use correct starting inode.
2011-08-16 23:10:38 +02:00
Vladimir 'phcoder' Serbinenko
5c144cc8b2 * util/grub-setup.c (main): Add missing gcry initialisation. 2011-08-16 16:19:06 +02:00
Vladimir 'phcoder' Serbinenko
b1257f6533 Don't accept text modes on EFI when booting Linux.
* grub-core/loader/i386/linux.c (ACCEPTS_PURE_TEXT): New define.
	(grub_linux_boot) [!ACCEPTS_PURE_TEXT]: Restrict to graphics modes.
2011-08-16 16:11:10 +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
Robert Millan
66816d8556 2011-08-03 Robert Millan <rmh@gnu.org>
* include/grub/zfs/zap_leaf.h (typedef union zap_leaf_chunk): Mark
        la_array as packed.
        Reported by: Zachary Bedell
2011-08-03 13:30:46 +02:00
Colin Watson
20168fcafe * configure.ac: The Loongson port requires grub-mkfont due to its
use of -DUSE_ASCII_FAILBACK.  Raise an error if it is not going to
be built.
2011-07-26 16:19:47 +01: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
6795300e7f Support ATA disks with 4K sectors.
* include/grub/ata.h (grub_ata): New member log_sector_size.
	* grub-core/disk/ata.c (grub_ata_dumpinfo): Show sector size.
	(grub_ata_identify): Read sector size.
	(grub_ata_readwrite): Use log_sector_size rather than hardcoded value.
2011-07-25 08:14:34 +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
Vladimir 'phcoder' Serbinenko
b70e4cb08d * grub-core/normal/menu.c (grub_menu_execute_entry): Fix NULL
dereference.
2011-07-25 07:48:19 +02:00
Vladimir 'phcoder' Serbinenko
583168a216 * grub-core/disk/pata.c (grub_pata_readwrite): Add missing wait. 2011-07-23 18:18:14 +02:00
Vladimir 'phcoder' Serbinenko
6be1c01fd7 * include/grub/video.h: add missing EXPORT_FUND on
grub_video_edid_checksum and grub_video_edid_preferred_mode.
2011-07-23 17:18:31 +02:00
Vladimir 'phcoder' Serbinenko
a116743910 * include/grub/mips/kernel.h: Fix define conflict. 2011-07-23 17:14:38 +02:00
Vladimir 'phcoder' Serbinenko
bf66054fb3 * grub-core/kern/mips/cache_flush.S [GRUB_MACHINE_MIPS_LOONGSON]: Flush
all four ways.
2011-07-23 16:44:40 +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
e4bcf6258c * po/POTFILES.in: Regenerate. 2011-07-10 15:56:56 +02:00
Vladimir 'phcoder' Serbinenko
c4edd54832 * grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name): Fix
incorrect memory usage.
2011-07-10 15:33:57 +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 'phcoder' Serbinenko
def9832af6 * po/POTFILES.in: Regenerate. 2011-07-08 04:06:02 +02:00
Vladimir 'phcoder' Serbinenko
cd8fe79a59 Fix compilation on GNU/Linux.
* grub-core/kern/emu/getroot.c (grub_util_pull_device) [!FreeBSD]:
	Disable geli.
	(grub_util_get_grub_dev) [!FreeBSD]: Likewise.
	(grub_util_pull_device) [HAVE_DEVICE_MAPPER]: Fix const and func name.
	* grub-core/disk/cryptodisk.c (grub_cryptodisk_open): Fix proto.
2011-07-08 03:59:05 +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
9bfdcbbc7d Lazy device scanning.
* Makefile.util.def (libgrubkern.a): Add grub-core/kern/emu/raid.c.
	(grub-setup): Remove util/raid.c.
	* grub-core/Makefile.core.def (kernel): Add kern/emu/raid.c on emu.
	* grub-core/disk/lvm.c (scan_depth): New variable.
	(grub_lvm_iterate): Rescan if necessary.
	(find_lv): New function based on grub_lvm_open.
	(grub_lvm_open): Use find_lv. Rescan on error.
	(is_node_readable): New function.
	(is_lv_readable): Likewise.
	(grub_lvm_scan_device): Skip already found disks.
	(do_lvm_scan): New function. Move grub_lvm_scan_device inside of it.
	Stop if searched device is found and readable.
	* grub-core/disk/raid.c (inscnt): New variable.
	(scan_depth): Likewise.
	(scan_devices): New function based on grub_raid_register. Abort if
	looked for device is found.
	(grub_raid_iterate): Rescan if needed.
	(find_array): NEw function based on -grub_raid_open.
	(grub_raid_open): Use find_array and rescan.
	(insert_array): Set became_readable_at.
	* grub-core/kern/disk.c (grub_disk_dev_iterate): Iterate though "pull.
	* grub-core/kern/emu/getroot.c (grub_util_open_dm) [HAVE_DEVICE_MAPPER]:
	New function.
	(grub_util_is_lvm) [HAVE_DEVICE_MAPPER]: Use grub_util_open_dm.
	(grub_util_pull_device): New function.
	(grub_util_get_grub_dev): Call grub_util_pull_device.
	* util/raid.c: Moved to ..
	* grub-core/kern/emu/raid.c: ... here.
	(grub_util_raid_getmembers): New parameter "bootable".
	All users updated. Support 1.x.
	* include/grub/ata.h (grub_ata_dev): Change iterate prototype.
	All users updated.
	* include/grub/disk.h (grub_disk_pull_t): New enum.
	(grub_disk_dev): Change iterate prototype.
	All users updated.
	* include/grub/emu/getroot.h (grub_util_raid_getmembers) [__linux__]:
	New proto.
	* include/grub/emu/hostdisk.h (grub_util_pull_device): Likewise.
	* include/grub/lvm.h (grub_lvm_lv): New members fullname and compatname.
	* include/grub/raid.h (grub_raid_array): New member became_readable_at.
	* include/grub/scsi.h (grub_scsi_dev): Change iterate prototype.
	All users updated.
	* include/grub/util/raid.h: Removed.
2011-07-07 23:21:59 +02:00
Vladimir 'phcoder' Serbinenko
1c358e5948 * po/POTFILES.in: Regenerate. 2011-07-06 22:15:58 +02:00
Vladimir 'phcoder' Serbinenko
abee94edf9 Unify sparc init with other ieee1275.
* grub-core/Makefile.core.def (kernel): Use kern/ieee1275/init.c
	instead of kern/sparc64/ieee1275/init.c.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options)
	[__sparc__]: Set GRUB_IEEE1275_FLAG_NO_PARTITION_0.
	* grub-core/kern/ieee1275/init.c [__sparc__]: Include
	grub/machine/kernel.h.
	(grub_ieee1275_original_stack) [__sparc__]: New variable.
	(grub_claim_heap) [__sparc__]: Use sparc version.
	(grub_machine_init): Moved args parsing to
	(grub_parse_cmdline): ...this.
	* grub-core/kern/sparc64/ieee1275/init.c: Removed.
	* include/grub/offsets.h (GRUB_KERNEL_SPARC64_IEEE1275_MOD_GAP):
	New definition.
	(GRUB_KERNEL_SPARC64_IEEE1275_MOD_ALIGN): Likewise.

	Move BOOTP to separate file.

	* grub-core/Makefile.core.def (net): Add net/bootp.c.
	* grub-core/net/net.c: Move all BOOTP functions to
	* grub-core/net/bootp.c: ... here.

	Use frame interface on PXE.

	* grub-core/Makefile.core.def (pxecmd): Removed.
	(pxe): Use net/drivers/i386/pc/pxe.c rather than net/i386/pc/pxe.c.
	* grub-core/commands/i386/pc/pxecmd.c: Removed.
	* grub-core/i386/pc/pxe.c: Moved from here ...
	* grub-core/net/i386/pc/pxe.c: ... here. Rewritten.
	* grub-core/net/net.c (grub_net_open_real): Handle old pxe syntax.
	* include/grub/i386/pc/pxe.h (grub_pxe_unload): Removed.

	EFI network support.

	* grub-core/Makefile.core.def (efinet): New module.
	* grub-core/disk/efi/efidisk.c (compare_device_paths): Moved from
	here...
	* grub-core/kern/efi/efi.c (grub_efi_compare_device_paths): ... here.
	All users updated.
	* grub-core/kern/efi/init.c (grub_efi_net_config): New variable.
	(grub_machine_get_bootlocation): Call grub_efi_net_config if needed.
	* grub-core/kern/x86_64/efi/callwrap.S (efi_wrap_7): New function.
	* grub-core/net/drivers/efi/efinet.c: New file.
	* include/grub/efi/efi.h (grub_efi_compare_device_paths): New proto.
	(grub_efi_net_config): New extern var.

	Various cleanups and bugfixes.

	* grub-core/disk/efi/efidisk.c (grub_efidisk_open): Fix off-by-one
	error.
	(grub_efidisk_get_device_name): Unify similar codepaths. Accept whole
	disk declared as partition.
	* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_open): Fix memory
	leak on failure.
	* grub-core/kern/dl.c (grub_dl_load_file): Fix memory leak.
	* grub-core/kern/mm.c (grub_debug_malloc): Don't use unsupported %zx.
	(grub_debug_zalloc): Likewise.
	(grub_debug_realloc): Likewise.
	(grub_debug_memalign): Likewise.
	* grub-core/net/arp.c (grub_net_arp_receive): IPv4 is 4-byte wide.
	Check that target is IPv4.
	* grub-core/net/drivers/ieee1275/ofnet.c (grub_ofnet_findcards): Use
	local-mac-address as fallback.
	* grub-core/net/ethernet.c (grub_net_recv_ethernet_packet): Prevent
	memory leak.
	* grub-core/net/ip.c (ipchksum): Rename to ...
	(grub_net_ip_chksum): ... this. All users updated.
	(grub_net_recv_ip_packets): Special handling for DHCP.
	* util/grub-mkimage.c (generate_image): Zero-out aout header.

	Unify prefix handling

	* grub-core/kern/efi/init.c (grub_efi_set_prefix): Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* grub-core/kern/emu/main.c (grub_machine_set_prefix): Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	(grub_prefix): New variable.
	(prefix): Removed.
	(root_dev): New variable.
	(dir): Likewise.
	(main): Use new variables.
	* grub-core/kern/i386/coreboot/init.c (grub_machine_set_prefix):
	Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* grub-core/kern/i386/efi/init.c (grub_machine_set_prefix): Removed.
	* grub-core/kern/i386/pc/init.c (make_install_device): Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	(grub_machine_set_prefix): Removed.
	* grub-core/kern/ia64/efi/init.c (grub_machine_set_prefix): Removed.
	* grub-core/kern/ieee1275/init.c (grub_machine_set_prefix):
	Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* grub-core/kern/main.c (grub_set_root_dev): Revamped into ...
	(grub_set_prefix_and_root): ... this. All users updated.
	* grub-core/kern/mips/init.c (grub_machine_set_prefix):
	Revamped into ...
	(grub_machine_get_bootlocation): ... this.
	* include/grub/kernel.h (grub_machine_set_prefix): Removed.
	(grub_machine_get_bootlocation): New proto.
	* include/grub/i386/pc/kernel.h (grub_pc_net_config): New var.

	Less intrusive and more reliable seek on network implementation.

	* grub-core/kern/file.c (grub_file_net_seek): Removed.
	(grub_file_seek): Don't call grub_file_net_seek.
	* grub-core/net/net.c (grub_net_fs_read): Renamed to ...
	(grub_net_fs_read_real): .. this.
	(grub_net_seek_real): Use net->offset.
	(grub_net_fs_read): Seek if necessary.

	Unify IEEE1275 netwotk config with the other platforms.

	* grub-core/kern/ieee1275/init.c (grub_ieee1275_net_config):
	New variable.
	(grub_machine_get_bootlocation): Support network.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args):
	Support type and device parsing.
	(grub_ieee1275_get_device_type): New function.
	* grub-core/net/drivers/ieee1275/ofnet.c (grub_getbootp_real): Revamped
	into ...
	(grub_ieee1275_net_config_real): ... this.
	(grub_ofnet_probecards): Removed.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Remove ofnet.h.
	* include/grub/ieee1275/ofnet.h: Removed.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_net_config): NEw
	extern var.
	(grub_ieee1275_get_device_type): New function.

	Unify network device closing across platforms and make more robust.

	* grub-core/kern/ieee1275/init.c (grub_machine_fini): Don't call
	grub_grubnet_fini.
	* grub-core/net/ethernet.c (send_ethernet_packet): Open card if it isn't
	already.
	* grub-core/net/net.c (grub_net_network_level_interface_register):
	Update num_ifaces.
	(grub_net_card_unregister): Close all interfaces.
	(receive_packets): Don't poll if no iterfaces are registered.
	Open if necessary.
	(grub_net_fini_hw): New function.
	(grub_net_restore_hw): Likewise.
	(fini_hnd): New variable.
	(GRUB_MOD_INIT): Register preboot hook.
	(GRUB_MOD_FINI): Run and unregister preboot hook.

	Poll network cards when idle.

	* grub-core/kern/term.c (grub_net_poll_cards_idle): New variable.
	(grub_checkkey): Call grub_net_poll_cards_idle if it's not NULL.
	* grub-core/net/net.c (receive_packets): Save last poll time.
	(grub_net_poll_cards_idle_real): New function.
	(GRUB_MOD_INIT): Register grub_net_poll_cards_idle.
	(GRUB_MOD_FINI): Unregister grub_net_poll_cards_idle.
	* include/grub/kernel.h (grub_poll_cards_idle): New extern variable.

	Rename ofnet interfaces.

	* grub-core/net/drivers/ieee1275/ofnet.c (find_alias): New function.
	(grub_ofnet_findcards): Use ofnet_%s names.

	* util/grub-mknetdir.in: Support for EFI and IEEE1275.

	Cleanup socket opening.

	* grub-core/net/net.c (grub_net_fs_open): Rewritten.
	(grub_net_fs_close): Likewise.
	(grub_net_fs_read_real): Use eof member.
	* include/grub/net/udp.h (+grub_net_udp_open): New proto.
	(+grub_net_udp_close): New inline function.

	* include/grub/net/tftp.h: Moved to the top of ...
	* grub-core/net/tftp.c: ... here.
	* include/grub/net/ip.h: Moved mostly to the top of ...
	* grub-core/net/ip.c: ... here.
	* include/grub/net/ethernet.h: Moved mostly to the top of ...
	* grub-core/net/ethernet.c: ... here.

	* grub-core/kern/device.c (grub_device_close): Free device->net->server.

	* grub-core/commands/probe.c (grub_cmd_probe): Use protocol name for
	FS name.

	* include/grub/net/ip.h (ipv4_ini): Removed.
	(ipv4_fini): Likewise.

	* include/grub/net/ip.h (grub_net_recv_ip_packets): New proto.
	(grub_net_send_ip_packets): Likewise.
2011-07-06 20:05:26 +02:00
Vladimir 'phcoder' Serbinenko
cf1337aa02 * grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_init): Use new
grub_read_cmos prototype.
2011-07-06 02:50:35 +02:00
Vladimir 'phcoder' Serbinenko
93c06ff9c6 VGA text support in qemu-mips
* grub-core/Makefile.core.def (kernel): Add term/i386/pc/vga_text.c,
	term/i386/vga_common.c and kern/vga_init.c on qemu-mips.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init vga
	text.
	* grub-core/kern/i386/qemu/init.c: Renamed to ...
	* grub-core/kern/vga_init.c: ... this.
	* grub-core/kern/vga_init.c (VGA_ADDR) [__mips__]: Adjust.
	(grub_qemu_init_cirrus) [__mips__]: Skip PCI and adjust the I/O base.
	* grub-core/term/i386/pc/vga_text.c (VGA_TEXT_SCREEN) [__mips__]:
	Adjust.
	* include/grub/vga.h [GRUB_MACHINE_MIPS_QEMU_MIPS]: Declare
	GRUB_MACHINE_PCI_IO_BASE.
2011-07-05 23:46:15 +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
d734599439 MIPS qemu at_keyboard support.
* gentpl.py (videoinkernel): Add qemu-mips.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add necessary headers.
	* grub-core/Makefile.core.def (kernel): Add at_keyboard and layout.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init new
	modules.
	* grub-core/term/at_keyboard.c (grub_keyboard_controller_init)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Don't consider original set.
	* grub-core/term/serial.c (grub_serial_register)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Make com0 explicitly active.
2011-07-05 21:00:01 +02:00
Vladimir 'phcoder' Serbinenko
a07a81b335 CMOS support on sparc.
* gentpl.py (cmos): Add powerpc and sparc.
	* grub-core/Makefile.core.def (datetime): Add lib/ieee1275/cmos.c on
	powerpc and sparc.
	* grub-core/lib/cmos_datetime.c (grub_get_datetime)
	[__powerpc__ || __sparc__]: Rename to grub_get_datetime_cmos.
	(grub_set_datetime) [__powerpc__ || __sparc__]: Likewise to
	grub_set_datetime_cmos.
	* grub-core/lib/ieee1275/cmos.c: New file.
	* grub-core/lib/ieee1275/datetime.c (no_ieee1275_rtc): New vaiable.
	(find_rtc): Set no_ieee1275_rtc on error.
	(grub_get_datetime): Call grub_get_datetime_cmos on error.
	(grub_set_datetime): Call grub_set_datetime_cmos on error.
	* include/grub/cmos.h (grub_cmos_read): Return grub_err_t since it may
	fail. Move value to argument. All users updated
	(grub_cmos_write): Likewise.
	(grub_cmos_read) [__powerpc__ || __sparc__]: Rewritten.
	(grub_cmos_write) [__powerpc__ || __sparc__]: Likewise.
	* include/grub/datetime.h [__powerpc__ || __sparc__]: Declare
	grub_get_datetime_cmos and grub_set_datetime_cmos.
2011-07-05 20:24:20 +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
Colin Watson
548947916b * grub-core/term/gfxterm.c (grub_virtual_screen_setup): Use
default_bg_color rather than black.
(grub_gfxterm_fullscreen): Likewise.
(grub_gfxterm_background_color_cmd): Save new background color in
default_bg_color.
2011-06-28 17:05:41 +01:00
Vladimir 'phcoder' Serbinenko
8d5d8444bd * grub-core/Makefile.core.def (chain): Fix coreboot filename. 2011-06-27 19:30:16 +02:00
Vladimir 'phcoder' Serbinenko
5afeb5bdd6 * grub-core/disk/pata.c (grub_pata_initialize) [QEMU_MIPS]: Fix a
mismerge.
2011-06-27 19:26:52 +02:00
Vladimir 'phcoder' Serbinenko
ba7df45ee6 Chainloading on coreboot support.
* grub-core/Makefile.core.def (chain): Add coreboot.
	* grub-core/loader/i386/coreboot/chainloader.c: New file.
2011-06-27 14:14:11 +02:00
Vladimir 'phcoder' Serbinenko
d0b526b277 * grub-core/loader/i386/bsd.c (grub_bsd_load): Handle relocator failure
if it happens.
2011-06-27 13:57:03 +02:00
Vladimir 'phcoder' Serbinenko
5ff1d945ed Implement time command.
* grub-core/Makefile.core.def (time): New module.
	* grub-core/commands/time.c: New file.
	* grub-core/script/parser.y: Remove "time" keyword.
	* grub-core/script/yylex.l: Likewise.
2011-06-27 12:31:37 +02:00
Vladimir 'phcoder' Serbinenko
5ebaad7eec * include/grub/loader.h (grub_loader_unregister_preboot_hook): Export. 2011-06-27 12:28:47 +02:00
Vladimir 'phcoder' Serbinenko
bdea379833 * grub-core/lib/relocator.c (malloc_in_range): Fix a memory corruption
when handling leftovers.
2011-06-27 12:18:44 +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
b6f945dccb * grub-core/net/drivers/ieee1275/ofnet.c (send_card_buffer) Use right
type in pointers on sparc64.
	(get_card_packet): Likewise.
2011-06-27 12:13:21 +02:00
Colin Watson
f9b75e8a67 * grub-core/commands/videoinfo.c (hook): Indicate current video mode
with `*'.
(grub_cmd_videoinfo): Fetch current video mode.
2011-06-27 10:47:02 +01:00
Vladimir 'phcoder' Serbinenko
1e3d9b8612 * grub-core/disk/scsi.c (grub_scsi_read): Limit SCSI reads to 32K
because of underlying system restrictions.
2011-06-27 10:12:35 +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
9fc9ce3795 Coreboot video support.
* grub-core/Makefile.core.def (vga): Extend to coreboot and multiboot.
	(vbe): Likewise.
	* grub-core/kern/i386/coreboot/startup.S: Include int.S.
	* grub-core/kern/i386/pc/startup.S (grub_bios_interrupt): Moved from
	here ...
	* grub-core/kern/i386/int.S: ... here.
	* grub-core/video/i386/pc/vbe.c: Updated includes.
	* grub-core/video/i386/pc/vga.c: Likewise.
	* include/grub/i386/coreboot/memory.h
	(GRUB_MEMORY_MACHINE_SCRATCH_ADDR): New definition.
	(GRUB_MEMORY_MACHINE_SCRATCH_SEG): Likewise.
	(GRUB_MEMORY_MACHINE_SCRATCH_SIZE): Likewise.
	* include/grub/i386/pc/int.h (GRUB_CPU_INT_FLAGS_DEFAULT) [!PCBIOS]:
	Disable interrupts.
	* include/grub/i386/pc/vga.h: Removed. All users updated.
2011-06-27 08:54:55 +02:00
Vladimir 'phcoder' Serbinenko
41bec7fec9 * grub-core/disk/ahci.c (grub_ahci_readwrite_real): Use proper
definitions for dprintf.
	* grub-core/disk/pata.c (grub_pata_readwrite): Likewise.
2011-06-27 08:43:13 +02:00
Vladimir 'phcoder' Serbinenko
ca80309d32 * grub-core/net/drivers/ieee1275/ofnet.c (send_card_buffer): Fix
prototype.
	(get_card_packet): Likewise.
2011-06-27 08:40:17 +02:00
Yves Blusseau
9e322ce8de Display the path of the file when file is not found
* grub-core/fs/fat.c: Display the filename when file is not found.
	* grub-core/fs/fshelp.c: Likewise.
	* grub-core/fs/hfs.c: Likewise.
	* grub-core/fs/jfs.c: Likewise.
	* grub-core/fs/minix.c: Likewise.
	* grub-core/fs/ufs.c: Likewise.
	* grub-core/fs/btrfs.c: Likewise.
	* grub-core/commands/i386/pc/play.c: Likewise.
2011-06-26 21:48:52 +02:00
Szymon Janc
cbf597afb1 * grub-core/commands/cmp.c (grub_cmd_cmp): Remove unnecessary NULL
pointer checks before calling grub_free().
	* grub-core/commands/wildcard.c (match_devices): Likewise.
	* grub-core/commands/wildcard.c (match_files): Likewise.
	* grub-core/fs/cpio.c (grub_cpio_dir): Likewise.
	* grub-core/fs/cpio.c (grub_cpio_open): Likewise.
	* grub-core/fs/udf.c (grub_udf_read_block): Likewise.
	* grub-core/fs/xfs.c (grub_xfs_read_block): Likewise.
	* grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Likewise.
	* grub-core/normal/cmdline.c (grub_cmdline_get): Likewise.
	* grub-core/script/yylex.l (grub_lexer_unput): Likewise.
	* grub-core/video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
	* grub-core/video/readers/png.c (grub_png_output_byte): Likewise.
2011-06-26 17:17:41 +02:00
Patrick
6295b32f79 * grub-core/kern/main.c (grub_load_normal_mode): Correct the comment. 2011-06-25 01:09:32 +02:00
Vladimir 'phcoder' Serbinenko
77c0840ba6 * grub-core/net/i386/pc/pxe.c (grub_pxe_recv): Fix declaration.
(grub_pxe_send): Likewise.
	(GRUB_MOD_INIT): Fix types.
2011-06-25 00:18:36 +02:00
Szymon Janc
40ea05dee4 * grub-core/io/xzio.c: Fix code style issues 2011-06-24 22:37:17 +02:00
Manoel Rebelo Abranches
90162423e9 Network infrastructure.
The ARP protocol was made by Paulo Pinatti <ppinatti@br.ibm.com>

	* include/grub/net/arp.h: New file.
	* include/grub/net/device.h: Likewise.
	* include/grub/net/ethernet.h: Likewise.
	* include/grub/net/ip.h: Likewise.
	* include/grub/net/netbuff.h: Likewise.
	* include/grub/net/tftp.h: Likewise.
	* include/grub/net/udp.h: Likewise.
	* include/grub/ieee1275/ofnet.h: Likewise.
	* include/grub/emu/export.h: Likewise.
	* include/grub/net.h: Likewise.
	* grub-core/net/arp.c: Likewise.
	* grub-core/net/ethernet.c: Likewise.
	* grub-core/net/ip.c: Likewise.
	* grub-core/net/udp.c: Likewise.
	* grub-core/net/tftp.c: Likewise.
	* grub-core/net/netbuff.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/net/drivers/emu/emunet.c: Likewise.
	* grub-core/net/drivers/ieee1275/ofnet.c: Likewise.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add net.h, ofnet.h and
	export.h.
	* grub-core/Makefile.core.def (net): New module.
	(tftp): Likewise.
	(ofnet): Likewise.
	(emunet): Likewise.
	* grub-core/commands/ls.c (grub_ls_list_devices) [!GRUB_UTIL]: List
	network protocols.
	* grub-core/kern/device.c (grub_net_open) : New variable.
	(grub_device_open): Handle network device.
	(grub_device_close): Likewise.
	* grub-core/kern/file.c (grub_file_net_seek) : New variable.
	(grub_grubnet_fini): Likewise.
	(grub_file_seek): Seek in network device.
	* grub-core/kern/fs.c (grub_fs_probe): Handle network devices.
	* grub-core/kern/ieee1275/init.c (grub_machine_set_prefix): Handle
	network root.
	(grub_machine_fini): Call grub_grubnet_fini.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args): Handle
	network.
	(grub_ieee1275_get_aliasdevname): New function.
	* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
	Add unofficial Solaris network info.
	(grub_multiboot_make_mbi): Likewise.
	* grub-core/fs/i386/pc/pxe.c: Moved from here ...
	* grub-core/net/i386/pc/pxe.c: ...here. Adapted for new design.
	* include/grub/device.h (grub_fs): Removed.
	* include/grub/err.h (grub_err_t): Add network-related values.
	* include/grub/i386/pc/pxe.h: Removed bootp parts.
	* include/grub/ieee1275/ieee1275.h (grub_ofnetcard_data): New struct.
	(grub_ieee1275_get_aliasdevname): New proto.
	* include/grub/net.h: Rewritten.

	Also-By: Paulo Pinatti <ppinatti@br.ibm.com>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-06-24 22:16:05 +02:00
Vladimir 'phcoder' Serbinenko
031f22a01f * grub-core/disk/raid.c (insert_array): Ensure uniqueness of readable
names.
2011-06-24 18:26:20 +02:00
Vladimir 'phcoder' Serbinenko
4388ca7224 * grub-core/commands/wildcard.c (match_files): Add a useful dprintf.
(wildcard_expand): Don't stop on nonregexp parts after regexp ones since
	it truncates the output.
	Reported by: Ximin Luo.
2011-06-24 13:43:10 +02:00
Vladimir 'phcoder' Serbinenko
98e2f50661 * grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Skip . and .. 2011-06-24 13:02:49 +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
bc09e1a238 * grub-core/kern/emu/getroot.c (grub_guess_root_device): Revert to
old method if mountinfo would return /dev/root and /dev/root doesn't
	exist.
2011-06-24 04:32:54 +02:00
Vladimir 'phcoder' Serbinenko
290766fb77 ZFS zlib support
* grub-core/fs/zfs/zfs.c (zlib_decompress): New function.
	(decomp_table): Add zlib entries.
	(zio_read): USe 8 bits for compression function rather than 3.
	* include/grub/zfs/zio.h (zio_compress): Add zlib values.
2011-06-24 00:31:29 +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
Szymon Janc
c31dc5f5e4 Add support for DRI and RSTn markers in JPEG files.
* grub-core/video/readers/jpeg.c (JPEG_MARKER_DRI): New define.
	(JPEG_MARKER_RST0): Likewise.
	(JPEG_MARKER_RST1): Likewise.
	(JPEG_MARKER_RST2): Likewise.
	(JPEG_MARKER_RST3): Likewise.
	(JPEG_MARKER_RST4): Likewise.
	(JPEG_MARKER_RST5): Likewise.
	(JPEG_MARKER_RST6): Likewise.
	(JPEG_MARKER_RST7): Likewise.
	(grub_jpeg_data): New fields dri, r1, bitmap_ptr.
	(grub_jpeg_decode_dri): New function.
	(grub_jpeg_decode_sos): Move image data related part into
	grub_jpeg_decode_data function.
	(grub_jpeg_decode_data): New function.
	(grub_jpeg_reset): New function.
	(grub_jpeg_decode_jpeg): Handle new markers.
2011-06-23 23:13:20 +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
cad3237fb5 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Close
file after stat.
	Reported by: David Volgyes <dvolgyes>.
2011-06-23 22:02:05 +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
e061a1b537 * grub-core/lib/reed_solomon.c (rs_recover) [STANDALONE]:
Prevent memory leak.
2011-06-23 20:58:35 +02:00
Vladimir 'phcoder' Serbinenko
1abe47dc99 * grub-core/lib/reed_solomon.c (rs_recover): Prevent memory leak.
(main): Close file.
2011-06-23 20:55:36 +02:00
Vladimir 'phcoder' Serbinenko
fbc626665f * grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devprop): Don't attempt
to continue if allocation is failed.

	Reported by: David Volgyes <dvolgyes>.
2011-06-23 20:38:19 +02:00
David Volgyes
e98c83e910 * grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Avoid NULL-pointer
dereference.
2011-06-23 20:28:04 +02:00
Vladimir 'phcoder' Serbinenko
a199a8cd1a Fix spurious warning.
* grub-core/partmap/acorn.c (grub_acorn_boot_block): Make a union.
	(acorn_partition_map_find): Use .bin member.
2011-06-23 20:05:39 +02:00
Vladimir 'phcoder' Serbinenko
e2d1dba0ae * grub-core/kern/emu/getroot.c (grub_guess_root_device): Don't accept
/dev/root as a valid device.
2011-06-23 19:50:41 +02:00
Jim Meyering
8a5d6919e1 Avoid NULL deref in grub_device_open.
* grub-core/kern/device.c (grub_device_open): Don't dereference
	a NULL pointer upon failed grub_env_get.
2011-06-23 18:08:53 +02:00
Vladimir 'phcoder' Serbinenko
f7db6f4a55 Support non-512B sectors and agglomerate reads.
* Makefile.util.def (libgrubmods.a): Add grub-core/commands/testload.c.
	* grub-core/disk/efi/efidisk.c (grub_efidisk_data): Remove disk_io.
	(disk_io_guid): Removed.
	(make_devices): Locate solely by BlockIO.
	(grub_efidisk_open): Fill log_sector_size and total_sectors.
	(grub_efidisk_read): Use read_blocks.
	(grub_efidisk_write): Use write_blocks.
	* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Fill
	log_sector_size.
	(get_safe_sectors): Handle non-512B sectors.
	(grub_biosdisk_read): Remove special CDROM handling. Handle non-512B
	sectors.
	(grub_biosdisk_write): Handle non-512B sectors.
	* grub-core/disk/scsi.c (grub_scsi_open): Fill log_sector_size.
	(grub_scsi_read): Remove special non-512B block handling (now handled
	one level up).
	* grub-core/kern/disk.c (grub_disk_open): Fill default log_sector_size
	and do sanity checks.
	(grub_disk_adjust_range): Handle non-512B sectors.
	(transform_sector): New function.
	(grub_disk_read_small): Likewise.
	(grub_disk_read): Rewritten.
	(grub_disk_write): Handle non-512B sectors.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Fill
	log_sector_size.
	(open_device): Use log_sector_size.
	(grub_util_biosdisk_read): Likewise.
	(grub_util_biosdisk_write): Likewise.
	* grub-core/partmap/msdos.c (grub_partition_msdos_iterate): Handle
	non-512B sectors.
	(pc_partition_map_embed): Likewise.
	* include/grub/disk.h (grub_disk): New field log_sector_size.
	(GRUB_DISK_CACHE_SIZE): Redefined from GRUB_DISK_CACHE_BITS.
	(GRUB_DISK_CACHE_BITS): Increased to 6.
	* util/grub-fstest.c (fstest): New command testload.
	(argp_parser): Likewise.
2011-06-23 16:45:52 +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
1e9aef7d96 * docs/man/grub-mklayout.h2m (DESCRIPTION): Add a reference to the
input format.
2011-06-13 17:35:50 +01:00
Manoel Rebelo Abranches
423a1849ef Write ChangeLog. 2011-06-07 11:47:31 -03:00
Colin Watson
351c7c8a15 * docs/grub.texi (Obtaining and Building GRUB): Substitute
`ftp.gnu.org' for `alpha.gnu.org'.
2011-05-29 22:15:08 +01:00
Colin Watson
6b4e643081 * grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle
partitions under /dev/disk/by-id/.
2011-05-27 13:57:22 +01:00
Colin Watson
c64db050f7 * grub-core/kern/emu/hostdisk.c (linux_find_partition): Give up
after ten consecutive open failures.  Scanning all the way up to
10000 is excessive and can cause serious performance problems in
some configurations.
Fixes Ubuntu bug #787461.
2011-05-27 13:52:21 +01:00
Vladimir 'phcoder' Serbinenko
245f4aba48 * grub-core/disk/arc/arcdisk.c (reopen): Close old handle before
opening new one.
2011-05-21 07:05:46 +02:00
Vladimir Serbinenko
f767c929f2 Don't stat devices unless we have to.
* grub-core/kern/emu/getroot.c (grub_find_device): Recognize
	dir == /dev/mapper.
	(grub_guess_root_device): Use already known os_dev if possible.
	* grub-core/kern/emu/hostdisk.c
	(convert_system_partition_to_system_disk): Scan only in /dev/mapper
	if device is known to be a dm one.

	Also-By: Colin Watson <cjwatson@ubuntu.com>
2011-05-21 07:03:55 +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
Vladimir 'phcoder' Serbinenko
9a79fcf2c9 * grub-core/Makefile.core.def (lsacpi): Fix ia64 mismerge.
(lsefisystab): Likewise.
	(lssal): Likewise.
	(lsefimmap): Likewise.
	(hdparm): Enable on qemu-mips.
	(setjmp): Add ia64 nodist.
	(serial): Simplify tags.
2011-05-19 12:13:18 +02:00
Colin Watson
63e3eea967 * Makefile.util.def (grub-ofpathname): Install manual page. 2011-05-18 17:31:50 +01:00
Colin Watson
09728256a8 * grub-core/fs/squash4.c: Add missing GRUB_MOD_LICENSE. 2011-05-18 17:16:59 +02:00
Colin Watson
8b63a14297 * .bzrignore: Add grub-core/modinfo.sh and a number of test files. 2011-05-18 16:10:52 +01:00
Vladimir 'phcoder' Serbinenko
e775d8edfe * grub-core/bus/usb/usbhub.c (poll_nonroot_hub): Downgrade a printf
into dprintf.
2011-05-18 15:37:18 +02:00
Vladimir 'phcoder' Serbinenko
bf947d36e3 Use full 64-bit division.
* grub-core/kern/misc.c (grub_divmod64_full): Renamed to ...
	(grub_divmod64): ... this.
	* include/grub/misc.h (grub_divmod64): Removed. All users switch to full
	version.
2011-05-18 15:35:19 +02:00
Colin Watson
b84f26c549 * util/grub-mkrescue.in: Use portable `.' rather than non-portable
`source'.
2011-05-18 12:57:59 +01:00
Colin Watson
5626056ffb * grub-core/genmod.sh.in: Use 'set -e' rather than '#! /bin/sh -e',
to avoid accidents when debugging with 'sh -x'.
* grub-core/gensyminfo.sh.in: Likewise.
* tests/example_scripted_test.in: Likewise.
* tests/grub_cmd_regexp.in: Likewise.
* tests/grub_script_blanklines.in: Likewise.
* tests/grub_script_dollar.in: Likewise.
* tests/grub_script_expansion.in: Likewise.
* tests/grub_script_final_semicolon.in: Likewise.
* tests/partmap_test.in: Likewise.
* tests/util/grub-shell-tester.in: Likewise.
* tests/util/grub-shell.in: Likewise.
2011-05-18 12:53:07 +01:00
Colin Watson
e2965f4a32 Move gfxmenu color handling to video, so that gfxterm can use it
too.

* grub-core/gfxmenu/named_colors.c: Move to ...
* grub-core/video/colors.c: ... here.  Rename
grub_gui_get_named_color to grub_video_get_named_color.
* grub-core/gfxmenu/gui_string_util.c (my_isxdigit): Move to ...
* grub-core/video/colors.c (my_isxdigit): ... here.
* grub-core/gfxmenu/gui_string_util.c (parse_hex_color_component):
Move to ...
* grub-core/video/colors.c (parse_hex_color_component): ... here.
* grub-core/gfxmenu/gui_string_util.c (grub_gui_parse_color): Move
to ...
* grub-core/video/colors.c (grub_video_parse_color): ... here.

* include/grub/gui.h (grub_gui_color_t): Move to ...
* include/grub/video.h (grub_video_rgba_color_t): ... here.
* include/grub/gui.h (grub_gui_color_rgb): Move to ...
* include/grub/video.h (grub_video_rgba_color_rgb): ... here.
* include/grub/gui.h (grub_gui_map_color): Move to ...
* include/grub/video.h (grub_video_map_rgba_color): ... here.
* include/grub/gui_string_util.h (grub_gui_get_named_color): Move
to ...
* include/grub/video.h (grub_video_get_named_color): ... here.
* include/grub/gui_string_util.h (grub_gui_parse_color): Move to ...
* include/grub/video.h (grub_video_parse_color): ... here.

* grub-core/Makefile.core.def (kernel) [videoinkernel]: Add
video/colors.c.
(gfxmenu): Remove gfxmenu/named_colors.c.
(video) [videomodules]: Add video/colors.c.

Add a background_color command.

* grub-core/term/gfxterm.c (grub_gfxterm_background_color_cmd): New
function.
(GRUB_MOD_INIT): Register background_color command.
(GRUB_MOD_FINI): Unregister background_color command.
(redraw_screen_rect): Allow blend/replace of text layer to be
controlled independently from whether there is a background bitmap.
(grub_gfxterm_background_image_cmd): Change blend_text_bg when
changing bitmap.
2011-05-18 12:44:24 +01:00
Vladimir 'phcoder' Serbinenko
26618ff0db Patch BPB in ntldr and chainloader --bpb.
* grub-core/fs/fat.c: Include grub/fat.h.
	(grub_fat_bpb): Moved to ...
	* include/grub/fat.h (grub_fat_bpb): ... here. New file.
	* grub-core/loader/i386/pc/chainloader.c: Include grub/fat.h and
	grub/ntfs.h.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_flags_t):
	Moved from here...
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_flags_t): ...
	here.
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_patch_bpb):
	New function.
	(grub_chainloader_cmd): Patch BPB if --bpb is given.
	(GRUB_MOD_INIT): Show --bpb.
	* grub-core/loader/i386/pc/ntldr.c (grub_cmd_ntldr): Patch BPB.
	* grub-core/normal/main.c (features): New variable.
	(GRUB_MOD_INIT): Set feature_* variables.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_patch_bpb): New
	proto.
	* include/grub/ntfs.h (grub_ntfs_bpb): New field bios_drive.
2011-05-18 12:51:05 +02:00
Vladimir 'phcoder' Serbinenko
1e4b43901a * grub-core/fs/fat.c: Include grub/fat.h.
(grub_fat_bpb): Moved to ...
	* include/grub/fat.h (grub_fat_bpb): ... here. New file.
	* grub-core/loader/i386/pc/chainloader.c: Include grub/fat.h and
	grub/ntfs.h.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_flags_t):
	Moved from here...
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_flags_t): ...
	here.
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_patch_bpb):
	New function.
	(grub_chainloader_cmd): Patch BPB if --bpb is given.
	(GRUB_MOD_INIT): Show --bpb.
	* grub-core/loader/i386/pc/ntldr.c (grub_cmd_ntldr): Patch BPB.
	* grub-core/normal/main.c (features): New variable.
	(GRUB_MOD_INIT): Set feature_* variables.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_patch_bpb): New
	proto.
	* include/grub/ntfs.h (grub_ntfs_bpb): New field bios_drive.
2011-05-18 12:48:14 +02:00
Vladimir 'phcoder' Serbinenko
cf02731e48 * grub-core/Makefile.core.def (ieee1275_fb): Use enable=powerpc_ieee1275
for cleanness.
2011-05-18 12:39:22 +02:00
Vladimir 'phcoder' Serbinenko
e3a1073fd2 FreeDOS direct loading support.
* docs/grub.texi (Supported OS): Add FreeDOS.
	* grub-core/Makefile.core.def (freedos): New module.
	* grub-core/lib/i386/relocator.c (grub_relocator16_ebx): New extern
	variable.
	(grub_relocator16_boot): Handle %ebx.
	* grub-core/lib/i386/relocator16.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c: New file.
2011-05-18 12:15:16 +02:00
Vladimir 'phcoder' Serbinenko
05caa461e8 Long Linux command line support.
* grub-core/loader/i386/linux.c (GRUB_LINUX_CL_END_OFFSET): Removed.
	(maximal_cmdline_size): New variable.
	(allocate_pages): Use maximal_cmdline_size.
	(grub_cmd_linux): Set and use maximal_cmdline_size.
	* grub-core/loader/i386/pc/linux.c (GRUB_LINUX_CL_END_OFFSET): Removed.
	(allocate_pages): Use maximal_cmdline_size.
	(grub_cmd_linux): Set and use maximal_cmdline_size.
	* include/grub/i386/linux.h (GRUB_LINUX_SETUP_MOVE_SIZE): Removed.
	(linux_kernel_header): Add fields kernel_alignment, relocatable, pad
	and cmdline_size.
2011-05-18 09:56:33 +02:00
Vladimir Serbinenko
a2491e235c Improve devmapper support
* grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Removed.
	(grub_util_is_lvm): New function.
	(grub_util_get_dev_abstraction): Assume dmraid if not lvm rather
	than lvm if not dmraid.
	Handle mapped md nodes.
	* grub-core/kern/emu/hostdisk.c (device_is_mapped): Rename to ...
	(grub_util_device_is_mapped): ... this. Make always available. All users
	updated.
	(grub_util_get_dm_node_linear_info) [HAVE_DEVICE_MAPPER]: New function.
	(convert_system_partition_to_system_disk): Handle lvm, mpath and
	dmraid nodes.
	* include/grub/emu/misc.h (grub_util_device_is_mapped): New proto.

	Also-By: Colin Watson <cjwatson@ubuntu.com>
2011-05-18 09:35:47 +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
543a8f6ef9 * grub-core/kern/ia64/dl_helper.c (grub_ia64_dl_get_tramp_got_size):
Fix potential usage of Elf32 instead of Elf64 when compiling on
	32-bit architecture. Add endianness macros while on it.
2011-05-18 00:21:49 +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
Vladimir 'phcoder' Serbinenko
566a191715 Prevent potential loss of memory map by overwrite on qemu-mips.
* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]:
	Save ram size in $s4.
	* grub-core/kern/mips/qemu_mips/init.c (RAMSIZE): Removed.
	All users changed to grub_arch_memsize.
	* grub-core/kern/mips/startup.S (grub_arch_machine): Restrict to
	Loongson.
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Save grub_arch_memsize.
	* grub-core/loader/mips/linux.c (grub_linux_boot): Pass memory size.
	* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): New
	external variable.
2011-05-17 19:32:51 +02:00
Colin Watson
5d420cd983 * .bzrignore: Remove grub-dumpbios. 2011-05-17 18:13:12 +01: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
Colin Watson
24c9143ae3 * Makefile.util.def (grub-bin2h): Don't install.
* docs/man/grub-bin2h.h2m: Remove.
2011-05-17 18:00:31 +01:00
Vladimir 'phcoder' Serbinenko
90f7ac192f * grub-core/kern/mips/startup.S (grub_arch_cpuclock): Move to the right
place.
2011-05-17 18:39:32 +02:00
Vladimir 'phcoder' Serbinenko
8d4a51785a Reenable qemu-mips port.
* configure.ac: Handle --target=qemu-mips and --target=qemu_mips.
	Fix small arc bug while on it.
	* gentpl.py: Handle qemu_mips.
	* grub-core/Makefile.am: Likewise.
	* grub-core/Makefile.core.def: Likewise.
	* grub-core/disk/ata.c [GRUB_MACHINE_MIPS_QEMU_MIPS]: Remove
	inappropriate includes.
	(grub_ata_pciinit) [GRUB_MACHINE_MIPS_QEMU_MIPS]: Removed.
	(grub_ata_initialize): [GRUB_MACHINE_MIPS_QEMU_MIPS]: Rewritten.
	* grub-core/kern/main.c (grub_modules_get_end)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Enable.
	* grub-core/kern/mips/qemu-mips: Moved to ..
	* grub-core/kern/mips/qemu_mips: ... this.
	* grub-core/kern/mips/qemu_mips/init.c (grub_get_rtc): Removed.
	(grub_machine_init): Call terminfo_init and serial_init.
	* grub-core/kern/mips/startup.S: Change MIPS_LOONGSON to MACHINE.
	* grub-core/loader/mips/linux.c (params) [GRUB_MACHINE_MIPS_QEMU_MIPS]:
	New variable.
	(grub_linux_boot) [GRUB_MACHINE_MIPS_QEMU_MIPS]: Handle the qemu-mips
	parameter passing.
	(grub_linux_unload) [GRUB_MACHINE_MIPS_QEMU_MIPS]: Free params.
	(grub_cmd_linux) [GRUB_MACHINE_MIPS_QEMU_MIPS]: Handle params.
	(grub_cmd_initrd) [GRUB_MACHINE_MIPS_QEMU_MIPS]: Likewise.
	* include/grub/mips/qemu_mips/cmos.h: New file.
	* include/grub/mips/qemu-mips/kernel.h: Don't include cpu/kernel.h.
	* include/grub/mips/qemu-mips/memory.h (grub_machine_mmap_iterate):
	Removed.
	* include/grub/mips/qemu-mips/serial.h (GRUB_MACHINE_SERIAL_PORTS):
	Use correct mips-style address.
	* include/grub/mips/qemu-mips/time.h: Include cpu/time.h.
	(GRUB_TICKS_PER_SECOND): Removed.
	(grub_get_rtc): Likewise.
	(grub_cpu_idle): Likewise.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_QEMU_MIPS_LINK_ADDR):
	New definition.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_LINK_ALIGN): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_COMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_UNCOMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_TOTAL_MODULE_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_MOD_ALIGN): Likewise.
	* util/grub-mkimage.c (image_targets): Add mipsel-qemu_mips-elf.
2011-05-17 16:07:17 +02:00
Vladimir 'phcoder' Serbinenko
b6296b3f9e Add missing ChngeLog line 2011-05-17 09:18:53 +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
c8ecc840d7 * grub-core/bus/pci.c (grub_memalign_dma32): Always allocate in 64-byte
blocks.
2011-05-16 08:51:55 +02:00
Vladimir 'phcoder' Serbinenko
153a4b552d * grub-core/bus/usb/usbhub.c (attach_root_port): Wait 10ms
after enabling port.
2011-05-16 08:50:21 +02:00
Vladimir 'phcoder' Serbinenko
ff44d107ad Skip incorrect USB devices.
* grub-core/bus/usb/usb.c (grub_usb_device_initialize): Fail if
	configcnt == 0.
	* include/grub/usb.h (grub_usb_err_t): New enum value
	GRUB_USB_ERR_BADDEVICE.
2011-05-16 02:39:25 +02:00
Vladimir 'phcoder' Serbinenko
638dbe4f27 add changelog entry 2011-05-16 02:35:47 +02:00
Vladimir 'phcoder' Serbinenko
c3fc520c0d * grub-core/bus/cs5536.c: Don't include grub/machine/kernel.h on
non-loongson.
	* grub-core/kern/mips/dl.c (grub_arch_dl_init_linker): Fix argument
	to grub_dl_register_symbol.
2011-05-15 15:41:23 +02:00
Vladimir 'phcoder' Serbinenko
67b1e5c907 Fix compilation errors.
* grub-core/term/ns8250.c (serial_get_divisor): Declare 'port' as
	potentially unused.
	* grub-core/loader/i386/linux.c (grub_linux_setup_video):
	Handle GRUB_VIDEO_DRIVER_SIS315PRO.
	* grub-core/bus/cs5536.c (grub_cs5536_init_geode): Restrict DIVIL init
	to loongson machines.
2011-05-15 12:32:37 +02:00
Vladimir 'phcoder' Serbinenko
b756f75f07 Several FS mtime support.
* grub-core/fs/affs.c (grub_affs_time): New struct.
	(grub_affs_file): New field mtime.
	(grub_fshelp_node): Changed 'block' and 'parent' to more appropriate
	type. Removed 'size'. New field 'di'. All users updated.
	(grub_affs_mount): Simplify checsum checking.
	(grub_affs_iterate_dir): New helper grub_affs_create_node.
	(grub_affs_dir): Handle mtime.
	* grub-core/fs/cpio.c (grub_cpio_find_file): Handle mtime.
	(grub_cpio_dir): Likewise.
	* grub-core/fs/hfs.c (grub_hfs_dirrec): New fields 'ctime' and 'mtime'.
	(grub_hfs_filerec): New field mtime.
	(grub_hfs_dir): Handle mtime.
	(grub_hfs_mtime): New function.
	(grub_hfs_fs): Register grub_hfs_mtime.
	* grub-core/fs/iso9660.c (grub_iso9660_date2): New struct.
	(grub_iso9660_dir): New field mtime.
	(grub_fshelp_node): New field dirent.
	(iso9660_to_unixtime): New function.
	(iso9660_to_unixtime2): Likewise.
	(grub_iso9660_read_symlink): Use node->dirent.
	(grub_iso9660_iterate_dir): Likewise.
	(grub_iso9660_dir): Set mtime.
	(grub_iso9660_mtime): New function.
	(grub_iso9660_fs): Register grub_iso9660_mtime.
	* grub-core/fs/jfs.c (grub_jfs_time): New struct.
	(grub_jfs_inode): New fields atime, ctime and mtime.
	(grub_jfs_dir): Set mtime.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/ntfs.c (list_file): Set mtime.
	(grub_ntfs_dir): Likewise.
	* grub-core/fs/reiserfs.c (grub_fshelp_node): New field 'mtime'.
	(grub_reiserfs_iterate_dir): Set mtime.
	(grub_reiserfs_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_obj): New field mtime.
	(grub_fshelp_node): Likewise.
	(grub_sfs_iterate_dir): Set mtime.
	(grub_sfs_dir): Likewise.
	* grub-core/fs/udf.c (grub_udf_dir): Set mtime.
	* grub-core/fs/xfs.c (grub_xfs_time): New struct.
	(grub_xfs_inode): New fields atime, mtime, ctime.
	(grub_xfs_dir): Set mtime.
	* include/grub/datetime.h (grub_datetime2unixtime): New function.
	* include/grub/hfs.h (grub_hfs_sblock): New fields ctime and mtime.
	* include/grub/ntfs.h (grub_fshelp_node): New field mtime.

	Support UDF symlinks.

	* grub-core/fs/udf.c (grub_udf_iterate_dir): Handle symlinks.
	(grub_ufs_read_symlink): New function. All users updated.

	Check amiga partmap checksum.

	* grub-core/partmap/amiga.c (grub_amiga_rdsk): Pad to 128 bytes.
	(grub_amiga_partition): Likewise.
	(amiga_partition_map_checksum): New function.
	(amiga_partition_map_iterate): Check checksum.
2011-05-15 12:23:54 +02:00
Vladimir 'phcoder' Serbinenko
5470225d58 ROMFS support.
* Makefile.util.def (libgrubmods.a): Add romfs.
	* grub-core/Makefile.core.def (romfs): New module.
	* grub-core/fs/romfs.c: New file.
2011-05-15 12:01:03 +02:00
Vladimir 'phcoder' Serbinenko
d4680a3556 Squashfs v4 support.
* Makefile.util.def (libgrubmods.a): Add squash4.
	* grub-core/Makefile.core.def (squash4): New module.
	* grub-core/fs/squash4.c: New file.
	* grub-core/io/gzio.c (grub_gzio): New members disk_input_off,
	disk_input_start, disk_input.
	(get_byte): Handle disk_input.
	(grub_zlib_disk_read): New function.
	* include/grub/deflate.h (grub_zlib_disk_read): New proto.
2011-05-15 11:58:22 +02:00
Feiran Zheng
bcb18e748f * Makefile.util.def (libgrubmods.a): Add minix3.
* grub-core/Makefile.core.def (minix3): New module.
	* grub-core/fs/minix.c (GRUB_MINIX_MAGIC) [MODE_MINIX3]: New value.
	(GRUB_MINIX_BSIZE): Removed.
	(GRUB_MINIX_INODE_DIR_BLOCKS): New definition. All users updated.
	(grub_minix_ino_t): New type.
	(grub_minix_le_to_cpu_ino): New macro.
	(GRUB_MINIX_ZONE2SECT): New definition. All users updated.
	(grub_minix_sblock) [MODE_MINIX3]: Change for minix3.
	(grub_minix_data): New field block_size.
	(grub_minix_read_file): Handle 64-bit correctly.
	* grub-core/fs/minix3.c: New file.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-05-15 11:53:16 +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
983b414d77 * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Silence spurious
warning. Move variables before code while on it.
2011-05-15 10:23:02 +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
Jordan Uggla
6ada82d14d * docs/grub.texi (Invoking grub-install): Fix additional outdated claims
and add some clarification.
2011-05-14 22:49:53 +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
de04eecfa9 * grub-core/kern/mm.c (grub_memalign): Disable auto-unloadding of
unused modules since currently referrence counter isn't reliable and
	there isn't much memory to recover there anyway.
2011-05-14 22:44:53 +02:00
Vladimir 'phcoder' Serbinenko
576881217f * grub-core/kern/dl.c (grub_dl_load_file): Decrease ref counter
rather than resetting it to allow modules to reference themselves
	in init.
2011-05-14 22:42:28 +02:00
Vladimir 'phcoder' Serbinenko
3d2c7e3591 * grub-core/kern/dl.c (grub_dl_unload): Don't decrease reference
counter on dependencies since grub_dl_unref already handles this.
2011-05-14 22:35:56 +02:00
Vladimir 'phcoder' Serbinenko
b25db21885 * grub-core/font/font_cmd.c (loadfont_command): Set grub_errno
on error if not already done.
2011-05-14 22:29:27 +02:00
Vladimir 'phcoder' Serbinenko
25a4533875 Fix few potential memory misusage.
* grub-core/font/font.c (load_font_index): Don't free char_index to
	avoid double free.
2011-05-14 22:26:52 +02:00
Vladimir 'phcoder' Serbinenko
0cac83df85 * docs/grub.texi (Installation): Fix several outdated claims. 2011-05-14 17:50:48 +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
d4de6b01e8 * grub-core/commands/menuentry.c (grub_cmd_menuentry): Correctly
handle class-free menuentries.
	(grub_normal_add_menu_entry): Add a check to be sure.
2011-05-14 12:14:00 +02:00
Vladimir 'phcoder' Serbinenko
4c2a3b438e * grub-core/term/at_keyboard.c (set1_e0_mapping): Fix swap between
PgUp and PgDown.
2011-05-14 12:09:16 +02:00
Vladimir 'phcoder' Serbinenko
85c6210f6a * configure.ac: Bump version to 1.99. 2011-05-13 21:50:18 +02:00
Vladimir 'phcoder' Serbinenko
36084912c0 Give ATA device a bit more time on first try in order to allow disks
to spin up.

	* grub-core/disk/ata.c (grub_atapi_identify): Use GRUB_ATA_TOUT_DEV_INIT
	if dev->present is 1. Reset dev->present on failure.
	(grub_ata_device_initialize): Set dev->present to 1.
	* include/grub/ata.h (GRUB_ATA_TOUT_DEV_INIT): New value.
	(grub_ata_device): New member 'present'.
2011-05-13 21:41:18 +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
19e1c41bbf Flush caches on DMA memory.
* grub-core/kern/mips/cache.S (grub_arch_sync_dma_caches): New function.
	* grub-core/bus/pci.c (grub_memalign_dma32): Flush caches.
	(grub_dma_free): Likewise.
	* include/grub/cache.h (grub_arch_sync_dma_caches): New declaration.
2011-05-13 20:56:50 +02:00
Vladimir 'phcoder' Serbinenko
91bbcc0cb6 * grub-core/boot/mips/yeeloong/fwstart.S: Add explicit set mips3
to avoid asm treating ld and sd as macros.
2011-05-13 20:23:29 +02:00
Vladimir 'phcoder' Serbinenko
60ddfad3da * grub-core/boot/mips/startup_raw.S: Flush cache after loading
decompressor.
2011-05-13 15:35:06 +02:00
Vladimir 'phcoder' Serbinenko
a298aa046c * grub-core/boot/mips/startup_raw.S: Use jalr rather than bal to call
grub_decompress_core since later would fail if grub_decompress_core
	is too far.
2011-05-13 15:20:16 +02:00
Vladimir 'phcoder' Serbinenko
9b44fecaa6 * grub-core/kern/mips/dl.c (grub_arch_dl_relocate_symbols): Handle
R_MIPS_JALR since it's used by newer compiler.
2011-05-13 15:17:02 +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
52856af262 * grub-core/loader/efi/chainloader.c (grub_chainloader_unload): Set
file_path to 0 for surety.
	(grub_chainloader_boot): Set exit_data to NULL.
	Unset the loader once done.
	(grub_cmd_chainloader): Fix confusing error message if file is empty.
2011-05-10 09:14:41 +02:00
Vladimir 'phcoder' Serbinenko
9c9bfc6de9 * grub-core/term/at_keyboard.c (fetch_key): Make a printf on
unknown key into a dprintf.
2011-05-09 19:33:03 +02:00
Vladimir 'phcoder' Serbinenko
dd94a3df9d * grub-core/kern/emu/hostdisk.c (linux_find_partition): Don't abort
on first non-existant partition.
2011-05-09 18:59:35 +02:00
Vladimir 'phcoder' Serbinenko
d8ce999501 Fix surname spelling in Changelog 2011-05-09 18:50:25 +02:00
Vladimir 'phcoder' Serbinenko
fa68d99c45 * grub-core/kern/emu/hostdisk.c (open_device): Set data->fd to -1 if
openning fails.
	Reported by: Mark Korenberg.
2011-05-09 18:48:50 +02:00
Vladimir 'phcoder' Serbinenko
157effb745 * grub-core/kern/emu/hostdisk.c (linux_find_partition): Prevent possible
overflow.
2011-05-09 18:46:51 +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
072b5d315a * grub-core/loader/efi/appleloader.c (MAKE_PIWG_PATH): New macro.
(devpath_1): Use MAKE_PIWG_PATH.
	(devpath_2): Likewise.
	(devpath_3): Likewise.
	(devpath_4): Likewise.
	(devpath_5): Likewise.
	(devpath_6): Likewise.

	The appleldr.mod was checked that to be binary identical to previous
	version.
2011-05-05 13:34:03 +02:00
Zach
7fae005102 Support 2010 Macbooks.
* grub-core/loader/efi/appleloader.c (devpath_6): New variable.
	(devs): Add devpath_6.
2011-05-05 12:18:00 +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
ee5614b7f8 * grub-core/lib/legacy_parse.c (grub_legacy_parse): Correctly handle
hexadecimal.
2011-05-05 01:27:54 +02:00
Vladimir 'phcoder' Serbinenko
664889a69c * grub-core/efiemu/main.c (grub_efiemu_load_file): Return grub_errno
and not 0 on failure.
2011-05-05 01:26:16 +02:00
Colin Watson
bd405bbc55 * grub-core/fs/i386/pc/pxe.c (grub_pxefs_dir): Return
GRUB_ERR_BAD_FS rather than GRUB_ERR_IO if the disk is not a pxe
disk; otherwise grub_fs_probe will not fall back to the next
filesystem.
(grub_pxefs_open): Likewise, for consistency.
Reported and tested by: Ezekiel Grave.
2011-05-03 18:03:05 +01:00
Colin Watson
4ebff75340 * tests/partmap_test.in: Don't hardcode path to parted.
Reported by: Peter Hjalmarsson.  Fixes Savannah bug #33150.
2011-05-03 17:57:39 +01:00
Colin Watson
8f94255340 * docs/grub.texi (GRUB only offers a rescue shell): Suggest the use
of `ls' to find out which devices are available.
2011-05-01 20:04:02 +01:00
Vladimir 'phcoder' Serbinenko
3c62402d08 * grub-core/loader/i386/linux.c (grub_linux_boot): Supply target rather
than source address for efi mmap buffer.
2011-04-25 16:58:25 +02:00
Vladimir 'phcoder' Serbinenko
723f63f2f8 * grub-core/partmap/amiga.c (amiga_partition_map_iterate): Fix a
wrong action on non-detecting the magic.
2011-04-25 15:36:08 +02:00
Vladimir 'phcoder' Serbinenko
68797f9230 * grub-core/gnulib/regex.c: Remove GRUB_MOD_LICENSE since it's
already supplied by another part of the module (fixes compilation on
	FreeBSD).
2011-04-25 15:29:41 +02:00
Vladimir 'phcoder' Serbinenko
6be8715dfc * grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Make mdraid UUID
match the one used by mdadm.
2011-04-25 15:23:37 +02:00
Colin Watson
e91dba5b13 * po/README: Add instructions for creating po/LINGUAS. 2011-04-21 15:47:58 +01:00
Colin Watson
c85140b3b7 Add "SEE ALSO" sections to most man pages. Fixes Debian bug
#551428.

* docs/man/grub-editenv.h2m (SEE ALSO): New section.
* docs/man/grub-emu.h2m (SEE ALSO): Likewise.
* docs/man/grub-fstest.h2m (SEE ALSO): Likewise.
* docs/man/grub-install.h2m (SEE ALSO): Likewise.
* docs/man/grub-macho2img.h2m (SEE ALSO): Likewise.
* docs/man/grub-menulst2cfg.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkconfig.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkdevicemap.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkfont.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkimage.h2m (SEE ALSO): Likewise.
* docs/man/grub-mklayout.h2m (SEE ALSO): Likewise.
* docs/man/grub-mknetdir.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkpasswd-pbkdf2.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkrelpath.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkrescue.h2m (SEE ALSO): Likewise.
* docs/man/grub-ofpathname.h2m (SEE ALSO): Likewise.
* docs/man/grub-pe2elf.h2m (SEE ALSO): Likewise.
* docs/man/grub-probe.h2m (SEE ALSO): Likewise.
* docs/man/grub-reboot.h2m (SEE ALSO): Likewise.
* docs/man/grub-script-check.h2m (SEE ALSO): Likewise.
* docs/man/grub-set-default.h2m (SEE ALSO): Likewise.
* docs/man/grub-setup.h2m (SEE ALSO): Likewise.
2011-04-21 15:17:48 +01:00
Colin Watson
92051871b7 * grub-core/kern/emu/getroot.c
(grub_find_root_device_from_mountinfo): Remove non-virtual-device
test that was incorrectly reintroduced in r3214.
Reported by: Ian Dall.  Fixes Savannah bug #33133.
2011-04-21 10:26:29 +01:00
Colin Watson
b13f79a427 Fix stack pointer handling in 16-bit relocator.
* grub-core/lib/i386/relocator16.S (grub_relocator16_start): Move
grub_relocator16_sp to %esp rather than %ss, and zero-extend it.
Fixes Ubuntu bug #683904.
2011-04-21 00:07:22 +01:00
Vladimir 'phcoder' Serbinenko
9b710a888e * configure.ac: Bump version to 1.99~rc2. 2011-04-20 09:23:55 +02:00
Vladimir 'phcoder' Serbinenko
d97e7b5935 * include/grub/dl.h [ASM_FILE]: Adapt for assembly.
* grub-core/lib/i386/setjmp.S: Add missing GRUB_MOD_LICENSE.
	* grub-core/lib/x86_64/setjmp.S: Likewise.
	* grub-core/lib/mips/setjmp.S: Likewise.
	* grub-core/lib/powerpc/setjmp.S: Likewise.
	* grub-core/lib/sparc64/setjmp.S: Likewise.
2011-04-20 01:37:48 +02:00
Vladimir 'phcoder' Serbinenko
0624551c22 * grub-core/lib/efi/datetime.c: Add missing GRUB_MOD_LICENSE.
* grub-core/lib/efi/datetime.c: Likewise.
2011-04-20 01:32:21 +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
bba79a1502 * grub-core/term/gfxterm.c (grub_gfxterm_fullscreen): Preserve previous
bitmap.
	(grub_gfxterm_term_init): Likewise.
2011-04-19 22:31:50 +02:00
Vladimir 'phcoder' Serbinenko
abc474ef4b Take into account the decorations the computing menu entry width.
* grub-core/gfxmenu/widget-box.c (get_border_width): New function.
	(grub_gfxmenu_create_box): Register get_border_width.
	* grub-core/gfxmenu/gui_list.c (draw_menu): Use get_border_width
	if available.
	* include/grub/gfxwidgets.h (grub_gfxmenu_box): New member
	get_border_width.
2011-04-19 00:44:53 +02:00
Endres Puschner
e74b3947af * grub-core/gfxmenu/icon_manager.c (grub_gfxmenu_icon_manager_get_icon):
Don't skip first class.
2011-04-18 23:24:41 +02:00
Vladimir 'phcoder' Serbinenko
34faa5955a * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Support huge
chunks.
	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_BUG.
2011-04-18 23:10:19 +02:00
Vladimir 'phcoder' Serbinenko
93a777e388 Complete 64-bit division support.
* grub-core/kern/misc.c (grub_divmod64): Rename to ...
	(grub_divmod64_full): ... this. Support 64-bit divisor and reminder.
	* include/grub/misc.h (grub_divmod64): Rename to ...
	(grub_divmod64_full): ... this.
	(grub_divmod64): New inline function.
2011-04-18 23:03:52 +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
Vladimir 'phcoder' Serbinenko
9ac718b061 * Makefile.am (multiboot.elf): Add -Wl,--build-id=none.
(kfreebsd.elf): Likewise.
	(pc-chainloader.elf): Likewise.
	(ntldr.elf): Likewise.
2011-04-16 17:24:47 +02:00
Vladimir 'phcoder' Serbinenko
50d2cc5ae5 Identify RAID by its UUID rather than (guessed) name.
* grub-core/disk/raid.c (ascii2hex): New function.
	(grub_raid_open): Accept mduuid/%s specification.
	* grub-core/kern/emu/getroot.c (get_mdadm_name): Revamped into ...
	(get_mdadm_uuid): ... this.
	(grub_util_get_grub_dev): Use mduuid/%s if UUID is available.
2011-04-16 15:27:35 +02:00
Vladimir 'phcoder' Serbinenko
e03f7bea45 * grub-core/gfxmenu/gui_image.c (rescale_image): Don't attempt to scale
to negative size.
2011-04-16 09:16:44 +02: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
78fa584f67 Rewrite /proc/self/mountinfo handling to cope with bind-mounts and
move-mounts appearing out of order.  Fixes Ubuntu bug #738345.

* grub-core/kern/emu/getroot.c (find_root_device_from_mountinfo):
Build a list of relevant visible mounts using the mnt_id and
parent_mnt_id fields, and then scan that list at the end.
2011-04-13 12:36:04 +01:00
Colin Watson
9d5f81622c * docs/grub.texi (normal): New section.
(normal_exit): New section.
(Embedded configuration): Add reference to normal.
(GRUB only offers a rescue shell): Likewise.
* docs/grub-dev.texi (Error Handling): Fix typo.
2011-04-12 13:23:19 +01:00
Colin Watson
09a9d66f1d * NEWS: Drop obsolete entry about probe-only btrfs support. 2011-04-12 11:44:35 +01:00
Colin Watson
0c67693394 * util/import_gcry.py: Fix typo. 2011-04-12 11:39:17 +01:00
Vladimir 'phcoder' Serbinenko
ec9f5e0d73 * NEWS: Add btrfs support. 2011-04-11 23:30:15 +02:00
Vladimir 'phcoder' Serbinenko
fe6b2cbaa6 BtrFS support. Written by me (Vladimir) with important bugfixes and
even more important testing by Colin.

	* Makefile.util.def (libgrubmods.a): Add crc.c and gzio.c
	* grub-core/Makefile.core.def (btrfs): Add crc.c.
	* grub-core/fs/btrfs.c: Stub replaced with real implementation.
	* grub-core/io/gzio.c (grub_gzio): New fields mem_input_size,
	mem_input_off and mem_input. All users updated to accept in-RAM input.
	(gzio_seek): New function.
	(test_zlib_header): Likewise.
	(grub_gzio_read): Likewise.
	(grub_zlib_decompress): Likewise.
	* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo):
	Accept partial and non-virtual mounts.
	(grub_guess_root_device): Do rescanning after device_from_mountinfo to
	avoid receiving /dev/dm-X as device.
	* grub-core/kern/emu/misc.c (grub_make_system_path_relative_to_its_root):
	Handle bind and partial mounts.
	* grub-core/lib/crc.c: New file.
	* include/grub/deflate.h: Likewise.
	* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): New
	proto.
	* include/grub/lib/crc.h: New file.
2011-04-11 23:26:41 +02: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
Colin Watson
2a9bc0169e * grub-core/fs/btrfs.c (grub_btrfs_fs) [GRUB_UTIL]: Set
reserved_first_sector to 1.  btrfs reserves plenty of space for boot
loaders.
Reported by: Gene Cumm.  Fixes Ubuntu bug #757446.
2011-04-11 16:06:37 +01: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
Vladimir 'phcoder' Serbinenko
9ee8d94faa * grub-core/kern/file.c (grub_file_open): Don't take into account the
parenthesis in the middle of the filename.
2011-04-11 07:38:42 +02:00
Vladimir 'phcoder' Serbinenko
b01abe3e16 * grub-core/loader/mips/linux.c (grub_cmd_initrd): Use correct limits
rather than trying to put initrd way too high.
	Reported by: Ryan Lortie <desrt@desrt.ca>
2011-04-10 16:44:11 +02:00
Vladimir 'phcoder' Serbinenko
335bda1e57 * grub-core/boot/mips/yeeloong/fwstart.S (no_cs5536): Put back
improperly removed string.
2011-04-10 16:12:31 +02:00
Vladimir 'phcoder' Serbinenko
5ca1a64de6 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_data): New member
is_disk.
	(grub_util_biosdisk_open): Don't apply ioctl on non-disk devices.
	(open_device) Likewise.
	(grub_util_biosdisk_close): Likewise.
	Reported by: Mark Korenberger.
2011-04-10 16:08:58 +02:00
Alexander Kurtz
cbac5b1ece * util/grub-mkconfig_lib.in: Add missing quotes. 2011-04-10 15:30:45 +02:00
Colin Watson
088cdb65eb * grub-core/gnulib/argp-parse.c (__argp_input): Don't crash if pstate
is NULL.
2011-04-10 15:25:52 +02:00
Vladimir 'phcoder' Serbinenko
8b8a81fa6a Dynamically count the number of lines for the lower banner.
* grub-core/normal/menu_entry.c (per_term_screen): New member
	num_entries.
	(print_down): Use num_entries.
	(update_screen): Likewise.
	(grub_menu_entry_run): Set num_entries.
	* grub-core/normal/menu_text.c (menu_viewer_data): New member
	num_entries.
	(grub_print_message_indented): Move real part to ...
	(grub_print_message_indented_real): ... here. Additional argument
	dry_run.
	(draw_border): Additional argument num_entries.
	(print_message): Additional argument dry_run.
	(print_entries): Receive menu viewer data.
	(grub_menu_init_page): New argment num_entries.
	(menu_text_set_chosen_entry): Use num_entries.
	(grub_menu_try_text): Likewise.
	* grub-core/normal/term.c (print_ucs4_terminal): New argument dry_run.
	All users updated.
	(grub_ucs4_count_lines): New function.
	* include/grub/term.h (grub_term_cursor_x): Moved from here ..
	* grub-core/normal/menu_text.c (grub_term_cursor_x): ... to here.
	* include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): Removed.
	(grub_term_border_height): Likewise.
	(grub_term_num_entries): Likewise.
2011-04-10 13:56:23 +02:00
Vladimir 'phcoder' Serbinenko
277f955bf1 * grub-core/boot/mips/yeeloong/fwstart.S: Fix address to error message.
Remove now unused string.
2011-04-10 11:57:19 +02:00
Colin Watson
536ce85a8d * docs/grub-dev.texi (Finding your way around): Update for 1.99
build system.
(Getting started): GRUB is developed in Bazaar now, not Subversion.

(Comment): Fix typo.
(Getting started): General copy-editing.
(Typical Development Experience): Likewise.
(Error Handling): Likewise.
(Video API): Likewise.
2011-04-09 03:39:47 +01:00
Colin Watson
2cf09e3258 * docs/grub-dev.texi: Replace MoinMoin syntax with Texinfo syntax
throughout.
2011-04-09 03:10:59 +01:00
Vladimir 'phcoder' Serbinenko
1ec652f4c4 * util/grub-mkimage.c (main): Handle special naming of yeeloong
directory.
2011-04-08 16:00:23 +02:00
Colin Watson
2c58372857 * docs/grub-dev.texi: Fix spelling of "developer" throughout.
* grub-core/fs/i386/pc/pxe.c (parse_dhcp_vendor): Fix spelling of
"development".
2011-04-08 14:01:51 +01:00
Vladimir 'phcoder' Serbinenko
d7a565e962 * grub-core/normal/menu_entry.c (run): Use grub_memcpy rather than
grub_strcpy since the lines aren't necessarily 0-terminated.
2011-04-08 14:37:13 +02:00
Vladimir 'phcoder' Serbinenko
7c2e4909c3 * grub-core/lib/legacy_parse.c (legacy_commands): Find doesn't set
root on legacy.
2011-04-08 14:32:41 +02:00
Vladimir 'phcoder' Serbinenko
34c09785b6 * grub-core/commands/probe.c (options): Argument to set isn't optional.
(GRUB_MOD_INIT): DEVICE isn't optional.
2011-04-08 14:28:19 +02:00
Vladimir 'phcoder' Serbinenko
6a6f80587b * grub-core/normal/term.c (print_ucs4_terminal): Don't try to put the
word on new line if it's too long anyway. Fixes a hang.
2011-04-08 14:25:44 +02:00
Vladimir 'phcoder' Serbinenko
2e335e901c * include/grub/util/raid.h (grub_util_raid_getmembers): Make argument
const.
	* util/grub-setup.c (main): Reuse md device name if available.
	* util/raid.c (grub_util_raid_getmembers): Receive device name and
	not GRUB name as argument.
	Based on patch by: Florian Wagner <fwagner>.
2011-04-08 14:08:55 +02:00
Vladimir 'phcoder' Serbinenko
10a7a86703 * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi):
Place mbi on low memory for better compatibility.
2011-04-08 14:04:24 +02:00
Vladimir 'phcoder' Serbinenko
7a3d6cd97b * include/grub/efiemu/efiemu.h: Use grub_memory_hook_t type. 2011-04-08 14:02:27 +02:00
Vladimir 'phcoder' Serbinenko
4ed4ce5820 correct Changelog spelling 2011-04-08 13:59:07 +02:00
Vladimir Serbinenko
18dd6b472d * autogen.sh: Ensure that collate and ctype locale is C.
* conf/Makefile.common: Likeiwise.

	Also-By: Colin Watson <cjwatson@ubuntu.com>
2011-04-08 13:57:56 +02:00
Vladimir 'phcoder' Serbinenko
cb180fdf06 revert last revision. It's ineffective 2011-04-08 13:18:27 +02:00
Vladimir 'phcoder' Serbinenko
947aa4f886 * grub-core/Makefile.am: Properly escape parenthesis in sed expressions.
Fixes Estonian locale.
	Reported by: Leho Kraav.
2011-04-08 12:13:44 +02:00
Vladimir 'phcoder' Serbinenko
f7148863eb * grub-core/normal/menu.c: Add missing include. 2011-04-08 12:12:02 +02:00
Vladimir 'phcoder' Serbinenko
3c0e3f142a * grub-core/disk/raid.c [GRUB_UTIL]: Add missing include. 2011-04-08 12:06:55 +02:00
Martin Zuther
6d1fa41fb4 * util/grub-mkconfig.in: Ignore emacsen backup. 2011-04-08 11:53:17 +02:00
Vladimir 'phcoder' Serbinenko
478182a838 * grub-core/kern/emu/hostdisk.c (open_device): Sync on close and not
on open.
	(grub_util_biosdisk_close): Likewise.
2011-04-08 11:49:38 +02:00
Vladimir 'phcoder' Serbinenko
72a89a54e1 * grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Add missing
const attribute and use grub_isdigit.
2011-04-08 11:44:44 +02:00
Andrey
b5ebecfabc * grub-core/video/fb/video_fb.c (grub_video_fb_setup): Silence older
gcc warning.
2011-04-06 14:21:34 +02:00
Vladimir 'phcoder' Serbinenko
7755f66e64 * grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align): Add few
useful grub_dprintf's.
2011-04-06 14:04:52 +02:00
Vladimir 'phcoder' Serbinenko
461121ffb3 * include/grub/fs.h (grub_dirhook_info): Use unsigned for 1-bit fields. 2011-04-06 14:01:12 +02: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
adf594cc44 Output errors if theme loading failed.
* grub-core/gfxmenu/gfxmenu.c (grub_gfxmenu_try): Move the call to
	grub_gfxterm_fullscreen on error paths to ...
	* grub-core/normal/menu.c (menu_init): ...here. Wait after showing
	theme loading error.
2011-04-06 13:00:18 +02:00
Vladimir 'phcoder' Serbinenko
665900a389 * include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): Let a bit more
space for older compilers.
	(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise.
2011-04-06 12:33:46 +02:00
Vladimir 'phcoder' Serbinenko
a562b47916 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Detect spares
and report them as not RAID members since they are useless for GRUB.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
2011-04-06 12:29:49 +02:00
Vladimir 'phcoder' Serbinenko
850e937329 Increase LVM implementation robustness in order not to crash on
configurations like pvmove. Previously code assumed that in some places
	only lvs or only pvs are used whereas it seems that they are used
	interchangeably.

	* grub-core/disk/lvm.c (read_node): New function.
	(read_lv): Use read_node.
	(grub_lvm_scan_device): Use only first mirror on pvmove'd lvs.
	Match volumes only at the end when all lvs are found. Take both
	pvs (first) and lvs (second) into account.
	* include/grub/lvm.h (grub_lvm_segment): Merge fields stripe_* and
	mirror_* into node_*. All users updated.
	(grub_lvm_stripe): Merge this ...
	(grub_lvm_mirror): ... and this ...
	(grub_lvm_node): ... into this. All users updated.
2011-04-03 16:28:14 +02:00
Vladimir 'phcoder' Serbinenko
6f33215394 * grub-core/disk/lvm.c (grub_lvm_scan_device): Print errors on the end
of function to allow further scanning for LVMs.
2011-04-03 15:57:44 +02:00
Vladimir 'phcoder' Serbinenko
829ea451a4 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_read): Don't close
on failed seek as it breaks open fd reusage.
2011-04-03 15:45:20 +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
Vladimir 'phcoder' Serbinenko
67e11623a8 * docs/grub.texi (Vendor power-on buttons): Explain how the numbers
are obtained.
2011-04-03 15:34:50 +02:00
Vladimir 'phcoder' Serbinenko
caee5efd31 GRUB developper manual based on existing Internals section and
contributions by the various authors with active copyright assignment.

	* docs/Makefile.am (info_TEXINFOS): Add grub-dev.texi.
	* docs/font_char_metrics.png: New file.
	* docs/font_char_metrics.txt: Likewise.
	* docs/grub-dev.texi: Likewise.
	* docs/grub.texi (Internals): Move from here ...
	* docs/grub-dev.texi: ... here.
2011-04-03 15:30:28 +02:00
Colin Watson
2cccc747ac Store the loopback device as data on loopback grub_disk structures,
rather than the file it points to.  This fixes use of freed memory
if an existing loopback device is replaced.

* grub-core/disk/loopback.c (grub_loopback_open): Store dev in
disk->data, not dev->file.
(grub_loopback_read): Adjust file assignment to match.
Fixes Ubuntu bug #742967.
2011-04-01 17:04:10 +01:00
Colin Watson
186ae367af * grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak
when replacing an existing device.
2011-04-01 15:35:09 +01:00
Vladimir 'phcoder' Serbinenko
cfed2ad097 Fix incorrect types in jfs.c. This enables >2TiB disks and fixes some
memory corruptions.

	* grub-core/fs/jfs.c (struct grub_jfs_diropen): Interpret bytes as
	unsigned.
	(grub_jfs_lookup_symlink): Make ino a grub_uint32_t rather than int.
	(grub_jfs_blkno): Use 64-bit quantities for block sectors.
	(grub_jfs_read_inode): Likewise.
	(grub_jfs_opendir): Likewise. Remove now useless casts.
	(grub_jfs_getent): Likewise.
	Make ino a grub_uint32_t rather than int.
	(grub_jfs_mount): Ensure that blksize and log2_blksize are consistent.
	(grub_jfs_read_file): Use 64-bit quantities when necessary. Replace
	division and module with bit operations.
	(grub_jfs_find_file): Make ino a grub_uint32_t.
	(grub_jfs_lookup_symlink): Likewise. Use 64-bit quantities
2011-04-01 15:53:06 +02:00
Colin Watson
05d2ed3277 * grub-core/normal/menu_entry.c (run): Quieten uninitialised
warning.  (This was in fact always initialised before use, but GCC
  wasn't smart enough to prove that.)
* grub-core/script/lexer.c (grub_script_lexer_yywrap): Likewise.
2011-04-01 11:43:51 +01:00
Vladimir 'phcoder' Serbinenko
91dc607330 * grub-core/kern/x86_64/efi/callwrap.S (efi_wrap_0): Preserve 16-byte
stack alignment.
	(efi_wrap_1): Likewise.
	(efi_wrap_2): Likewise.
	(efi_wrap_3): Likewise.
	(efi_wrap_4): Likewise.
	(efi_wrap_5): Likewise.
	(efi_wrap_6): Likewise.
	(efi_wrap_10): Likewise.
	Based on information by: Red Hat/Peter Jones.
2011-03-31 16:48:36 +02:00
Colin Watson
a8afc1d12c * grub-core/mmap/efi/mmap.c (grub_mmap_unregister): Remove
set-but-not-used variable.
2011-03-31 12:25:10 +01:00
Colin Watson
a826cc7d7e * docs/grub.texi (Simple configuration): Be more explicit about
GRUB_DEFAULT, and add an example.
Reported by: Leslie Rhorer.
2011-03-31 08:46:41 +01:00
Colin Watson
875b67ba09 * docs/grub.texi (Commands): Link to "GRUB only offers a rescue
shell".
2011-03-30 20:52:26 +01: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
241e41f55c * grub-core/disk/raid.c (insert_array): Add few potentially
useful grub_util_info.
	(grub_raid_register): Likewise.
2011-03-30 16:54:11 +02:00
Vladimir 'phcoder' Serbinenko
56445fb2b4 * grub-core/kern/emu/getroot.c (grub_util_get_grub_dev) [__linux__]:
Preserve partition number in mdadm code path.
2011-03-30 16:37:10 +02:00
Vladimir 'phcoder' Serbinenko
c871b1c6d0 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev): Add
few potentially useful grub_util_info.
2011-03-30 13:13:25 +02:00
Colin Watson
5e631b4fcb fix ChangeLog ordering 2011-03-30 12:07:43 +01:00
Vladimir 'phcoder' Serbinenko
87d1aa1927 * grub-core/disk/lvm.c (grub_lvm_scan_device): Remove spurious \n. 2011-03-30 13:02:39 +02:00
Colin Watson
2d5d0333d6 * docs/grub.texi (default): Use @example rather than nested
itemized lists to avoid breaking gendocs.
2011-03-30 11:46:36 +01:00
Colin Watson
3d7ed04e92 * docs/grub.texi (Future): Update. 2011-03-30 11:34:52 +01:00
abf042006e * docs/grub.texi (Environment): New chapter.
(Changes from GRUB Legacy): Link to "Environment block" section for
details of limitations.
(Simple configuration): Likewise.  Link to documentation of gfxmode
and gfxpayload variables from GRUB_GFXMODE and GRUB_GFXPAYLOAD
respectively.
(Shell-like scripting): Note that normal variables are stored in the
environment.
(gettext): Link to documentation of lang and locale_dir.
(list_env): New section.
(load_env): New section.
(save_env): New section.
(Reporting bugs): Fix typo.
2011-03-30 11:31:33 +01:00
Vladimir 'phcoder' Serbinenko
e1ad0edd11 * docs/grub.texi: Correctly use "terminal_input" and not "terminal" in
the example.
2011-03-30 09:35:35 +02:00
Vladimir 'phcoder' Serbinenko
5d8031749e * grub-core/term/at_keyboard.c (set_scancodes)
[!GRUB_MACHINE_MIPS_YEELOONG && !GRUB_MACHINE_QEMU]: Use scancode set 1.
2011-03-30 09:26:23 +02:00
Colin Watson
2a2da1d030 * docs/grub.texi (Menu-specific commands): Remove some semantics
that were true in GRUB Legacy but not in GRUB 2.
(submenu): New section.
(false): New section.
(read): New section.
(true): New section.
2011-03-30 03:49:22 +01:00
Colin Watson
a752763906 * docs/grub.texi (Changes from GRUB Legacy): Minor proofreading. 2011-03-30 03:26:11 +01:00
Colin Watson
8a748df2fd credit 2011-03-30 03:22:37 +01:00
Colin Watson
e30af0297d * docs/grub.texi (Simple configuration): Explain some of the
current limitations of grub-mkconfig.
2011-03-30 03:20:09 +01: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
70e75364fa * include/grub/lvm.h (grub_lvm_lv): New field 'visible'.
(grub_lvm_segment): New fields 'type', 'mirror_count' and 'mirrors'.
	(grub_lvm_mirror): New struct.
	* grub-core/disk/lvm.c (grub_lvm_checkvalue): Commented out.
	(grub_lvm_iterate): Iterate only visible volumes.
	(grub_lvm_read): Factor out to ..
	(read_lv): ... this. Support mirrors.
	(grub_lvm_read): New wrapper function.
	(grub_lvm_scan_device): Parse mirrors. Skip everything that isn't
	stripped or mirrored.
2011-03-29 20:33:32 +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
Colin Watson
5c650f4c8e * docs/grub.texi (loopback): New section. 2011-03-29 18:08:23 +01:00
Colin Watson
61d7156b94 * grub-core/disk/loopback.c (GRUB_MOD_INIT): Stop documenting
removed -p option.
2011-03-29 18:00:23 +01:00
Colin Watson
994b826432 * docs/grub.texi (BIOS installation): New section, partly based on
previous text in other sections.
(Installing GRUB using grub-install): Replace BIOS discussion with a
cross-reference.
(Images): Likewise.
2011-03-29 14:32:38 +01:00
Vladimir 'phcoder' Serbinenko
9e4d19e0d3 * grub-core/kern/emu/hostdisk.c (find_partition_start)
[HAVE_DIOCGDINFO]: Add safety checks.
2011-03-29 15:00:23 +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
Colin Watson
b4db4f39f0 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): If
real_sb->size is zero (e.g. RAID-0), get the disk size from
real_sb->data_size instead.
Fixes Ubuntu bug #743136.
2011-03-29 10:51:58 +01:00
Vladimir 'phcoder' Serbinenko
35e5f84c18 * grub-core/normal/misc.c (grub_normal_print_device_info): Use correct
printf clauses for printing size and start.
2011-03-29 11:25:04 +02:00
Vladimir 'phcoder' Serbinenko
d2e29d81a9 * grub-core/fs/ext2.c (grub_ext2_read_inode): Fix an overflow.
Reported and tested by: Timothy Nikkel.
2011-03-29 10:56:14 +02:00
Vladimir 'phcoder' Serbinenko
ed5587afea * grub-core/term/gfxterm.c (dirty_region_add): Move core part to ...
(dirty_region_add_real): ... this.
	(dirty_region_add): Don't discard margin refresh when performing
	scheduled repaint.
2011-03-29 08:33:28 +02:00
Vladimir 'phcoder' Serbinenko
a1dc717c58 * grub-core/lib/relocator.c (allocate_regstart)
[!DEBUG_RELOCATOR_NOMEM_DPRINTF]: Avoid grub_dprintf since not all
	terminals are capabple of malloc-free operation.
	(allocate_inreg) [!DEBUG_RELOCATOR_NOMEM_DPRINTF]: Likewise.
	(malloc_in_range) [!DEBUG_RELOCATOR_NOMEM_DPRINTF]: Likewise.
2011-03-29 08:20:19 +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
2414872538 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Remove stale
comment.
2011-03-28 15:17:22 +01:00
Colin Watson
f329eda79e * grub-core/disk/raid.c (grub_raid_register): Adjust debug message
to be specific about what kind of RAID device we're scanning for.
2011-03-28 13:23:54 +01:00
Seth Goldberg
c482ad98b3 * grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): Don't return freed string. 2011-03-26 23:22:59 +01:00
Vladimir 'phcoder' Serbinenko
5ee04984d1 * grub-core/fs/iso9660.c (grub_iso9660_label): Rtrim the label. 2011-03-26 14:14:59 +01:00
Vladimir 'phcoder' Serbinenko
f4727da93f Use libgeom on FreeBSD to detect partitions.
* Makefile.util.def (grub-mkimage): Add LIBGEOM to ldadd.
	(grub-mkrelpath): Likewise.
	(grub-script-check): Likewise.
	(grub-editenv): Likewise.
	(grub-mkpasswd-pbkdf2): Likewise.
	(grub-fstest): Likewise.
	(grub-mkfont): Likewise.
	(grub-mkdevicemap): Likewise.
	(grub-probe): Likewise.
	(grub-setup): Likewise.
	(grub-ofpathname): Likewise.
	(grub-mklayout): Likewise.
	(example_unit_test): Likewise.
	(grub-menulst2cfg): Likewise.
	* grub-core/Makefile.core.def (grub-emu): Likewise.
	(grub-emu-lite): Likewise.
	* configure.ac: Check for -lgeom on FreeBSD and set LIBGEOM.
	* grub-core/kern/emu/hostdisk.c [FreeBSD]: Include libgeom.h. Don't
	define HAVE_DIOCGDINFO.
	(follow_geom_up) [FreeBSD]: New function.
	(find_partition_start) [FreeBSD]: Rewritten using follow_geom_up.
	(convert_system_partition_to_system_disk) [FreeBSD]: Likewise.
	(grub_util_biosdisk_get_grub_dev) [FreeBSD]: Use FreeBSD path
	unconditionally of HAVE_DIOCGDINFO.
2011-03-26 12:59:02 +01:00
Vladimir 'phcoder' Serbinenko
82fe6c751b Fix FreeBSD compilation problem.
* grub-core/kern/emu/hostdisk.c (MAJOR) [FreeBSD]: New definition.
	(FLOPPY_MAJOR) [FreeBSD]: Likewise.
2011-03-26 12:49:34 +01:00
Colin Watson
4c6c9431d2 * grub-core/video/fb/video_fb.c (grub_video_fb_get_info_and_fini):
Switch back to page zero before loading a kernel, since some kernel
drivers expect that.
Thanks to: Felix Kuehling.
2011-03-25 00:03:54 +00:00
Vladimir 'phcoder' Serbinenko
c7064d9425 * grub-core/lib/relocator.c (grub_relocator_alloc_chunk_addr)
[DEBUG_RELOCATOR]: Reuse grub_mm_check.
	(grub_relocator_alloc_chunk_align) [DEBUG_RELOCATOR]: Likewise.
2011-03-24 12:45:51 +01:00
Vladimir 'phcoder' Serbinenko
3f71cded81 * include/grub/mm.h (GRUB_MM_CHECK): Rename to ...
(grub_mm_check): ... this. MAke a function-like macro and use GRUB_FILE.
2011-03-24 12:43:28 +01:00
Vladimir 'phcoder' Serbinenko
ef6de21af4 * grub-core/lib/relocator.c (allocate_inreg): Avoid dprintf unless
DEBUG_RELOCATOR is defined since gfxterm can't cope with output when
	malloc is disabled.
2011-03-24 12:39:48 +01:00
Vladimir 'phcoder' Serbinenko
8bc66a2ce6 * grub-core/loader/i386/bsdXX.c (grub_freebsd_load_elfmodule): Account
for modules headers when counting the needed allocation size.
2011-03-24 12:28:22 +01:00
Vladimir 'phcoder' Serbinenko
5657722c3c * grub-core/term/gfxterm.c (calculate_normal_character_width): Return 8
if no ASCII character is found to prevent crash.
2011-03-23 20:29:17 +01:00
Alexander Kurtz
41a85f5508 * grub-core/video/bitmap.c (match_extension): Ignore case. 2011-03-23 17:08:56 +01:00
Vladimir 'phcoder' Serbinenko
59e1e5f17b * grub-core/normal/menu_entry.c (init_line): Fix off-by-one error. 2011-03-23 14:18:56 +01:00
Vladimir 'phcoder' Serbinenko
bd4d051a95 * grub-core/script/parser.y: Declare "time" as valid argument. 2011-03-23 13:23:50 +01:00
Peter Jones
bae7fcc1ed Fix incorrect assert failure reporting.
* grub-core/tests/example_functional_test.c (example_test): Add
	a failure comment.
	* grub-core/tests/lib/test.c (add_failure): Renamed to ...
	(failure_start): ...this. Check that malloc succeeded.
	Don't call xvasprintf. Return failure struct.
	(failure_append_vtext): New function.
	(failure_append_text): Likewise.
	(add_failure): Likewise.
	(grub_test_assert_helper): Likewise.
	* include/grub/test.h (grub_test_assert_helper): New declaration.
	(grub_test_assert): Macro rewritten.
2011-03-23 13:01:42 +01:00
Vladimir 'phcoder' Serbinenko
537dc9bec6 * grub-core/normal/main.c (GRUB_MOD_INIT): Export pager variable. 2011-03-23 12:40:15 +01:00
Vladimir 'phcoder' Serbinenko
fa3e01bfb5 * grub-core/lib/i386/pc/biosnum.c: Add missing include. 2011-03-23 12:23:42 +01:00
Vladimir 'phcoder' Serbinenko
b1d2840445 * grub-core/disk/usbms.c (grub_usbms_reset): Transform USB-style error
into GRUB-style one.
2011-03-23 12:21:15 +01:00
Vladimir 'phcoder' Serbinenko
2e3e2e0908 * grub-core/bus/usb/usbtrans.c (grub_usb_control_msg): Return usb-style
error and not grub_errno.
	* grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Likewise.
2011-03-23 12:17:05 +01:00
Vladimir 'phcoder' Serbinenko
ed57e55702 * grub-core/bus/usb/uhci.c (grub_uhci_detect_dev): Return
GRUB_USB_SPEED_NONE in case of failure and not the error code.
2011-03-23 12:13:39 +01:00
Vladimir 'phcoder' Serbinenko
d1611f0163 * grub-core/efiemu/i386/pc/cfgtables.c
(grub_machine_efiemu_init_tables): Make declaration a prototype.
	* grub-core/loader/xnu.c (grub_xnu_lock): Likewise.
	(grub_xnu_unlock): Likewise.
	* grub-core/normal/cmdline.c (grub_cmdline_get/cl_set_pos_all): Likewise.
2011-03-23 12:08:33 +01:00
Vladimir 'phcoder' Serbinenko
7d4e39d65a * grub-core/bus/usb/usb.c (attach_hooks): Make static.
* grub-core/bus/usb/usbhub.c (hubs): Likewise.
	* grub-core/commands/hashsum.c (aliases): Likewise.
	* grub-core/commands/setpci.c (pci_registers): Likewise.
	* grub-core/disk/usbms.c (attach_hook): Likewise.
	* grub-core/fs/zfs/zfs.c (decomp_table): Likewise.
	(zio_checksum_table): Likewise.
	* grub-core/gettext/gettext.c (grub_gettext_msg_list): Likewise.
	* grub-core/gfxmenu/gfxmenu.c (cached_view): Likewise.
	* grub-core/lib/legacy_parse.c (legacy_commands): Likewise.
	* grub-core/lib/relocator.c (leftovers): Likewise.
	(extra_blocks): Likewise.
	* grub-core/loader/i386/bsd.c (relocator): Likewise.
	* grub-core/loader/i386/multiboot_mbi.c (modules): Likewise.
	(modules_last): Likewise.
	* grub-core/loader/i386/xnu.c (table_aliases): Likewise.
	(devices): Likewise.
	* grub-core/loader/multiboot_mbi2.c (modules): Likewise.
	(modules_last): Likewise.
	* grub-core/normal/auth.c (users): Likewise.
	* grub-core/normal/context.c (initial_menu): Likewise.
	(current_menu): Likewise.
	* grub-core/normal/crypto.c (crypto_specs): Likewise.
	* grub-core/term/serial.c (grub_serial_ports): Likewise.
	(grub_serial_terminfo_input_template): Likewise.
	(grub_serial_terminfo_output_template): Likewise.
	(grub_serial_terminfo_input): Likewise.
	(grub_serial_terminfo_output): Likewise.
	(registered): Likewise.
	* grub-core/term/usb_keyboard.c (attach_hook): Likewise.
2011-03-23 12:05:13 +01:00
Vladimir 'phcoder' Serbinenko
40fc46599d * grub-core/video/bochs.c (grub_video_bochs_setup): Use
grub_video_mode_type_t.
	* grub-core/video/cirrus.c (grub_video_cirrus_setup): Likewise.
	* grub-core/video/i386/pc/vbe.c (grub_video_vbe_setup): Likewise.
	* grub-core/video/i386/pc/vga.c (grub_video_vga_setup): Likewise.
2011-03-23 11:54:58 +01: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
9b43bf396a * grub-core/boot/i386/pc/lnxboot.S (real_code_2): Ensure that the
initial chunk read from the kernel always includes GRUB's multiboot
header, which is now outside the first sector.
2011-03-11 11:51:10 +00:00
Colin Watson
be1a7ce0cf * grub-core/loader/i386/linux.c (find_efi_mmap_size): Page-align
cached mmap_size, so that this works correctly when called multiple
times.
Reported by: Daniel Kahn Gillmor.  Should fix Debian bug #616638.
2011-03-09 17:38:31 +00:00
Colin Watson
83a3c48d37 * docs/grub.texi (Simple configuration): Tidy up formatting. 2011-03-09 17:35:16 +00:00
Szymon Janc
57d75699d6 2011-03-07 Szymon Janc <szymon@janc.net.pl>
* grub-core/fs/zfs/zfs.c (zap_leaf_lookup):
	Set-but-not-used variable removed.
2011-03-07 22:23:06 +01:00
Vladimir 'phcoder' Serbinenko
028501a0e0 Workaround yet another IEEE1275 bug.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value
	GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS.
	* grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate): Ignore
	adress_cells and size:cells if GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS
	is set.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
	GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS on powermacs.
2011-02-12 10:22:55 +03:00
Vladimir 'phcoder' Serbinenko
d998657dcf * grub-core/partmap/msdos.c (pc_partition_map_embed): Fix off by one
error.
2011-02-12 09:59:04 +03: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
97286eb547 * docs/grub.texi (Kernel): Add reference to grub-mkrescue.
(Making a GRUB bootable CD-ROM): Likewise.
(Invoking grub-mkrescue): New section.
Reported by: Yann Dirson.  Fixes Debian bug #612585.
2011-02-09 12:14:10 +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
Colin Watson
7e735e4349 * include/grub/file.h (not_easly_seekable): Rename to ...
(not_easily_seekable): ... this.  Update all users.
2011-02-08 13:21:13 +00:00
Colin Watson
800f188183 * docs/grub.texi (Making a GRUB bootable CD-ROM): Update to describe
grub-mkrescue.
2011-01-28 17:01:28 +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
3533413cd5 * grub-core/kern/emu/getroot.c: Include config-util.h explicitly. 2011-01-22 15:37:05 +01:00
Vladimir 'phcoder' Serbinenko
73ae4f4ff5 Add missing ChangeLog entry 2011-01-22 15:30:48 +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
Vladimir 'phcoder' Serbinenko
03a4ccb513 * grub-core/bus/bonito.c (write_bases): Fix direction of the shift. 2011-01-22 14:26:18 +01:00
Vladimir 'phcoder' Serbinenko
ffc8f4d8bc * grub-core/partmap/bsdlabel.c: Include grub/emu/misc.h and not grub/util/misc.h.
(iterate_real): Don't rely on partition being non-NULL.
2011-01-22 14:15:17 +01:00
Vladimir 'phcoder' Serbinenko
80f23be71f * grub-core/script/argv.c (round_up_exp): unsigned is 32-bit on all
supported platforms. Put a compile time assert for this rather than
	generate a warning with 32-bit shift.
2011-01-22 14:11:19 +01:00
Vladimir 'phcoder' Serbinenko
5d4f4dd51b * grub-core/disk/scsi.c (grub_scsi_read): Fix binary and check and make
logical expression more readable.
2011-01-22 13:22:46 +01:00
Vladimir 'phcoder' Serbinenko
e489601ad0 * grub-core/disk/raid.c (insert_array): Ensure uniqueness of p->number
even if some elements have a name.
	Reported by: Alexander GQ Gerasiov.
2011-01-22 13:18:05 +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
Colin Watson
81431e2b02 * docs/grub.texi (Simple configuration): Document
GRUB_PRELOAD_MODULES.
2011-01-22 01:11:56 +00:00
Colin Watson
5e79d66a54 * .bzrignore: Remove nonexistent grub-pbkdf2. 2011-01-17 12:48:07 +00:00
Vladimir 'phcoder' Serbinenko
646ada34d1 * configure.ac: Bump version to 1.99~rc1. 2011-01-16 12:54:03 +01: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
46c9db88cd * grub-core/kern/mips/yeeloong/init.c (grub_machine_init): Init boot
module.
2011-01-14 19:23:34 +01:00
Vladimir 'phcoder' Serbinenko
1d955d0098 * grub-core/Makefile.core.def (fwstart): Add lost LDFLAGS. 2011-01-14 19:21:06 +01:00
Vladimir 'phcoder' Serbinenko
4fbf185232 * grub-core/fs/zfs/zfsinfo.c (grub_cmd_zfs_bootfs): Quote bootpath and
diskdevid.
2011-01-13 22:25:56 +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
Vladimir 'phcoder' Serbinenko
8fc0a24576 * grub-core/Makefile.core.def (ieee1275_fb): Disable on sparc.
It doesn't work well there.
2011-01-12 11:55:52 +01:00
Vladimir 'phcoder' Serbinenko
b8494fbe5c * grub-core/normal/context.c (grub_env_context_close): Silence spurious
warning.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Likewise.
	* grub-core/partmap/msdos.c (pc_partition_map_embed): Use unsigned
	counter.
2011-01-12 11:52:51 +01:00
Vladimir 'phcoder' Serbinenko
b44a558c9a Use alias->path rather than buggy "canon".
* grub-core/disk/ieee1275/ofdisk.c (ofdisk_hash_add_real): New function.
	(ofdisk_hash_add): New argument curcan. All users updated.
2011-01-12 11:26:28 +01:00
Colin Watson
51fa856c58 * configure.ac: Fall back to true' if makeinfo' does not exist. 2011-01-11 17:49:27 -06:00
Vladimir 'phcoder' Serbinenko
9da068a5dc * grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_load32): Apply
loadmask before doing any calculations. Use correct type for offset.
	(grub_linux_load64): Likewise.
2011-01-11 23:01:07 +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
4531a206a1 * grub-core/fs/i386/pc/pxe.c (set_mac_env): Export variable.
(set_env_limn_ro): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/hook/datehook.c (GRUB_MOD_INIT): Likewise. Change to
	ARRAY_SIZE while on it.
	(GRUB_MOD_FINI): Change to ARRAY_SIZE.
	* grub-core/normal/context.c (grub_env_export): Move from here ...
	* grub-core/kern/env.c (grub_env_export): ... here.
	* grub-core/normal/context.c (grub_cmd_export): Skip exporting root and
	prefix.
	* grub-core/kern/main.c (grub_main): Export root and prefix.
	* include/grub/env.h (grub_env_export): Export.
	Reported by: Seth Goldberg.
2011-01-11 11:51:05 +01:00
Vladimir 'phcoder' Serbinenko
4514605726 * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi):
Take into account space used by ELF sections and multiboot palette.
	Reported by: Grégoire Sutre.
2011-01-11 00:44:56 +01:00
Vladimir 'phcoder' Serbinenko
f093110b52 * BUGS: New file. 2011-01-11 00:06:01 +01:00
Vladimir 'phcoder' Serbinenko
3395fe5230 Pass more appropriate video id to Linux.
* grub-core/loader/i386/linux.c (grub_linux_setup_video): Use
	grub_video_get_driver_id and variable gfxpayloadforcelfb to
	fill have_vga.
	(grub_linux_boot): Rely on grub_linux_setup_video to fill have_vga and
	shift params->lfb_size.
	* include/grub/i386/linux.h: Make an enume out of have_vga values.
2011-01-11 00:02:01 +01: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
b3ff6ff056 * grub-core/fs/zfs/zfsinfo.c (grub_cmd_zfs_bootfs): Use comma as
separator and pass bootpath/devid even if only one of them is available.
	Reported by: Seth Goldberg.
2011-01-10 23:56:11 +01:00
Vladimir 'phcoder' Serbinenko
ae67942e78 Don't use post-4G memory on EFI even if 64-bit since some non-compliant
implementations bug on them.

	* grub-core/kern/efi/mm.c (grub_efi_allocate_pages): Skip post-4G
	memory.
	(filter_memory_map): Likewise.
2011-01-10 23:51:10 +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
dcb883b162 Submenu default support.
* grub-core/normal/menu.c (grub_menu_execute_entry): New parameter
	auto_boot. All users updated.
	Declared static.
	Handle chosen and default with submenus.
	(grub_menu_execute_with_fallback): Declared static.
	Don't notify failure if autobooted. Upper level does it.
	(menuentry_eq): New function.
	(get_entry_number): Use menuentry_eq.
	(show_menu): New parameter "autobooted". All users updated.
	(grub_show_menu): Likewise.
	* include/grub/normal.h (grub_show_menu): Likewise.
	* include/grub/menu.h (grub_menu_execute_entry): Removed.
	(grub_menu_execute_with_fallback): Likewise.
2011-01-10 23:27:58 +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
47a77af5e8 * grub-core/commands/legacycfg.c (legacy_file): Trim the line. 2011-01-10 19:25:00 +01:00
Vladimir 'phcoder' Serbinenko
ce6bb3ee31 * util/grub-menulst2cfg.c (main): Trim the line. 2011-01-10 19:20:50 +01:00
Vladimir 'phcoder' Serbinenko
db87be2aea * grub-core/kern/i386/pc/init.c (grub_get_conv_memsize): Removed.
(grub_machine_init): Don't check amount of low memory as reportedly
	INT 12h can be broken and if low memory is too low we wouldn't have
	gotten into grub_machine_init anyway.
2011-01-10 17:54:21 +01:00
Vladimir 'phcoder' Serbinenko
c49849cc63 * grub-core/kern/i386/pc/mmap.c (grub_get_conv_memsize): New function.
(grub_machine_mmap_iterate): Take low memory into account
2011-01-10 17:51:06 +01:00
Vladimir 'phcoder' Serbinenko
b1969b3049 * grub-core/fs/btrfs.c (grub_btrfs_mount): Transform out of range into
badfs.
	Reported by: TiCPU.
2011-01-10 17:35:32 +01:00
Vladimir 'phcoder' Serbinenko
cf0eaf13a1 * grub-core/disk/raid.c (insert_array): Display RAID name in duplicate
members errors.
2011-01-10 17:28:29 +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
c88172fa92 * config.h.in (_LARGEFILE_SOURCE): Add missing define.
(_FILE_OFFSET_BITS): Likewise.
	Reported by: Seth Goldberg.
2011-01-08 20:22:32 +01:00
Grégoire Sutre
53798c4bd1 Check for libdevmapper header 2011-01-08 17:01:38 +01:00
Vladimir 'phcoder' Serbinenko
e7121b6932 * grub-core/fs/zfs/zfs.c (dmu_read): Use void * for some pointers to
avoid aliasing.
	(fzap_lookup): Likewise.
	(dnode_get): Likewise.
	(make_mdn): Likewise.
	(zfs_mount): Likewise.
	(fzap_iterate): Use temporary pointer to avoid aliasing.
	(grub_zfs_read): Likewise.
	* grub-core/loader/i386/xnu.c (grub_xnu_boot): Likewise.
	* grub-core/loader/xnu.c (grub_cmd_xnu_kernel): Use void * for some
	pointers to avoid aliasing.
	(grub_cmd_xnu_kernel64): Likewise.
	(grub_xnu_load_driver): Likewise.
2011-01-08 01:56:09 +01:00
Vladimir 'phcoder' Serbinenko
fc836af9a5 * grub-core/commands/terminal.c (grub_cmd_terminal_input): Silence
aliasing warning.
	(grub_cmd_terminal_output): Likewise.
	Reported and tested by: Grégoire Sutre.
2011-01-08 01:50:06 +01:00
Vladimir 'phcoder' Serbinenko
f9f376488b * grub-core/term/at_keyboard.c (grub_keyboard_getkey): Silence spurious
warning.
	Reported and tested by: Grégoire Sutre.
2011-01-08 01:45:57 +01:00
Vladimir 'phcoder' Serbinenko
ec1dfd634e * configure.ac: Do CPU substitution even if it's specified explicitly.
Reported and tested by: Alain Greppin.
2011-01-08 00:44:38 +01:00
Vladimir 'phcoder' Serbinenko
9462775a2d * grub-core/Makefile.am (rs_decoder.S): Force compilation with -Os.
Reported and tested by: Alain Greppin.
2011-01-08 00:39:12 +01:00
Vladimir 'phcoder' Serbinenko
0fd48e357f Satisfy some bison versions need for inttypes.h.
* grub-core/lib/posix_wrap/inttypes.h: New file.
	* grub-core/lib/posix_wrap/sys/types.h (int8_t): New type.
	(int16_t): Likewise.
	(int32_t): Likewise.
	(int64_t): Likewise.
	Reported and tested by: Alain Greppin.
2011-01-08 00:34:23 +01:00
Vladimir 'phcoder' Serbinenko
43f1bc8369 * grub-core/loader/i386/bsdXX.c (grub_netbsd_load_elf_meta):
Silence spurious warning.
	Reported and tested by: Alain Greppin.
2011-01-08 00:27:38 +01:00
Szymon Janc
64d1f0412b * docs/grub.texi (Support automatic decompression): Update with xz
decompression support.
2011-01-07 22:42:02 +01:00
Szymon Janc
25953e1055 Improve loaders' kernel command line handling.
* grub-core/lib/cmdline.c: New file.
	* include/grub/lib/cmdline.h: Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Use
	grub_create_loader_cmdline to create kernel command line.
	* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_linux): Likewise.
	* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_linux): Likewise.
	* grub-core/Makefile.core.def (linux16): Add lib/cmdline.c on i386_pc.
	(linux): Add lib/cmdline.c on common.
2011-01-07 17:09:39 +01:00
Vladimir 'phcoder' Serbinenko
e72d259fe1 * grub-core/fs/xfs.c (grub_xfs_iterate_dir): Take into account that
inopos might be unaligned.
2011-01-07 17:06:42 +01:00
Vladimir 'phcoder' Serbinenko
c0cf26da6b * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Add missing
endian transformations.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
	Based on report by: Doug Nazar.
2011-01-07 16:17:24 +01:00
Doug Nazar
0ca09e6c52 * grub-core/disk/raid5_recover.c (grub_raid5_recover): Add missing
array->members[i].start_sector.
	* grub-core/disk/raid6_recover.c (grub_raid6_recover): Likewise.
2011-01-07 14:41:44 +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
415502c26a * tests/util/grub-shell.in: Set serial terminfo type to `dumb', to
avoid causing test failures by clearing the screen.
2011-01-06 13:24:38 +00:00
Colin Watson
71b6a2b7a2 * grub-core/kern/emu/getroot.c (find_root_device_from_mountinfo):
Fix prefix check to handle the case where dir ends with a slash
(most significantly, "/" itself).
Reported by: Michael Vogt.
2011-01-06 11:09:17 +00:00
Vladimir 'phcoder' Serbinenko
b3f8d28ad0 Run terminfo_cls on initing terminfo output to clear the screen and
move the cursor to (0,0).

	* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_init_output):
	Call grub_terminfo_output_init.
	* grub-core/term/serial.c (grub_serial_term_output): Set .init.
	* grub-core/term/terminfo.c (grub_terminfo_output_init): New function.
	* include/grub/terminfo.h (grub_terminfo_output_init): New declaration.
2011-01-05 12:23:06 +01: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
488f71f116 * grub-core/term/terminfo.c (grub_terminfo_readkey): Handle keys with
CTRL.
2011-01-05 01:25:01 +01:00
Vladimir 'phcoder' Serbinenko
18a38098ad The E820 type 5 is BADRAM, not EXEC_CODE.
* grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed.
	(GRUB_E820_BADRAM): New define.
	* grub-core/loader/i386/linux.c (grub_linux_boot): Translate code
	into reserved. Propagate BADRAM.
	* grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed.
	(GRUB_E820_BADRAM): New define.
2011-01-05 01:14:32 +01:00
Vladimir 'phcoder' Serbinenko
9eae2084f4 * grub-core/lib/efi/relocator.c (grub_relocator_firmware_fill_events):
Ignore the memory post-4G.
	(grub_relocator_firmware_alloc_region): Additional debug statement.
2011-01-04 19:08:03 +01:00
Vladimir 'phcoder' Serbinenko
ebc71d284c * grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Check md/%s
names.
	Reported by: David Pravec.
2011-01-04 18:15:27 +01:00
Vladimir 'phcoder' Serbinenko
446fa40081 * grub-core/disk/i386/pc/biosdisk.c (GRUB_MOD_INIT): Workaround buggy
BIOSes.
2011-01-04 15:42:47 +01:00
Vladimir 'phcoder' Serbinenko
a0159f370d * grub-core/lib/reed_solomon.c (grub_reed_solomon_add_redundancy):
Prevent overflow.
	(grub_reed_solomon_recover): Likewise.
2011-01-04 15:39:59 +01:00
Vladimir 'phcoder' Serbinenko
e5146ca18b * grub-core/lib/reed_solomon.c (main) [TEST]: Reactivate normal test. 2011-01-04 15:37:10 +01:00
Vladimir 'phcoder' Serbinenko
956384994b * grub-core/lib/reed_solomon.c (scratch) [! STANDALONE]: Remove leftover
variable.
2011-01-04 15:35:10 +01:00
Colin Watson
5b1bdf1231 * grub-core/commands/legacycfg.c (GRUB_MOD_INIT): Fix typo in
descriptions of extract_legacy_entries_source and
extract_legacy_entries_configfile.
Reported by: Seung Soo, Ha.
2011-01-04 13:05:19 +00:00
Colin Watson
99d925aad4 * grub-core/bus/pci.c (grub_pci_iterate): Skip remaining functions
on devices that do not implement function 0.
2011-01-03 23:56:45 +00:00
Dave Vasilevsky
4af0504b72 * grub-core/fs/hfsplus.c: Make parent unsigned.
(grub_hfsplus_cmp_catkey): Don't compare using subtraction, it
	overflows.
	(grub_hfsplus_cmp_extkey): Likewise
2011-01-03 15:30:41 +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
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
275bff5f00 * grub-core/partmap/amiga.c (GRUB_AMIGA_PART_MAGIC): New define.
(amiga_partition_map_iterate): Check "PART" magic to avoid a very long
	loop in case of incorrect amiga partmap.
2010-12-31 15:00:45 +01:00
Vladimir 'phcoder' Serbinenko
307806cb53 * grub-core/partmap/amiga.c (GRUB_AMIGA_RDSK_MAGIC): New define.
(amiga_partition_map_iterate): Use grub_memcmp instead of grub_strcmp.
	Reported by:EHeM.
2010-12-31 14:55:55 +01:00
Vladimir 'phcoder' Serbinenko
b12b923e63 * grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Silence
spurious warning.
	Reported by: crocket
2010-12-31 12:37:35 +01:00
Vladimir 'phcoder' Serbinenko
14b48a19c2 * grub-core/loader/xnu.c (grub_cmd_xnu_kernel) [! GRUB_MACHINE_EFI]:
Preload EFIemu.
	(grub_cmd_xnu_kernel64) [! GRUB_MACHINE_EFI]: Likewise.
2010-12-27 07:19:51 +01:00
Vladimir 'phcoder' Serbinenko
693db2df56 * grub-core/loader/xnu.c (grub_cmd_xnu_kext): Abort if no kernel
is loaded
	(grub_cmd_xnu_kextdir): Likewise.
	(grub_cmd_xnu_splash): Likewise.
2010-12-27 07:18:24 +01:00
Vladimir 'phcoder' Serbinenko
c76386454e Avoid using Reed-Solomon with 0 redundancy.
* grub-core/kern/i386/pc/startup.S: Remove 0-data check.
	* grub-core/lib/reed_solomon.c (decode_block): Do not proceed on 0 data
	or 0 redundancy.
	(grub_reed_solomon_add_redundancy): Do not proceed with 0 redundancy.
	(grub_reed_solomon_recover): Likewise.
2010-12-27 07:09:43 +01:00
Vladimir 'phcoder' Serbinenko
25dd47804d Don't use disk subsystem in freebsd_boot.
* grub-core/loader/i386/bsd.c (freebsd_bootdev): New variable.
	(freebsd_biosdev): Likewise.
	(grub_freebsd_boot): Use freebsd_bootdev and freebsd_biosdev.
	(grub_cmd_freebsd): Set freebsd_bootdev and freebsd_biosdev.
2010-12-27 07:06:41 +01:00
Vladimir 'phcoder' Serbinenko
0b2db94300 Handling of files of unknown size is currently limited. They can't be
used e.g. for initrd or modules. Moreover gzip handling of not
	easily seekable files is buggy. Disable unknown file size for now. May
	be inefficient but works.

	* grub-core/io/gzio.c (test_header): Always retrieve the file size.
	* grub-core/io/xzio.c (grub_xzio_open): Likewise.
2010-12-26 21:15:31 +01:00
Mirko Parthey
5c408d0f50 * grub-core/boot/i386/pc/boot.S: Fix %es:%bx pointing to nowhere on
floppy probe.
2010-12-26 20:49:08 +01:00
Jeroen Dekkers
190a011a8b * grub-core/disk/raid.c (insert_array): Don't add spurious members. 2010-12-25 22:32:54 +01:00
Shea Levy
022d01b807 * grub-core/genmod.sh.in: Use @OBJCOPY@ rather than objcopy. 2010-12-25 18:21:46 +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
0354b8672c * grub-core/commands/acpihalt.c (grub_acpi_halt): Sleep for 1.5 before
writing an error message because of async power management.
	* grub-core/kern/mips/yeeloong/init.c (grub_halt): Likewise.
	(grub_reboot): Likewise.
2010-12-25 14:09:36 +01:00
Jordan Uggla
ab66c69f1a * tests/util/grub-shell.in: Suppress "ACPI shutdown failed" error to
keep unit tests from failing when they shouldn't.
2010-12-23 11:51:18 +00:00
Colin Watson
1426ef3560 * include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): The
previous patch increased the size of the RS code by 20 bytes (at
least with gcc-4.4), so increase this by 20 bytes to match.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise.
2010-12-21 17:41:47 +00:00
Colin Watson
20641b6baa * grub-core/lib/reed_solomon.c (gauss_solve): Fix size of standalone
scratch area.  Make sure to initialise chosen in standalone mode as
well as non-standalone.
Reported by: Robert Hooker and Andy Whitcroft.
Tested by: Andy Whitcroft.
2010-12-21 16:51:08 +00:00
Colin Watson
d060ad60ee * grub-core/commands/echo.c (grub_cmd_echo): Make UTF-8-clean by
constructing a new unescaped string and passing it to grub_xputs in
one go, rather than passing characters to grub_printf one at a time.
2010-12-21 13:52:07 +00:00
Colin Watson
b889cfadf9 * grub-core/fs/udf.c (read_string): Pacify GCC warning by
initialising utf16.
2010-12-21 13:00:10 +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
5318fe9804 * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_add_module):
Avoid next pointing to nowhere.
2010-12-20 16:13:01 +01:00
Vladimir 'phcoder' Serbinenko
6c85b743f5 * grub-core/fs/affs.c (grub_affs_mount): Read data->bblock.rootblock
rather than assuming than rootblock is exactly in the middle.
	(grub_affs_label): Likewise.
2010-12-19 00:52:18 +01:00
Vladimir 'phcoder' Serbinenko
a2a08a35bf * grub-core/fs/affs.c (grub_affs_fs) [GRUB_UTIL]: Explicitly set
reserved_first_sector to 0.
	* grub-core/fs/cpio.c (grub_cpio_fs) [GRUB_UTIL]: Likewise.
	* grub-core/fs/sfs.c (grub_sfs_fs) [GRUB_UTIL]: Likewise.
	* grub-core/fs/xfs.c (grub_xfs_fs) [GRUB_UTIL]: Likewise.
2010-12-19 00:49:52 +01:00
Vladimir 'phcoder' Serbinenko
7059d1ec14 Fix handling of UTF-16 UDF labels.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Move string-parsing part
	(read_string): .. here.
	(grub_udf_label): Use read_string.
2010-12-19 00:43:41 +01: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
BVK Chaitanya
30aff4cb3a * grub-core/normal/menu_entry.c (run): Execute commands from menu
editor under argument scope.
	Reported by: Jordan Uggla
2010-12-19 09:55:51 +05:30
Colin Watson
32570200a8 * grub-core/normal/term.c (print_more): Make \r or \n scroll one
line, and other keys scroll an entire page (previous handling was
for \r and \n to scroll a page and other keys to scroll two lines).
2010-12-18 17:37:48 +00:00
Vladimir 'phcoder' Serbinenko
e1dffcf270 * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi):
Set ptrdest to correct get_physical_target_address rather than
	incorrect get_virtual_current_address.
2010-12-18 14:31:05 +01:00
kashyap garimella
b04298cfa2 * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_load): Use
correct cat to grub_uint8_t * rather than grub_uint32_t *.
2010-12-18 15:22:11 +01:00
Colin Watson
5367ecd305 * .bzrignore: Ignore grub-core/rs_decoder.S. 2010-12-10 12:56:45 +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
Robert Millan
a94a667185 2010-12-09 Robert Millan <rmh@gnu.org>
* NEWS: Document addition of ZFS support.
2010-12-09 14:09:37 +01:00
Colin Watson
24b7938b32 * grub-core/kern/i386/pc/startup.S (grub_console_getkey): Use `>> 1'
rather than `/ 2', as the latter requires -Wa,--divide which would
require bumping our minimum binutils version.
2010-12-04 16:19:26 +00:00
BVK Chaitanya
bddc3ef623 * util/grub-script-check.c (main): Print script line number on
error.
2010-12-03 08:58:34 +05:30
Robert Millan
15abb5547f Merge ZFS. 2010-12-01 22:57:49 +01:00
Robert Millan
bf78d5b251 2010-12-01 Robert Millan <rmh@gnu.org>
* grub-core/fs/zfs/zfs.c: New file.
	* grub-core/fs/zfs/zfs_fletcher.c: Likewise.
	* grub-core/fs/zfs/zfs_lzjb.c: Likewise.
	* grub-core/fs/zfs/zfs_sha256.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	
	* include/grub/zfs/dmu.h: Likewise.
	* include/grub/zfs/dmu_objset.h: Likewise.
	* include/grub/zfs/dnode.h: Likewise.
	* include/grub/zfs/dsl_dataset.h: Likewise.
	* include/grub/zfs/dsl_dir.h: Likewise.
	* include/grub/zfs/sa_impl.h: Likewise.
	* include/grub/zfs/spa.h: Likewise.
	* include/grub/zfs/uberblock_impl.h: Likewise.
	* include/grub/zfs/vdev_impl.h: Likewise.
	* include/grub/zfs/zap_impl.h: Likewise.
	* include/grub/zfs/zap_leaf.h: Likewise.
	* include/grub/zfs/zfs.h: Likewise.
	* include/grub/zfs/zfs_acl.h: Likewise.
	* include/grub/zfs/zfs_znode.h: Likewise.
	* include/grub/zfs/zil.h: Likewise.
	* include/grub/zfs/zio.h: Likewise.
	* include/grub/zfs/zio_checksum.h: Likewise.
	
	* Makefile.util.def: Build ZFS into libgrubmods.
	* grub-core/Makefile.core.def: Build zfs.mod.
2010-12-01 22:42:11 +01:00
Colin Watson
ea20f6e03a merge some more commits from before Savannah compromise (mirrored by Launchpad) 2010-12-01 16:19:26 +00:00
Szymon Janc
3f0f38317b * grub-core/commands/regexp.c (grub_cmd_regexp): Remove unused
variable.
	* grub-core/commands/wildcard.c (match_files): Likewise.
2010-11-30 21:35:59 +01:00
Robert Millan
3a4253b2c4 2010-11-30 Robert Millan <rmh@gnu.org>
* grub-core/loader/i386/bsd.c
	(grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module_elf): Check
	whether kernel is loaded using grub_loader_is_loaded(), rather
	than `kernel_type', which may still be `KERNEL_TYPE_NONE' under
	certain error conditions.
2010-11-30 19:33:12 +01:00
Colin Watson
725d286634 merge commits from before Savannah compromise 2010-11-30 17:01:52 +00:00
Robert Millan
c5c9cd3e7d Add missing include 2010-11-30 16:23:41 +01:00
Robert Millan
8c317b270f 2010-11-30 Robert Millan <rmh@gnu.org>
* grub-core/commands/echo.c (grub_cmd_echo): Call grub_refresh()
	after printing a message.
2010-11-30 15:36:47 +01:00
Vladimir 'phcoder' Serbinenko
49d3ab4668 Avoid using tricks for initialising endian variables.
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot):
	Make const.
	(GRUB_MOD_INIT): Don't byte-swap.
	* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
	Use grub_cpu_to_le16_compile_time and grub_cpu_to_le32_compile_time.
	* include/grub/types.h (grub_swap_bytes16_compile_time): New macro.
	(grub_swap_bytes32_compile_time): Likewise.
	(grub_cpu_to_le32_compile_time): Likewise.
	(grub_cpu_to_le16_compile_time): Likewise.
2010-11-26 22:29:19 +01:00
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
Robert Millan
4e7db17be9 2010-11-26 Robert Millan <rmh@gnu.org>
* grub-core/term/i386/pc/vga_text.c (VGA_TEXT_SCREEN): Beautify.
	Update all users.
2010-11-26 15:35:40 +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
BVK Chaitanya
2c7859b36f merge with mainline 2010-11-25 19:54:50 +05:30
BVK Chaitanya
7955bea0d8 fix changelog and doc 2010-11-25 19:05:16 +05:30
BVK Chaitanya
d7647bb670 better changelog message 2010-11-25 18:25:26 +05:30
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
5a4072785b * grub-core/Makefile.core.def (xz_decompress): Move -lgcc from
ldflags to ldadd, to fix link line ordering.
(none_decompress): Likewise.
2010-11-24 19:32:49 +00:00
Colin Watson
3030d8ec49 * grub-core/Makefile.core.def (kernel): Add kern/emu/cache.S for emu
platforms.
(grub-emu-lite): Remove kern/emu/cache.S.
2010-11-24 12:07:14 +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
5225f32882 * Makefile.util.def (grub-menulst2cfg): List libraries in ldadd, not
ldflags, to fix link line ordering.
2010-11-23 15:56:18 +00:00
Colin Watson
038b3ce8dc * grub-core/Makefile.am (gentrigtables): Put -lm after $<; some
linkers are picky about this.
2010-11-23 13:00:05 +00:00
Colin Watson
bf16e98e3c * grub-core/Makefile.am (command.lst): Adjust sed expression
ordering so that extended and priority commands aren't treated as
ordinary commands.
2010-11-23 12:52:40 +00:00
Colin Watson
7242bab6a4 * include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
Remove byte-swapping function calls, which are not valid in
structure initialisers.
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot): Make
non-const.
(GRUB_MOD_INIT): Byte-swap data1, data2, and data3 fields of
grub_gpt_partition_type_bios_boot.
2010-11-23 10:48:46 +00:00
Colin Watson
14e8b279e9 Fix test program build on GNU/kFreeBSD.
* Makefile.util.def (example_unit_test): Add `$(LIBZFS)
$(LIBNVPAIR)' library dependencies.
2010-11-22 18:22:50 +00:00
Colin Watson
e6f63338f7 usual e-mail address 2010-11-22 18:22:00 +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
7f8b0fd7f0 * grub-core/loader/i386/linux.c (grub_cmd_linux): Pass correctly the
bootloader version instead of 0.
2010-11-19 22:58:06 +01:00
Vladimir 'phcoder' Serbinenko
dfd240b122 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Fix spurious
warning.
2010-11-19 22:52:27 +01:00
Vladimir 'phcoder' Serbinenko
7b61e6096b * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Don't try to
retrieve the metadat sector if size isn't known.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
2010-11-19 22:48:26 +01:00
BVK Chaitanya
f866fe808b reuse code from legacy parser 2010-11-19 19:08:44 +05:30
BVK Chaitanya
7e623b0d74 add changelog entry 2010-11-19 10:17:16 +05:30
Robert Millan
9dfe92d07a 2010-11-18 Robert Millan <rmh@gnu.org>
* grub-core/fs/btrfs.c (grub_btrfs_mount): Replace grub_strncmp()
	with grub_memcmp().
2010-11-18 16:52:27 +01:00
Vladimir 'phcoder' Serbinenko
41cc919ef7 * grub-core/normal/menu_entry.c (print_up): Fix displacement of up
arrow.
	Reported by: Jordan Uggla.
2010-11-18 02:08:01 +01:00
Vladimir 'phcoder' Serbinenko
1afcc914c5 Make better UTF compliant.
* grub-core/normal/charset.c (grub_utf8_to_utf16): Handle 6- and 7-byte
	sequences as incorrect.
	(grub_is_valid_utf8): Likewise.
	(grub_utf8_to_ucs4): Likewise.
	(grub_ucs4_to_utf8): Handle codepoints outside of BMP.
	(grub_ucs4_to_utf8_alloc): Likewise.
	* include/grub/charset.h (grub_utf16_to_utf8): Likewise.
2010-11-17 16:13:16 +01:00
Vladimir 'phcoder' Serbinenko
f18088844f Make legacy_source behave like source.
* grub-core/commands/legacycfg.c (legacy_file): Don't call
	grub_show_menu.
	(grub_cmd_legacy_source): Call grub_show_menu if needed.
2010-11-17 08:41:18 +01:00
Colin Watson
24ec575b72 * conf/Makefile.common (CFLAGS_GNULIB): Add -Wno-unused-parameter.
(-Wunused implies -Wunused-parameter, but not vice versa).
2010-11-16 15:54:18 +00:00
Colin Watson
72b7c7aa36 * configure.ac: Make error messages less confusing by testing for
-Wtrampolines rather than -Wno-trampolines (since -Wno-* is always
accepted, but produces a diagnostic if something else is wrong).
2010-11-16 15:50:20 +00:00
Vladimir 'phcoder' Serbinenko
e98937aaf0 * grub-core/term/at_keyboard.c (grub_keyboard_controller_read)
[GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: ifdef-ed out
	(now unused).
	(grub_keyboard_controller_init)
	[GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: Don't attempt to
	read the initial state since controller isn't inited yet.
2010-11-15 10:01:11 +01:00
Vladimir 'phcoder' Serbinenko
f6bbabc373 * grub-core/lib/relocator.c (malloc_in_range): Take into account that
allocate_regbeg may need to create new chunk header.
2010-11-15 09:50:58 +01:00
Vladimir 'phcoder' Serbinenko
22e7dbb2bb Fix quoting in legacy parser.
* grub-core/lib/legacy_parse.c (grub_legacy_escape): Correctly handle
	single quotes.
	(grub_legacy_parse): Likewise.
	Reported by: Jordan Uggla.
	Tested by: Jordan Uggla.
2010-11-15 00:33:28 +01:00
Vladimir 'phcoder' Serbinenko
03f80960cf Don't add -lgcc on i386 and x86_64.
* configure.ac (LIBS): Don't add -lgcc on i386 and x86_64.
	* conf/Makefile.common (LDADD_KERNEL): Likewise.
	* grub-core/Makefile.core.def (kernel): Use LDADD_KERNEL.
2010-11-14 23:36:20 +01:00
Vladimir 'phcoder' Serbinenko
779dc15bf6 * configure.ac: Add -Wno-trampolines when supported. 2010-11-14 17:13:44 +01:00
Modestas Vainius
d20a3b371c * grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Recognise ddf1_
fakeraid.
2010-11-14 17:09:13 +01:00
Giuseppe Caizzone
e53609331b Add generic logical block size support for UDF.
* grub-core/fs/udf.c (GRUB_UDF_LOG2_BLKSIZE): Removed.
	(GRUB_UDF_BLKSZ): Removed.
	(struct grub_udf_data): New field "lbshift" to hold the logical	block
	size of the file system in log2 format. All users updated.
	(sblocklist): Change type to unsigned.
	(grub_udf_mount): Change type of "sblklist" to unsigned.
	Move AVDP search before VRS recognition, because the latter requires
	knowledge of the logical block size, which is detected during the
	former.
	Detect and validate logical block size during AVDP search, adding
	support for block sizes 512, 1024 and 4096.
	Make VRS recognition independent of block size.
2010-11-14 16:58:50 +01:00
Giuseppe Caizzone
cb0229c587 Properly handle deleted files on UDF.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Skip directory entries
	whose "characteristics" field has the bit GRUB_UDF_FID_CHAR_DELETED
	set.
2010-11-14 16:51:45 +01:00
Giuseppe Caizzone
406858a8a9 Support reading files larger than 2 GiB.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Change type of variable
	"offset" to grub_off_t.
	(grub_udf_read_file): Likewise for parameter "pos".
2010-11-14 16:48:17 +01:00
Vladimir 'phcoder' Serbinenko
130da6a745 * docs/grub.texi (Changes from GRUB Legacy): Note when save_env is
unavailable.
	(Simple configuration): Refer to Changes from GRUB Legacy about
	save_env availability.
2010-11-14 16:25:28 +01: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
1fd08bf111 * grub-core/disk/lvm.c (GRUB_MOD_FINI): Reset the vg_list. Fixes
LVM on RAID support.
2010-11-14 14:13:11 +01:00
Vladimir 'phcoder' Serbinenko
de1a024fff Properly define WORDS_BIGENDIAN in wrapped environments.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN): New
	definition.
	* grub-core/lib/posix_wrap/sys/types.h (WORDS_BIGENDIAN): Likewise.

	Reported by: Manoel Rebelo Abranches.
	Tested by: Manoel Rebelo Abranches.
2010-11-14 13:37:59 +01:00
Vladimir 'phcoder' Serbinenko
bc5dd0b9ca * util/grub-mkconfig.in: Fix quoting. 2010-11-13 16:27:29 +01:00
Vladimir 'phcoder' Serbinenko
58c184be7b Support big ext2 files.
* grub-core/fs/ext2.c (grub_ext2_inode): Rename dir_acl to size_high.
	(grub_ext2_read_block): Support triple indirect blocks.
	(grub_ext2_read_file): Use 64-bit types and read size_high.
	(grub_ext2_open): Read size_high.
	Reported by: Ximin Luo.
	Tested by: Manoel Rebelo Abranches.
2010-11-13 16:11:24 +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
7625a68ebb * docs/grub.texi (menu): Correct the order.
Reported by: D. Hugh Redelmeier.
2010-11-13 15:56:23 +01:00
Vladimir 'phcoder' Serbinenko
10001ac54b * grub-core/kern/i386/pc/startup.S (multiboot_trampoline): Add missing
jump.
2010-11-12 08:45:16 +01:00
Manoel Rebelo Abranches
9c4cf53bfe 2010-11-08 Manoel Rebelo Abranches <mrabran@br.ibm.com>
* include/grub/elfload.h (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * kern/elf.c (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * grub-core/loader/powerpc/ieee1275/linux.c:
        (grub_linux_claimmap_iterate): New function. Uses the "available"property
        in the "memory" node for memory allocation for kernel in the PowerPC loader.
        (grub_linux_load32): Correctly find linux entry point offset.
        (grub_linux_load64): Likewise.
2010-11-08 11:14:54 -02:00
Robert Millan
d2bf06bf34 2010-11-07 Robert Millan <rmh@gnu.org>
On mips-yeeloong, build with -march=loongson2f when this flag is
	available (GCC >= 4.4).
	* conf/Makefile.common [COND_mips_yeeloong] (CFLAGS_PLATFORM): Remove
	`-march=mips3'.
	* configure.ac: For mips-yeeloong, add -march=loongson2f if available,
	or otherwise add -march=mips3.
2010-11-07 16:29:10 +01:00
BVK Chaitanya
86643a242f Suppress shell expansion on echo '*' and echo "*" like cases.
Reported by: Jordan Uggla.

	* grub-core/script/execute.c (grub_script_arglist_to_argv): Escape
	string arguments before shell expansion.
	* tests/grub_cmd_echo.in: New testcases.
2010-11-07 20:22:29 +05:30
Robert Millan
4f9b406ae3 2010-11-07 Robert Millan <rmh@gnu.org>
* conf/mips-qemu-mips.rmk: Remove stale file from previous
	transition.
2010-11-07 15:10:09 +01:00
BVK Chaitanya
87220a6881 merge with mainline 2010-11-07 18:31:41 +05:30
BVK Chaitanya
898c99a2c3 add changelog entry 2010-11-07 16:18:29 +05:30
Vladimir 'phcoder' Serbinenko
80c6d25eef * grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Handle devices like "sdaa1".
2010-11-07 00:10:49 +01:00
Vladimir 'phcoder' Serbinenko
4a1a0153c3 * include/grub/emu/misc.h: Don't include grub/util/libzfs.h.
* include/grub/emu/misc.h (grub_get_libzfs_handle): Move from here ...
	* include/grub/util/libzfs.h (grub_get_libzfs_handle): ... here.
2010-11-06 23:52:56 +01:00
Vladimir 'phcoder' Serbinenko
34706ddc06 * grub-core/fs/ntfs.c (grub_ntfs_uuid): Make uppercase. 2010-11-06 21:54:24 +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
Vladimir 'phcoder' Serbinenko
9c693bd66a Properly register serial terminfo.
Reported by: Jordan Uggla

	* grub-core/term/serial.c (grub_serial_terminfo_input_template): New
	const.
	(grub_serial_terminfo_output_template): Likewise.
	(grub_cmd_serial): Register "serial" with terminfo.
	(GRUB_MOD_INIT(serial)): Fill grub_serial_terminfo_input and
	grub_serial_terminfo_output.
2010-11-06 20:40:08 +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
b9b3839f6d 2010-11-05 Robert Millan <rmh@gnu.org>
On Yeeloong, pass machine type information to Linux.
	
	* grub-core/loader/mips/linux.c [GRUB_MACHINE_MIPS_YEELOONG]
	(LOONGSON_MACHTYPE): New macro, set to
	"machtype=lemote-yeeloong-2f-8.9inches".
	[LOONGSON_MACHTYPE] (grub_cmd_linux): Pass LOONGSON_MACHTYPE as
	additional argument to Linux.
2010-11-05 19:48:55 +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
Grégoire Sutre
33b4b0c61a Fix an integer overflow. 2010-11-01 23:42:53 +01:00
Vladimir 'phcoder' Serbinenko
2b36fbf493 * grub-core/loader/i386/linux.c (grub_cmd_linux): Autoload vbe.mod if
vga= option is supplied.
2010-11-01 13:10:51 +01: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
6428dec358 * grub-core/lib/arg.c (grub_arg_parse): Avoid interpreting direct
argument as an argument to no-argument option.
2010-11-01 12:45:51 +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
89d68fa681 * Makefile.am (libgrub.pp): Propagate the libgrub.a split. 2010-11-01 12:29:20 +01:00
Vladimir 'phcoder' Serbinenko
3a1197cdb0 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Do not put
elements with invlid index.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
	* grub-core/disk/raid.c (insert_array): Automatically reallocate
	members.
	* include/grub/raid.h (grub_raid_member): New struct.
	(grub_raid_array): Transform devices and start_sector into usage of
	grub_raid_member. All users updated
	(allocated_devs): New member.
2010-11-01 10:20:58 +01:00
Vladimir 'phcoder' Serbinenko
71574288a4 * docs/man/grub-set-default.h2m: Clarify that only saved default entry
is modified
2010-11-01 10:11:44 +01:00
BVK Chaitanya
8d40ec6590 NetBSD build fix for getline function conflict from gnulib.
* Makefile.util.def (libgrubkern.a): New library for grub kernel
	components that depend on gnulib headers.
	(libgrubmods.a): Renamed from earlier libgrub.a.
	* conf/Makefile.common: Remove gnulib from *_LIBRARY flags.
2010-10-29 15:26:16 +05:30
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
Vladimir 'phcoder' Serbinenko
18568d1852 * include/grub/types.h (grub_target_off_t): Removed no longer used type. 2010-10-26 12:29:12 +02:00
Vladimir 'phcoder' Serbinenko
4f6a2e2175 * grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root)
	[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Fix mountpoint return on ZFS.
2010-10-23 20:39:08 +02:00
Vladimir 'phcoder' Serbinenko
5c81f8b349 * grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Revert r2882.
2010-10-23 20:34:50 +02:00
Vladimir 'phcoder' Serbinenko
e138c45836 * grub-core/lib/relocator.c (grub_relocator_subchunk): Remove now
useless field head. All users updated.
	(free_subchunk): Correct handling of IN_REGION subchunk.
2010-10-22 22:49:36 +02:00
Colin Watson
0cbcdf0e6f * docs/grub.texi (Installing GRUB using grub-install): Proofread.
(Supported kernels): Likewise.
2010-10-22 14:17:33 +01:00
Grégoire Sutre
b65ea15514 Make mktemp invocations portable. 2010-10-18 22:50:01 +02:00
BVK Chaitanya
05f43cdd03 add change log entry 2010-10-18 13:41:00 +05:30
Szymon Janc
800e6a9be5 * grub-core/normal/auth.c (grub_auth_check_authentication):
Set-but-not-used variable removed.
2010-10-17 15:41:54 +02:00
Vladimir 'phcoder' Serbinenko
d82df574cd * docs/grub.texi (GNU/Linux): Document APM unavailability with
32-bit linux protocol.
2010-10-17 02:08:08 +02:00
Vladimir 'phcoder' Serbinenko
7bced4583e * grub-core/kern/i386/pc/startup.S (grub_console_setcursor): Check
cursor shape for sanity.
2010-10-17 01:49:06 +02:00
Vladimir 'phcoder' Serbinenko
5b0276902e * docs/grub.texi (Installation): Document buggy BIOS install. 2010-10-17 00:46:39 +02:00
Vladimir 'phcoder' Serbinenko
ba5f65cfa1 * docs/grub.texi (Installation): Indent. 2010-10-17 00:38:57 +02:00
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
Vladimir 'phcoder' Serbinenko
27d9ee3253 * docs/grub.texi (Installation): Document embedding zone. Remove
obsolete grub-install example.
2010-10-16 23:38:30 +02:00
Szymon Janc
6bdda8f877 * grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):
Set-but-not-used variable ifdef'ed.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Likewise.
	* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Set-but-not-used
	variable removed.
	* grub-core/disk/lvm.c (grub_lvm_scan_device): Likewise.
	* grub-core/fs/jfs.c (grub_jfs_find_file): Likewise.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_read_extent): Likewise.
	* grub-core/fs/ufs.c (grub_ufs_dir): Likewise.
	* grub-core/gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
	* grub-core/gfxmenu/view.c (redraw_menu_visit): Likewise.
	* grub-core/gfxmenu/widget-box.c (draw): Likewise.
	* grub-core/lib/relocator.c (malloc_in_range): Likewise.
	* grub-core/loader/i386/bsdXX.c (grub_netbsd_load_elf_meta): Likewise.
	* grub-core/loader/i386/bsd_pagetable.c (fill_bsd64_pagetable):
	Likewise.
2010-10-16 22:16:52 +02:00
Vladimir 'phcoder' Serbinenko
e19b016b30 * grub-core/commands/acpihalt.c (skip_ext_op): Skip index field op.
* include/grub/acpi.h (GRUB_ACPI_EXTOPCODE_INDEX_FIELD_OP): New
	enum value.
2010-10-16 20:01:30 +02:00
Vladimir 'phcoder' Serbinenko
6c8d300275 * grub-core/commands/acpihalt.c (get_sleep_type): Accept \_S5_ as
synonym to _S5_. Needed for some DSDTs.
2010-10-16 19:12:18 +02:00
Vladimir 'phcoder' Serbinenko
c32b51c9f9 Userspace ACPI parser debugging.
* grub-core/commands/acpihalt.c [GRUB_DSDT_TEST]: Include userspace
	headers and add relevant defines. Don't include standard headers.
	(main) [GRUB_DSDT_TEST]: New function.
	* include/grub/acpi.h [GRUB_DSDT_TEST]: Don't include standard headers.
	Don't declare functions.
2010-10-16 19:06:55 +02:00
Vladimir 'phcoder' Serbinenko
fbfbeb394f Remove dead grub_efi_mm_fini.
* grub-core/kern/efi/mm.c (allocated_page): Removed.
	(ALLOCATED_PAGES_SIZE): Likewise.
	(MAX_ALLOCATED_PAGES): Likewise.
	(allocated_pages): Likewise.
	(grub_efi_allocate_pages): Don't record allocated pages.
	(grub_efi_free_pages): Likewise.
	(grub_efi_mm_init): Likewise.
	(grub_efi_mm_fini): Removed.
2010-10-16 17:50:48 +02:00
Vladimir 'phcoder' Serbinenko
65f7ed7c9a * grub-core/kern/efi/mm.c (BYTES_TO_PAGES): Round up instead of down.
(grub_efi_mm_init): Take into account the memory map size increase.
2010-10-16 17:44:35 +02:00
Vladimir 'phcoder' Serbinenko
24977b4451 * grub-core/term/ns8250.c (do_real_config): Set port->broken to 0.
(serial_hw_put): Wait based on real time rather than port reads. Don't
	roken ports.
	* include/grub/serial.h (grub_serial_port): New field broken.
2010-10-16 17:29:12 +02:00
Robert Millan
5f8b440b6b Mention who reported this bug. 2010-10-16 02:34:10 +02:00
Robert Millan
1eb01cd276 2010-10-16 Robert Millan <rmh@gnu.org>
* grub-core/kern/emu/misc.c
	(grub_make_system_path_relative_to_its_root): Fix premature return
	when processing non-root ZFS filesystems.
2010-10-16 02:30:14 +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
Vladimir 'phcoder' Serbinenko
d0f4c1ea0f * grub-core/efiemu/main.c (grub_efiemu_prepare): Handle errors from
grub_efiemu_autocore.
2010-10-14 15:44:04 +02:00
Vladimir 'phcoder' Serbinenko
d87c681fd4 * grub-core/kern/i386/pc/startup.S (bypass_table): Use 0x1b explicitly
rather than 0x1b.
	(grub_console_getkey): Use correct jae opcode rather than ja.
2010-10-14 15:35:55 +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
74baff844e * grub-core/kern/i386/pc/startup.S (grub_console_getkey): Fix incorrect
handling of special keys.
2010-10-06 19:46:20 +02:00
Vladimir 'phcoder' Serbinenko
c7980ad945 Correct 2 last Changelog entries 2010-10-06 19:42:51 +02:00
starous
3ef068df41 SCSI - cache ID bug 2010-10-02 20:55:10 +02:00
starous
a94551944e usbtrans.c - wrong max packet size for bulk transfer 2010-10-02 20:49:05 +02:00
Vladimir 'phcoder' Serbinenko
441cfe65c0 Clear out 0x80 color bit on EFI.
Tested by: decoder
	Reported by: decoder and meta tech.

	* grub-core/term/efi/console.c (grub_console_standard_color): Removed.
	(grub_console_setcolorstate): Clear out 0x80 bit.
	Use GRUB_TERM_DEFAULT_STANDARD_COLOR.
	(grub_console_output): Use GRUB_TERM_DEFAULT_NORMAL_COLOR.
	Use GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR.
2010-10-01 16:54:38 +02:00
Vladimir 'phcoder' Serbinenko
bf26bcc435 * grub-core/loader/i386/linux.c (DEFAULT_VIDEO_MODE) [GRUB_MACHINE_EFI]:
Set to "auto".
2010-10-01 16:24:43 +02:00
Vladimir 'phcoder' Serbinenko
6e3c515d5b * grub-core/gettext/gettext.c (grub_gettext_init_ext): Avoid using
mo_file after freeing.
2010-09-30 21:07:51 +02:00
Vladimir 'phcoder' Serbinenko
e6d983ba6d * grub-core/normal/term.c (read_terminal_list): Free in a right order. 2010-09-30 21:04:09 +02:00
Vladimir 'phcoder' Serbinenko
74ccb5b5e2 * grub-core/script/execute.c (grub_script_execute_sourcecode): Set
flags.
2010-09-30 20:59:20 +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
ee74fa4822 Put terminfo into core on ieee1275 and yeeloong (needed for console).
* gentpl.py: New groups terminfoinkernel and terminfomodule.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include extcmd.h, arg.h
	and terminfo.h when needed.
	* grub-core/Makefile.core.def (kernel): Include term/terminfo.c,
	term/tparm.c, commands/extcmd.c, lib/arg.c on terminfokernel.
	(terminfo): Enable only on terminfokernel.
	(extcmd): Likewise.
	* include/grub/extcmd.h: Add missing EXPORT_FUNC.
	* include/grub/lib/arg.h: Likewise.
	* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions): Fix
	incorrect usage of ->.
2010-09-30 17:50:01 +02:00
Vladimir 'phcoder' Serbinenko
aa438e6818 * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi]
[GRUB_MACHINE_EFI && __i386__]: Fix typo.
2010-09-29 23:58:43 +02:00
Vladimir 'phcoder' Serbinenko
579940128b Fix coreboot compilation.
* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
	Take VBE info into account even if only text is supported.
	(fill_vbe_info): Take into account the case when only VGA text
	is supported.
	* include/grub/multiboot.h (GRUB_MACHINE_HAS_VBE): Set to zero
	on coreboot, multiboot and qemu.
2010-09-29 23:51:12 +02:00
Vladimir 'phcoder' Serbinenko
2a4066114d * grub-core/lib/relocator.c (malloc_in_range): Trim too verbose
debug messages.
	(grub_relocator_prepare_relocs): Set movers_chunk.srcv.
2010-09-29 23:19:21 +02:00
Vladimir 'phcoder' Serbinenko
d33613fcf3 * grub-core/loader/i386/bsd.c (grub_cmd_netbsd): Provide default serial
parameters.
2010-09-29 22:51:12 +02:00
Vladimir 'phcoder' Serbinenko
44a1b4327a * grub-core/lib/arg.c (grub_arg_parse): Fix treating of all commands as
if they were BSD-style.
2010-09-29 22:48:38 +02:00
Vladimir 'phcoder' Serbinenko
edde54e656 * grub-core/boot/i386/pc/lnxboot.S: Replace
GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE with
	GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART.
2010-09-29 22:45:57 +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
Colin Watson
0b4b227fae * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi): Fix
i386 and x86-64 definedness tests.
2010-09-28 17:38:34 +01:00
Yves Blusseau
f772623bc0 Fix generation of kernel_syms.lst
* grub-core/Makefile.am (kernel_syms.lst): Fix value and position of
    ASM_PREFIX
2010-09-27 11:11:38 +02:00
Robert Millan
8e57a6ca44 2010-09-26 Robert Millan <rmh@gnu.org>
Support degraded ZFS arrays in "grub-probe -t device" resolution.
	
	* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): When
	the pool is an array of devices, iterate through it and return the
	first device that passes a stat() test (instead of blindly returning
	the first one).
2010-09-26 16:11:33 +02:00
Robert Millan
f913083640 2010-09-26 Robert Millan <rmh@gnu.org>
Build fixes for GNU/kFreeBSD.
	
	* Makefile.util.def: Add `$(LIBZFS) $(LIBNVPAIR)' library dependencies
	to programs that require ZFS conversion.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Support
	kernels that don't have FLOPPY_MAJOR.
2010-09-26 15:53:05 +02:00
BVK Chaitanya
96510fafd2 fix typo 2010-09-25 10:48:48 +05:30
BVK Chaitanya
449333eb7d Fix grub-emu build.
* grub-core/kern/emu/main.c: Remove #include <getopt.h>.
	* grub-core/kern/emu/full.c: Split grub_mdraid_{init,fini} into
	mdraid09 and mdraid1x.
2010-09-25 10:43:09 +05:30
Colin Watson
e1fd193905 Re-enable grub-extras.
* autogen.sh: Create symlinks to ${GRUB_CONTRIB} if necessary to
avoid confusing Automake.  Run autogen only twice, once for the top
level and once for grub-core.  Add Makefile.util.def and
Makefile.core.def from extra modules to the appropriate autogen
invocations.  If Makefile.common exists in an extra module, include
it in both Makefile.util.am and grub-core/Makefile.core.am;
similarly, include any Makefile.util.common file in Makefile.util.am
and any Makefile.core.common file in grub-core/Makefile.core.am.
* conf/Makefile.common ($(top_srcdir)/grub-core/Makefile.core.am):
Depend on $(top_srcdir)/grub-core/Makefile.gcry.def.
($(top_srcdir)/grub-core/Makefile.gcry.def): Remove.
* grub-core/Makefile.am: Remove inclusion of Makefile.gcry.am.
* gentpl.py (gvar_add): Turn GVARS into a set.
(global_variable_initializers): Sort global variables on output.
(vars_init): New function.
(first_time): Likewise.
(library): Ensure that non-global variable initialisations are
emitted before the first time we emit code for a library block.
Append to variables rather than setting them.  Only emit
noinst_LIBRARIES, BUILT_SOURCES, and CLEANFILES the first time for
each conditional path.
(program): installdir() emits an Autogen macro, so must be passed to
var_add rather than gvar_add.
(data): Likewise.
(script): Likewise.
(rules): New function, centralising handling for different target
types.  Set up Guile association lists for first_time and vars_init,
and send most output to a diversion so that variable initialisations
can be emitted first.
(module_rules): Use new rules function.
(kernel_rules): Likewise.
(image_rules): Likewise.
(library_rules): Likewise.
(program_rules): Likewise.
(script_rules): Likewise.
(data_rules): Likewise.
* configure.ac: Add AC_PROG_LN_S, for the benefit of ntldr-img.
* .bzrignore: Add contrib and grub-core/contrib.  Remove
grub-core/Makefile.gcry.am.
2010-09-24 09:48:27 +01:00
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
BVK Chaitanya
dd363028e4 * Makefile.util.def (example_unit_test): Add
grub-core/gnulib/libgnu.a.
2010-09-24 08:46:15 +05:30
Grégoire Sutre
f5a109e277 Variable initialization. 2010-09-24 01:13:50 +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
Grégoire Sutre
1b655af685 Define FLOPPY_MAJOR on NetBSD. 2010-09-22 23:32:58 +02:00
Colin Watson
8f03f0b580 * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi): Fix
typo in __i386__ conditional.
2010-09-22 16:57:49 +01:00
Vladimir 'phcoder' Serbinenko
7835dfd3e8 * grub-core/loader/multiboot_mbi2.c (GRUB_MACHINE_EFI): Add missing
include.
2010-09-22 17:13:21 +02:00
Vladimir 'phcoder' Serbinenko
e255597e51 Implement EFI and ACPI multiboot2 extensions.
* grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Declare
	new tags as supported.
	(acpiv2_size): New function.
	(grub_multiboot_get_mbi_size): Take new tags into account.
	(grub_multiboot_make_mbi): Add new tags.
	* include/grub/multiboot.h (GRUB_MACHINE_HAS_ACPI): New definition.
2010-09-22 14:51:49 +02:00
starous
6cc1405144 .../serial/common.c - added missing configuration 2010-09-21 21:57:57 +02:00
Colin Watson
df7769d8dc * grub-core/normal/menu_entry.c (run): Make sure we always return
a value.
2010-09-21 19:03:11 +01:00
Colin Watson
b031012d70 * grub-core/commands/efi/lsefimmap.c (grub_cmd_lsefimmap):
NumberOfPages is UINT64 according to the UEFI specification, not
UINTN.  Fix printf format.
2010-09-21 16:58:08 +01:00
Colin Watson
174de8f340 * grub-core/bus/usb/usbhub.c (poll_nonroot_hub): Change type of
`err' to grub_usb_err_t.
Reported and tested by: KESHAV P.R.
2010-09-21 16:13:04 +01:00
Colin Watson
d7dbe92395 * grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name): Make
tpart non-const, so that we can assign to it.  (Since this is a
typedef, the constness refers to the pointer rather than what it
points to.)
2010-09-21 13:41:23 +01:00
Colin Watson
8d5e2af3fc * conf/Makefile.common (CPPFLAGS_GNULIB): Add
$(top_srcdir)/grub-core/gnulib as well as
$(top_builddir)/grub-core/gnulib.
Reported by: KESHAV P.R.
2010-09-21 13:37:50 +01: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
Colin Watson
d309a16e26 * grub-core/commands/hashsum.c (GRUB_MOD_INIT): Make "Compute or
check hash checksum." consistently translatable.
2010-09-21 11:14:06 +01:00
Yves Blusseau
b830cd16a1 * conf/Makefile.common (CPPFLAGS_GNULIB): Replace $(top_srcdir) with
$(top_builddir).
2010-09-21 12:02:59 +02:00
Colin Watson
c4fe27a827 * grub-core/commands/hashsum.c (aliases): Add sha1sum alias.
(GRUB_MOD_INIT): Register sha1sum command.
(GRUB_MOD_FINI): Unregister sha1sum command.
2010-09-21 10:56:16 +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
Colin Watson
4eff79d2f9 * grub-core/kern/emu/hostdisk.c (find_system_device): Only try to
convert partition names to disk names if the new `convert' parameter
is set.
(grub_util_biosdisk_get_grub_dev): If opening the disk device
returns GRUB_ERR_UNKNOWN_DEVICE, treat the partition device as a
disk in its own right.  This can happen with Xen disk images.
2010-09-21 10:36:44 +01: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
df3367cc4a * configure.ac: Change version to 1.99~beta0. 2010-09-21 02:33:48 +02:00
Vladimir 'phcoder' Serbinenko
77a94e9810 * grub-core/loader/i386/multiboot_mbi.c (grub_fill_multiboot_mmap):
Add BADRAM.
	* grub-core/loader/multiboot_mbi2.c (grub_fill_multiboot_mmap):
	Likewise.
	* include/multiboot.h: Resynced with specification.
	* include/multiboot2.h: Likewise.
2010-09-21 02:06:14 +02:00
Colin Watson
269004c158 Fix po directory handling.
* configure.ac: Create po/Makefile.in rather than po/Makefile.
* grub-core/gnulib/Makefile.am: Import gettext module.
* m4/gnulib-cache.m4: Likewise.
* m4/gnulib-comp.m4: Likewise.
* m4/gettext.m4: New file, from gnulib.
* m4/glibc2.m4: Likewise.
* m4/iconv.m4: Likewise.
* m4/intdiv0.m4: Likewise.
* m4/intl.m4: Likewise.
* m4/intldir.m4: Likewise.
* m4/intlmacosx.m4: Likewise.
* m4/intmax.m4: Likewise.
* m4/inttypes-pri.m4: Likewise.
* m4/lcmessage.m4: Likewise.
* m4/lib-ld.m4: Likewise.
* m4/lib-link.m4: Likewise.
* m4/lib-prefix.m4: Likewise.
* m4/lock.m4: Likewise.
* m4/nls.m4: Likewise.
* m4/po.m4: Likewise.
* m4/printf-posix.m4: Likewise.
* m4/progtest.m4: Likewise.
* m4/threadlib.m4: Likewise.
* m4/uintmax_t.m4: Likewise.
* m4/visibility.m4: Likewise.
* po/Makefile.am: Remove.
* po/Makefile.in.in: New file, from gettext.
($(DOMAIN).pot-update): Support POTFILES-shell.
* po/Makevars: New file.
* po/POTFILES-shell: Rename to ...
* po/POTFILES-shell.in: ... this.  Update.
* po/POTFILES: Rename to ...
* po/POTFILES.in: ... this.  Update.
* po/Rules-quot: New file, from gettext.
* po/boldquot.sed: Likewise.
* po/en@boldquot.header: Likewise.
* po/en@quot.header: Likewise.
* po/insert-header.sin: Likewise.
* po/quot.sed: Likewise.
* po/remove-potcdate.sin: Likewise.
2010-09-21 00:09:23 +01:00
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
fc55cc4c27 Support submenus.
* grub-core/commands/menuentry.c (grub_normal_add_menu_entry): New
	parameter submenu. All users updated.
	* grub-core/normal/main.c (free_menu): Rename to ...
	(grub_normal_free_menu): ... this. Made global.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Open new context
	if requested.
	* grub-core/normal/menu_entry.c (screen): New field submenu.
	(make_screen): Set submenu.
	(run): Open new context if requested.
	* include/grub/menu.h (grub_menu_entry): New field submenu.
	* include/grub/normal.h (grub_normal_free_menu): New proto.
2010-09-21 00:47:49 +02:00
Vladimir 'phcoder' Serbinenko
600cedf7f4 Menu entries extractor.
* grub-core/commands/configfile.c (grub_cmd_source): Implement extractor
	variants.
	(GRUB_MOD_INIT): Register new variants.
	(GRUB_MOD_FINI): Unregister new variants.
	* grub-core/commands/legacycfg.c (grub_cmd_legacy_configfile): Merge
	into grub_cmd_legacy_source.
	(grub_cmd_legacy_source): Implement extractor variants.
	(GRUB_MOD_INIT): Register new variants.
	(GRUB_MOD_FINI): Unregister new variants.
	* grub-core/commands/menuentry.c (grub_menu_init): Declare menuentry
	as an extractor.
	* grub-core/commands/search_wrap.c (GRUB_MOD_INIT): Declare
	search as an extractor.
	* grub-core/commands/test.c (GRUB_MOD_INIT): Declare
	test as an extractor.
	* grub-core/kern/corecmd.c (grub_register_core_commands): Declare set
	as an extractor.
	* grub-core/normal/context.c (grub_env_context_open): Reorganised.
	(grub_env_new_context): New function.
	(grub_env_context_open): Likewise.
	(grub_env_extractor_open): Likewise.
	(grub_env_extractor_close): Likewise.
	* grub-core/script/execute.c (grub_script_execute_cmdline): Handle
	grub_extractor_level.
	* include/grub/command.h (GRUB_COMMAND_FLAG_EXTRACTOR): New flag.
	* include/grub/env.h (grub_env_extractor_open): New proto.
	(grub_env_extractor_close): Likewise.
	* include/grub/normal.h (grub_extractor_level): New external variable.
2010-09-21 00:07:05 +02:00
Vladimir 'phcoder' Serbinenko
7bda3a87af Make cutmem accept a region specification.
Suggested by: Samuel Thibault

	* grub-core/mmap/mmap.c (parsemem): New function.
	(grub_cmd_cutmem): Handle new arguments.
2010-09-20 22:24:30 +02:00
Vladimir 'phcoder' Serbinenko
2ea57f8844 * grub-core/mmap/mmap.c (grub_cmd_cutmem): New function.
(GRUB_MOD_INIT): Register new command.
	(GRUB_MOD_FINI): Unregister new command.
2010-09-20 22:11:52 +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
Vladimir 'phcoder' Serbinenko
899d8af498 * grub-core/kern/emu/misc.c (asprintf): Use vsnprintf instead of
vsprintf.
2010-09-20 19:14:29 +02:00
Colin Watson
40901acd76 * grub-core/commands/efi/lsefimmap.c: Correct header.
* NEWS: Update.
2010-09-20 17:59:09 +01: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
Tristan Gingold
3dccbe4bbb * grub-core/commands/efi/lsefimmap.c: New file.
* grub-core/Makefile.core.def (lsefimmap): New module.
	* include/grub/efi/api.h (PRIxGRUB_EFI_UINTN_T): New definition.

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

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-20 17:59:25 +02:00
Vladimir 'phcoder' Serbinenko
38c259a76a Pause the execution (10s max) if any errors are displayed so the user
has a chance to see them.

	* grub-core/kern/err.c (grub_err_printed_errors): New variable.
	(grub_print_error): Increment grub_err_printed_errors.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Pause the
	execution if any errors were displayed.
	(show_menu): Remove old code for pause.
	* grub-core/normal/menu_entry.c (run): Likewise.
	* grub-core/normal/term.c (grub_normal_char_counter): Removed. All
	users updated.
	(grub_normal_get_char_counter): Likewise.
	* include/grub/err.h (grub_err_printed_errors): New external variable.
	* include/grub/normal.h (grub_normal_get_char_counter): Removed.
2010-09-20 17:46:35 +02:00
Vladimir 'phcoder' Serbinenko
f218b09c99 Support multiboot VBE info.
* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
	Take VBE info into account.
	(fill_vbe_info) [GRUB_MACHINE_HAS_VBE]: New function.
	(retrieve_video_parameters) [GRUB_MACHINE_HAS_VBE]:
	Call fill_vbe_info when appropriate.
	(grub_multiboot_make_mbi): Account for the size occupied by VBE info.
	* grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Declare tags
	as supported.
	(grub_multiboot_get_mbi_size): Take new tags into account.
	(fill_vbe_tag) [GRUB_MACHINE_HAS_VBE]: New function.
	(retrieve_video_parameters) [GRUB_MACHINE_HAS_VBE]:
	Call fill_vbe_tag when appropriate.
	(grub_multiboot_make_mbi): Properly align tags.
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_pm_interface): New
	function.
	* include/grub/i386/pc/vbe.h (grub_vbe_bios_get_pm_interface): New
	proto.
	* include/grub/multiboot.h (GRUB_MACHINE_HAS_VBE): New definition.
2010-09-20 17:01:28 +02:00
Vladimir 'phcoder' Serbinenko
a9cc5438a5 Suport manual terminal geometry specification.
* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions):
	Save state in grub_ofconsole_terminfo_output.
	(grub_ofconsole_term): Use grub_terminfo_getwh.
	(grub_ofconsole_getwh): Removed.
	* grub-core/term/serial.c (grub_serial_getwh): Removed.
	(grub_serial_term): Use grub_terminfo_getwh.
	* grub-core/term/terminfo.c (grub_terminfo_getwh): New function.
	(options): New struct.
	(OPTION_*): New enum.
	(grub_cmd_terminfo): Transform into extcmd and handle new parameters.
	* include/grub/terminfo.h (grub_terminfo_output_state): New fields
	width and height.
	(grub_terminfo_getwh): New proto.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Handle --lines.
2010-09-20 16:27:33 +02:00
Vladimir 'phcoder' Serbinenko
1a8fed20ad Handle legacy "terminal" command.
* grub-core/lib/legacy_parse.c (legacy_command): New flags FLAG_TITLE
	and FLAG_TERMINAL.
	(legacy_commands): Add terminal and title.
	(grub_legacy_parse): Handle terminal. Simplify title handling.
2010-09-20 16:15:50 +02:00
Vladimir 'phcoder' Serbinenko
41e9c57d89 * grub-core/lib/arg.c (grub_arg_show_help): Correctly handle
parameters overflow.
2010-09-20 16:12:15 +02:00
Colin Watson
61c874c51c * .bzrignore: Add grub-core/gnulib/sys, widthspec.bin, and
widthspec.h.
* docs/grub.texi (Shell-like scripting): Document `!'.
(Network): Simplify using new i386-pc-pxe format.  Mention
grub-mknetdir.
* NEWS: Update.
2010-09-20 14:03:47 +01:00
Colin Watson
943682b44c * Makefile.am (SUBDIRS): Restore "."; it's important to force
ordering, so that e.g. ascii.h is built before grub-core/font/font.c
when needed.
2010-09-20 13:55:49 +01:00
Colin Watson
6d3d698d13 * grub-core/commands/efi/lsefisystab.c: Correct header.
* grub-core/commands/efi/lssal.c: Likewise.
* grub-core/commands/testload.c: Likewise.
2010-09-20 13:18:41 +01: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
Colin Watson
a63c31b62d * kern/emu/hostdisk.c: Include <sys/ioctl.h> and <sys/disklabel.h>
on FreeBSD.  Define HAVE_DIOCGDINFO on NetBSD and FreeBSD to reduce
the verbosity of later #ifs.
(find_partition_start): Define this function on FreeBSD too.
(device_is_wholedisk) [__FreeBSD__ || __FreeBSD_kernel__]: New
function.
(grub_util_biosdisk_get_grub_dev): Use partition-start-sector logic
on FreeBSD.
2010-09-20 12:12:33 +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
Yves Blusseau
15c6926126 Use gnulib-tool to create gnulib source files.
* Add gnulib files generated by gnulib-tool in build-aux, m4 and
    grub-core/gnulib directories
    * .bzignore: Add **/.deps and autogenerated gnulib files
    * configure.ac: Assign auxiliary directory to build-aux, add invocation
    of gnulib macros, add grub-core/gnulib/Makefile
    * Makefile.am: Add gnulib directory in SUBDIRS (removing unnecessary .),
    include m4 directory to aclocal.
    * Makefile.util.def: Remove direct compilation of gnulib source files
    and use the new grub-core/gnulib/libgnu.a.
    * build-aux/config.rpath: move config.rpath from top directory to
    build-aux
    * conf/Makefile.common: Remove the macro _GL_UNUSED already defined
    in gnulib headers
    * conf/Makefile.extra-dist: Add m4/gnulib-cache.m4
    * grub-core/Makefile.core.def: Remove unnecessary extra_dist
    * grub-core/lib/posix_wrap/localcharset.h (locale_charset): Update
    header.
    * grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Return static
    string.
2010-09-20 12:35:33 +02:00
Yves Blusseau
e511c9f591 * .bzrignore: Add grub-kbdcomp, grub-menulst2cfg, *.marker,
grub-core/genmod.sh and grub-core/gensyminfo.sh
2010-09-20 11:49:57 +02:00
BVK Chaitanya
c2dede052a Add a test for echo command options.
* tests/grub_cmd_echo.in: New test.
	* Makefile.util.def: Rules for new test.
2010-09-20 13:53:55 +05:30
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
Vladimir 'phcoder' Serbinenko
e0337366d1 * grub-core/boot/i386/pc/boot.S: Ignore %dl if it's not in a sane range. 2010-09-20 00:06:45 +02:00
Vladimir 'phcoder' Serbinenko
742f9232e3 Split config.h for util and core.
* acinclude.m4 (HAVE_ASM_USCORE): Transformed into a variable.
	(ADDR32): Likewise.
	(DATA32): Likewise.
	(BSS_START_SYMBOL): Likewise.
	(END_SYMBOL): Likewise.
	(NEED_ENABLE_EXECUTE_STACK): Likewise. All users updated.
	(grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK): Removed.
	* config.h.in: New file.
	* configure.ac: Use config-util.h as config define file.
	Rename MACHINE into GRUB_MACHINE. All users updated.
	(NEED_REGISTER_FRAME_INFO): Transformed into a variable. All users
	updated.
	(NESTED_FUNC_ATTR): Likewise.
	Substitue new variables.
	(COND_HAVE_ASM_USCORE): New conditional.
	* grub-core/Makefile.am (ASM_PREFIX): New variable.
	(kernel_syms.lst): Use ASM_PREFIX.
	* grub-core/kern/emu/console.c: Include config-util.h.
	* grub-core/kern/emu/misc.c: Likewise.
	* grub-core/kern/emu/mm.c: Likewise.
	* include/grub/emu/misc.h: Likewise.
	* include/grub/libgcc.h: Likewise.
2010-09-19 22:22:43 +02:00
Vladimir 'phcoder' Serbinenko
39feb0e8f9 * grub-core/term/efi/console.c (efi_codes): Fix GRUB_TERM_KEY_*
constants usage.
	* grub-core/kern/emu/console.c (grub_ncurses_getkey):
	Fix GRUB_TERM_KEY_* constants usage.
	* grub-core/kern/emu/misc.c (asprintf): Fix vasprintf usage.
2010-09-19 22:09:05 +02:00
Vladimir 'phcoder' Serbinenko
9af6dac30d * grub-core/bus/usb/ohci.c (grub_ohci_cancel_transfer): Use %p to
print pointer.
	* grub-core/bus/usb/uhci.c: Remove empty define.
	(grub_uhci_check_transfer): Add missing cast.
	* grub-core/bus/usb/usbhub.c (poll_nonroot_hub): Use %p to
	print pointer.
	* grub-core/term/usb_keyboard.c (grub_usb_keyboard_getkey): Use
	PRIuGRUB_SIZE.
	* include/grub/types.h (PRIuGRUB_SIZE): New definition.
2010-09-19 22:05:48 +02:00
Vladimir 'phcoder' Serbinenko
d6d94820b5 * grub-core/Makefile.core.def (legacycfg): Add
lib/i386/pc/vesa_modes_table.c on emu.
2010-09-19 22:03:16 +02:00
BVK Chaitanya
3572f2b65a Reduce number of temporary files generated by build system.
* grub-core/gencmdlist.sh: Removed.
	* grub-core/genfslist.sh: Removed.
	* grub-core/genhandlerlist.sh: Removed.
	* grub-core/genmodsrc.sh: Removed.
	* grub-core/genpartmaplist.sh: Removed.
	* grub-core/genparttoollist.sh: Removed.
	* grub-core/gentermiinallist.sh: Removed.
	* grub-core/genvideolist.sh: Removed.

	* grub-core/genmod.sh.in: New file.
	* grub-core/gensyminfo.sh.in: New file.

	* conf/Makefile.common (CPPFLAGS_*_LIST): New marker flags.
	* conf/Makefile.extra-dist: Update with new files.
	* gentpl.py: Remove rules related to unnecessary temporary files.
	* grub-core/Makefile.am (syminfo.lst): New replacement for def-*
	and und-* files.
	* grub-core/Makefile.core.def: New rules for gensyminfo.sh and
	genmod.sh scripts.
	* grub-core/bus/usb/uhci.c: Remove empty #define.
	* grub-core/genmoddep.awk: Updated with new syminfo format.
	* util/bash-completion.d/Makefile.am: Add config.log to
	CLEANFILES.
2010-09-19 19:29:36 +05:30
Yves Blusseau
c836b030ae * Makefile.util.def: Add forgotten $(LIBINTL) library. 2010-09-19 15:36:34 +02:00
BVK Chaitanya
2f4e8053e0 * util/grub-mkconfig.in: Check the config script for syntax errors
before saving.
2010-09-19 08:49:25 +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
a1d84a5e5e Unify memory types.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include memory.h.
	* grub-core/commands/lsmmap.c (grub_cmd_lsmmap): Output user-readable
	types.
	* grub-core/kern/i386/multiboot_mmap.c (grub_lower_mem): Removed.
	(grub_upper_mem): Likewise.
	* grub-core/kern/ieee1275/init.c (grub_upper_mem): Likewise.
	* include/grub/memory.h (grub_memory_type_t): New enum.
	All users updated.
2010-09-19 00:04:31 +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
bf8d13388d (convert_system_partition_to_system_disk): Initialise node.
* grub-core/kern/emu/hostdisk.c
2010-09-17 23:41:06 +01:00
Colin Watson
9c0bad2e15 * grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Fix devmapper memory pool
leak.
Reported and based on patch by: Modestas Vainius.
2010-09-17 11:43:46 +01:00
Colin Watson
a939d135ec Fix DM-RAID probing with recent versions of device-mapper udev
rules.
* grub-core/kern/emu/hostdisk.c (read_device_map): Don't
canonicalise device paths under /dev/mapper/.
(convert_system_partition_to_system_disk): Compare the
uncanonicalised path to /dev/mapper/ rather than the canonicalised
path, since device nodes under /dev/mapper/ are often symlinks.
2010-09-17 11:00:37 +01:00
Yves Blusseau
0f7ee3c969 * .bzrignore: *.d removed (old rule), add *.image and symlist.h. 2010-09-17 11:56:04 +02:00
Yves Blusseau
10854d0d79 * configure.ac: Avoid some annoying error messages if freetype-config
program is not found.
2010-09-16 17:07:42 +02:00
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
e5bfc130a4 * docs/grub.texi (serial): Remove obsolete comment about GRUB
needing to be compiled with serial support.
(ls): Indicate that multiple files are accepted.
* grub-core/commands/ls.c (GRUB_MOD_INIT): Update help text to
indicate that multiple files are accepted.
2010-09-16 14:13:48 +01:00
Colin Watson
be458ae264 * .bzrignore: Add *.1, *.8, grub-shell, grub-shell-tester,
libgrub_a_init.c, and util/bash-completion.d/grub.
2010-09-16 14:09:37 +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
35139e8a55 * grub-core/commands/parttool.c (grub_cmd_parttool): Fix a variable
misusage.
	Reported by: J. Nick Terry
2010-09-15 21:48:24 +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
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
2e04a00685 * grub-core/gnulib/basename-lgpl.c: Imported.
* grub-core/gnulib/basename.c: Likewise.
	* grub-core/gnulib/dirname-lgpl.c: Likewise.
	* grub-core/gnulib/dirname.c: Likewise.
	* grub-core/gnulib/dirname.h: Likewise.
	* grub-core/gnulib/stripslash.c: Likewise.
2010-09-15 11:34:29 +02:00
Vladimir 'phcoder' Serbinenko
5dcdf93ad6 * grub-core/gnulib/error.c: Resynced.
* grub-core/gnulib/getopt.c: Likewise.
	* grub-core/gnulib/getopt_int.h: Likewise.
	* grub-core/gnulib/regex.h: Likewise.
	* grub-core/gnulib/regex_internal.c: Likewise.
	* grub-core/gnulib/regex_internal.h: Likewise.
2010-09-15 11:31:02 +02:00
Szymon Janc
014f47b74f * grub-core/lib/xzembed/xz_dec_stream.c (dec_main): Fix index and block
CRC calculations and validity checks.
	* grub-core/lib/xzembed/xz_dec_stream.c (dec_index): Fix index CRC
	calculations.
2010-09-15 00:39:49 +02:00
Szymon Janc
dd521a4afb * grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_end): Fix memory leak. 2010-09-15 00:13:09 +02:00
Vladimir 'phcoder' Serbinenko
79c4eeb919 Fix incorrect echo options handling.
Reported by: Yves Blusseau.

	* include/grub/command.h (grub_command_flags_t): New flags
	GRUB_COMMAND_ACCEPT_DASH and GRUB_COMMAND_OPTIONS_AT_START.
	* grub-core/lib/arg.c (grub_arg_parse): Handle new flags.
	* grub-core/commands/echo.c (GRUB_MOD_INIT): Use new flags.
2010-09-14 23:30:06 +02:00
Vladimir 'phcoder' Serbinenko
ed80f7d586 * include/grub/command.h (GRUB_COMMAND_FLAG_CMDLINE): Removed. All
users updated.
	(GRUB_COMMAND_FLAG_MENU): Likewise.
	(GRUB_COMMAND_FLAG_BOTH): Likewise.
	(GRUB_COMMAND_FLAG_TITLE): Removed.
	(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
	(GRUB_COMMAND_FLAG_EXTCMD): Moved into enum.
	(GRUB_COMMAND_FLAG_DYNCMD): Likewise.
	(GRUB_COMMAND_FLAG_BLOCKS): Likewise.
	(grub_command_flags_t): New enum. All users updated.
2010-09-14 23:06:01 +02:00
Seth Goldberg
5fe7620a4e Fix solaris compilation.
* grub-core/Makefile.core.def (kernel): Include gnulib/error.c on emu.
	(grub-emu): Add LIBZFS and LIBNVPAIR to ldadd.
	(grub-emu-list): Likewise.
2010-09-14 22:32:33 +02:00
Vladimir 'phcoder' Serbinenko
545b752f88 Remove deprecated root command.
* grub-core/commands/minicmd.c (grub_mini_cmd_root): Removed. All users
	updated.
2010-09-14 22:21:35 +02:00
Vladimir 'phcoder' Serbinenko
6c1a338ca5 * util/i386/pc/grub-setup.c: Merge this ...
* util/sparc64/ieee1275/grub-setup.c:  ... and this ...
	* util/grub-setup.c: ... into this.
	* include/grub/sparc64/ieee1275/boot.h (grub_boot_blocklist) [ASM_FILE]:
	New struct.
	* grub-core/fs/ext2.c (grub_ext2_open): Use return error value when
	possible.
2010-09-14 21:15:35 +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
b71c3faedb * grub-core/kern/sparc64/ieee1275/crt0.S: Align stack. 2010-09-14 20:59:00 +02:00
Vladimir 'phcoder' Serbinenko
275433e642 Don't export grub_gate_a20.
* grub-core/kern/i386/pc/init.c: Remove leftovers.
	* grub-core/kern/i386/pc/startup.S (FUNCTION(grub_gate_a20)): Rename
	to ...
	(grub_gate_a20): ... this. All users updated.
	* include/grub/i386/pc/init.h: Removed. All users updated.
2010-09-14 01:08:24 +02:00
Vladimir 'phcoder' Serbinenko
a5dbb1f10d Create euro.pf2 which supports most European languages.
* Makefile.am (grubdata_DATA): Add euro.pf2.
	(euro.pf2): New target.
	(CLEANFILES): Add euro.pf2.
2010-09-14 00:49:02 +02:00
Vladimir 'phcoder' Serbinenko
62a747cb00 * configure.ac: Disable emu-usb by default to prevent inadvertent
device takeover.
2010-09-14 00:21:52 +02:00
Vladimir 'phcoder' Serbinenko
608e43b102 Disable usbserial on grub-emu since our libusb code isn't good enough
yet.

	* grub-core/Makefile.core.def (usbserial_common): Disable on emu.
	(usbserial_pl2303): Likewise.
	(usbserial_ftdi): Likewise.
2010-09-14 00:08:07 +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
2419f17a09 Enable acpi shutdown on all ACPI platforms.
* grub-core/Makefile.core.def (halt): Inlude commands/acpihalt.c
	on coreboo, multiboot and EFI.
	* grub-core/commands/acpihalt.c (get_sleep_type): Add missing casts.
	(grub_acpi_halt): Likewise.
	* grub-core/commands/i386/pc/halt.c (grub_halt): Call grub_acpi_halt.
	(grub_cmd_halt): Don't call grub_acpi_halt directly.
	* grub-core/lib/efi/halt.c (grub_halt): Call grub_acpi_halt.
	* grub-core/lib/i386/halt.c (grub_halt)
	[GRUB_MACHINE_COREBOOT || GRUB_MACHINE_MULTIBOOT]: Likewise.
2010-09-13 20:29:15 +02:00
Vladimir 'phcoder' Serbinenko
0575c7c3ec * grub-core/commands/iorw.c (grub_cmd_read): Declare buf in smallest
context.
2010-09-13 20:16:51 +02:00
Vladimir 'phcoder' Serbinenko
54ac3cd189 * grub-core/video/efi_gop.c: Fix over-80-chars line.
* grub-core/video/efi_uga.c: Likewise.
2010-09-13 20:10:41 +02:00
Vladimir 'phcoder' Serbinenko
b2a30ac5e4 Filter devaliases and never open same device twice.
* grub-core/disk/ieee1275/ofdisk.c (last_devpath): New variable.
	(last_ihandle): Likewise.
	(ofdisk_hash_ent): New member shortest.
	(ofdisk_hash_add): Add canonical path too.
	(scan): New function.
	(grub_ofdisk_iterate): Iterate over hashed entries.
	(compute_dev_path): Don't add :0.
	(grub_ofdisk_open): Don't really open the disk.
	(grub_ofdisk_close): Avoid closing unrelated disk.
	(grub_ofdisk_read): Implement reopen logic.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_canonicalise_devname):
	New function.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_canonicalise_devname):
	New proto.
2010-09-13 19:17:29 +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
f452b04048 * grub-core/normal/completion.c (complete_file): Handle device
containing slash.
	Fix based on patch by Doug Nazar.
2010-09-13 14:26:55 +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
Vladimir 'phcoder' Serbinenko
9d2be652d4 videoinfo on non-vbe.
* grub-core/Makefile.core.def (vbeinfo): Removed.
	(vbetest): Removed.
	(videoinfo): New module.
	* grub-core/commands/i386/pc/vbeinfo.c: Removed.
	* grub-core/commands/i386/pc/vbetest.c: Removed.
	* grub-core/commands/videoinfo.c: New file.
	* grub-core/commands/videotest.c (grub_cmd_videotest): Support mode
	specification.
	(grub_cmd_videotest) [GRUB_MACHINE_PCBIOS]: Load vbe.mod when invoked
	as vbetest.
	(GRUB_MOD_INIT) [GRUB_MACHINE_PCBIOS]: New command vbetest.
	(GRUB_MOD_FINI) [GRUB_MACHINE_PCBIOS]: Unregister vbetest.
	* grub-core/video/efi_gop.c (grub_video_gop_fill_mode_info): Fill
	mode_number. New parameter mode. All users updated.
	(grub_video_gop_iterate): New function.
	(grub_video_efi_gop): New member iterate.
	* grub-core/video/i386/pc/vbe.c (framebuffer): Removed leftover fields.
	(grub_vbe_set_video_mode): Remove setting useless fields.
	(vbe2videoinfo): New function.
	(grub_video_vbe_iterate): Likewise.
	(grub_video_vbe_setup): Use vbe2videoinfo.
	(grub_video_vbe_print_adapter_specific_info): New function.
	(grub_video_vbe_adapter): New fields iterate and
	print_adapter_specific_info.
	* include/grub/video.h (GRUB_VIDEO_MODE_*): Transform into enum.
	All users updated.
	(grub_video_mode_info): New field mode_number.
	(grub_video_adapter): New fields iterate and
	print_adapter_specific_info.
2010-09-13 13:38:13 +02:00
Tristan Gingold
179503f524 * grub-core/commands/efi/lsefisystab.c: New file.
* grub-core/commands/efi/lssal.c: Likewise.
	* grub-core/Makefile.core.def (lsacpi): New module.
	(lsefisystab): Likewise.
	* include/grub/efi/api.h (GRUB_EFI_SAL_TABLE_GUID): New definition.
	(GRUB_EFI_HCDP_TABLE_GUID): Likewise.
	(grub_efi_sal_system_table): New struct.
	(grub_efi_sal_system_table_entrypoint_descriptor): Likewise.
	(grub_efi_sal_system_table_memory_descriptor): Likewise.
	(grub_efi_sal_system_table_platform_features): Likewise.
	(grub_efi_sal_system_table_translation_register_descriptor): Likewise.
	(grub_efi_sal_system_table_purge_translation_coherence): Likewise.
	(grub_efi_sal_system_table_ap_wakeup): Likewise.
	* include/grub/types.h (PRIuGRUB_UINT64_T): New definition.

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

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-13 13:14:44 +02:00
Vladimir 'phcoder' Serbinenko
cf9827de73 Support explicit user claim that a device is BIOS-visible.
* grub-core/kern/emu/getroot.c (grub_util_get_dev_abstraction):
	Return GRUB_DEV_ABSTRACTION_NONE if device is in device.map.
	* grub-core/kern/emu/hostdisk.c
	(convert_system_partition_to_system_disk): Support mdX.
	(find_system_device): New parameter add. All users updated.
	(grub_util_biosdisk_is_present): New function.
	* include/grub/emu/hostdisk.h (grub_util_biosdisk_is_present): New
	proto.
2010-09-13 13:09:58 +02:00
Vladimir 'phcoder' Serbinenko
53f0eb1f64 Search hints support.
* commands/search.c (FUNC_NAME): New arguments hints and nhints.
	All users updated.
2010-09-13 13:01:41 +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
d547dc281c * grub-core/normal/term.c (put_glyphs_terminal): Correct sign.
(print_backlog): set backlog_ucs4 and backlog_glyphs.
	Reported by: Yves Blusseau.
2010-09-12 22:05:27 +02:00
Vladimir 'phcoder' Serbinenko
2fc8ccb97f * grub-core/normal/misc.c (grub_normal_print_device_info): Show
partition size and offset.
2010-09-12 20:18:50 +02:00
Vladimir 'phcoder' Serbinenko
d8a84076ea * grub-core/commands/wildcard.c (make_regex): Escape brackets. 2010-09-12 20:15:30 +02:00
Vladimir 'phcoder' Serbinenko
84fb3b3d73 * grub-core/commands/ls.c (grub_cmd_ls): Accept multiple files. 2010-09-12 20:12:16 +02:00
Vladimir 'phcoder' Serbinenko
768ec2e2ad * grub-core/kern/misc.c (grub_vprintf): Use va_copy when necessary.
(grub_xvasprintf): Likewise.
2010-09-12 14:00:44 +02:00
Vladimir 'phcoder' Serbinenko
4870900f8f * grub-core/kern/emu/main.c (main): Call hostfs_init only after init_all. 2010-09-12 13:55:52 +02:00
Vladimir 'phcoder' Serbinenko
faca6bec3b * grub-core/commands/menuentry.c (append_menu_entry): Don't rely on
args ending with NULL.
2010-09-12 13:53:12 +02:00
Vladimir 'phcoder' Serbinenko
788f1f3a85 * grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_reset): Preserve context
pointer.
2010-09-12 13:50:24 +02:00
Szymon Janc
3c70f225b2 * grub-core/commands/lsacpi.c (grub_cmd_lsacpi): Fix prototype. 2010-09-11 20:08:37 +02:00
Vladimir 'phcoder' Serbinenko
4df7996d87 Shutdown using ACPI.
* grub-core/Makefile.core.def (halt): Add commands/acpihalt.c on i386-pc.
	* grub-core/commands/acpihalt.c: New file.
	* grub-core/commands/i386/pc/halt.c (grub_cmd_halt): Call grub_acpi_halt.
	* include/grub/acpi.h (grub_acpi_fadt): New member pm1a.
	(grub_acpi_halt): New proto.
	(GRUB_ACPI_SLP_EN): New const.
	(GRUB_ACPI_SLP_TYP_OFFSET): Likewise.
	(GRUB_ACPI_OPCODE_*): New enum.
	(GRUB_ACPI_EXTOPCODE_*): Likewise.
2010-09-11 17:59:14 +02:00
Tristan Gingold
126b4c32ab * commands/lsacpi.c: New file.
* grub-core/Makefile.core.def (lsacpi): New module.
	* include/grub/acpi.h (GRUB_ACPI_FADT_SIGNATURE): New definition.
	(GRUB_ACPI_MADT_SIGNATURE): Likewise.
	(grub_acpi_madt_entry_header): New struct.
	(grub_acpi_madt): Likewise.
	(grub_acpi_madt_entry_interrupt_override): Likewise.
	(grub_acpi_madt_entry_sapic): Likewise.
	(grub_acpi_madt_entry_lsapic): Likewise.
	(grub_acpi_madt_entry_platform_int_source): Likewise.
	* include/grub/types.h (PRIxGRUB_UINT32_T): New definition.
	(PRIuGRUB_UINT32_T): Likewise.
	(PRIxGRUB_UINT64_T): Likewise.

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

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-09-11 17:48:54 +02:00
Vladimir 'phcoder' Serbinenko
1aa4fe8822 Implement loading palette on ieee1275_fb.
* grub-core/video/ieee1275.c (stdout_ihandle): New variable.
	(have_setcolors): Likewise.
	(grub_video_ieee1275_init): Fill stdout_ihandle and have_setcolors.
	(grub_video_ieee1275_setup): Use grub_video_ieee1275_set_palette.
	(grub_video_ieee1275_set_palette): Implement.
2010-09-11 17:41:56 +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
050abaeaa8 Fix emu on mipsel.
* conf/Makefile.common (CFLAGS_PLATFORM): Add -mflush-func
	=grub_cpu_flush_cache on all mips and not only yeeloong.
	* configure.ac (COND_mips): New conditional.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add libgcc on all
	platforms.
	* grub-core/kern/emu/cache.S (__mips__): Use _flush_cache.
	* grub-core/kern/emu/full.c (grub_arch_dl_init_linker)
	[GRUB_LINKER_HAVE_INIT]: New function.
	(grub_emu_post_init): Likewise.
	* grub-core/kern/emu/lite.c (grub_emu_post_init): Likewise.
	* grub-core/kern/emu/main.c: Use grub_emu_post_init.
	* include/grub/cache.h (_mips): Include mips/cache.h.
	* include/grub/disk.h [GRUB_UTIL || GRUB_MACHINE_EMU]: Add missing
	LVM and RAID prototypes.
	* include/grub/emu/misc.h (grub_emu_post_init): New proto.
	* include/grub/mips/time.h (grub_cpu_idle) [GRUB_MACHINE_EMU]: New
	function.
2010-09-11 16:58:06 +02:00
Vladimir 'phcoder' Serbinenko
038272a5c5 Merge mainline into install 2010-09-11 16:38:37 +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
c38fe9f48e 2010-09-10 Robert Millan <rmh@gnu.org>
Solaris support in grub_find_zpool_from_dir().  Thanks
	Seth Goldberg for referring to getextmntent() facility.
	
	* configure.ac: Check for getextmntent(), `sys/mnttab.h' and
	`sys/mkdev.h'.
	* grub-core/kern/emu/misc.c [HAVE_SYS_MNTTAB_H]: Include
	`<sys/mnttab.h>'.
	[HAVE_SYS_MKDEV_H]: Include `<sys/mkdev.h>'.
	[HAVE_GETEXTMNTENT] (grub_find_zpool_from_dir): Add getextmntent()
	method for finding zpool name.
2010-09-10 14:32:28 +02:00
Colin Watson
905f7773e5 grub-fstest needs the host and hostfs modules while other utilities
actively require those modules to be absent, so grub-fstest needs
its own initialisation and finalisation code.
* Makefile.am (grub_fstest.pp): New target.
(grub_fstest_init.lst): Likewise.
(grub_fstest_init.c): Likewise.
* Makefile.util.def (grub-fstest): Add grub_fstest_init.c.
2010-09-10 13:20:21 +01:00
Robert Millan
fb90b54648 2010-09-10 Robert Millan <rmh@gnu.org>
* configure.ac: Check for `struct statfs.f_fstypename' and
	`struct statfs.f_mntfromname'.
	
	* grub-core/kern/emu/misc.c (grub_find_zpool_from_dir): Conditionalize
	kFreeBSD-specific code.
2010-09-10 14:02:54 +02:00
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
bvk.groups@gmail.com
8901b00c88 * tests/partmap_test.in: New test for partitions.
* Makefile.util.def: Rules for new test.
2010-09-09 21:24:17 +05:30
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
4dfbc57428 2010-09-09 Robert Millan <rmh@gnu.org>
Basic Btrfs support (detection and UUID).
	
	* grub-core/fs/btrfs.c: New file.
	* Makefile.util.def (library): Register btrfs.c.
	* grub-core/Makefile.core.def: Likewise.
2010-09-09 01:12:10 +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
27f21a8bb6 Add forgotten commit part 2010-09-08 21:01:20 +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
Yves Blusseau
d87aedff34 * configure.ac: Define some useful variables. 2010-09-08 17:19:27 +02:00
Vladimir 'phcoder' Serbinenko
e55e8495e1 * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_HAS_CURSORONOFF when appropriate.
	* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_setcursor):
	Use terminfo and don't use cursor-on/cursor-off unless it's known
	to work.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New element
	GRUB_IEEE1275_FLAG_HAS_CURSORONOFF.
2010-09-08 16:15:57 +02:00
Vladimir 'phcoder' Serbinenko
6ed71f4831 merge mainline into install 2010-09-08 15:05:42 +02:00
Colin Watson
6fa6d6751d * grub-core/kern/efi/init.c (grub_efi_set_prefix): If the prefix
starts with "(,", fill the drive containing the loaded image in
between those two characters, but expect that a full partition
specification including partition map names will follow.
2010-09-08 13:53:47 +01: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
bvk.groups@gmail.com
058e30ac09 Not command (!) support to GRUB script.
* tests/grub_script_not.in: New test.
	* Makefile.util.def: Rules for new test.

	* grub-core/script/execute.c (grub_script_execute_cmdline): Handle
	! command as a special case.
	* grub-core/script/yylex.l (GRUB_PARSER_TOKEN_NOT): Removed.
2010-09-08 09:21:02 +05:30
bvk.groups@gmail.com
b61d05ed19 * grub-core/commands/wildcard.c (wildcard_expand): Fix wrong
grub_free.
2010-09-07 17:16:03 +05:30
bvk.groups@gmail.com
4d69c7863b * docs/grub.texi (Shell-like scripting): Fix @dots to @dots{}. 2010-09-07 11:00:37 +05:30
bvk.groups@gmail.com
aa3119c46f * docs/grub.texi (Shell-like scripting): Documentation for break,
continue, shift and return commands.
2010-09-07 09:39:14 +05:30
Vladimir 'phcoder' Serbinenko
db0f7e3d20 Rename CD-ROM to cd on BIOS.
* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_get_drive): Recognise
	"cd".
	(grub_biosdisk_call_hook): Call with "cd" instead of arbitrary hdX.
2010-09-06 09:35:35 +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
Vladimir 'phcoder' Serbinenko
294f324d89 * grub-core/disk/lvm.c (grub_lvm_scan_device) [GRUB_UTIL]: Output more
diagnostic info.
2010-09-05 23:20:13 +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
d7e06c1f0b * docs/grub.texi (Theme file format): Document new position format. 2010-09-05 20:33:03 +02:00
Vladimir 'phcoder' Serbinenko
fc157e539c * docs/grub.texi (Theme file format): Replace Box_slice_names.png with
a table. Use @code instead of @verbatim.
2010-09-05 20:17:34 +02:00
Colin D Bennett
506e9a1ce0 Gfxmenu documentation.
* docs/grub.texi (Theme file format): New chapter.
2010-09-05 20:04:10 +02:00
Szymon Janc
f0aff67c47 * grub-core/Makefile.core.def (xzio): New module.
* grub-core/io/xzio.c: New file.
	* grub-core/lib/xzembed/xz.h: New file (from xembed).
	* grub-core/lib/xzembed/xz_config.h: Likewise.
	* grub-core/lib/xzembed/xz_dec_bcj.c: Likewise.
	* grub-core/lib/xzembed/xz_dec_lzma2.c: Likewise.
	* grub-core/lib/xzembed/xz_dec_stream.c: Likewise.
	* grub-core/lib/xzembed/xz_lzma2.h: Likewise.
	* grub-core/lib/xzembed/xz_private.h: Likewise.
	* grub-core/lib/xzembed/xz_stream.h: Likewise.
	* include/grub/file.h (grub_file_filter_id): New compression filter
	GRUB_FILE_FILTER_XZIO.
2010-09-05 17:12:13 +02:00
Vladimir 'phcoder' Serbinenko
82a8506214 * include/grub/file.h (GRUB_FILE_SIZE_UNKNOWN): New definition.
* grub-core/disk/loopback.c (grub_loopback_open): Handle unknown file
	size.
2010-09-05 17:01:16 +02:00
Vladimir 'phcoder' Serbinenko
3579415d20 * include/grub/err.h (grub_err_t): Replace GRUB_ERR_BAD_GZIP_DATA with
GRUB_ERR_BAD_COMPRESSED_DATA. All users updated.
2010-09-05 16:55:49 +02:00
Vladimir 'phcoder' Serbinenko
5124ae6d4f Uncompressed checksum support.
* grub-core/commands/hashsum.c (options): Add option --uncompress.
	(check_list): New parameter uncompress.
	(grub_cmd_hashsum): Handle --uncompress.
2010-09-05 16:48:54 +02:00
Vladimir 'phcoder' Serbinenko
9aadb3d146 Add missing ChangeLog entry 2010-09-05 16:43:31 +02:00
Szymon Janc
a17792c324 * grub-core/lib/posix_wrap/sys/types.h (bool): Transform into an enum.
(uint8_t): New type.
	(uint16_t): Likewise.
	(uint32_t): Likewise.
	(uint64_t): Likewise.
2010-09-05 14:24:39 +02:00
Szymon Janc
b81e40a379 * include/grub/crypto.h (GRUB_MD_CRC32): New definition. 2010-09-05 14:18:31 +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
BVK Chaitanya
35ee15e09a Filename expansion support for wildcards in GRUB script.
* tests/grub_script_expansion.in: New test.
	* Makefile.util.def: Rule for new test.

	* grub-core/commands/wildcard.c: New file, implements filename
	expansion support for GRUB script.
	* grub-core/Makefile.core.def: Rule update for regexp.mod.
	* grub-core/script/argv.c: Cosmetic changes.
	* grub-core/script/execute.c (grub_script_arglist_to_argv):
	Refactored to perform wildcard expansion on arguments.
	* include/grub/script_sh.h (grub_script_wildcard_translator): New
	struct.

	* tests/util/grub-shell.in: Fix quoting for read input.
2010-09-04 22:45:34 +05:30
BVK Chaitanya
5f0c4acaca Support for updating environment variables with matched substrings
of regexp.

	* tests/grub_cmd_regexp.in: New test.
	* Makefile.util.def: Rule for new test.

	* grub-core/commands/regexp.c: New option -s to update environment
	variables with regexp matches.
2010-09-04 22:19:58 +05:30
Szymon Janc
3759a35f75 * include/grub/file.h (grub_file): New member not_easly_seekable.
(grub_file_seekable): New inline function.
	* grub-core/io/gzio.c (test_header): Don't test end magic if file isn't
	easily seekable.
	(grub_gzio_open): Set not_easly_seekable.
	* grub-core/fs/i386/pc/pxe.c (grub_pxefs_open): Set not_easily_seekable.
	* grub-core/io/bufio.c (grub_bufio_open): Propagate not_easily_seekable.
2010-09-04 18:28:42 +02:00
BVK Chaitanya
ed8c6dec96 Support for options to appear multiple times on cmdline.
* include/grub/lib/arg.h (grub_arg_list_alloc): New prototype.
	* grub-core/commands/extcmd.c: Support for repeatable option.
	* grub-core/lib/arg.c (grub_arg_list_alloc): New function for
	repeatable option support.

	Refactor menuentry into a regular command.

	* grub-core/commands/menuentry.c: New file, menuentry command
	implementation.
	* grub-core/Makefile.core.def: Rule update for normal.mod.
	* grub-core/normal/main.c: Moved menuentry creation to
	grub-core/commands/menuentry.c.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Removed.
	(grub_menu_execute_entry_real): Removed.
	* grub-core/script/execute.c (grub_script_execute_sourcecode): New
	function.
	(grub_script_execute_menuentry): Removed.
	* grub-core/script/parser.y (menuentry): Removed.
	* grub-core/script/script.c (grub_script_create_cmdmenu): Removed.
	* grub-core/script/yylex.l (menuentry): Removed.
	* include/grub/menu.h (grub_menu_init): New prototype.
	(grub_menu_fini): New prototype.
	* include/grub/normal.h (grub_normal_add_menu_entry): Removed.
	* include/grub/script_sh.h (grub_script_cmd_menuentry): Removed.
	(grub_script_execute_sourcecode): New prototype.
2010-09-04 21:43:54 +05:30
BVK Chaitanya
dacd0cf07a "return" command for GRUB script functions.
* tests/grub_script_return.in: New test.
	* Makefile.util.def: Rules for new test.

	* grub-core/script/execute.c (grub_script_return): New function.
	* grub-core/script/main.c: Register/unregister return commaond.
	* include/grub/script_sh.h (grub_script_return): New prototype.
2010-09-04 20:53:09 +05:30
BVK Chaitanya
52e72f9d46 "setparams" command to update positional parameters.
* tests/grub_script_setparams.in: New test.
	* Makefile.util.def: Rules for new test.

	* grub-core/script/argv.c (grub_script_argv_make): New function.
	* grub-core/script/execute.c (replace_scope): New function.
	(grub_script_setparams): New function.
	* grub-core/script/lexer.c: Remove unused variables.
	* grub-core/script/main.c: Register/unregister setparams command.
	* include/grub/script_sh.h (grub_script_argv_make): New prototype.
	(grub_script_setparams): New prototype.
2010-09-04 20:27:48 +05:30
BVK Chaitanya
25b60c913b * grub-core/normal/completion.c (grub_normal_do_completion): Fix
grub_free order.
2010-09-04 14:19:04 +05:30
BVK Chaitanya
37e7bf68c5 Support for passing block of commands as an argument to
extcmds.

	* Makefile.util.def: Rules for new test.
	* tests/grub_script_blockarg.in: New test.
	* grub-core/tests/test_blockarg.c: New file, block argument
	command used in the test.

	* include/grub/extcmd.h (grub_extcmd_context): New struct.
	(grub_register_extcmd_prio): New function prototype.
	(grub_extcmd_dispatcher): New function prototype.
	* include/grub/command.h (GRUB_COMMAND_FLAG_BLOCKS): New command
	type.
	* include/grub/script_sh.h (struct grub_script): New members
	`children', `next_siblings' and `refcnt' for block arguments and
	reference counting.
	(GRUB_SCRIPT_ARG_TYPE_BLOCK): New argument type.
	(grub_script_arg): New member `script' for block argument.
	(grub_script_argv): New member `script' for block argument.
	(grub_parser_param): New member `scripts' for block argument.
	(grub_script_mem_free): New extern function prototype.
	(grub_script_ref): New function prototype.
	(grub_script_unref): New function prototype.

	* grub-core/normal/dyncmd.c (grub_dyncmd_dispatcher): Moved to
	extcmd form to support block arguments.
	* grub-core/script/argv.c: Block arguments support.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/lexer.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* grub-core/script/script.c: Likewise.
	* grub-core/script/parser.y: Likewise.  New `block' and `block0'
	non-terminals.

	* grub-core/commands/acpi.c: Update extcmd implementations with
	grub_extcmd_context_t.
	* grub-core/commands/cat.c: Likewise.
	* grub-core/commands/echo.c: Likewise.
	* grub-core/commands/extcmd.c: Likewise.
	* grub-core/commands/hashsum.c: Likewise.
	* grub-core/commands/hdparm.c: Likewise.
	* grub-core/commands/help.c: Likewise.
	* grub-core/commands/hexdump.c: Likewise.
	* grub-core/commands/i386/cpuid.c: Likewise.
	* grub-core/commands/i386/pc/drivemap.c: Likewise.
	* grub-core/commands/i386/pc/halt.c: Likewise.
	* grub-core/commands/i386/pc/sendkey.c: Likewise.
	* grub-core/commands/iorw.c: Likewise.
	* grub-core/commands/keystatus.c: Likewise.
	* grub-core/commands/loadenv.c: Likewise.
	* grub-core/commands/ls.c: Likewise.
	* grub-core/commands/lspci.c: Likewise.
	* grub-core/commands/memrw.c: Likewise.
	* grub-core/commands/probe.c: Likewise.
	* grub-core/commands/search_wrap.c: Likewise.
	* grub-core/commands/setpci.c: Likewise.
	* grub-core/commands/sleep.c: Likewise.
	* grub-core/disk/loopback.c: Likewise.
	* grub-core/hello/hello.c: Likewise.
	* grub-core/loader/i386/bsd.c: Likewise.
	* grub-core/loader/xnu.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/serial.c: Likewise.
	* grub-core/tests/lib/functional_test.c: Likewise.
2010-09-04 09:13:30 +05:30
BVK Chaitanya
888d1500b2 Multi-line quoted strings support.
* grub-core/script/lexer.c (append_newline): Removed.
	(grub_script_lexer_yywrap): Refactored.
	(grub_script_lexer_init): Refactored.
	* grub-core/script/yylex.l (yywrap): New function.
	(grub_lexer_resplit): New function.
	(grub_lexer_unput): New function.
	* include/grub/script_sh.h (grub_lexer_param): New members, unput
	and resplit.
	* tests/grub_script_echo1.in: Added few more testcases.
2010-09-04 08:43:35 +05:30
Vladimir 'phcoder' Serbinenko
dda060dd0f * grub-core/kern/misc.c: Don't add abort alias in utils.
Reported by: echoline.
2010-09-04 02:18:48 +02:00
BVK Chaitanya
6556eba9c6 Add missing files into "make dist" tarball for other platforms.
* gentpl.py (script): Use dist_noinst_DATA instead of EXTRA_DIST.
	* conf/Makefile.common (dist_noinst_DATA): New variable.
	* conf/Makefile.extra-dist: Added missing make dist files.
	* grub-core/Makefile.core.def: Likewise.
2010-09-03 21:23:00 +05:30
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
a7c00cdb94 * grub-core/loader/i386/bsd.c (grub_freebsd_boot): Set %ebp to sane
value.
	(grub_openbsd_boot): Likewise.
	(grub_netbsd_boot): Likewise.
	* grub-core/loader/i386/xnu.c (grub_xnu_boot_resume): Likewise.
	(grub_xnu_boot): Likewise.
2010-09-03 14:05:19 +02:00
Vladimir 'phcoder' Serbinenko
9f915872ef * configure.ac: Clean LIBS variable after tests. 2010-09-03 03:26:22 +02:00
Colin Watson
efa1bee7a1 * INSTALL: Document that libdevmapper needs to be 1.02.34 or later. 2010-09-02 23:57:21 +01:00
Vladimir 'phcoder' Serbinenko
61d720e535 * configure.ac: Check for dm_log_with_errno_init in libdevmapper and
echo if libdevmapper will be used.
2010-09-03 00:53:41 +02:00
Ian Turner
ef8e0ec8ed * grub-core/fs/i386/pc/pxe.c (grub_pxefs_read): Keep the blocksize
constant for the same file.
2010-09-02 23:59:27 +02:00
Vladimir 'phcoder' Serbinenko
03e261d84c * grub-core/kern/i386/multiboot_mmap.c: Remove leftover include. 2010-09-02 23:50:07 +02:00
Colin Watson
c2a4eba698 * .bzrignore: Add *.pp, **/.dirstamp, grub-core/*.module, and
grub-core/*.pp.
2010-09-02 22:42:36 +01:00
Colin Watson
9056cbf38e Zero %ebp and %edi when entering Linux's 32-bit entry point, as
required by the boot protocol.
* include/grub/i386/relocator.h (struct grub_relocator32_state): Add
ebp and edi members.
* grub-core/lib/i386/relocator.c (grub_relocator_boot): Handle
state.ebp and state.edi.
* grub-core/lib/i386/relocator32.S (grub_relocator32_start): Set
%ebp and %edi according to grub_relocator32_ebp and
grub_relocator32_edi respectively.
* grub-core/loader/i386/linux.c (grub_linux_boot): Zero state.ebp
and state.edi.
2010-09-02 22:36:09 +01: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
Vladimir 'phcoder' Serbinenko
9a09392057 Fix grub_pxe_scan.
* grub-core/fs/i386/pc/pxe.c (grub_pxe_pxenv): Put correct type bangpxe.
	(grub_pxe_scan): Fix types and pxe_rm_entry computation.
	All users updated.
	* include/grub/i386/pc/pxe.h (grub_pxe_bangpxe): New struct.
	(grub_pxe_pxenv): Correct type.
2010-09-02 15:47:03 +02:00
Colin Watson
f9cefc4eb3 * NEWS: Document most of the important changes since 1.98. 2010-09-01 18:15:46 +01: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
Colin Watson
da2891f962 * docs/grub.texi: Add myself as an author. 2010-09-01 10:29:30 +01:00
Vladimir 'phcoder' Serbinenko
ad717faeff * Makefile.util.def (libgrub.a): Add missing sunpc.
Reported by: Seth Goldberg.
2010-09-01 01:09:00 +02:00
Vladimir 'phcoder' Serbinenko
21ed554bb0 Interrupt wrapping and code simplifications.
* Makefile.util.def (grub-mkrescue): Use x86 tg instead of
	x86_noieee1275 which are functionaly equivalent in this case.
	(grub-install): Make source on each platform explicit. Enable on
	all noemu.
	* gentpl.py (x86_efi_pc): Removed group.
	(x86_noefi): Likewise.
	(i386_noefi): Likewise.
	(x86_noieee1275): Likewise.
	(i386_noieee1275): Likewise.
	(i386_noefi_noieee1275): Likewise.
	(i386_pc_qemu_coreboot): Likewise.
	(i386_coreboot_multiboot): Likewise.
	(i386_pc_coreboot_multiboot_qemu): Likewise.
	(x86_noefi_mips): Likewise.
	(noieee1275): Likewise.
	(ieee1275_mips): Likewise.
	(noemu_noieee1275): Likewise.
	(cmos): New group.
	(usb): Likewise.
	(videoinkernel): Likewise.
	(videomodules): Likewise.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Remove
	include/grub/elf.h, include/grub/elfload.h, include/grub/net.h,
	include/grub/reader.h, include/grub/symbol.h, include/grub/types.h,
	include/grub/loader.h, include/grub/msdos_partition.h,
	include/grub/machine/biosdisk.h, include/grub/machine/boot.h,
	include/grub/machine/console.h, include/grub/machine/vga.h,
	include/grub/machine/vbe.h, include/grub/machine/init.h,
	include/grub/machine/kernel.h, include/grub/cpu/time.h,
	include/grub/cpu/types.h, include/grub/gzio.h and include/grub/menu.h
	(KERNEL_HEADER_FILES) [i386-pc]: Add include/grub/machine/int.h.
	(KERNEL_HEADER_FILES) [i386-ieee1275]: Add include/grub/i386/pit.h
	* grub-core/Makefile.core.def (kernel): Explicit the source for
	startup. Explicit the platforms using kern/generic/rtc_get_time_ms.c.
	Split ieee1275_mips. Remove kern/i386/halt.c. Remove kern/i386/misc.S.
	Enable kern/i386/pit.c on all x86. Remove kern/i386/ieee1275/init.c.
	Use videoinkernel tag.
	(usb): Enable on all usb.
	(usbserial_common): Likewise.
	(usbserial_pl2303): Likewise.
	(usbserial_ftdi): Likewise.
	(uhci): Enable on all x86.
	(ohci): Enable on all pci.
	(cmostest): Enable on all CMOS.
	(acpi): Include commands/acpi.c on all platforms.
	(halt): Add relevant lib/*/halt.c.
	(hdparm): Enable on all pci.
	(lspci): Likewise.
	(usbtest): Enable on all usb.
	(ata): Enable on all pci.
	(ata_pthru): Likewise.
	(usbms): Enable on all usb.
	(usb_keyboard): Likewise.
	(font): Use tag videomodules.
	(bufio): Likewise.
	(datetime): Use tag cmos. Enable on all noemu.
	(mmap): Use tags common and x86.
	(gfxterm): Use tag videomodules.
	(bitmap): Likewise.
	(bitmap_scale): Likewise.
	(video_fb): Likewise.
	(video): Likewise.
	* grub-core/bus/usb/ohci.c (grub_ohci_td): Make link_td a pointer and
	adjust padding accordingly. All users updated.
	(grub_ohci_transaction): Fix bad format specification.
	(GRUB_MOD_INIT): Add asserts for struct size.
	* grub-core/bus/usb/uhci.c (grub_uhci_pci_iter): Add explicit casts.
	(grub_alloc_td): Likewise.
	(grub_free_queue): Likewise.
	(grub_uhci_transfer): Likewise.
	(grub_uhci_transaction): Fix bad format specification.
	* grub-core/bus/usb/usbtrans.c (grub_usb_control_msg): Likewise.
	(grub_usb_bulk_readwrite): Likewise.
	* grub-core/kern/i386/misc.S (grub_stop): Moved from here ...
	* grub-core/commands/i386/pc/halt.c (stop): ...here. Transformed into C.
	Made static.
	* grub-core/lib/i386/halt.c (stop): ... and here. Transformed into C.
	Made static.
	* grub-core/kern/i386/pc/startup.S (grub_halt): Moved from here ...
	* grub-core/commands/i386/pc/halt.c (grub_halt): ...here.
	Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_biosdisk_rw_int13_extensions):
	Moved from here ...
	* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_rw_int13_extensions):
	... here. Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S (grub_biosdisk_rw_standard):
	Moved from here ...
	* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_rw_standard):
	... here. Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S
	(grub_biosdisk_check_int13_extensions): Moved from here ...
	* grub-core/disk/i386/pc/biosdisk.c
	(grub_biosdisk_check_int13_extensions): ... here. Transformed into C.
	Made static.
	* grub-core/kern/i386/pc/startup.S
	(grub_biosdisk_get_cdinfo_int13_extensions): Moved from here ...
	* grub-core/disk/i386/pc/biosdisk.c
	(grub_biosdisk_get_cdinfo_int13_extensions): ... here.
	Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S
	(grub_biosdisk_get_diskinfo_int13_extensions): Moved from here ...
	* grub-core/disk/i386/pc/biosdisk.c
	(grub_biosdisk_get_diskinfo_int13_extensions): ... here.
	Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S
	(grub_biosdisk_get_diskinfo_standard): Moved from here ...
	* grub-core/disk/i386/pc/biosdisk.c
	(grub_biosdisk_get_diskinfo_standard): ... here.
	Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S
	(grub_biosdisk_get_num_floppies): Moved from here ...
	* grub-core/disk/i386/pc/biosdisk.c
	(grub_biosdisk_get_num_floppies): ... here.
	Transformed into C. Made static.
	* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_get_diskinfo_real):
	New function.
	* grub-core/kern/i386/pc/startup.S (grub_pxe_scan): Moved from here ...
	* grub-core/fs/i386/pc/pxe.c (grub_pxe_scan): ... here.
	Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S (grub_rm_entry): Moved from here ...
	* grub-core/fs/i386/pc/pxe.c (grub_rm_entry): ... here.
	Transformed into C. Made static.
	* grub-core/kern/i386/ieee1275/init.c: Removed.
	* grub-core/kern/i386/misc.S: Likewise.
	* grub-core/kern/i386/pc/startup.S (grub_get_memsize):
	Splitted from here ...
	* grub-core/kern/i386/pc/init.c (grub_get_conv_memsize): ... here.
	Transformed into C. Made static. All users updated.
	* grub-core/kern/i386/pc/mmap.c (grub_get_ext_memsize): ... and here.
	Transformed into C. Made static. All users updated.
	* grub-core/kern/i386/pc/startup.S (grub_get_eisa_mmap):
	Moved from here...
	* grub-core/kern/i386/pc/mmap.c (grub_get_eisa_mmap): ... here.
	Transformed into C. Made static. All users updated.
	* grub-core/kern/i386/pc/startup.S (grub_get_mmap_entry):
	Moved from here...
	* grub-core/kern/i386/pc/mmap.c (grub_get_mmap_entry): ... here.
	Transformed into C. Made static. All users updated.
	* grub-core/kern/i386/pc/startup.S (grub_stop_floppy):
	Removed (replaced by C version).
	* grub-core/kern/i386/pc/startup.S (grub_vga_set_mode):
	Moved from here...
	* grub-core/video/i386/pc/vga.c (grub_vga_set_mode): ...here.
	Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_get_controller_info):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_controller_info):
	... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_get_mode_info):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_mode_info):
	... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_set_mode):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_set_mode):
	... here. Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_get_mode):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_mode):
	... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S
	(grub_vbe_bios_getset_dac_palette_width):Moved from here...
	* grub-core/video/i386/pc/vbe.c
	(grub_vbe_bios_getset_dac_palette_width):... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_set_memory_window):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_set_memory_window):
	... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_get_memory_window):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_memory_window):
	... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_set_scanline_length):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_set_scanline_length):
	... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_get_scanline_length):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_scanline_length):
	... here. Transformed into C.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_set_display_start):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_set_display_start):
	... here. Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_get_display_start):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_display_start):
	... here. Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S (grub_vbe_bios_set_palette_data):
	Moved from here...
	* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_set_palette_data):
	... here. Transformed into C. Made static.
	* grub-core/kern/i386/pc/startup.S (grub_pxe_call): Receive
	pxe_rm_entry as third argument.
	(grub_bios_interrupt): New function.
	* grub-core/kern/i386/qemu/mmap.c: Remove useless include.
	* grub-core/kern/i386/qemu/startup.S (codestart): Do cli;hlt instead
	of calling grub_stop.
	* grub-core/kern/efi/efi.c (grub_halt): Moved from here ...
	* grub-core/lib/efi/halt.c (grub_halt): ...here.
	* grub-core/kern/emu/main.c (grub_halt): Moved from here ...
	* grub-core/lib/emu/halt.c (grub_halt): ... here.
	* grub-core/lib/i386/halt.c: Moved from here ...
	* grub-core/lib/i386/halt.c: ... here.
	* grub-core/kern/ieee1275/openfw.c (grub_halt): Moved from here ...
	* grub-core/lib/ieee1275/halt.c (grub_halt): ... here.
	* grub-core/loader/i386/pc/linux.c (grub_linux16_boot): Call
	grub_stop_floppy.
	* grub-core/loader/i386/xnu.c (guessfsb) [IEEE1275]: Enable.
	* include/grub/i386/coreboot/init.h: Removed.
	* include/grub/i386/multiboot/init.h: Likewise.
	* include/grub/i386/pc/biosdisk.h: Removed all function prototypes.
	* include/grub/i386/pc/init.h: Likewise except grub_gate_a20.
	* include/grub/i386/pc/int.h: New file.
	* include/grub/i386/pc/pxe.h (GRUB_PXE_SIGNATURE): New definition.
	(grub_pxe_scan): Removed.
	(grub_pxe_call): Update prototype.
	* include/grub/i386/pc/vbe.h: Removed EXPORT_FUNC and useless
	prototypes.
	* include/grub/i386/pc/vga.h (grub_vga_set_mode): Removed.
	* include/grub/i386/qemu/init.h: Removed.
	* include/grub/mips/yeeloong/kernel.h (grub_reboot): Add missing
	noreturn.
	(grub_halt): Likewise.
	* include/grub/misc.h (grub_halt): Removed EXPORT_FUNC.
	(grub_reboot): Likewise.
	* grub-core/kern/i386/coreboot/init.c (grub_stop_floppy): Moved from here...
	* include/grub/i386/floppy.h (grub_stop_floppy): ...here. Inlined.
	* grub-core/kern/i386/pc/startup.S (grub_hard_stop): Removed.
2010-08-30 22:02:58 +02:00
Robert Millan
215dd4716e 2010-08-30 Robert Millan <rmh@gnu.org>
* NEWS: Document addition of ZFS support in `grub-install' and
	`grub-mkconfig'.
2010-08-30 21:55:10 +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
9494ef9aaf Add ChangeLog 2010-08-30 16:28:01 +02:00
Vladimir 'phcoder' Serbinenko
eefe8abd52 Dimplify tags and enable USB on more platforms 2010-08-30 15:13:38 +02:00
BVK Chaitanya
ebd65b82dc remove leading / in dprintf output 2010-08-30 09:37:35 +05:30
Vladimir 'phcoder' Serbinenko
e176a764ee Add missing Reported by 2010-08-30 02:01:59 +02:00
Vladimir 'phcoder' Serbinenko
b4c1aae0f1 * docs/grub.texi (Network): Fix reference to pxe_blksize. 2010-08-30 01:56:35 +02:00
Vladimir 'phcoder' Serbinenko
8920a08d87 * grub-core/normal/menu.c (grub_wait_after_message): Add a 10 second
timeout to avoid indefinite boot stalling.
2010-08-30 01:14:07 +02:00
Vladimir 'phcoder' Serbinenko
f21db0332f * grub-core/normal/color.c (grub_env_write_color_normal): Fix a warning.
(grub_env_write_color_highlight): Likewise.
2010-08-30 01:12:37 +02:00
Vladimir 'phcoder' Serbinenko
9a9de209a2 * grub-core/normal/term.c (print_more): Return to normal and not
to standard state after printing "---MORE---".
2010-08-30 01:11:12 +02:00
Vladimir 'phcoder' Serbinenko
3dca01d7e3 * grub-core/term/i386/vga_common.c (grub_console_setcolorstate):
Mask out the bit 0x80 since it has other meaning that specifiing color.
2010-08-30 01:09:28 +02:00
Vladimir 'phcoder' Serbinenko
1935c0773e Finish Changelog 2010-08-29 23:08:06 +02:00
Vladimir 'phcoder' Serbinenko
4847f93e2a Merge mainline into newreloc 2010-08-29 22:05:46 +02:00
Vladimir 'phcoder' Serbinenko
0b986c402b First part of ChangeLog 2010-08-29 22:03:28 +02:00
Vladimir 'phcoder' Serbinenko
5303b85d44 * grub-core/normal/charset.c (grub_utf8_to_ucs4_alloc): Avoid deadloop
on malloc error.
	(grub_bidi_logical_to_visual): Check that malloc succeded.
	* grub-core/normal/term.c (grub_puts_terminal): Fix fallback to dumb
	puts.
	(grub_xputs_normal): Likewise.
2010-08-29 21:57:37 +02:00
Vladimir 'phcoder' Serbinenko
d768d15986 * grub-core/Makefile.core.def (kernel): Add kern/mips/cache_flush.S to
extra_dist.
2010-08-29 18:53:56 +02:00
Vladimir 'phcoder' Serbinenko
5bf84df429 * Makefile.util.def (grub-ofpathname): Add missing ldadd. 2010-08-29 17:49:37 +02:00
Vladimir 'phcoder' Serbinenko
3626810e53 * grub-core/kern/misc.c (grub_real_dprintf): Always refresh after
dprintf.
2010-08-29 17:17:52 +02:00
BVK Chaitanya
a7363f53c8 Use ldadd instead of ldflags for libraries 2010-08-29 09:33:13 +05:30
Vladimir 'phcoder' Serbinenko
902f75f645 * grub-core/normal/term.c (print_more): Fix a memory leak.
(grub_puts_terminal): Revert to dumb puts if memory allocation fails.
	(grub_xputs_normal): Likewise.
2010-08-28 15:39:34 +02:00
Vladimir 'phcoder' Serbinenko
3c7079670d * grub-core/script/lexer.c (grub_script_lexer_init): Don't look before
the begining of the string
2010-08-28 15:35:43 +02:00
Vladimir 'phcoder' Serbinenko
2053cc077b * grub-core/script/script.c (grub_script_parse): Free parsed on
failure.
2010-08-28 15:34:29 +02:00
Vladimir 'phcoder' Serbinenko
46422ebf1a * grub-core/normal/completion.c (grub_normal_do_completion): Free argv
on failure.
2010-08-28 15:31:21 +02:00
Vladimir 'phcoder' Serbinenko
9e0fa3f606 * grub-core/normal/cmdline.c (grub_cmdline_get): Free cl_terms on
return.
2010-08-28 15:29:44 +02:00
Vladimir 'phcoder' Serbinenko
3393cf16d6 * grub-core/term/gfxterm.c (grub_gfxterm_term_fini): Free the text buffer.
(scroll_up): Fix a memory leak.
2010-08-28 15:28:08 +02:00
Vladimir 'phcoder' Serbinenko
b17540cbd9 * grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Handle grub_disk_read
errors.
2010-08-28 15:25:12 +02:00
Vladimir 'phcoder' Serbinenko
671404469c Handle USB pendrives exposed as floppies.
* grub-core/boot/i386/pc/boot.S: Check LBA even on what appears to be
	floppy.
	* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
	Check for partitions on all devices.
2010-08-27 03:44:55 +02:00
Vladimir 'phcoder' Serbinenko
e35e46fce1 * grub-core/term/ieee1275/ofconsole.c (put): Correct prototype.
(readkey): Likewise.
2010-08-25 22:32:17 +02:00
BVK Chaitanya
8ecbb72dee Multiple variable names support to "export" command.
* normal/context.c (grub_cmd_export): "export" command supports
	multiple variable names.
2010-08-25 18:50:41 +05:30
BVK Chaitanya
d24c6190ae add changelog 2010-08-25 18:34:20 +05:30
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
BVK Chaitanya
0c8b61d8e4 automake based build system for grub 2010-08-23 23:26:24 +05:30
BVK Chaitanya
645586e686 Replace --enable-grub-emu-modules with grub-emu-lite.
* kern/emu/cache.S: New file.  Wrapper for $target_cpu specific
	cache.S.

	* include/grub/emu/misc.h (grub_emu_init): New prototype.
	* kern/emu/full.c: New file. For grub-emu specific initialization.
	* kern/emu/lite.c: New file. For grub-emu-lite initialization.
	* kern/emu/main.c: Call initialization function grub_emu_init.

	* Makefile.in: Include grub-emu-lite in install.
	* commands/parttool.c: Use grub_no_autoload to differentiate
	between grub-emu and grub-emu-lite.
	* include/grub/misc.h: New variable grub_no_autoload.

	* conf/any-emu.rmk: New rules for grub-emu-lite.
	* configure.ac: Remove --enable-grub-emu-modules.
	* genmk.rb: Cleanup unnecessary rules.
	* include/grub/dl.h: Remove GRUB_NO_MODULES macro.

	* normal/main.c: Don't load list files on grub-emu-lite.
	* util/misc.c (grub_arch_sync_caches): Removed.
2010-08-23 23:06:29 +05:30
Colin Watson
f86a4030ed * kern/mips/startup.S (grub_prefix): Update comment to refer to
grub-mkimage rather than grub-mkelfimage.
* kern/powerpc/ieee1275/startup.S (grub_prefix): Likewise.
2010-08-23 12:55:47 +01:00
Vladimir 'phcoder' Serbinenko
0677694455 * term/at_keyboard.c (grub_at_keyboard_getkey_noblock): Don't discard
a key after CapsLock or NumLock. It's just a qemu bug.
2010-08-22 17:10:39 +02:00
Vladimir 'phcoder' Serbinenko
df26241939 * include/grub/usb.h (grub_usb_device): Add 'data' field back. It's
needed by libusb wrapper.
2010-08-21 02:09:16 +02:00
Samuel Thibault
b40ea81bc7 2010-08-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
* docs/grub.texi (GNU/Hurd): Document booting GNU/Hurd.
2010-08-21 01:36:02 +02:00
Vladimir 'phcoder' Serbinenko
dee5057594 * loader/multiboot.c (grub_cmd_module): Don't unzip module if
--nounzip is passed.
2010-08-21 00:57:12 +02:00
Vladimir 'phcoder' Serbinenko
05a765c88b USB hotunplugging and USB serial support.
* bus/usb/ohci.c (grub_ohci_transfer): Fill *actual and respect timeout.
	* bus/usb/uhci.c (grub_free_queue): Compute *actual.
	(grub_uhci_transfer): Respect timeout and set *actual.
	* bus/usb/usb.c (grub_usb_device_initialize): Correctly skip fields of
	non-standard length.
	(grub_usb_device_attach): Autoload modules.
	(GRUB_MOD_INIT): Set grub_term_poll_usb.
	(GRUB_MOD_FINI): Unset grub_term_poll_usb.
	* bus/usb/usbhub.c (grub_usb_hub): Replace speed with devices. All
	users updated.
	(grub_usb_add_hub): Fill nports and children.
	(attach_root_port): Receive hub instead of controller.
	All users updated. Fill hub->devices.
	(grub_usb_root_hub): Allocate hub->devices.
	(detach_device): New function.
	(poll_nonroot_hub): Fill children and detach devices.
	* bus/usb/usbtrans.c (grub_usb_bulk_readwrite): Accept timeout and
	actual arguments. All users updated.
	(grub_usb_bulk_read_extended): New function.
	* bus/usb/serial/common.c: New file.
	* bus/usb/serial/ftdi.c: Likewise.
	* bus/usb/serial/pl2303.c: Likewise.
	* commands/terminal.c (handle_command): Support wildcard.
	* commands/usbtest.c: Output "Unknown" instead of empty string.
	* conf/any-emu.rmk (pkglib_MODULES): Add usbserial_common.mod.
	(usbserial_common_mod_SOURCES): New variable.
	(usbserial_common_mod_CFLAGS): Likewise.
	(usbserial_common_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add usbserial_pl2303.mod.
	(usbserial_pl2303_mod_SOURCES): New variable.
	(usbserial_pl2303_mod_CFLAGS): Likewise.
	(usbserial_pl2303_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add usbserial_ftdi.mod.
	(usbserial_ftdi_mod_SOURCES): New variable.
	(usbserial_ftdi_mod_CFLAGS): Likewise.
	(usbserial_ftdi_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add serial.mod.
	(serial_mod_SOURCES): New variable.
	(serial_mod_CFLAGS): Likewise.
	(serial_mod_LDFLAGS): Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/mips-yeeloong.rmk: Likewise.
	* conf/i386.rmk (serial_mod_SOURCES): Add term/ns8250.c.
	* conf/mips-yeeloong.rmk (kernel_img_SOURCES): Likewise.
	* disk/usbms.c (first_available_slot): New variable.
	(grub_usbms_attach): Don't reuse free slots due to potential cache
	problems.
	* include/grub/serial.h: Moved to ..
	* include/grub/ns8250.h: ...this.
	* include/grub/serial.h: New file.
	* include/grub/term.h (grub_term_poll_usb): New variable.
	* include/grub/terminfo.h (grub_terminfo_input_state): Pass term to
	readkey. All users updated.
	(grub_terminfo_output_state): Pass term to put.
	* include/grub/usb.h (GRUB_USB_REQTYPE): New enum.
	(grub_usb_controller_dev): Add timeout and actual arguments to
	transfer. All users updated.
	(grub_usb_interface): New field detach_data.
	(grub_usb_device): New fields children and nports.
	(grub_usb_ep_type_t): New type.
	(grub_usb_get_ep_type): New function.
	(grub_usb_bulk_read_extended): Likewise.
	* include/grub/usbdesc.h (grub_usb_desc): New type.
	* include/grub/usbserial.h: New file.
	* include/grub/usbtrans.h (grub_usb_transaction): New field preceding.
	* kern/term.c (grub_term_poll_usb): New variable.
	(grub_getkey): Call grub_term_poll_usb if set.
	(grub_checkkey): Likewise.
	(grub_getkeystatus): Likewise.
	* term/serial.c: Moved controller-specific parts to ...
	* term/ns8250.c: ... here.
	* term/serial.c: Mostly rewritten.
	* term/usb_keyboard.c: Reorganised to use GET_REPORT only on attaching
	according to spec.
2010-08-20 21:34:52 +02:00
Vladimir 'phcoder' Serbinenko
fb1d7b7975 Add ChangeLog 2010-08-20 21:26:27 +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
Colin Watson
63c734a63e * commands/i386/pc/sendkey.c (keysym_table): Rename "numlock" to
"numcenter" (I misunderstood the purpose of this entry).
* docs/grub.texi (sendkey): Likewise.
2010-08-20 00:15:23 +01:00
Colin Watson
c4d1654256 * commands/i386/pc/sendkey.c (options): Remove "keep" from all
status flag options; simply omitting the option is equivalent and
simpler.  Rename "wait" to "pause".  Rename "sysreq" to "sysrq".
(keysym_table): Rename "num5numlock" to "numlock".
(grub_cmd_sendkey): Reinitialise `andmask' and `ormask', so that we
can uniformly say that only the last of multiple `sendkey'
invocations has any effect.
* docs/grub.texi (sendkey): New section.
2010-08-20 00:05:14 +01:00
Colin Watson
93541d660d * commands/i386/pc/sendkey.c (options): Fix three typos. 2010-08-19 21:53:50 +01:00
Vladimir 'phcoder' Serbinenko
b4ece5e11e Implement sendkey support.
* commands/i386/pc/sendkey.c: New file.
	* conf/i386-pc.rmk (pkglib_MODULES): Add sendkey.mod.
	(sendkey_mod_SOURCES): New variable.
	(sendkey_mod_CFLAGS): Likewise.
	(sendkey_mod_LDFLAGS): Likewise.
2010-08-19 21:03:14 +02:00
Colin Watson
51f1f5afab * configure.ac: Move AM_INIT_AUTOMAKE after AC_CANONICAL_TARGET to
fix warnings from Autoconf.
2010-08-18 11:15:08 +01:00
Colin Watson
9da94e0576 * acinclude.m4 (grub_ASM_USCORE): Use a more accurate grep pattern,
to avoid false positives with some assemblers that output things
like "someprefix_func" as part of their output.
2010-08-18 11:08:00 +01:00
Robert Millan
729a0f2e0c 2010-08-15 Robert Millan <rmh@gnu.org>
* kern/emu/misc.c (grub_get_libzfs_handle): Handle libzfs_init()
	errors.
	* kern/emu/getroot.c (find_root_device_from_libzfs): Handle
	grub_get_libzfs_handle() errors.
2010-08-15 22:48:23 +02:00
Robert Millan
f3710e088c 2010-08-14 Robert Millan <rmh@gnu.org>
* kern/emu/misc.c (grub_find_zpool_from_dir): Abort function if
	filesystem is not ZFS.
2010-08-14 16:53:25 +02:00
BVK Chaitanya
7a3c13dea5 Fix for misspelled color names defaulting to black/black (bug
reported by Doug Nazar)

	* include/grub/normal.h (grub_parse_color_name_pair): Add return
	status to prototype.
	* normal/color.c (grub_parse_color_name_pair): Return failure
	status.
	(grub_env_write_color_normal): Ignore bad color names.
	(grub_env_write_color_highlight): Likewise.
	* normal/main.c (GRUB_MOD_INIT): Set default color names.
2010-08-12 20:52:42 +05:30
BVK Chaitanya
ab8ba50d75 "shift" command support to GRUB script.
* include/grub/script_sh.h (grub_script_shift): New prototype.
	* script/execute.c (grub_script_shift): New function.
	* script/main.c (grub_script_init): Register shift command.
	(grub_script_fini): Unregister shift command.
	* util/grub-script-check.c (grub_script_cmd_shift): New function.

	* tests/grub_script_shift.in: New testcase.
	* conf/tests.rmk: Rules for new testcase.
2010-08-12 12:07:27 +05:30
BVK Chaitanya
4d61999e33 "continue" command support to GRUB script.
* script/execute.c (grub_script_execute_cmdwhile): Continue support.
	(grub_script_break): Continue support.
	* script/main.c (grub_script_init): Register continue command.
	(grub_script_fini): Unregister continue command.

	* tests/grub_script_continue.in: New testcase.
	* conf/tests.rmk: Rules for new testcase.
2010-08-12 11:48:21 +05:30
BVK Chaitanya
4df51e0007 "break" command support to GRUB script.
* conf/common.rmk: Rule updates to grub-script-check.
	* include/grub/misc.h (grub_min): New function.
	* include/grub/script_sh.h (grub_script_init): New prototype.
	(grub_script_fini): New prototype.
	(grub_script_break): New prototype.
	* script/main.c (grub_script_init): New function.
	(grub_script_fini): New function.
	* script/execute.c (grub_script_break): New function.
	* normal/main.c: Calls to grub_script_{init,fini}.
	* util/grub-script-check.c (grub_script_break): New function.

	* tests/grub_script_break.in: New testcase.
	* conf/tests.rmk: Rules for new test case.
2010-08-12 09:35:15 +05:30
BVK Chaitanya
f12c842082 Function parameters support to GRUB script.
* script/yylex.l (VARIABLE): Regular expression update.
	* script/function.c (grub_script_function_call): Moved ...
	* script/execute.c (grub_script_function_call): ... to here.
	(grub_script_execute_arglist_to_argv): Removed.
	(grub_script_arglist_to_argv): New function.
	* script/argv.c: New file.
	(grub_script_argv_free): New function.
	(grub_script_argv_next): Likewise.
	(grub_script_argv_append): Likewise.
	(grub_script_argv_split_append): Likewise.
	* include/grub/script_sh.h (grub_script_argv): New struct.
	(grub_script_argv_free): New function.
	(grub_script_argv_next): Likewise.
	(grub_script_argv_append): Likewise.
	(grub_script_argv_split_append): Likewise.

	* conf/common.rmk (normal.mod): New source script/argv.c.

	* tests/grub_script_echo1.in: More tests.
	* tests/grub_script_vars1.in: Likewise.
	* tests/grub_script_functions.in: New test case.
	* conf/tests.rmk: Rules for new testcase.
2010-08-12 09:20:58 +05:30
BVK Chaitanya
8022b74825 Remove grub_script_cmdblock struct.
* include/grub/script_sh.h: Remove grub_script_cmdblock.
	* script/parser.y: Likewise.
	* script/execute.c: Rename cmdblock suffix to cmdlist.
	* script/script.c: Likewise.
	* util/grub-script-check.c: Likewise.
2010-08-12 09:04:37 +05:30
Yves Blusseau
79a6ba6101 2010-08-11 Yves Blusseau <blusseau@zetam.org>
* .bzrignore: add grub-macho2img
2010-08-11 13:24:37 +02:00
Vladimir 'phcoder' Serbinenko
d04b9414a8 * kern/i386/qemu/init.c (grub_qemu_init_cirrus): Fix compilation error. 2010-08-11 04:25:56 +02:00
Vladimir 'phcoder' Serbinenko
f947ab49b0 Remove the dump of sm712 initialisation sequence.
* include/grub/pci.h (GRUB_PCI_CLASS_SUBCLASS_VGA): New const.
	* include/grub/vga.h (GRUB_VGA_IO_ARX_READ): New register.
	(GRUB_VGA_IO_MISC_WRITE): Likewise.
	(GRUB_VGA_CR_*): Added many registers.
	(GRUB_VGA_SR_*): Likewise.
	(GRUB_VGA_GR_*): Likewise.
	(grub_vga_write_arx): New function.
	(grub_video_hw_config): New struct.
	(grub_vga_set_geometry): New function.
	* kern/i386/qemu/init.c (load_palette): Use grub_vga_write_arx and
	GRUB_PCI_CLASS_SUBCLASS_VGA.
	* video/cirrus.c (grub_video_cirrus_setup): Use grub_vga_set_geometry.
	* video/sm712.c (grub_sm712_write_reg): New function
	(grub_sm712_read_reg): Likewise.
	(grub_sm712_sr_write): Likewise.
	(grub_sm712_gr_write): Likewise.
	(grub_sm712_cr_write): Likewise.
	(grub_sm712_write_arx): Likewise.
	(grub_sm712_cr_shadow_write): Likewise.
	(grub_sm712_write_dda_lookup): Likewise.
	(grub_video_sm712_setup): Initialise the video rather then
	blindly replay the dump.
	(main) [TEST]: Add a routine to be able to compile as standalone for
	tests.
	* video/sm712_init.c (sm712_init): Removed.
	(sm712_sr_seq1): New array.
	(sm712_sr_seq2): Likewise.
2010-08-11 04:18:07 +02:00
Vladimir 'phcoder' Serbinenko
f0206638bf * include/grub/vga.h: Add missing grub/pci.h include. 2010-08-11 04:00:06 +02:00
Yves Blusseau
2764da3ba2 2010-08-10 Yves Blusseau <blusseau@zetam.org>
* util/grub-macho2img.c (main): fix typo
2010-08-10 16:32:48 +02:00
Vladimir 'phcoder' Serbinenko
cf0c775ed4 * include/grub/vga.h (grub_vga_gr_write): Add GRUB_MACHINE_PCI_IO_BASE.
(grub_vga_gr_read): Likewise.
	(grub_vga_cr_write): Likewise.
	(grub_vga_cr_read): Likewise.
	(grub_vga_sr_write): Likewise.
	(grub_vga_sr_read): Likewise.
	(grub_vga_palette_read): Likewise.
	(grub_vga_palette_write): Likewise.
	* video/sm712.c (GRUB_SM712_REG_BASE): New definition.
	(grub_sm712_sr_read): New function.
	(grub_video_sm712_setup): Use grub_vga_sr_write and grub_sm712_sr_read.
	* video/sm712_init.c (sm712_init): Substract GRUB_MACHINE_PCI_IO_BASE.
2010-08-10 13:43:43 +02:00
Robert Millan
07f360e92d 2010-08-09 Robert Millan <rmh@gnu.org>
* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): Filter
	out unused variables on non-ZFS build.
2010-08-09 17:44:24 +02:00
Robert Millan
346c207240 2010-08-08 Robert Millan <rmh@gnu.org>
Fix path generation for sub-filesystems in ZFS.
	
	* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): Add
	missing slash.
2010-08-09 00:11:19 +02:00
Robert Millan
7117542069 2010-08-08 Robert Millan <rmh@gnu.org>
* util/grub-fstest.c (read_file, cmd_cmp): Improve error message.
2010-08-08 22:47:32 +02:00
Robert Millan
0d8286f328 2010-08-08 Robert Millan <rmh@gnu.org>
* util/grub.d/10_kfreebsd.in: When files required for ZFS do not
	exist, issue a proper error message (rely on `ls' for translated
	strings).
2010-08-08 16:27:58 +02:00
Robert Millan
55dd292477 2010-08-08 Robert Millan <rmh@gnu.org>
Fix grub-probe invocation.
	
	* util/grub.d/10_kfreebsd.in: s/label/fs_label/g.
2010-08-08 15:45:33 +02:00