Commit graph

122 commits

Author SHA1 Message Date
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
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
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
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
a228ec103a enable ATA on qemu-mips 2011-05-17 14:35:55 +02:00
Vladimir 'phcoder' Serbinenko
3666d5f636 merge mainline and various cleanups 2011-05-17 14:02:18 +02:00
Vladimir 'phcoder' Serbinenko
400b93718f SGI ARCS port.
* Makefile.util.def (libgrubmods.a): Add dvh.c.
	* conf/Makefile.common (CCASFLAGS_PLATFORM): Add -mips3 on all mips
	platforms.
	* configure.ac: New target mips-arc.
	* gentpl.py: Likewise.
	* grub-core/Makefile.am: Likewise.
	* grub-core/Makefile.core.def: Likewise.
	(xz_decompress): Remove -D GRUB_MACHINE_LINK_ADDR.
	(none_decompress): Likewise.
	(lsdev): New module.
	(datetime): Use lib/arc/datetime.c on ARC.
	(part_dvh): New module.
	* grub-core/commands/arc/lsdev.c: New file.
	* grub-core/disk/arc/arcdisk.c: Likewise.
	* grub-core/kern/mips/arc/init.c: Likewise.
	* grub-core/kern/mips/cache_flush.S: Don't flush non 4-byte
	aligned addresses.
	* grub-core/kern/mips/dl.c (grub_arch_dl_check_header): Fix bigendian
	support.
	(grub_arch_dl_relocate_symbols): Likewise.
	* grub-core/kern/mips/loongson/init.c (grub_get_rtc): Moved from here...
	* grub-core/kern/mips/init.c (grub_get_rtc): ... here.
	* grub-core/kern/mips/startup.S (grub_arch_cpuclock): Have on all
	platforms.
	* grub-core/lib/arc/datetime.c: New file.
	* grub-core/loader/mips/linux.c: Always include time.h. Don't include
	pci.h on non-loongson.
	(envp_off) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove.
	(grub_linux_boot): Set unused registers to 0.
	(grub_cmd_linux) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove envp.
	* grub-core/mmap/mips/loongson/uppermem.c: Moved from here ...
	* grub-core/mmap/mips/uppermem.c: ...here.
	* grub-core/partmap/dvh.c: New file.
	* grub-core/term/arc/console.c: Likewise.
	* grub-core/term/terminfo.c (ANSI_C0_STR): New const.
	(grub_terminfo_set_current): Add terminal "arc".
	(grub_terminfo_readkey): Support ARC sequences.
	* include/grub/arc/arc.h: New file.
	* include/grub/arc/console.h: Likewise.
	* include/grub/disk.h (grub_disk_dev_id): Add
	GRUB_DISK_DEVICE_ARCDISK_ID.
	* include/grub/mips/arc/kernel.h: New file.
	* include/grub/mips/arc/memory.h: Likewise.
	* include/grub/mips/arc/time.h: Likewise.
	* include/grub/mips/loongson/kernel.h (grub_halt): Moved from here ...
	* include/grub/mips/kernel.h (grub_halt): ... here.
	* include/grub/mips/loongson.h (GRUB_CPU_REGISTER_WRAP): Moved from
	here...
	* include/grub/mips/mips.h (GRUB_CPU_REGISTER_WRAP): ... here.
	(GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): Moved from here ...
	* include/grub/mips/mips.h (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): .. here
	* include/grub/mips/loongson/kernel.h (grub_reboot): Removed redundant
	proto.
	* include/grub/mips/loongson/memory.h (GRUB_ARCH_LOWMEMVSTART): Moved
	from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMVSTART): ... here.
	(GRUB_ARCH_LOWMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMPSTART): ... here.
	(GRUB_ARCH_LOWMEMMAXSIZE): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMMAXSIZE): ... here.
	(GRUB_ARCH_HIGHMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_HIGHMEMPSTART): ... here.
	(grub_phys_addr_t): Moved from here ...
	* include/grub/mips/memory.h (grub_phys_addr_t): ... here.
	(grub_vtop): Moved from here ...
	* include/grub/mips/memory.h (grub_vtop): ... here.
	(grub_map_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_map_memory): ... here.
	(grub_unmap_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_unmap_memory): ... here.
	(grub_machine_mmap_iterate): Moved from here ...
	* include/grub/mips/memory.h (grub_machine_mmap_iterate): ... here.
	(grub_mmap_get_lower): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_lower): ... here.
	(grub_mmap_get_upper): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_upper): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_get_rtc): Moved from
	here ...
	* include/grub/mips/time.h (grub_get_rtc): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_cpu_idle): Moved from
	here ...
	* include/grub/mips/time.h (grub_cpu_idle): ... here.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_ARC_LINK_ADDR): New
	definition.
	(GRUB_KERNEL_MIPS_ARC_LINK_ALIGN): Likewise.
	(GRUB_KERNEL_MIPS_ARC_COMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_ARC_MOD_ALIGN): Likewise.
	(GRUB_MACHINE_LINK_ADDR): Likewise.
	* include/grub/terminfo.h (GRUB_TERMINFO_READKEY_MAX_LEN): Increased
	to 6.
	* util/grub-install.in: Run dvhtool on ARC.
	* util/grub-mkimage.c (image_targets): Add mips-arc.
2011-05-17 09:17:38 +02:00
Vladimir 'phcoder' Serbinenko
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
bee1aeb9a1 merge mainline into sgi 2011-05-15 02:23:36 +02:00
Vladimir 'phcoder' Serbinenko
5d063cdc10 Fuloong support.
* configure.ac: Rename yeeloong platform to loongson. All users updated.
	* grub-core/Makefile.core.def (fwstart_fuloong): New image.
	* grub-core/boot/mips/loongson/fuloong.S: New file.
	* grub-core/boot/mips/loongson/fwstart.S: Wait for CS5536 to come up.
	Explicitly init CS5536.
	[FULOONG]: Don't use serial until CS5536 is available.
	Set GPIO based on dumps.
	(serial_hw_init) [FULOONG]: Handle CS5536 parts.
	[FULOONG]: Handle GPIO and memory controller differences.
	Parse machine type in $a2.
	* grub-core/boot/mips/startup_raw.S: Determine and save the
	architecture.
	* grub-core/bus/cs5536.c (gpiodump): Move to fwstart.S.
	(grub_cs5536_init_geode): Remove gpio part. Conditionalise DIVIL
	init on architecture type.
	* grub-core/kern/mips/loongson/init.c (grub_machine_init): Init
	SIS315E. Don't init at_keyboard on fuloong.
	(grub_halt): Support Fuloong.
	* grub-core/kern/mips/startup.S [LOONGSON]: Save $s7.
	* grub-core/loader/mips/linux.c (LOONGSON_MACHTYPE): Removed.
	(loongson_machtypes): New array.
	(grub_cmd_linux) [GRUB_MACHINE_MIPS_LOONGSON]: Pass the right machine
	type.
	* grub-core/term/ns8250.c (serial_get_divisor): New parameter port and
	config. All users updated. Handle CS5536 serial.
	* grub-core/term/serial.c (grub_serial_register): Conditionalise
	default port on machine type. Register serial as inactive.
	* grub-core/video/sis315pro.c: New file.
	* include/grub/cs5536.h (GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED): New
	definition.
	(GRUB_CS5536_MSR_MAILBOX_CONFIG): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART1_CONF): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART2_CONF): Likewise.
	* include/grub/mips/loongson.h (GRUB_CPU_LOONGSON_SHUTDOWN_GPIO): Rename
	to ...
	(GRUB_CPU_YEELOONG_SHUTDOWN_GPIO): ... this.
	* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_YEELOONG): New
	definition.
	(GRUB_ARCH_MACHINE_FULOONG): Likewise.
	(grub_arch_machine): New extern var.
	* include/grub/mips/loongson/serial.h
	(GRUB_MACHINE_SERIAL_DIVISOR_115200): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0_DIVISOR_115200): ... this.
	(GRUB_MACHINE_SERIAL_PORT): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0): ... this.
	(GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200): New definition.
	(GRUB_MACHINE_SERIAL_PORT1): Likewise.
	(GRUB_MACHINE_SERIAL_PORT2): Likewise.
	(GRUB_MACHINE_SERIAL_PORTS): Include ports 1 and 2.
	* include/grub/term.h (grub_term_register_input_inactive): New inline
	function.
	(grub_term_register_output_inactive): Likewise.
	* include/grub/video.h (grub_video_driver_id): New value
	GRUB_VIDEO_DRIVER_SIS315PRO.
	* util/grub-mkimage.c (image_target_desc): Rename name to dirname.
	New field "names". All users updated.
	New field value IMAGE_FULOONG_FLASH.
	(generate_image): USe separate fwstart hashes for yeeloong and fuloong.
2011-05-15 01:43:44 +02:00
Vladimir 'phcoder' Serbinenko
8906c3dd40 sgi support 2011-05-13 16:36:05 +02:00
Vladimir 'phcoder' Serbinenko
7216a1bff3 Set EFI ticks to 1000Hz simplifying much of the code and avoiding cotsly division 2011-05-08 17:05:47 +02:00
Vladimir 'phcoder' Serbinenko
5452733f35 more or less functional ia64 grub-mkimage 2011-05-08 12:39:08 +02:00
Colin Watson
1eb44ae37e merge trunk 2011-04-21 11:07:10 +01:00
Feiran Zheng
3dd3dd335f minix3fs support 2011-04-11 08:16:13 +02:00
Vladimir 'phcoder' Serbinenko
c7ba1ba62e merge mainline into butter 2011-04-11 07:56:31 +02: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
54da1febce Rename mipsel-yeeloong to mipsel-loongson 2011-02-19 13:18:05 +01:00
Colin Watson
28f9509eb7 merge trunk 2011-02-17 14:51:11 +00:00
Vladimir 'phcoder' Serbinenko
a9fa2a22d7 Integrate Fuloong firmware port into build system and grub-mkimage 2011-01-24 02:20:04 +01:00
Vladimir 'phcoder' Serbinenko
01b08a0f15 initial SIS315PRO support 2011-01-18 13:44:16 +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
f440c33fd2 Make qemu-mips compile again. Still no grub-mkimage support 2011-01-14 17:37:11 +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
Colin Watson
6b978c4f04 merge trunk 2011-01-11 10:00:45 -06: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
Colin Watson
944404efb8 merge trunk 2011-01-04 15:41:07 +00:00
phcoder
bea3358389 First handling of ia64-efi in grub-mkimage 2011-01-03 13:46:36 +01:00
phcoder
c18271ed00 Fix compilation errors 2011-01-03 02:28:14 +01:00
phcoder
0a2b2cdc95 Fix autogen 2011-01-03 00:30:26 +01:00
Vladimir 'phcoder' Serbinenko
0f35c665e6 merge mainline to ia64 2011-01-03 00:04:39 +01:00
Vladimir 'phcoder' Serbinenko
7edf63fce6 merge ia64-emu into ia64 2011-01-02 23:55:50 +01:00
Vladimir 'phcoder' Serbinenko
6f49d0aacb Add missing cache.c 2011-01-01 15:53:31 +01:00
Vladimir 'phcoder' Serbinenko
b28fd807eb freedos support 2010-12-26 00:38:20 +01:00
Colin Watson
1c95b6d2bf Move video/colors.c into video.mod. 2010-12-23 12:11:44 +00:00
Vladimir 'phcoder' Serbinenko
29184e9312 romfs support 2010-12-15 19:49:35 +01:00
Colin Watson
52832c554c 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_colors) [videomodules]: New module, containing
video/colors.c.
2010-12-10 16:45:58 +00:00
Vladimir 'phcoder' Serbinenko
332fa36887 some squash4 code. Works only in very easy cases. 2010-12-08 21:22:46 +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
Vladimir 'phcoder' Serbinenko
3836e89df1 Add crc32c for btrfs 2010-12-01 01:22:55 +01: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
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
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
6d0fa83c79 Support xz compression on yeeloong.
* Makefile.util.def (grub-mkimage): Add $(LIBLZMA).
	* configure.ac: Check for LZMA.
	* grub-core/Makefile.core.def (xz_decompress): New target.
	(none_decompress): Likewise.
	* grub-core/boot/decompressor/minilib.c: New file.
	* grub-core/boot/decompressor/none.c: Likewise.
	* grub-core/boot/decompressor/xz.c: Likewise.
	* grub-core/kern/mips/cache.S: Change to noreorder nomacro.
	* grub-core/kern/mips/cache_flush.S: Likewise.
	* grub-core/kern/i386/pc/lzma_decode.S: Remove dead code.
	* grub-core/kern/mips/startup.S: Move first stage to ...
	* grub-core/boot/mips/startup_raw.S: ...here. Change to noreorder
	nomacro.
	* grub-core/kern/mips/startup.S: Change to noreorder nomacro.
	* grub-core/lib/mips/relocator_asm.S: Change to noreorder nomacro.
	* grub-core/lib/xzembed/xz_dec_bcj.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically.
	* grub-core/lib/xzembed/xz_dec_lzma2.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically or use scratch. Don't check CRC32.
	* grub-core/lib/xzembed/xz_dec_stream.c [GRUB_EMBED_DECOMPRESSOR]:
	Allocate statically. Don't check CRC32.
	* include/grub/decompressor.h: New file.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_YEELOONG_RAW_SIZE):
	Removed.
	(GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE): New field.
	(GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE): Adjusted.
	(GRUB_KERNEL_MIPS_YEELOONG_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END): Likewise.
	(GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE): New define.
	* util/grub-mkimage.c (grub_compression_t): New type.
	(PLATFORM_FLAGS_DECOMPRESSORS): New flag.
	(image_target_desc): New field default_compression.
	(image_targets): Adjust yeeloong targets.
	(compress_kernel_xz) [HAVE_LIBLZMA]: New function.
	(compress_kernel): New parameter comp.
	(generate_image): Likewise. Handle new compression case.
	(options): New option --compression
	(help): Likewise.
	(main): Handle new option.
2010-09-23 02:10:44 +02:00
Vladimir 'phcoder' Serbinenko
758194b076 Allow compression algorithm specification 2010-09-21 20:30:28 +02:00