From: Vladimir 'phcoder' Serbinenko Date: Wed, 29 Sep 2010 19:33:38 +0000 (+0200) Subject: Write embedding zone using Reed-Solomon. X-Git-Tag: 1.99~414 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b65830fae1be85c0dc65e8fccde64f6e28686a50;p=thirdparty%2Fgrub.git 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. --- b65830fae1be85c0dc65e8fccde64f6e28686a50 diff --cc ChangeLog index f33ddb6af,cf5cae534..fe48dc277 --- a/ChangeLog +++ b/ChangeLog @@@ -1,114 -1,3 +1,138 @@@ ++2010-09-29 Vladimir Serbinenko ++ ++ 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-28 Colin Watson + + * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi): Fix + i386 and x86-64 definedness tests. + +2010-09-27 Yves Blusseau + + Fix generation of kernel_syms.lst + + * grub-core/Makefile.am (kernel_syms.lst): Fix value and position of + ASM_PREFIX + +2010-09-26 Robert Millan + + 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 Robert Millan + + 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-25 BVK Chaitanya + + * grub-core/kern/emu/full.c (grub_emu_post_init): Fix typo. + +2010-09-25 BVK Chaitanya + + Fix grub-emu build. + + * grub-core/kern/emu/main.c: Remove #include . + * grub-core/kern/emu/full.c: Split grub_mdraid_{init,fini} into + mdraid09 and mdraid1x. + +2010-09-24 Colin Watson + + 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 Yves Blusseau + + * 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 BVK Chaitanya + + * Makefile.util.def (example_unit_test): Add + grub-core/gnulib/libgnu.a. + +2010-09-23 Grégoire Sutre + + * grub-core/commands/acpihalt.c (get_sleep_type): Initialize prev. + 2010-09-23 Vladimir Serbinenko Support xz compression on yeeloong. diff --cc include/grub/offsets.h index 359b32244,f11dffaca..b096abf37 --- a/include/grub/offsets.h +++ b/include/grub/offsets.h @@@ -34,11 -34,16 +34,13 @@@ /* The offset of GRUB_INSTALL_BSD_PART. */ #define GRUB_KERNEL_I386_PC_INSTALL_BSD_PART 0x18 - /* The offset of multiboot signature. */ - #define GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE 0x1c + /* Offset of reed_solomon_redundancy. */ + #define GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY 0x1c -/* The offset of multiboot signature. */ -#define GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE 0x20 - /* The size of the first region which won't be compressed. */ - #define GRUB_KERNEL_I386_PC_RAW_SIZE 0x5D8 + #define GRUB_KERNEL_I386_PC_RAW_SIZE 0xc90 + + #define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x6f8 /* The offset of GRUB_PREFIX. */ #define GRUB_KERNEL_I386_PC_PREFIX GRUB_KERNEL_I386_PC_RAW_SIZE