Colin Watson
0d9ff59345
* kern/emu/getroot.c (find_root_device_from_mountinfo): Use getline instead
...
of fgets into a static buffer. Use sizeof instead of strlen on a constant
string. Thanks to Vladimir for review.
2010-06-01 18:05:29 +01:00
Colin Watson
26c9e9bf61
merge from mainline
2010-05-27 16:36:31 +01:00
Colin Watson
d870813427
* util/grub-script-check.c (main): Ensure defined behaviour on empty
...
input files (in which case exit zero).
2010-05-27 15:54:18 +01:00
Colin Watson
db2102a046
* kern/emu/misc.c (canonicalize_file_name): realpath can still
...
return NULL for various reasons even if it has a maximum-length
buffer: for example, there might be a symlink loop, or the path
might exceed PATH_MAX. If this happens, return NULL.
2010-05-27 15:45:41 +01:00
Robert Millan
5fdba519bb
2010-05-27 Robert Millan <rmh@gnu.org>
...
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Insert
partmap module to handle cross-partmap setups.
Reported by Orestes Mas. Gràcies!
2010-05-27 16:38:16 +02:00
Colin Watson
d1d368e426
* util/grub-mkrescue.in: Initialise override_dir rather than
...
assuming that it's unset or empty in the environment.
2010-05-27 12:43:22 +01:00
Grégoire Sutre
95ac3c730c
Fix -Wshadow warning with emu build on NetBSD.
2010-05-26 23:49:52 +02:00
BVK Chaitanya
7d8c021353
* INSTALL: Added flex >= 2.5.35 requirement.
2010-05-25 18:24:46 +05:30
Vladimir 'phcoder' Serbinenko
db4d5813e3
* commands/usbtest.c (grub_usb_get_string): Properly support UTF-16.
2010-05-23 14:37:28 +02:00
Vladimir 'phcoder' Serbinenko
f24f430030
cmostest support.
...
* commands/i386/cmostest.c: New file.
* conf/i386-coreboot.rmk (pkglib_MODULES): Add cmostest.mod.
(cmostest_mod_SOURCES): New variable.
(cmostest_mod_CFLAGS): Likewise.
(cmostest_mod_LDFLAGS): Likewise.
* conf/i386-pc.rmk: Likewise.
* docs/grub.texi (Vendor power-on keys): New section.
* util/grub-mkconfig.in: export GRUB_DEFAULT_BUTTON,
GRUB_HIDDEN_TIMEOUT_BUTTON, GRUB_TIMEOUT_BUTTON
and GRUB_BUTTON_CMOS_ADDRESS.
* util/grub.d/00_header.in: Handle powering-on by separate button.
2010-05-23 14:16:17 +02:00
Vladimir 'phcoder' Serbinenko
76e6d0d767
Add default/grub support
2010-05-23 14:11:11 +02:00
Vladimir 'phcoder' Serbinenko
ad603f61a5
* gfxmenu/gui_list.c (draw_menu): Don't add scrollbar width to padding.
...
Removed drawing_scrollbar argument. All users updated
Fixes #29792 .
Reported by Jo Shields
2010-05-23 13:59:50 +02:00
Vladimir 'phcoder' Serbinenko
3ecb080a33
* gfxmenu/view.c (grub_gfxmenu_draw_terminal_box): Apply only to current
...
buffer since gfxterm handles double repaint.
2010-05-23 13:43:38 +02:00
Vladimir 'phcoder' Serbinenko
5f2316c1fe
* gfxmenu/gfxmenu.c (grub_gfxmenu_try): Change viewport on both buffers.
...
* term/gfxterm.c (real_scroll): Likewise.
2010-05-23 13:42:16 +02:00
Vladimir 'phcoder' Serbinenko
c49abfdd24
merge mainline into cmostest
2010-05-22 20:28:09 +02:00
Vladimir 'phcoder' Serbinenko
9a25f885d3
* kern/i386/pc/mmap.c (grub_machine_mmap_iterate): Zero-fill entry
...
before calling BIOS.
2010-05-21 20:22:29 +02:00
Vladimir 'phcoder' Serbinenko
39fbb79aa1
* include/grub/i18n.h: Always enable grub_gettext.
2010-05-21 20:12:41 +02:00
Vladimir 'phcoder' Serbinenko
228cfa97ca
* kern/i386/pc/init.c (make_install_device): Fix a leftover usage of old
...
partition naming style.
2010-05-21 20:08:48 +02:00
Colin Watson
21717c8fca
* util/grub-mkconfig.in: Fix handling of -o so that it works when
...
not the first option.
2010-05-21 14:17:15 +01:00
Colin Watson
c0f48e654d
* util/grub-mkrelpath.c (usage): Remove excess apostrophe.
2010-05-20 23:27:15 +01:00
Colin Watson
96779aec8e
* util/misc.c: Move inclusion of <limits.h> to ...
...
* kern/emu/misc.c: ... here. Needed for canonicalize_file_name.
2010-05-20 23:16:10 +01:00
Grégoire Sutre
fa9d256ee4
Fix merge error in NetBSD code.
2010-05-20 02:05:43 +02:00
BVK Chaitanya
123b7a8571
Fix grub-mkrescue usage unit testing.
...
* tests/util/grub-shell.in: Use --grub-mkimage with grub-mkrescue.
2010-05-19 14:31:43 +05:30
Christian Franke
74276c0df7
* util/grub.d/10_windows.in: Use path names instead of
...
drive letters to prevent warning from Cygwin 1.7.
Add drivemap command to menuentry if needed.
2010-05-18 21:58:49 +02:00
Samuel Thibault
c4f7b52359
2010-05-18 Justus Winter <4winter@informatik.uni-hamburg.de>
...
* util/grub.d/10_hurd.in: Include all gnumach* kernels, not only
gnumach and gnumach.gz.
2010-05-18 20:10:37 +02:00
Colin Watson
4db50964ad
Add btrfs probing support, currently only in the single-device case.
...
* kern/emu/getroot.c (find_root_device_from_mountinfo): New
function.
(grub_guess_root_device): Call find_root_device_from_mountinfo
before looking in /dev.
2010-05-18 13:01:59 +01:00
Vladimir 'phcoder' Serbinenko
95b97950e2
* include/grub/i18n.h (gettext): Inline instead of using #define.
...
(grub_gettext): Likewise.
(_): Likewise.
2010-05-18 14:00:51 +02:00
Vladimir 'phcoder' Serbinenko
01b8d2d787
* Makefile.in (CPPFLAGS): Replace -DGRUB_LIBDIR with
...
-DGRUB_PKGLIBROOTDIR= and prepend @PACKAGE_TARNAME@. All users updated.
* util/grub-mkimage.c (image_targets): Add i386-multiboot.
(main): Add a slash after pkglibdirroot.
2010-05-18 13:55:26 +02:00
Vladimir 'phcoder' Serbinenko
654e1d1e0e
* util/grub-install.in: Add missing "in" keyword.
2010-05-18 13:45:25 +02:00
Vladimir 'phcoder' Serbinenko
26966aeba7
2010-05-18 Vladimir Serbinenko <phcoder@gmail.com>
...
* util/grub-mkrescue.in: Remove -O i386-pc duplication.
Reported by: Seth Goldberg.
2010-05-18 14:21:15 +02:00
Vladimir 'phcoder' Serbinenko
7500674773
* po/POTFILES: Rename util/grub-mkrawimage.c to util/grub-mkimage.c.
2010-05-18 14:20:00 +02:00
Colin Watson
74cbf5bdcb
* configure.ac: Check for Linux device-mapper support.
...
* util/hostdisk.c (device_is_mapped): New function.
(find_partition_start): New function, partly broken out from
linux_find_partition and grub_util_biosdisk_get_grub_dev but with
device-mapper support added.
(linux_find_partition): Use find_partition_start.
(convert_system_partition_to_system_disk): Add `st' argument.
Support Linux /dev/mapper/* devices if device-mapper support is
available; only DM-RAID devices are understood at present.
(find_system_device): Add `st' argument. Pass it to
convert_system_partition_to_system_disk.
(grub_util_biosdisk_get_grub_dev): Pass stat result to
find_system_device and convert_system_partition_to_system_disk. Use
find_partition_start.
* conf/common.rmk (grub_mkdevicemap_SOURCES): Add kern/env.c,
kern/err.c, kern/list.c, kern/misc.c, and kern/emu/mm.c.
* util/deviceiter.c [__linux__]: Define MINOR.
(grub_util_iterate_devices): Add support for DM-RAID disk devices.
* util/mkdevicemap.c (grub_putchar): New function.
(grub_getkey): New function.
(grub_refresh): New function.
(main): Set debug=all if -v -v is used.
2010-05-18 12:33:35 +01:00
Colin Watson
355b51e9b5
Fix build with non-GNU libcs.
...
* util/misc.c (canonicalize_file_name): Move to ...
* kern/emu/misc.c (canonicalize_file_name): ... here. Needed by
grub_make_system_path_relative_to_its_root.
2010-05-18 11:57:31 +01:00
Colin Watson
7fb5c25fd0
* util/grub-mkrescue.in: Sync up with grub-install in terms of how
...
we handle finding grub-mkimage. Default to finding grub-mkimage in
${bindir} with program_transform_name applied, and provide a
--grub-mkimage option to override this.
2010-05-18 11:51:37 +01:00
Colin Watson
e6127bed25
merge from trunk
2010-05-18 11:14:13 +01:00
Vladimir 'phcoder' Serbinenko
1d3293d67d
Remove grub-mkisofs.
...
* conf/common.rmk (bin_UTILITIES): Remove grub-mkisofs.
(grub_mkisofs_SOURCES): Removed.
(grub_mkisofs_CFLAGS): Removed.
* util/mkisofs/defaults.h: Removed.
* util/mkisofs/eltorito.c: Likewise.
* util/mkisofs/exclude.h: Likewise.
* util/mkisofs/hash.c: Likewise.
* util/mkisofs/include/: Likewise.
* util/mkisofs/include/fctldefs.h: Likewise.
* util/mkisofs/include/mconfig.h: Likewise.
* util/mkisofs/include/prototyp.h: Likewise.
* util/mkisofs/include/statdefs.h: Likewise.
* util/mkisofs/iso9660.h: Likewise.
* util/mkisofs/joliet.c: Likewise.
* util/mkisofs/match.c: Likewise.
* util/mkisofs/match.h: Likewise.
* util/mkisofs/mkisofs.c: Likewise.
* util/mkisofs/mkisofs.h: Likewise.
* util/mkisofs/msdos_partition.h: Likewise.
* util/mkisofs/multi.c: Likewise.
* util/mkisofs/name.c: Likewise.
* util/mkisofs/rock.c: Likewise.
* util/mkisofs/tree.c: Likewise.
* util/mkisofs/write.c: Likewise.
2010-05-17 23:33:03 +02:00
Vladimir 'phcoder' Serbinenko
5dde9afe82
Unify grub-mkimage accross platforms.
...
* Makefile.in (CPPFLAGS): Set GRUB_LIBDIR to $(libdir).
* conf/common.rmk (bin_UTILITIES): Removed grub-mkelfimage.
(grub_mkelfimage_SOURCES): Removed.
(util/elf/grub-mkimage.c_DEPENDENCIES): Renamed to ..
(util/grub-mkimage.c_DEPENDENCIES): .. this.
(bin_UTILITIES): Add grub-mkimage.
(grub_mkimage_SOURCES): New variable.
(kernel_img_HEADERS): Remove machine/kernel.h.
* conf/i386-pc.rmk (pkglib_IMAGES): Remove kernel.img.
(pkglib_PROGRAMS): Add kernel.img.
(kernel_img_HEADERS): Add machine/kernel.h.
(kernel_img_FORMAT): Removed.
(bin_UTILITIES): Remove grub-mkimage.
(grub_mkimage_SOURCES): Removed.
(grub_mkimage_CFLAGS): Likewise.
(util/grub-mkrawimage.c_DEPENDENCIES): Likewise.
* conf/i386-qemu.rmk (pkglib_IMAGES): Remove kernel.img.
(pkglib_PROGRAMS): Add kernel.img.
(bin_UTILITIES): Remove grub-mkimage.
(grub_mkimage_SOURCES): Removed.
(grub_mkimage_CFLAGS): Likewise.
(util/grub-mkrawimage.c_DEPENDENCIES): Likewise.
* conf/mips-qemu-mips.rmk (pkglib_IMAGES): Remove kernel.img.
(pkglib_PROGRAMS): Add kernel.img.
* conf/mips-yeeloong.rmk (pkglib_IMAGES): Remove kernel.img.
(pkglib_PROGRAMS): Add kernel.img.
* conf/mips.rmk (bin_UTILITIES): Remove grub-mkimage.
(grub_mkimage_SOURCES): Removed.
(grub_mkimage_CFLAGS): Likewise.
(util/grub-mkrawimage.c_DEPENDENCIES): Likewise.
* conf/sparc64-ieee1275.rmk (pkglib_IMAGES): Remove kernel.img.
(pkglib_PROGRAMS): Add kernel.img.
(bin_UTILITIES): Remove grub-mkimage.
(grub_mkimage_SOURCES): Removed.
(grub_mkimage_CFLAGS): Likewise.
(util/grub-mkrawimage.c_DEPENDENCIES): Likewise.
* conf/x86-efi.rmk (bin_UTILITIES): Remove grub-mkimage.
(grub_mkimage_SOURCES): Removed.
(grub_mkimage_CFLAGS): Likewise.
(util/grub-mkrawimage.c_DEPENDENCIES): Likewise.
* configure.ac (machine_CFLAGS): Add "-DMACHINE".
* include/grub/efi/pe32.h (grub_pe32_optional_header): Split into ...
(grub_pe32_optional_header): ... this.
(grub_pe64_optional_header): ... and this. All users updated.
(GRUB_PE32_PE32_MAGIC): Split into ..
(GRUB_PE32_PE32_MAGIC): .. this.
(GRUB_PE32_PE64_MAGIC): .. and this.
(GRUB_PE32_SIGNATURE_SIZE): New definition.
* include/grub/elf.h (PT_GNU_STACK): New definition.
* include/grub/i386/coreboot/kernel.h: Merged into include/grub/offsets.h. All users updated.
* include/grub/i386/efi/kernel.h: Likewise.
* include/grub/i386/kernel.h: Likewise.
* include/grub/i386/pc/kernel.h: Likewise.
* include/grub/i386/qemu/boot.h: Likewise.
* include/grub/mips/kernel.h: Likewise.
* include/grub/mips/qemu-mips/kernel.h: Likewise.
* include/grub/powerpc/ieee1275/kernel.h: Likewise.
* include/grub/powerpc/kernel.h: Likewise.
* include/grub/sparc64/ieee1275/boot.h: Likewise.
* include/grub/sparc64/ieee1275/kernel.h: Likewise.
* include/grub/sparc64/kernel.h: Likewise.
* include/grub/x86_64/efi/kernel.h: Likewise.
* include/grub/x86_64/kernel.h: Likewise.
* include/grub/offsets.h: New file.
* include/grub/kernel.h (grub_module_info): Split into ...
(grub_module_info32): ... this.
(grub_module_info64): ... and this.
* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_KERNEL_SEG): Moved from here ...
* include/grub/offsets.h (GRUB_BOOT_I386_PC_KERNEL_SEG): ... here.
(grub_boot_blocklist): Moved from here ...
* include/grub/offsets.h (grub_pc_bios_boot_blocklist): ... here.
* include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): Moved from here.
* include/grub/offsets.h (GRUB_MEMORY_I386_PC_UPPER): .. here.
* include/grub/types.h (grub_target_to_host16): Removed.
(grub_target_to_host32): Likewise.
(grub_target_to_host64): Likewise.
(grub_host_to_target16): Likewise.
(grub_host_to_target32): Likewise.
(grub_host_to_target64): Likewise.
(grub_host_to_target_addr): Likewise.
Support grub-mkrescue for efi, coreboot and qemu.
* conf/x86-efi.rmk (bin_SCRIPTS): Add grub-mkrescue.
* kern/efi/init.c (grub_efi_set_prefix): Handle baked in prefix.
* util/elf/grub-mkimage.c: Merged into util/grub-mkimage.c.
* util/grub-mkrawimage.c: Moved from here ...
* util/grub-mkimage.c: ... here. All users updated.
(ALIGN_ADDR): Use image_target.
(TARGET_NO_FIELD): New const.
(image_target_desc): New type.
(image_targets): New array.
(grub_target_to_host64): Use image_target.
(grub_target_to_host32): Likewise.
(grub_target_to_host16): Likewise.
(grub_host_to_target64): Likewise.
(grub_host_to_target32): Likewise.
(grub_host_to_target16): Likewise.
(grub_host_to_target_addr): Likewise.
(generate_image): Handle multiimage.
(main): Require -O parameter. All users updated.
* util/grub-mkimagexx.c: New file. Based on util/grub-mkrawimage.c and
util/efi/grub-mkimage.c
* util/grub-mkrescue.in: Handle coreboot, efi and qemu.
New option --rom-directory.
Use xorriso.
* util/i386/efi/grub-mkimage.c: Removed.
* util/i386/pc/grub-setup.c (grub_target_to_host16): New definition.
(grub_target_to_host32): Likewise.
(grub_target_to_host64): Likewise.
(grub_host_to_target16): Likewise.
(grub_host_to_target32): Likewise.
(grub_host_to_target64): Likewise.
* util/sparc64/ieee1275/grub-setup.c (grub_target_to_host16): New definition.
(grub_target_to_host32): Likewise.
(grub_target_to_host64): Likewise.
(grub_host_to_target16): Likewise.
(grub_host_to_target32): Likewise.
(grub_host_to_target64): Likewise.
2010-05-17 23:04:10 +02:00
Vladimir 'phcoder' Serbinenko
6198f888c9
Revert spurious change in Makefile.in
2010-05-17 22:28:51 +02:00
Vladimir 'phcoder' Serbinenko
8b26d1d30b
add missing sh.mod
2010-05-17 22:23:22 +02:00
Vladimir 'phcoder' Serbinenko
7e70395f9c
Cherrypick bugfixes and coreboot+qemu support from expermental
2010-05-17 21:35:39 +02:00
Vladimir 'phcoder' Serbinenko
918405fd8c
merge mainline into rescue-efi
2010-05-17 21:26:16 +02:00
BVK Chaitanya
f4fc97d02a
source tree reorg for emu platform
2010-05-17 21:10:53 +05:30
BVK Chaitanya
d2d32327a8
merge with mainline
2010-05-17 20:36:05 +05:30
Vladimir 'phcoder' Serbinenko
cced9145fc
Fix gfxmenu crash.
...
Reported by: Thorsten Grützmacher.
* gfxmenu/gui_circular_progress.c (circprog_destroy): Unregister
timeout hook.
(circprog_set_property): Register and unregister timeout hook.
* gfxmenu/gui_label.c (grub_gui_label): New fields template and value.
(label_destroy): Free template. and unregister hook.
(label_set_state): New function.
(label_set_property): Handle templates and hooks.
* gfxmenu/gui_progress_bar.c (progress_bar_destroy): Unregister
timeout hook.
(progress_bar_set_property): Register and unregister timeout hook.
* gfxmenu/view.c (TIMEOUT_COMPONENT_ID): Move from here ...
* include/grub/gui.h (GRUB_GFXMENU_TIMEOUT_COMPONENT_ID): ...to here
* gfxmenu/view.c (grub_gfxmenu_timeout_notifications): New variable.
(update_timeout_visit): Removed.
(update_timeouts): New function.
(redraw_timeouts): Likewise.
(grub_gfxmenu_print_timeout): Use update_timeouts and redraw_timeouts.
(grub_gfxmenu_clear_timeout): Likewise.
* include/grub/gui.h (grub_gfxmenu_set_state_t): New type.
(grub_gfxmenu_timeout_notify): Likewise.
(grub_gfxmenu_timeout_notifications): New external variable.
(grub_gfxmenu_timeout_register): New function.
(grub_gfxmenu_timeout_unregister): Likewise.
2010-05-13 03:56:14 +02:00
Vladimir 'phcoder' Serbinenko
c6e5caab1d
Transform (broken) vga terminal into (working) vga video driver.
...
* conf/i386-pc.rmk (vga_mod_SOURCES): Change term/i386/pc/vga.c to
video/i386/pc/vga.c.
* include/grub/video.h (grub_video_driver_id):
Add GRUB_VIDEO_DRIVER_VGA.
* term/i386/pc/vga.c: Renamed to ...
* video/i386/pc/vga.c: ...this
(DEBUG_VGA): Removed.
(CHAR_WIDTH): Likewise.
(CHAR_HEIGHT): Likewise.
(TEXT_WIDTH): Likewise.
(TEXT_HEIGHT): Likewise.
(DEFAULT_FG_COLOR): Likewise.
(DEFAULT_BG_COLOR): Likewise.
(colored_char): Likewise.
(xpos): Likewise.
(ypos): Likewise.
(cursor_state): Likewise.
(fg_color): Likewise.
(bg_color): Likewise.
(text_buf): Likewise.
(page): Likewise.
(font): Likewise.
(framebuffer): New variable.
(set_read_map): Disabled.
(setup): New variable.
(is_target): Likewise.
(grub_vga_mod_init): Likewise.
(grub_vga_mod_fini): Likewise.
(check_vga_mem): Likewise.
(write_char): Likewise.
(write_cursor): Likewise.
(scroll_up): Likewise.
(grub_vga_putchar): Likewise.
(grub_vga_getcharwidth): Likewise.
(grub_vga_getwh): Likewise.
(grub_vga_getxy): Likewise.
(grub_vga_gotoxy): Likewise.
(grub_vga_cls): Likewise.
(grub_vga_setcolorstate): Likewise.
(grub_vga_setcursor): Likewise.
(grub_video_vga_init): New function.
(grub_video_vga_setup): Likewise.
(grub_video_vga_fini): Likewise.
(update_target): Likewise.
(grub_video_vga_blit_bitmap): Likewise.
(grub_video_vga_blit_render_target): Likewise.
(grub_video_vga_set_active_render_target): Likewise.
(grub_video_vga_get_active_render_target): Likewise.
(grub_video_vga_swap_buffers): Likewise.
(grub_video_vga_set_palette): Likewise.
(grub_video_vga_get_info_and_fini): Likewise.
(grub_vga_term): Removed.
(grub_video_vga_adapter): New variable.
(GRUB_MOD_INIT): Register a video driver instead of terminal.
(GRUB_MOD_FINI): Unrefister a video driver instead of terminal.
2010-05-09 11:00:21 +02:00
BVK Chaitanya
f1c891902d
merge with mainline
2010-05-06 21:22:08 +05:30
BVK Chaitanya
60b4a7c45b
sparc build fix
2010-05-06 10:16:55 +05:30
BVK Chaitanya
ab4da2cd36
build fixes for real platforms
2010-05-06 09:33:45 +05:30
BVK Chaitanya
da6e6f17f3
cygwin emu build fixes
2010-05-06 08:45:39 +05:30
Vladimir 'phcoder' Serbinenko
2bf61a980b
* video/readers/jpeg.c: Indented.
2010-05-05 21:19:55 +02:00