tech-volunteer-meeting
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]