[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 10/11] FSF: hardware: disable option roms: improve flashrom co
From: |
Denis 'GNUtoo' Carikli |
Subject: |
[PATCH v1 10/11] FSF: hardware: disable option roms: improve flashrom commands. |
Date: |
Tue, 5 Nov 2024 15:14:32 +0100 |
Using iomem=relaxed is potentially dangerous[1] and not very
convenient (it requires to add a kernel parameter and reboot if it's
not already done).
[1]The lpc_ich driver claims the PCI device that flashrom uses. Using
iomem=relaxed enables the kernel and flashrom to step on each other
toes which is extremely dangerous if that happens. A better
solution is simply to remove the lpc_ich driver while the flashing
is being done.
In addition on some ThinkPads since quite some time, flashrom will
complain about "multiple flash chip definitions" due to a vendor
having reused the same device ID for different chips.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
.../disable-option-roms-with-cbfstool.mdwn | 22 ++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/sviki/fsf/hardware/disable-option-roms-with-cbfstool.mdwn
b/sviki/fsf/hardware/disable-option-roms-with-cbfstool.mdwn
index ce803a6..06cc1fa 100644
--- a/sviki/fsf/hardware/disable-option-roms-with-cbfstool.mdwn
+++ b/sviki/fsf/hardware/disable-option-roms-with-cbfstool.mdwn
@@ -57,10 +57,27 @@ Downloading the rom from the machine itself is a good
approach so you don't
have to worry about **setting the MAC address** to a non-generic value before
writing the patched rom.
-If you are able to boot to GNU/Linux on the device:
+If you are able to boot to GNU/Linux on the device you can use flashrom.
+
+To do that, first if you are on Intel computer, you need to run the
+following command:
+
+ rmmod lpc_ich
+
+And then you can simply use the usual flashrom command:
flashrom -p internal -r gnuboot.rom
+Or if you are on a ThinkPad X200 with a flash chip of 8MiB and that it
+complains about multiple flash chip definitions:
+
+ flashrom -p internal -c MX25L6405D -r gnuboot.rom
+
+And if you have the same issue and that you are on ThinkPad X200 with
+a flash chip of 4MiB instead:
+
+ flashrom -p internal -c MX25L3205D -r gnuboot.rom
+
## patch the LibreBoot or GNU Boot ROM
> *Controls option ROM execution for roms found on PCI devices (as opposed to
@@ -96,4 +113,7 @@ If you are booted into GNU/Linux on the device:
flashrom -p internal -w gnuboot.rom
+and if it complains about multiple flash chip definitions, see the
+commands above for the ThinkPad X200.
+
Do a shutdown, then a cold boot.
--
2.46.0
- [PATCH v1 00/11] FSF sysadmin wiki patches for GPUs, Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 06/11] FSF: hardware: graphics-card: Nvidia: Warn about nonfree software., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 08/11] FSF: hardware: graphics-card: Add section about other card vendors., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 10/11] FSF: hardware: disable option roms: improve flashrom commands.,
Denis 'GNUtoo' Carikli <=
- [PATCH v1 02/11] FSF: explain how to test contributions., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 01/11] FSF: clarify how to contribute., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 04/11] FSF: hardware: graphics-card: Intel: Update and clarify., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 03/11] FSF: hardware: graphics-card: Intel: fix typo., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 05/11] FSF: hardware: graphics-card: Update AMD status., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 07/11] FSF: hardware: graphics-card: Add possible lead with nouveau instabilities., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 11/11] FSF: hardware: disable option roms: clarify shutdown / cold boot., Denis 'GNUtoo' Carikli, 2024/11/07
- [PATCH v1 09/11] FSF: hardware: disable option roms: update and point hardware/graphics-card to it., Denis 'GNUtoo' Carikli, 2024/11/07