FAQ: Difference between revisions
Jump to navigation
Jump to search
Nico@flashrom.org/ (talk) ("Nico@flashrom.org/: add question about linux_spi and spispeed") |
("nico.h@gmx.de: Rename => Supported *H*ardware") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== | == Flashprog doesn't seem to work on my board, what can I do? == | ||
* First of all, check if your chipset, ROM chip, and mainboard are supported (see [[Supported | * First of all, check if your chipset, ROM chip, and mainboard are supported (see [[Supported Hardware]], or use '''flashprog -L'''). | ||
* 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 | * If you run flashprog on Linux and see messages about /dev/mem, see next question. | ||
* If you run | * If you run flashprog 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# | * See [[Easy projects#Test_flashprog|this page]] for instructions on how to test flashprog support properly (this may be risky, make sure you have a working backup flash chip). | ||
== What can I do about ''/dev/mem'' errors? == | == What can I do about ''/dev/mem'' errors? == | ||
* If | * If flashprog 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. | ** 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 if the resource is unknown to the kernel or a conflicting kernel driver reserved it. On Intel systems, this is most often ''lpc_ich'', so '''''modprobe -r lpc_ich''''' can help. A more invasive solution is to try again after rebooting with '''''iomem=relaxed''''' in the 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. | ** 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''': | * If it tells you '/dev/mem mmap failed: ''Resource temporarily unavailable''': | ||
** This may be an issue with PAT (e.g. if the memory | ** This may be an issue with PAT (e.g. if the memory flashprog 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': | * If you see this message 'Can't mmap memory using /dev/mem: Invalid argument': | ||
** Your | ** Your flashprog is very old, better update it. If the issue persists, try the kernel options mentioned above. | ||
* Generally, if your version of | * Generally, if your version of flashprog is very old, an update might help. Flashprog has less strict requirements now and works on more systems without having to change the kernel. | ||
== I'm using | == I'm using flashprog 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 | * 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 flashprog(8) manpage. | ||
* Generally, [[Common problems]] and [[ISP]] may apply. | * Generally, [[Common problems]] and [[ISP]] may apply. | ||
== How do I use | == How do I use flashprog? == | ||
Please see the flashprog(8) manpage (e.g. execute `'''''man flashprog'''''`). |
Latest revision as of 17:46, 3 December 2023
Flashprog doesn't seem to 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 flashprog -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 flashprog on Linux and see messages about /dev/mem, see next question.
- If you run flashprog 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 flashprog support properly (this may be risky, make sure you have a working backup flash chip).
What can I do about /dev/mem errors?
- If flashprog 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 if the resource is unknown to the kernel or a conflicting kernel driver reserved it. On Intel systems, this is most often lpc_ich, so modprobe -r lpc_ich can help. A more invasive solution is to try again after rebooting with iomem=relaxed in the 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 flashprog 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 flashprog is very old, better update it. If the issue persists, try the kernel options mentioned above.
- Generally, if your version of flashprog is very old, an update might help. Flashprog has less strict requirements now and works on more systems without having to change the kernel.
I'm using flashprog 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 flashprog(8) manpage.
- Generally, Common problems and ISP may apply.
How do I use flashprog?
Please see the flashprog(8) manpage (e.g. execute `man flashprog`).