From patchwork Mon Jan 23 13:44:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1730465 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EUwmbQ5x; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=terefe.re header.i=@terefe.re header.a=rsa-sha256 header.s=default header.b=0pC1ix76; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P0rxn4q0Nz23gd for ; Tue, 24 Jan 2023 00:47:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1nbJ4KRoGuZbOA5oQrSSA0W9r/V2eA6rt9DBs1BJpo8=; b=EUwmbQ5xKnEgjs xFqJbXaBUZWGx1bonVb7LnrRMG/cN1NjNzV7RWqjniTvyeK5Unis3OI6BagAzJI6vJJh4pB30jLbY 3hFcTAIMUzgnHRk5NmdDoILGpqbx5EhVwYdzu6zHvnhIkZNookbHaiWspq5PHzMZJ0uu47Dvci7oQ cjmzIy+sJE9rWGj0aamGc+UTNm/MRIz7gb7knDqwkQ3uQF8E80R1OZpj+7mPwVABP4qoQFdIYauFE VhYJekodAebx+poL2U29qINLmLasGh5JpTtWhiiQu+JtPhN3osbQxwaHVYiV70CmgUR/6eCJyNkQn vLXsQ3UJ7sqrLT5WNhkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJx8S-00HOuz-AY; Mon, 23 Jan 2023 13:45:20 +0000 Received: from mail.terefe.re ([5.255.96.200]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJx8G-00HOs1-Jl for openwrt-devel@lists.openwrt.org; Mon, 23 Jan 2023 13:45:10 +0000 Received: from localhost.localdomain (unknown [212.106.161.74]) by mail.terefe.re (Postfix) with ESMTPSA id 53F1920C7B; Mon, 23 Jan 2023 14:45:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=terefe.re; s=default; t=1674481502; bh=yDYBuf/PFxBFvGqGxYmmtFOgIO2/g8aQ7i/+lC6/GWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0pC1ix76YQK8zsCUvAPy7h/honm65PhFD0OvJubCnlBP75F9u+z3pA/N44oRMRDuH bR8TD3JyPEv4IDdVvzTK+ihnNq10bMCiPdDDdq738OTFxcEv1WfVSb7oSpd849VnXd FL+9jtcuTIf08cYTvTs2VpWr1c4l06NTNzDh1FV66iZj7Ic7ryPxYtS2jcHDeGv4X5 RSguYagDCuzqhhfFba5GJouIe55tLtAJBPSOLJVS5sS0wk2VNtxjG9blb3fqTL1mns P046fDzrnQCZGOOLXCMfJoFa2t+efTNRv534/2NLT0LwHZdb+DA4Nf1s0wqoGArBQL g7+XLMru6dYLw== From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Cc: Tomasz Maciej Nowak Subject: [PATCH 2/2] grub2: re-add test module Date: Mon, 23 Jan 2023 14:44:50 +0100 Message-Id: <20230123134450.10623-2-tmn505@terefe.re> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230123134450.10623-1-tmn505@terefe.re> References: <20230123134450.10623-1-tmn505@terefe.re> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230123_054508_842303_F2E304DA X-CRM114-Status: GOOD ( 12.05 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Tomasz Maciej Nowak 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 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Tomasz Maciej Nowak 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 --- 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 c4cc43de2e60..7d6cfd539594 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 \