[openwrt/openwrt] grub2: re-add test module

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 26 14:44:58 PST 2023


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bdd78897c33b25a4954f6e41e26f57bab5284129

commit bdd78897c33b25a4954f6e41e26f57bab5284129
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Mon Jan 23 14:44:50 2023 +0100

    grub2: re-add test module
    
    It seems more hardware needs early load of firmware when initialised
    to work properly (at least Intel hardware). One of previous case is CPU
    microcode, which this series[1] tried to change. The second one is Intel
    graphics IC, which needs firmware for controlling DMC circuit (switch
    conncted display to DC6 power state). As it stands, the i915 module is
    built-in and it seems the hardware can't cope with firmware loaded
    later from rootfs, it needs to be supplied when the module is loaded.
    Unfortunately we need bootloader to handle the load of firmware in this
    case, but as previously mentioned series[1], there was an error when
    initrd was hardcoded, instead of testing existence for it and then
    loading. To remedy this in later the 55b808e0c4be ('x86: image: add test
    module to bootloader') was commited. Which was later accidentally
    dropped when grub2 image creation was moved to packages. Therefore bring
    back test module, so we can test for cases of existing firmware in
    grub.cfg.
    
    1. https://patchwork.ozlabs.org/project/openwrt/cover/20181120162044.16371-1-tomek_n@o2.pl
    
    Fixes: 5a5df62d95f5 ("x86/grub2: move grub2 image creation to package")
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 package/boot/grub2/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index c4cc43de2e..7d6cfd5395 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -122,14 +122,14 @@ define Package/grub2/install
 		-O i386-pc \
 		-c $(PKG_BUILD_DIR)/grub-early.cfg \
 		-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
-		at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial vga
+		at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial test vga
 	$(STAGING_DIR_HOST)/bin/grub-mkimage \
 		-d $(PKG_BUILD_DIR)/grub-core \
 		-p /boot/grub \
 		-O i386-pc \
 		-c ./files/grub-early.cfg \
 		-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
-		at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial vga
+		at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial test vga
 	$(STAGING_DIR_HOST)/bin/grub-mkimage \
 		-d $(PKG_BUILD_DIR)/grub-core \
 		-p /boot/grub \
@@ -154,7 +154,7 @@ define Package/grub2-efi/install
 		-O $(CONFIG_ARCH)-efi \
 		-c $(PKG_BUILD_DIR)/grub-early.cfg \
 		-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \
-		at_keyboard boot chain configfile fat linux ls part_gpt reboot serial efi_gop efi_uga
+		at_keyboard boot chain configfile fat linux ls part_gpt reboot serial test efi_gop efi_uga
 	$(STAGING_DIR_HOST)/bin/grub-mkimage \
 		-d $(PKG_BUILD_DIR)/grub-core \
 		-p /boot/grub \




More information about the lede-commits mailing list