mirror of
http://cgit.git.savannah.gnu.org/git/grub.git
synced 2026-04-28 06:33:17 +00:00
Compare commits
20 Commits
ac042f3f58
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b07cc37ca6 | ||
|
|
14949bbd1f | ||
|
|
da3675583a | ||
|
|
3dce38eb19 | ||
|
|
7d0a4c07a8 | ||
|
|
ab6f735174 | ||
|
|
86283bfd4e | ||
|
|
935e889ab5 | ||
|
|
1dc2986c7e | ||
|
|
7b72d6cbd5 | ||
|
|
ba2f351145 | ||
|
|
9922ed133c | ||
|
|
ce6f2b57f5 | ||
|
|
9f4a586f12 | ||
|
|
b71ae6db28 | ||
|
|
675d858103 | ||
|
|
170221b355 | ||
|
|
eaa3b8f0f9 | ||
|
|
d38d6a1a9b | ||
|
|
35bfd6c478 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -238,7 +238,8 @@ widthspec.bin
|
||||
/lzocompress_test
|
||||
/luks1_test
|
||||
/luks2_test
|
||||
/m4/
|
||||
/m4/*
|
||||
!/m4/ax_check_link_flag.m4
|
||||
/minixfs_test
|
||||
/missing
|
||||
/netboot_test
|
||||
|
||||
1
INSTALL
1
INSTALL
@@ -56,7 +56,6 @@ need the following.
|
||||
* Python 3 (NOTE: python 2.6 should still work, but it's not tested)
|
||||
* Autoconf 2.64 or later
|
||||
* Automake 1.14 or later
|
||||
* GNU Autoconf Archive (autoconf-archive on Debian)
|
||||
|
||||
Your distro may package cross-compiling toolchains such as the following
|
||||
incomplete list on Debian: gcc-aarch64-linux-gnu, gcc-arm-linux-gnueabihf,
|
||||
|
||||
14
MAINTAINERS
14
MAINTAINERS
@@ -2,7 +2,8 @@ List of current GRUB maintainers and some basic information about the project
|
||||
=============================================================================
|
||||
|
||||
Here is the list of current GRUB maintainers:
|
||||
- Daniel Kiper <daniel.kiper@oracle.com> and <dkiper@net-space.pl>,
|
||||
- Leo Sandoval <lsandova@redhat.com>,
|
||||
- Marta Lewandowska <mlewando@redhat.com>,
|
||||
- Alex Burmashev <alexander.burmashev@oracle.com>,
|
||||
- Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>.
|
||||
|
||||
@@ -13,10 +14,9 @@ file to get more information how to properly report this kind of bugs to
|
||||
the maintainers.
|
||||
|
||||
The GRUB development happens on the grub-devel mailing list [1]. The latest
|
||||
GRUB source code is available at Savannah git repository [2].
|
||||
|
||||
Users can ask for help on the help-grub mailing list [3].
|
||||
GRUB source code is available at freedesktop git repository [2].
|
||||
|
||||
Users can also ask for help on the same grub-devel mailing list [1].
|
||||
|
||||
List of past GRUB maintainers and people who strongly contributed to the project
|
||||
================================================================================
|
||||
@@ -25,11 +25,11 @@ Here is the list, sorted alphabetically, of past GRUB maintainers and people who
|
||||
strongly contributed to the project:
|
||||
- Andrei Borzenkov,
|
||||
- Bryan Ford,
|
||||
- Daniel Kiper,
|
||||
- Erich Stefan Boleyn,
|
||||
- Gordon Matzigkeit,
|
||||
- Yoshinori K. Okuji.
|
||||
|
||||
|
||||
[1] https://lists.gnu.org/mailman/listinfo/grub-devel
|
||||
[2] https://git.savannah.gnu.org/gitweb/?p=grub.git&view=view+git+repository
|
||||
[3] https://lists.gnu.org/mailman/listinfo/help-grub
|
||||
[1] https://lists.freedesktop.org/postorius/lists/grub-devel.lists.freedesktop.org/
|
||||
[2] https://gitlab.freedesktop.org/gnu-grub/grub/
|
||||
|
||||
23
NEWS
23
NEWS
@@ -1,3 +1,26 @@
|
||||
New in 2.14:
|
||||
|
||||
* libgcrypt 1.11.
|
||||
* LVM LV integrity and cachevol support.
|
||||
* EROFS support.
|
||||
* GRUB environment block inside the Btrfs header support.
|
||||
* NX support for EFI platforms.
|
||||
* shim loader protocol support.
|
||||
* BLS and UKI support.
|
||||
* Argon2 KDF support.
|
||||
* TPM2 key protector support.
|
||||
* Appended Signature Secure Boot Support for PowerPC.
|
||||
* New option to block command line interface.
|
||||
* Support dates outside of 1901..2038 range.
|
||||
* zstdio decompression support.
|
||||
* EFI code improvements and fixes.
|
||||
* TPM driver fixes.
|
||||
* Filesystems fixes.
|
||||
* CVE and Coverity fixes.
|
||||
* Tests improvements.
|
||||
* Documentation improvements.
|
||||
* ... and tons of other fixes and cleanups...
|
||||
|
||||
New in 2.12:
|
||||
|
||||
* GCC 13 support.
|
||||
|
||||
8
SECURITY
8
SECURITY
@@ -49,9 +49,11 @@ on each step of the process.
|
||||
|
||||
While there's currently no bug bounty program we appreciate every report.
|
||||
|
||||
* Contact: Daniel Kiper <daniel.kiper@oracle.com> and
|
||||
Daniel Kiper <dkiper@net-space.pl>
|
||||
* PGP Key Fingerprint: BE5C 2320 9ACD DACE B20D B0A2 8C81 89F1 988C 2166
|
||||
* Contact: Marta Lewandowska <mlewando@redhat.com>
|
||||
* PGP Key Fingerprint: 5B21 5739 7348 6620 C0FF 7073 DDF0 92F7 4C8F 619B
|
||||
|
||||
* Contact: Leonardo Sandoval Gonzalez <lsandova@redhat.com>
|
||||
* PGP Key Fingerprint: DFB6 2CC1 A987 E6C7 6EBF 8143 916E C070 8CDF DDFD
|
||||
|
||||
* Contact: Alex Burmashev <alexander.burmashev@oracle.com>
|
||||
* PGP Key Fingerprint: 50A4 EC06 EF7E B84D 67E0 3BB6 2AE2 C87E 28EF 2E6E
|
||||
|
||||
18
acinclude.m4
18
acinclude.m4
@@ -79,11 +79,6 @@ AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
|
||||
[AC_MSG_CHECKING([whether ${TARGET_OBJCOPY} works for absolute addresses])
|
||||
AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
|
||||
[cat > conftest.c <<\EOF
|
||||
asm (
|
||||
".globl start, _start, __start\n"
|
||||
".ifdef cmain; .set start = _start = __start = cmain\n.endif\n"
|
||||
".ifdef _cmain; .set start = _start = __start = _cmain\n.endif\n"
|
||||
);
|
||||
void cmain (void);
|
||||
void
|
||||
cmain (void)
|
||||
@@ -98,7 +93,18 @@ else
|
||||
fi
|
||||
grub_cv_prog_objcopy_absolute=yes
|
||||
for link_addr in 0x2000 0x8000 0x7C00; do
|
||||
if AC_TRY_COMMAND([${CC-cc} ${TARGET_CFLAGS} ${TARGET_LDFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},$link_addr conftest.o -o conftest.exec]); then :
|
||||
|
||||
target_img_base_ld="${TARGET_IMG_BASE_LDOPT}"
|
||||
case "$target_img_base_ld" in
|
||||
*_grub_text_base)
|
||||
target_img_base_ld="${target_img_base_ld}=$link_addr"
|
||||
;;
|
||||
*)
|
||||
target_img_base_ld="${target_img_base_ld},$link_addr"
|
||||
;;
|
||||
esac
|
||||
|
||||
if AC_TRY_COMMAND([${CC-cc} ${TARGET_CFLAGS} ${TARGET_LDFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${target_img_base_ld} conftest.o -o conftest.exec]); then :
|
||||
else
|
||||
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
|
||||
fi
|
||||
|
||||
@@ -16,7 +16,8 @@ EXTRA_DIST += docs/autoiso.cfg
|
||||
EXTRA_DIST += docs/grub.cfg
|
||||
EXTRA_DIST += docs/osdetect.cfg
|
||||
|
||||
EXTRA_DIST += conf/i386-cygwin-img-ld.sc
|
||||
EXTRA_DIST += conf/i386-cygwin-img.lds
|
||||
EXTRA_DIST += conf/i386-pc-kernel.lds
|
||||
|
||||
EXTRA_DIST += grub-core/Makefile.core.def
|
||||
EXTRA_DIST += grub-core/Makefile.gcry.def
|
||||
@@ -72,6 +73,7 @@ EXTRA_DIST += grub-core/lib/libtasn1
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/include -name '*.h')
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/lib -name '*.h')
|
||||
EXTRA_DIST += grub-core/efiemu/runtime/config.h
|
||||
EXTRA_DIST += grub-core/tests/crypto_cipher_mode_vectors.h
|
||||
EXTRA_DIST += grub-core/tests/asn1/asn1_test.h
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/tests/asn1/tests -name '*.h')
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/commands/tpm2_key_protector -name '*.h')
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = _grub_text_base;
|
||||
.text :
|
||||
{
|
||||
start = . ;
|
||||
51
conf/i386-pc-kernel.lds
Normal file
51
conf/i386-pc-kernel.lds
Normal file
@@ -0,0 +1,51 @@
|
||||
ENTRY(_start)
|
||||
|
||||
/*
|
||||
* Align sections to a 16-byte boundary. This guarantees ABI compatibility with
|
||||
* C generated code.
|
||||
*/
|
||||
SECTION_ALIGN = 0x10;
|
||||
|
||||
PHDRS {
|
||||
text PT_LOAD FLAGS(7) /* PF_R | PF_W | PF_X */;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/*
|
||||
* Set section alignment to 1. This allows sections to be aligned without
|
||||
* creating holes in the VMA space or gaps in the file.
|
||||
*/
|
||||
. = _grub_text_base;
|
||||
.text ALIGN(0x1) : {
|
||||
_start = .;
|
||||
*(.text .text.*)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
} :text
|
||||
.rodata ALIGN(0x1) : {
|
||||
*(.rodata .rodata.*)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
} :text
|
||||
.module_license ALIGN(0x1) : {
|
||||
*(.module_license)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
} :text
|
||||
.data ALIGN(0x1) : {
|
||||
*(.data .data.*)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
_edata = .;
|
||||
} :text
|
||||
.bss ALIGN(0x1) : {
|
||||
__bss_start = .;
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
_end = .;
|
||||
} :text
|
||||
/DISCARD/ : {
|
||||
*(.interp)
|
||||
*(.note*)
|
||||
*(.comment)
|
||||
*(.build-id)
|
||||
}
|
||||
}
|
||||
61
configure.ac
61
configure.ac
@@ -34,7 +34,7 @@ dnl "TARGET_" (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for
|
||||
dnl the target type. See INSTALL for full list of variables and
|
||||
dnl description of the relationships between them.
|
||||
|
||||
AC_INIT([GRUB],[2.14~rc1],[bug-grub@gnu.org])
|
||||
AC_INIT([GRUB],[2.15],[bug-grub@gnu.org])
|
||||
|
||||
AS_CASE(["$ERROR_PLATFORM_NOT_SUPPORT_SSP"],
|
||||
[n | no | nO | N | No | NO], [ERROR_PLATFORM_NOT_SUPPORT_SSP=no],
|
||||
@@ -1454,13 +1454,16 @@ if test x$grub_cv_target_cc_link_format = x-arch,i386 || test x$grub_cv_target_c
|
||||
TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
|
||||
TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
|
||||
TARGET_IMG_BASE_LDOPT="-Wl,-image_base"
|
||||
TARGET_IMG_BASE_LDOPT_ARG_SEP=","
|
||||
TARGET_LDFLAGS_OLDMAGIC=""
|
||||
elif test x$grub_cv_target_cc_link_format = x-mi386pe || test x$grub_cv_target_cc_link_format = x-mi386pep ; then
|
||||
TARGET_APPLE_LINKER=0
|
||||
TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
|
||||
TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/i386-cygwin-img-ld.sc"
|
||||
TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/i386-cygwin-img.lds"
|
||||
TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
|
||||
TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/i386-cygwin-img-ld.sc"
|
||||
TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/i386-cygwin-img.lds"
|
||||
TARGET_IMG_BASE_LDOPT="-Wl,--defsym=_grub_text_base"
|
||||
TARGET_IMG_BASE_LDOPT_ARG_SEP="="
|
||||
TARGET_IMG_CFLAGS=
|
||||
else
|
||||
TARGET_APPLE_LINKER=0
|
||||
@@ -1468,6 +1471,27 @@ else
|
||||
TARGET_IMG_LDSCRIPT=
|
||||
TARGET_IMG_LDFLAGS='-Wl,-N'
|
||||
TARGET_IMG_LDFLAGS_AC='-Wl,-N'
|
||||
if test "x$target_cpu-$platform" != "xi386-pc"; then
|
||||
AX_CHECK_LINK_FLAG([-Wl,--image-base,0],
|
||||
[TARGET_IMG_BASE_LDOPT="-Wl,--image-base,0 -Wl,-Ttext"],
|
||||
[TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"],
|
||||
[],
|
||||
[AC_LANG_SOURCE([
|
||||
asm (".globl start; start:");
|
||||
asm (".globl _start; _start:");
|
||||
asm (".globl __start; __start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);
|
||||
])])
|
||||
TARGET_IMG_BASE_LDOPT_ARG_SEP=","
|
||||
else
|
||||
TARGET_IMG_BASE_LDOPT="-Wl,--defsym=_grub_text_base"
|
||||
TARGET_IMG_BASE_LDOPT_ARG_SEP="="
|
||||
TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/i386-pc-kernel.lds"
|
||||
TARGET_IMG_LDFLAGS="${TARGET_IMG_LDFLAGS} -Wl,-T${TARGET_IMG_LDSCRIPT}"
|
||||
TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/i386-pc-kernel.lds"
|
||||
fi
|
||||
TARGET_IMG_CFLAGS=
|
||||
fi
|
||||
|
||||
@@ -1792,24 +1816,7 @@ LIBS=""
|
||||
# Defined in acinclude.m4.
|
||||
grub_ASM_USCORE
|
||||
grub_PROG_TARGET_CC
|
||||
|
||||
# The error message produced by autoconf if autoconf-archive is not installed is
|
||||
# quite misleading and not very helpful. So, try point people in the right direction.
|
||||
m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. You must install it to generate the configure script.])])
|
||||
|
||||
if test "x$TARGET_APPLE_LINKER" != x1 ; then
|
||||
AX_CHECK_LINK_FLAG([-Wl,--image-base,0x400000],
|
||||
[TARGET_IMG_BASE_LDOPT="-Wl,--image-base"],
|
||||
[TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"],
|
||||
[],
|
||||
[AC_LANG_SOURCE([
|
||||
asm (".globl start; start:");
|
||||
asm (".globl _start; _start:");
|
||||
asm (".globl __start; __start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);
|
||||
])])
|
||||
grub_PROG_OBJCOPY_ABSOLUTE
|
||||
fi
|
||||
grub_PROG_LD_BUILD_ID_NONE
|
||||
@@ -1817,7 +1824,18 @@ if test "x$target_cpu" = xi386; then
|
||||
if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
|
||||
if test ! -z "$TARGET_IMG_LDSCRIPT"; then
|
||||
# Check symbols provided by linker script.
|
||||
CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},0x8000"
|
||||
target_img_base_ld="${TARGET_IMG_BASE_LDOPT}"
|
||||
case "$target_img_base_ld" in
|
||||
*_grub_text_base)
|
||||
target_img_base_ld="${target_img_base_ld}="
|
||||
;;
|
||||
*)
|
||||
target_img_base_ld="${target_img_base_ld},"
|
||||
;;
|
||||
esac
|
||||
target_img_base_ld="${target_img_base_ld}0x8000"
|
||||
CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${target_img_base_ld}"
|
||||
target_img_base_ld=""
|
||||
fi
|
||||
grub_CHECK_BSS_START_SYMBOL
|
||||
grub_CHECK_END_SYMBOL
|
||||
@@ -2419,6 +2437,7 @@ AC_SUBST(TARGET_CCASFLAGS)
|
||||
AC_SUBST(TARGET_IMG_LDFLAGS)
|
||||
AC_SUBST(TARGET_IMG_CFLAGS)
|
||||
AC_SUBST(TARGET_IMG_BASE_LDOPT)
|
||||
AC_SUBST(TARGET_IMG_BASE_LDOPT_ARG_SEP)
|
||||
AC_SUBST(TARGET_APPLE_LINKER)
|
||||
|
||||
AC_SUBST(HOST_CFLAGS)
|
||||
|
||||
@@ -10,6 +10,7 @@ transform_data = {
|
||||
installdir = noinst;
|
||||
name = genmod.sh;
|
||||
common = genmod.sh.in;
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
};
|
||||
|
||||
transform_data = {
|
||||
@@ -82,21 +83,21 @@ kernel = {
|
||||
riscv64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version -R .eh_frame';
|
||||
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x9000';
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x9000';
|
||||
i386_coreboot_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
|
||||
i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x9000';
|
||||
i386_multiboot_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000';
|
||||
i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x9000';
|
||||
i386_ieee1275_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_ieee1275_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x10000';
|
||||
i386_ieee1275_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x10000';
|
||||
i386_xen_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0';
|
||||
i386_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0';
|
||||
x86_64_xen_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
x86_64_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0';
|
||||
i386_xen_pvh_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_xen_pvh_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x100000';
|
||||
i386_xen_pvh_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x100000';
|
||||
|
||||
mips_loongson_ldflags = '-Wl,-Ttext,0x80200000';
|
||||
powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
|
||||
@@ -450,10 +451,10 @@ image = {
|
||||
sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S;
|
||||
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x7C00';
|
||||
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_BOOT_MACHINE_LINK_ADDR)';
|
||||
i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)$(GRUB_BOOT_MACHINE_LINK_ADDR)';
|
||||
i386_qemu_ccasflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
|
||||
|
||||
/* The entry point for a.out binaries on sparc64 starts
|
||||
@@ -478,7 +479,7 @@ image = {
|
||||
cppflags = '-DHYBRID_BOOT=1';
|
||||
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x7C00';
|
||||
|
||||
objcopyflags = '-O binary';
|
||||
enable = i386_pc;
|
||||
@@ -489,7 +490,7 @@ image = {
|
||||
|
||||
i386_pc = boot/i386/pc/cdboot.S;
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x7C00';
|
||||
|
||||
sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S;
|
||||
|
||||
@@ -509,7 +510,7 @@ image = {
|
||||
i386_pc = boot/i386/pc/pxeboot.S;
|
||||
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x7C00';
|
||||
|
||||
objcopyflags = '-O binary';
|
||||
enable = i386_pc;
|
||||
@@ -520,7 +521,7 @@ image = {
|
||||
i386_pc = boot/i386/pc/diskboot.S;
|
||||
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8000';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x8000';
|
||||
|
||||
sparc64_ieee1275 = boot/sparc64/ieee1275/diskboot.S;
|
||||
sparc64_ieee1275_ldflags = '-Wl,-Ttext=0x4200';
|
||||
@@ -536,7 +537,7 @@ image = {
|
||||
i386_pc = boot/i386/pc/lnxboot.S;
|
||||
|
||||
i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x6000';
|
||||
i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x6000';
|
||||
|
||||
objcopyflags = '-O binary';
|
||||
enable = i386_pc;
|
||||
@@ -578,7 +579,7 @@ image = {
|
||||
i386_pc_nodist = rs_decoder.h;
|
||||
|
||||
objcopyflags = '-O binary';
|
||||
ldflags = '$(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200';
|
||||
ldflags = '$(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT)$(TARGET_IMG_BASE_LDOPT_ARG_SEP)0x8200';
|
||||
enable = i386_pc;
|
||||
};
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ badram_iter (grub_uint64_t addr, grub_uint64_t size,
|
||||
*/
|
||||
while (high - low > 1)
|
||||
{
|
||||
cur = (low + high) / 2;
|
||||
cur = low + (high - low) / 2;
|
||||
if (fill_mask (entry, cur) >= addr)
|
||||
high = cur;
|
||||
else
|
||||
|
||||
@@ -488,8 +488,11 @@ check_hba_identifiers (const char *sysfs_path, int *vendor, int *device_id)
|
||||
static void
|
||||
check_sas (const char *sysfs_path, int *tgt, unsigned long int *sas_address)
|
||||
{
|
||||
char *ed = strstr (sysfs_path, "end_device");
|
||||
char *p, *q, *path;
|
||||
const char *ed = strstr (sysfs_path, "end_device");
|
||||
int p_len;
|
||||
int ed_len;
|
||||
const char *q;
|
||||
char *path;
|
||||
char phy[21];
|
||||
int fd;
|
||||
size_t path_size;
|
||||
@@ -498,20 +501,16 @@ check_sas (const char *sysfs_path, int *tgt, unsigned long int *sas_address)
|
||||
return;
|
||||
|
||||
/* SAS devices are identified using disk@$PHY_ID */
|
||||
p = xstrdup (sysfs_path);
|
||||
ed = strstr(p, "end_device");
|
||||
if (!ed)
|
||||
return;
|
||||
|
||||
q = ed;
|
||||
while (*q && *q != '/')
|
||||
q++;
|
||||
*q = '\0';
|
||||
p_len = (int) (q - sysfs_path);
|
||||
ed_len = (int) (q - ed);
|
||||
|
||||
path_size = (strlen (p) + strlen (ed)
|
||||
+ sizeof ("%s/sas_device/%s/phy_identifier"));
|
||||
path_size = (p_len + ed_len + sizeof ("/sas_device//phy_identifier"));
|
||||
path = xmalloc (path_size);
|
||||
snprintf (path, path_size, "%s/sas_device/%s/phy_identifier", p, ed);
|
||||
snprintf (path, path_size, "%.*s/sas_device/%.*s/phy_identifier", p_len,
|
||||
sysfs_path, ed_len, ed);
|
||||
fd = open (path, O_RDONLY);
|
||||
if (fd < 0)
|
||||
grub_util_error (_("cannot open `%s': %s"), path, strerror (errno));
|
||||
@@ -524,7 +523,8 @@ check_sas (const char *sysfs_path, int *tgt, unsigned long int *sas_address)
|
||||
|
||||
sscanf (phy, "%d", tgt);
|
||||
|
||||
snprintf (path, path_size, "%s/sas_device/%s/sas_address", p, ed);
|
||||
snprintf (path, path_size, "%.*s/sas_device/%.*s/sas_address", p_len,
|
||||
sysfs_path, ed_len, ed);
|
||||
fd = open (path, O_RDONLY);
|
||||
if (fd < 0)
|
||||
grub_util_error (_("cannot open `%s': %s"), path, strerror (errno));
|
||||
@@ -535,7 +535,6 @@ check_sas (const char *sysfs_path, int *tgt, unsigned long int *sas_address)
|
||||
sscanf (phy, "%lx", sas_address);
|
||||
|
||||
free (path);
|
||||
free (p);
|
||||
close (fd);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/i386/pc/int_types.h>
|
||||
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
void EXPORT_FUNC (grub_bios_interrupt) (grub_uint8_t intno,
|
||||
struct grub_bios_int_registers *regs)
|
||||
__attribute__ ((regparm(3)));
|
||||
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
extern struct grub_i386_idt *EXPORT_VAR(grub_realidt);
|
||||
#endif
|
||||
|
||||
|
||||
53
m4/ax_check_link_flag.m4
Normal file
53
m4/ax_check_link_flag.m4
Normal file
@@ -0,0 +1,53 @@
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given FLAG works with the linker or gives an error.
|
||||
# (Warnings, however, are ignored)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
|
||||
# when the check is done. The check is thus made with the flags: "LDFLAGS
|
||||
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
|
||||
# issue an error when a bad flag is given.
|
||||
#
|
||||
# INPUT gives an alternative input source to AC_LINK_IFELSE.
|
||||
#
|
||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
||||
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 6
|
||||
|
||||
AC_DEFUN([AX_CHECK_LINK_FLAG],
|
||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
|
||||
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
|
||||
ax_check_save_flags=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS $4 $1"
|
||||
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
||||
[AS_VAR_SET(CACHEVAR,[no])])
|
||||
LDFLAGS=$ax_check_save_flags])
|
||||
AS_VAR_IF(CACHEVAR,yes,
|
||||
[m4_default([$2], :)],
|
||||
[m4_default([$3], :)])
|
||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||
])dnl AX_CHECK_LINK_FLAGS
|
||||
@@ -70,7 +70,7 @@ char *
|
||||
grub_util_guess_bios_drive (const char *orig_path)
|
||||
{
|
||||
char *canon;
|
||||
char *ptr;
|
||||
const char *ptr;
|
||||
canon = grub_canonicalize_file_name (orig_path);
|
||||
if (!canon)
|
||||
return NULL;
|
||||
@@ -99,7 +99,7 @@ char *
|
||||
grub_util_guess_efi_drive (const char *orig_path)
|
||||
{
|
||||
char *canon;
|
||||
char *ptr;
|
||||
const char *ptr;
|
||||
canon = grub_canonicalize_file_name (orig_path);
|
||||
if (!canon)
|
||||
return NULL;
|
||||
@@ -128,7 +128,7 @@ char *
|
||||
grub_util_guess_baremetal_drive (const char *orig_path)
|
||||
{
|
||||
char *canon;
|
||||
char *ptr;
|
||||
const char *ptr;
|
||||
canon = grub_canonicalize_file_name (orig_path);
|
||||
if (!canon)
|
||||
return NULL;
|
||||
|
||||
@@ -138,12 +138,12 @@ read_dep_list (FILE *fp)
|
||||
static char *
|
||||
get_module_name (const char *str)
|
||||
{
|
||||
char *base;
|
||||
char *ext;
|
||||
const char *base;
|
||||
const char *ext;
|
||||
|
||||
base = strrchr (str, '/');
|
||||
if (! base)
|
||||
base = (char *) str;
|
||||
base = str;
|
||||
else
|
||||
base++;
|
||||
|
||||
@@ -164,9 +164,9 @@ get_module_name (const char *str)
|
||||
static char *
|
||||
get_module_path (const char *prefix, const char *str)
|
||||
{
|
||||
char *dir;
|
||||
const char *dir;
|
||||
char *base;
|
||||
char *ext;
|
||||
const char *ext;
|
||||
char *ret;
|
||||
|
||||
ext = strrchr (str, '.');
|
||||
|
||||
Reference in New Issue
Block a user