- 01 Apr, 2022 1 commit
-
-
David Johnson authored
This is only for Linux for now. And we take the shortcut of assuming that the "root" we are given is perhaps an EFI sys part, and if it is, and if the default loader exists, we chainload it.
-
- 29 Apr, 2019 1 commit
-
-
Mike Hibler authored
-
- 01 Mar, 2019 3 commits
-
-
David Johnson authored
-
David Johnson authored
-
David Johnson authored
-
- 27 Feb, 2019 7 commits
-
-
David Johnson authored
-
David Johnson authored
-
David Johnson authored
-
David Johnson authored
-
David Johnson authored
-
David Johnson authored
-
David Johnson authored
We only want to have to hardcode the console info in the initial configfile, not in any network-loaded (bootinfo) config files. Those can now reference this variable in the linux command line to get the console set according to the initial grub2pxe configuration.
-
- 16 Aug, 2018 1 commit
-
-
David Johnson authored
-
- 16 Mar, 2018 1 commit
-
-
Mike Hibler authored
-
- 14 Mar, 2018 3 commits
-
-
Eric Snowberg authored
Split up some of the functionality in grub_machine_get_bootlocation into grub_ieee1275_get_boot_dev. This will allow for code reuse in a follow on patch. Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
C. Masloch authored
These fields must reflect the ROM-BIOS's geometry for CHS-based loaders to correctly load their next stage. Most loaders do not query the ROM-BIOS (Int13.08), relying on the BPB fields to hold the correct values already. Tested with lDebug booted in qemu via grub2's FreeDOS direct loading support, refer to https://bitbucket.org/ecm/ldosboot + https://bitbucket.org/ecm/ldebug (For this test, lDebug's iniload.asm must be assembled with -D_QUERY_GEOMETRY=0 to leave the BPB values provided by grub.) Signed-off-by:
C. Masloch <pushbx@38.de> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Matthew S. Turnbull authored
Add support for multiple, shared, early initrd images. These early images will be loaded in the order declared, and all will be loaded before the initrd image. While many classes of data can be provided by early images, the immediate use case would be for distributions to provide CPU microcode to mitigate the Meltdown and Spectre vulnerabilities. There are two environment variables provided for declaring the early images. * GRUB_EARLY_INITRD_LINUX_STOCK is for the distribution declare images that are provided by the distribution or installed packages. If undeclared, this will default to a set of common microcode image names. * GRUB_EARLY_INITRD_LINUX_CUSTOM is for user created images. User images will be loaded after the stock images. These separate configurations allow the distribution and user to declare different image sets without clobbering each other. This also makes a minor update to ensure that UUID partition labels stay disabled when no initrd image is found, even if early images are present. This is a continuation of a previous patch published by Christian Hesse in 2016: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00025.html Down stream Gentoo bug: https://bugs.gentoo.org/645088 Signed-off-by:
Robin H. Johnson <robbat2@gentoo.org> Signed-off-by:
Matthew S. Turnbull <sparky@bluefang-logic.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
- 07 Mar, 2018 1 commit
-
-
Eric Snowberg authored
The grub_mkimage_load_image function (commit 7542af69 , mkimage: refactor a bunch of section data into a struct.) introduces a build regression on SPARC: cc1: warnings being treated as errors In file included from util/grub-mkimage32.c:23: util/grub-mkimagexx.c: In function 'grub_mkimage_load_image32': util/grub-mkimagexx.c:1968: error: missing initializer util/grub-mkimagexx.c:1968: error: (near initialization for 'smd.sections') make[2]: *** [util/grub_mkimage-grub-mkimage32.o] Error 1 Initialize the entire section_metadata structure. Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
- 05 Mar, 2018 17 commits
-
-
dann frazier authored
This can cause an issue where GRUB is trying to display both a text and graphical menu on the display at the same time, resulting in a flickering effect when e.g. scrolling quickly through a menu (LP: #1752767). Revert for now while we look for a better solution for the original issue. This reverts commit 52ef7b23 . Signed-off-by:
dann frazier <dann.frazier@canonical.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Eric Snowberg authored
Return the 64bit number of blocks of storage associated with the device or instance. Where a "block" is a unit of storage consisting of the number of bytes returned by the package's "block-size" method. If the size cannot be determined, or if the number of blocks exceeds the range return -1. Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Eric Snowberg authored
Return the number of blocks of storage associated with the device or instance. Where a "block" is a unit of storage consisting of the number of bytes returned by the package's "block-size" method. If the size cannot be determined, the #blocks method returns the maximum unsigned integer (which, because of Open Firmware's assumption of two's complement arithmetic, is equivalent to the signed number -1). If the number of blocks exceeds the range of an unsigned number, return 0 to alert the caller to try the #blocks64 command. Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Eric Snowberg authored
IEEE Std 1275-1994 Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices 3.8.3 deblocker support package Any package that uses the "deblocker" support package must define the following method, which the deblocker uses as a low-level interface to the device block-size ( -- block-len ) Return "granularity" for accesses to this device. Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Daniel Kiper authored
IEEE 1275-1994 Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices E.3.2.2 Bus-specific methods for bus nodes A package implementing the scsi-2 device type shall implement the following bus-specific method: no-data-command ( cmd-addr -- error? ) Executes a simple SCSI command, automatically retrying under certain conditions. cmd-addr is the address of a 6-byte command buffer containing an SCSI command that does not have a data transfer phase. Executes the command, retrying indefinitely with the same retry criteria as retry-command. error? is nonzero if an error occurred, zero otherwise. NOTE no-data-command is a convenience function. It provides no capabilities that are not present in retry-command, but for those commands that meet its restrictions, it is easier to use. Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Eric Snowberg authored
IEEE 1275-1994 Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices E.3.2.2 Bus-specific methods for bus nodes A package implementing the scsi-2 device type shall implement the following bus-specific method: set-address ( unit# target# -- ) Sets the SCSI target number (0x0..0xf) and unit number (0..7) to which subsequent commands apply. This function is for devices with #address-cells == 2 Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Eric Snowberg authored
Convert physical address to text unit-string. Convert phys.lo ... phys-high, the numerical representation, to unit-string, the text string representation of a physical address within the address space defined by this device node. The number of cells in the list phys.lo ... phys.hi is determined by the value of the #address-cells property of this node. This function is for devices with #address-cells == 4 Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Eric Snowberg authored
decode-unit ( addr len -- phys.lo ... phys.hi ) Convert text unit-string to physical address. Convert unit-string, the text string representation, to phys.lo ... phys.hi, the numerical representation of a physical address within the address space defined by this device node. The number of cells in the list phys.lo ... phys.hi is determined by the value of the #address-cells property of this node. This function is for devices with #address-cells == 4 Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Eric Snowberg authored
Limit NVMe of_path_of_nvme to just SPARC hardware for now. It has been found that non-Open Firmware hardware platforms can some how access this function. Signed-off-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
John Paul Adrian Glaubitz authored
The of_path_of_nvme function (commit 2391d579 , ieee1275: add nvme support within ofpath) introduced a functional regression: On systems which are not based on Open Firmware but have at least one NVME device, find_obppath will return NULL and thus trying to append the disk name to of_path will result in a crash. The proper behavior of of_path_of_nvme is, however, to just return NULL in such cases, like other users of find_obppath, such as of_path_of_scsi. Signed-off-by:
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Reviewed-by:
Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Peter Jones authored
This way debuginfo built from the .module will still include this information, but the final result won't have the data we don't actually need in the modules, either on-disk, loaded at runtime, or in prebuilt images. Signed-off-by:
Peter Jones <pjones@redhat.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Peter Jones authored
Some versions of gcc include a plugin called "annobin", and in some build systems this is enabled by default. This plugin creates special ELF note sections to track which ABI-breaking features are used by a binary, as well as a series of relocations to annotate where. If grub is compiled with this feature, then when grub-mkimage translates the binary to another file format which does not strongly associate relocation data with sections (i.e. when platform is *-efi), these relocations appear to be against the .text section rather than the original note section. When the binary is loaded by the PE runtime loader, hilarity ensues. This issue is not necessarily limited to the annobin, but could arise any time there are relocations in sections that are not represented in grub-mkimage's output. This patch seeks to avoid this issue by only including relocations that refer to sections which will be included in the final binary. As an aside, this should also obviate the need to avoid -funwind-tables, -fasynchronous-unwind-tables, and any sections similar to .eh_frame in the future. I've tested it on x86-64-efi with the following gcc command line options (as recorded by -grecord-gcc-flags), but I still need to test the result on some other platforms that have been problematic in the past (especially ARM Aarch64) before I feel comfortable making changes to the configure.ac bits: GNU C11 7.2.1 20180116 (Red Hat 7.2.1-7) -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -mno-stack-arg-probe -mcmodel=large -mno-red-zone -m64 -mtune=generic -march=x86-64 -g3 -Os -freg-struct-return -fno-stack-protector -ffreestanding -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -fstack-clash-protection -fno-ident -fplugin=annobin Signed-off-by:
Peter Jones <pjones@redhat.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Peter Jones authored
This basically moves a bunch of the section information we pass around a lot into a struct, and passes a pointer to a single one of those instead. This shouldn't change the binary file output or the "grub-mkimage -v" output in any way. Signed-off-by:
Peter Jones <pjones@redhat.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Peter Jones authored
This puts both kinds of address initialization at the same place, and also lets us iterate through the section list one time fewer. Signed-off-by:
Peter Jones <pjones@redhat.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Peter Jones authored
This renames some things: - the "strtab" and "strtab_section" in relocate_symbols are changed to "symtab" instead, so as to be less confusing when "strtab" is moved to a struct in a later patch. - The places where we pass section_vaddresses to functions are changed to also be called section_vaddresses"inside those functions, so I get less confused when I put addresses and vaddresses in a struct in a later patch. Signed-off-by:
Peter Jones <pjones@redhat.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Peter Jones authored
This makes it so you can treat grub-mkimagexx.c as a file you can build directly, so syntax checkers like vim's "syntastic" plugin, which uses "gcc -x c -fsyntax-only" to build it, will work. One still has to do whatever setup is required to make it pick the right include dirs, which -W options we use, etc., but this makes it so you can do the checking on the file you're editing, rather than on a different file. Signed-off-by:
Peter Jones <pjones@redhat.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Peter Jones authored
grub_aout_load() has a grub_file_t parameter, and depending on what order includes land in, it's sometimes not defined. This patch explicitly adds file.h to aout.h so that it will always be defined. Signed-off-by:
Peter Jones <pjones@redhat.com> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
- 26 Feb, 2018 1 commit
-
-
Joakim Bech authored
The of_path_of_nvme function (commit 2391d579 , ieee1275: add nvme support within ofpath) introduced a build regression: grub-core/osdep/linux/ofpath.c:365:21: error: comparison between pointer and zero character constant [-Werror=pointer-compare] if ((digit_string != '\0') && (*part_end == 'p')) Update digit_string to compare against the char instead of the pointer. Signed-off-by:
Joakim Bech <joakim.bech@linaro.org> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
- 23 Feb, 2018 4 commits
-
-
Leif Lindholm authored
<grub/machine/loader.h> (for machine arm/efi) and <grub/machine/kernel.h> (for machine arm/coreboot) will not always resolve (and will likely not be valid to) if pulled in when building non-native commands, such as host tools or the "file" command. So explicitly include them with their expanded pathnames. Signed-off-by:
Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Leif Lindholm authored
Use kernel header struct and magic definition to align (and coexist) with i386/arm64 ports. Signed-off-by:
Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Leif Lindholm authored
Change GRUB_ARM64_LINUX_MAGIC to GRUB_LINUX_ARM64_MAGIC_SIGNATURE. Signed-off-by:
Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-
Leif Lindholm authored
Rename struct grub_arm64_linux_kernel_header -> linux_arm64_kernel_header. Signed-off-by:
Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
-