]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Removed unused GRUB_BOOT_VERSION. Check for kernel version is better
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 19 Oct 2011 21:01:44 +0000 (23:01 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 19 Oct 2011 21:01:44 +0000 (23:01 +0200)
done with a dedicated section.

* grub-core/boot/sparc64/ieee1275/boot.S: Remove GRUB_BOOT_VERSION.
Ensure the correct position of boot_path.
* grub-core/kern/i386/efi/startup.S: Remove GRUB_BOOT_VERSION.
* grub-core/kern/i386/pc/startup.S: Likewise. Ensure correct position of
other fields.
* grub-core/kern/x86_64/efi/startup.S: Remove GRUB_BOOT_VERSION.
* include/grub/boot.h: Removed. All references removed.
* include/grub/sparc64/ieee1275/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
Removed.
(GRUB_BOOT_MACHINE_BOOT_DEVPATH): Make it lower.

13 files changed:
ChangeLog
grub-core/Makefile.am
grub-core/boot/i386/pc/boot.S
grub-core/boot/i386/pc/cdboot.S
grub-core/boot/i386/pc/lnxboot.S
grub-core/boot/sparc64/ieee1275/boot.S
grub-core/boot/sparc64/ieee1275/diskboot.S
grub-core/kern/i386/efi/startup.S
grub-core/kern/i386/pc/startup.S
grub-core/kern/x86_64/efi/callwrap.S
grub-core/kern/x86_64/efi/startup.S
include/grub/boot.h [deleted file]
include/grub/sparc64/ieee1275/boot.h

index afbc8aec7eb137091707579a26cc1ce106b1d4db..1159d32a5be104703715988398476469e930ab4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-10-19  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Removed unused GRUB_BOOT_VERSION. Check for kernel version is better
+       done with a dedicated section.
+
+       * grub-core/boot/sparc64/ieee1275/boot.S: Remove GRUB_BOOT_VERSION.
+       Ensure the correct position of boot_path.
+       * grub-core/kern/i386/efi/startup.S: Remove GRUB_BOOT_VERSION.
+       * grub-core/kern/i386/pc/startup.S: Likewise. Ensure correct position of
+       other fields.
+       * grub-core/kern/x86_64/efi/startup.S: Remove GRUB_BOOT_VERSION.
+       * include/grub/boot.h: Removed. All references removed.
+       * include/grub/sparc64/ieee1275/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
+       Removed.
+       (GRUB_BOOT_MACHINE_BOOT_DEVPATH): Make it lower.
+
 2011-10-19  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * util/grub-install.in: Declare IEEE1275 as able to find out the disk
index f300146351caf13be30bfa364151b2c18a69ae9d..3bd192602a2fc92cee0020e76f74a79818ec38b7 100644 (file)
@@ -78,7 +78,6 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
index 635599a24c8ab3c58341032d99701894d1fe6bc6..314f1401618cc9d9fdba472f8342fe1cc5f95d1c 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <grub/symbol.h>
-#include <grub/boot.h>
 #include <grub/machine/boot.h>
 
 /*
index 33569ce9dd8b2ba6c82aefff8d4fc88eee9db908..d939835a9df2969348345085ff6bda6b5478e680 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <grub/symbol.h>
-#include <grub/boot.h>
 #include <grub/machine/boot.h>
 #include <grub/machine/kernel.h>
 #include <multiboot.h>
index 2c759602651821824359b21065105d15885ec2f4..bb43ed73cf1636305e36687f39a73201802d6b59 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <config.h>
 #include <grub/symbol.h>
-#include <grub/boot.h>
 #include <grub/machine/boot.h>
 #include <grub/machine/kernel.h>
 #include <multiboot.h>
index f08258f47977b833fd695dac5dd94bf8f1ad6354..f796995020bfd4596c3e9aa9aa7f5ce378e4316e 100644 (file)
@@ -17,7 +17,6 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <grub/boot.h>
 #include <grub/machine/boot.h>
 
        .text
@@ -29,9 +28,6 @@ pic_base:
        call    boot_continue
         mov    %o4, CIF_REG
 
-       . = _start + GRUB_BOOT_MACHINE_VER_MAJ
-boot_version:          .byte   GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
-
        /* The offsets to these locations are defined by the
         * GRUB_BOOT_MACHINE_foo macros in include/grub/sparc/ieee1275/boot.h,
         * and grub-setup uses this to patch these next three values as needed.
@@ -44,6 +40,7 @@ boot_version:         .byte   GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
         * After loading in that block we will execute it by jumping to the
         * load address plus the size of the prepended A.OUT header (32 bytes).
         */
+       . = _start + GRUB_BOOT_MACHINE_BOOT_DEVPATH
 boot_path:
        . = _start + GRUB_BOOT_MACHINE_KERNEL_BYTE
 boot_path_end:
index 83dfee098f2d5409450b767c653a539dcedfd40a..e020f622181ef18de98c8e9814eb64f0d159b1d6 100644 (file)
@@ -17,7 +17,6 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <grub/boot.h>
 #include <grub/machine/boot.h>
 #include <grub/offsets.h>
 
index 0f904d7b38c2e9c78f0ea5181395bf5aff13ba1a..fc5ea3dac863375a4d0137db59f60044c74aa585 100644 (file)
 
 #include <config.h>
 #include <grub/symbol.h>
-#include <grub/boot.h>
 
         .file   "startup.S"
         .text
         .globl  start, _start
 start:
 _start:
-       jmp codestart
-
-        /*
-         *  Compatibility version number
-         *
-         *  These MUST be at byte offset 6 and 7 of the executable
-         *  DO NOT MOVE !!!
-         */
-        . = _start + 0x6
-        .byte   GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
-
-        /*
-         *  This is a special data area 8 bytes from the beginning.
-         */
-
-codestart:
        /*
         *  EFI_SYSTEM_TABLE * and EFI_HANDLE are passed on the stack.
         */
index a70a2a7db29e5efe16f30aa8e21ac3bc2b7ef856..0350431d90cec79995c614f01c50e3c8538b8f58 100644 (file)
@@ -43,7 +43,6 @@
 
 #include <config.h>
 #include <grub/symbol.h>
-#include <grub/boot.h>
 #include <grub/machine/boot.h>
 #include <grub/machine/memory.h>
 #include <grub/machine/console.h>
@@ -75,31 +74,27 @@ LOCAL (base):
 #else
        ljmp $0, $ABS(LOCAL (codestart))
 #endif
-       /*
-        *  Compatibility version number
-        *
-        *  These MUST be at byte offset 6 and 7 of the executable
-        *  DO NOT MOVE !!!
-        */
-       . = _start + 0x6
-       .byte   GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
 
        /*
-        *  This is a special data area 8 bytes from the beginning.
+        *  This is a special data area.
         */
 
-       . = _start + 0x8
-
+       . = _start + GRUB_KERNEL_I386_PC_TOTAL_MODULE_SIZE
 VARIABLE(grub_total_module_size)
        .long   0
+       . = _start + GRUB_KERNEL_I386_PC_KERNEL_IMAGE_SIZE
 VARIABLE(grub_kernel_image_size)
        .long   0
+       . = _start + GRUB_KERNEL_I386_PC_COMPRESSED_SIZE 
 VARIABLE(grub_compressed_size)
        .long   0
+       . = _start + GRUB_KERNEL_I386_PC_INSTALL_DOS_PART
 VARIABLE(grub_install_dos_part)
        .long   0xFFFFFFFF
+       . = _start + GRUB_KERNEL_I386_PC_INSTALL_BSD_PART
 VARIABLE(grub_install_bsd_part)
        .long   0xFFFFFFFF
+       . = _start + GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY
 reed_solomon_redundancy:
        .long   0
 
index cc2c8aa05881a589dc56d4ed54ec6696cc5ca3e5..dced859ac40e119a99d1447ad5ad8a68ced1c596 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <config.h>
 #include <grub/symbol.h>
-#include <grub/boot.h>
 
 /*
  * x86_64 uses registry to pass parameters. Unfortunately, gcc and efi use
index 37efde7fcf78169e95f89ebd7bf3a533238d638f..f86f019699fc5e03c04024baad80ef742f9ae80c 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <config.h>
 #include <grub/symbol.h>
-#include <grub/boot.h>
 
         .file   "startup.S"
         .text
 
 start:
 _start:
-       jmp codestart
-
-        /*
-         *  Compatibility version number
-         *
-         *  These MUST be at byte offset 6 and 7 of the executable
-         *  DO NOT MOVE !!!
-         */
-        . = _start + 0x6
-        .byte   GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
-
-codestart:
        movq    %rcx, EXT_C(grub_efi_image_handle)(%rip)
        movq    %rdx, EXT_C(grub_efi_system_table)(%rip)
 
diff --git a/include/grub/boot.h b/include/grub/boot.h
deleted file mode 100644 (file)
index 2357748..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2007  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  GRUB is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GRUB_BOOT_HEADER
-#define GRUB_BOOT_HEADER       1
-
-#define GRUB_BOOT_VERSION_MAJOR        4
-#define GRUB_BOOT_VERSION_MINOR        0
-#define GRUB_BOOT_VERSION      ((GRUB_BOOT_VERSION_MINOR << 8) \
-                                       | GRUB_BOOT_VERSION_MAJOR)
-
-#endif /* ! GRUB_BOOT_HEADER */
index 112d19bc7a49bd7a07353bfc45dd1f0d32501fc3..60edc712e8a34e295231c66309616ac4b5f9d229 100644 (file)
@@ -39,9 +39,7 @@
 
 #define GRUB_BOOT_MACHINE_SIGNATURE    0xbb44aa55
 
-#define GRUB_BOOT_MACHINE_VER_MAJ      0x08
-
-#define GRUB_BOOT_MACHINE_BOOT_DEVPATH 0x0a
+#define GRUB_BOOT_MACHINE_BOOT_DEVPATH 0x08
 
 #define GRUB_BOOT_MACHINE_BOOT_DEVPATH_END 0x80