Commit graph

4690 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
3ac9e79207 Multiple bugs correction for Reed-Solomon 2010-09-25 20:40:26 +02:00
Vladimir 'phcoder' Serbinenko
419cbeb06d hook Reed-Solomon into startup.S 2010-09-25 19:33:05 +02:00
Vladimir 'phcoder' Serbinenko
4f0de6881c C part of Reed-Solomon 2010-09-24 14:05:47 +02:00
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
Vladimir 'phcoder' Serbinenko
9a0e5c815e Fix bugs in asm code 2010-09-22 00:53:34 +02:00
Vladimir 'phcoder' Serbinenko
67c4bb722d Align scratch 2010-09-22 00:52:33 +02:00
Vladimir 'phcoder' Serbinenko
bf5f1dc6d2 Write total module size before compressing 2010-09-22 00:51:54 +02:00
starous
a93cb8a8cc .../serial/common.c - added missing configuration 2010-09-21 22:00:44 +02:00
starous
6cc1405144 .../serial/common.c - added missing configuration 2010-09-21 21:57:57 +02:00
Vladimir 'phcoder' Serbinenko
2c44e493c7 Compressor part 2010-09-21 21:35:46 +02:00
Vladimir 'phcoder' Serbinenko
758194b076 Allow compression algorithm specification 2010-09-21 20:30:28 +02:00
Colin Watson
df7769d8dc * grub-core/normal/menu_entry.c (run): Make sure we always return
a value.
2010-09-21 19:03:11 +01:00
Vladimir 'phcoder' Serbinenko
e0a8ef26e4 MAke a separate scratch for decompressor 2010-09-21 19:39:51 +02: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
Vladimir 'phcoder' Serbinenko
f8926c32b4 C part of decompressor 2010-09-21 11:22:52 +02:00
Yves Blusseau
934d7e44b2 * util/grub-editenv.c: Update strings to avoid warnings when generating
grub.pot file.
    * util/grub-setup.c: Likewise.
2010-09-21 11:17:54 +02:00
Vladimir 'phcoder' Serbinenko
c5b4cd370e asm part for mips decompressor 2010-09-21 10:14:08 +02:00
Vladimir 'phcoder' Serbinenko
3197c86ba8 Remove dead code in decompressor 2010-09-21 10:07:12 +02:00
Vladimir 'phcoder' Serbinenko
4519e259a1 Implementation of ACPI parts 2010-09-21 08:37:50 +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
9dbbe5e858 Impletment EST multiboot passing 2010-09-21 02:19:29 +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
57f20e67a0 Support extraction of legacy entries 2010-09-20 23:10:29 +02:00
Vladimir 'phcoder' Serbinenko
a38b701cbf Rename jail to extractor 2010-09-20 23:01:34 +02:00
Vladimir 'phcoder' Serbinenko
1b71d7500b merge mainline into jail 2010-09-20 22:41:59 +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
65d973de1c Add the comment about net-/openbsdlabel 2010-09-20 21:34:20 +02:00
Vladimir 'phcoder' Serbinenko
4b98e0d7c7 Support net-/openbsd labels inside logical partitions 2010-09-20 21:30:11 +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