FAQ: Difference between revisions

From flashrom
Jump to navigation Jump to search
(remove broken link to flashrom.8)
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
* If your board has a jumper for BIOS flash protection (check the manual), disable it.
* If your board has a jumper for BIOS flash protection (check the manual), disable it.
* Should your BIOS menu have a BIOS flash protection option, disable it.
* Should your BIOS menu have a BIOS flash protection option, disable it.
* If you run flashrom on a Linux system with kernels >= 2.6.27 there are two issues you have to check:
* If you run flashrom on Linux and see messages about /dev/mem, see next question.
** See next question: '''X86_PAT''' and '''nopat'''
** See next question: '''CONFIG_STRICT_DEVMEM'''
* If you run flashrom on OpenBSD, you might need to obtain raw access permission by setting '''securelevel=-1''' in '''/etc/rc.securelevel''' and rebooting, or rebooting into single user mode.
* If you run flashrom on OpenBSD, you might need to obtain raw access permission by setting '''securelevel=-1''' in '''/etc/rc.securelevel''' and rebooting, or rebooting into single user mode.


* See [[Easy projects#Test_flashrom|this page]] for instructions on how to test flashrom support properly (this may be risky, make sure you have a working backup flash chip).
* See [[Easy projects#Test_flashrom|this page]] for instructions on how to test flashrom support properly (this may be risky, make sure you have a working backup flash chip).


== I get 'Can't mmap memory using /dev/mem: Invalid argument' ==
== What can I do about ''/dev/mem'' errors? ==


* The easiest fix is to update to latest flashrom from svn. It has less strict requirements and works on more systems without having to change the kernel.
* If flashrom tells you '/dev/mem mmap failed: ''Operation not permitted''':
** Most common at the time of writing is a Linux kernel option, CONFIG_IO_STRICT_DEVMEM, that prevents even the root user from accessing hardware from user-space. Try again after rebooting with '''''iomem=relaxed''''' in your kernel command line.
** Some systems with incorrect memory reservations (e.g. E820 map) may have the same problem even with CONFIG_STRICT_DEVMEM. In that case '''''iomem=relaxed''''' in the kernel command line may help too.


* (Not needed for latest flashrom from svn) Please check that [http://www.coreboot.org/pipermail/coreboot/2008-December/043708.html your kernel doesn't have CONFIG_STRICT_DEVMEM set], as it will stop flashrom from working.
* If it tells you '/dev/mem mmap failed: ''Resource temporarily unavailable''':
** This may be an issue with PAT (e.g. if the memory flashrom tries to map is already mapped in an incompatible mode). Try again after rebooting with '''''nopat''''' in the kernel command line.


* Another poster reported that [http://www.coreboot.org/pipermail/coreboot/2008-December/043497.html CONFIG_X86_PAT will also stop flashrom from working]. Please try booting with the nopat kernel parameter to temporarily disable it.
* If you see this message 'Can't mmap memory using /dev/mem: Invalid argument':
** Your flashrom is very old, better update it. If the issue persists, try the kernel options mentioned above.


* With the Linux kernel version >= 4.4, CONFIG_IO_STRICT_DEVMEM can make flashrom stop working, in that case you can try adding "iomem=relaxed" to your kernel parameters.
* Generally, if your version of flashrom is very old, an update might help. Flashrom has less strict requirements now and works on more systems without having to change the kernel.
 
== I'm using flashrom with ''linux_spi'' and it doesn't find the chip. I've double checked all connections, what else can I try? ==
 
* In case you haven't set it already: The ''linux_spi'' driver has a '''''spispeed''''' parameter that should always be set to a reasonable speed (100kHz..10,000kHz, try lower frequencies first). Also see the flashrom(8) manpage.
 
* Generally, [[Common problems]] and [[ISP]] may apply.


== How do I use flashrom? ==
== How do I use flashrom? ==


Please see the [http://flashrom.org/trac/flashrom/browser/trunk/flashrom.8 flashrom(8)] manpage.
Please see the flashrom(8) manpage (e.g. execute `'''''man flashrom'''''`).


== Is there a flashrom Live CD? ==
== Is there a flashrom Live CD? ==


See [[Live CD]].
See [[Live CD]].

Revision as of 12:42, 31 December 2017

flashrom doesn't work on my board, what can I do?

  • First of all, check if your chipset, ROM chip, and mainboard are supported (see Supported hardware, or use flashrom -L).
  • If your board has a jumper for BIOS flash protection (check the manual), disable it.
  • Should your BIOS menu have a BIOS flash protection option, disable it.
  • If you run flashrom on Linux and see messages about /dev/mem, see next question.
  • If you run flashrom on OpenBSD, you might need to obtain raw access permission by setting securelevel=-1 in /etc/rc.securelevel and rebooting, or rebooting into single user mode.
  • See this page for instructions on how to test flashrom support properly (this may be risky, make sure you have a working backup flash chip).

What can I do about /dev/mem errors?

  • If flashrom tells you '/dev/mem mmap failed: Operation not permitted':
    • Most common at the time of writing is a Linux kernel option, CONFIG_IO_STRICT_DEVMEM, that prevents even the root user from accessing hardware from user-space. Try again after rebooting with iomem=relaxed in your kernel command line.
    • Some systems with incorrect memory reservations (e.g. E820 map) may have the same problem even with CONFIG_STRICT_DEVMEM. In that case iomem=relaxed in the kernel command line may help too.
  • If it tells you '/dev/mem mmap failed: Resource temporarily unavailable':
    • This may be an issue with PAT (e.g. if the memory flashrom tries to map is already mapped in an incompatible mode). Try again after rebooting with nopat in the kernel command line.
  • If you see this message 'Can't mmap memory using /dev/mem: Invalid argument':
    • Your flashrom is very old, better update it. If the issue persists, try the kernel options mentioned above.
  • Generally, if your version of flashrom is very old, an update might help. Flashrom has less strict requirements now and works on more systems without having to change the kernel.

I'm using flashrom with linux_spi and it doesn't find the chip. I've double checked all connections, what else can I try?

  • In case you haven't set it already: The linux_spi driver has a spispeed parameter that should always be set to a reasonable speed (100kHz..10,000kHz, try lower frequencies first). Also see the flashrom(8) manpage.

How do I use flashrom?

Please see the flashrom(8) manpage (e.g. execute `man flashrom`).

Is there a flashrom Live CD?

See Live CD.