FLASHPROG-WRITE-PROTECT(8)
π FLASHPROG-WRITE-PROTECT π
okay so bestie, this is the 8 section page for flashprog-write-protect, which is the utility for controlling write-protection settings on flash chips. it lives in the flashprog family, and honestly? it's giving "tiny tool, huge power". periodt.
β¨ NAME β¨
flashprog-write-protect β control write-protection settings of flash chips π«Ά
π¦ SYNOPSIS π¦
flashprog write-protect [status] <options>
flashprog write-protect list <options>
flashprog write-protect disable <options> [--temporary]
flashprog write-protect enable <options> [--temporary]
flashprog write-protect range <options> [--temporary] <start>,<len>
flashprog write-protect region <options> [--temporary] <region-name>
and the generic <options>? yeah they're these:
-p <programmername>[:<parameters>] [-c <chipname>]
[-V[V[V]]] [-o <logfile>] [-h]
and the layout <options> are these girls:
[(-l|--layout) <layout-file>|--fmap <fmap-file>|--fmap|--ifd]
πΈ DESCRIPTION πΈ
flashprog-write-protect is a utility for reading and writing the write-protection settings of flash chips. no cap. Currently, it supports only block protection of SPI NOR chips. that's the whole vibe rn, bestie. π
π OPERATIONS π
one operation per call, okay? just ONE. you can't stack them like a layered outfit. and status is the default operation, so if you say nothing, that's what you get. π
statusβ Shows the write-protection state, including the currently programmed protection range. it's the "so what's going on in there" girlie. β¨listβ Prints a list of write-protection ranges supported for the flash chip. window shopping, but for memory ranges.disableβ Disables write protection locks. The configured range usually stays as is, but it will be possible to override it. so the range is still sitting there, it's just not locked down anymore.enableβ Enables write protection locks. The write-protection range should be set before running theenableoperation. set the range FIRST, then lock it. order matters, bestie, it's the way thatβ¦ yeah. π₯range<start>,<len>β Configures the protected range.startand length specify the range in decimal, octal (0prefix), or hexadecimal (0xprefix) numbers of bytes. Any zero-length range will unprotect the entire flash (e.g.range 0,0). so0,0= full unprotect, noted, don't do that by accident πregion<region-name>β Configures the protected range, matching a region of the loaded layout (from a file or flash, see the respective option-descriptions inflashprog(8)for possible layout sources). yes, named regions, very main character energy. π
π OPTIONS π
All operations require the -p/--programmer option to be used (please see flashprog(8) for more information on programmer support and parameters). like, ALL of them. every single one. mandatory bestie.
-p,--programmer <name>[:<parameter>[,<parameter>]...]β Specify the programmer device. This is mandatory for all operations. Please see theflashprog(8)manual for a list of currently supported programmers and their parameters. π«Ά-c,--chip <chipname>β Probe only for the specified flash ROM chip. This option takes the chip name as printed byflashprog -Lwithout the vendor name as parameter. Please note that the chip name is case sensitive. yes it really is, don't @ me. π-V,--verboseβ More verbose output. This option can be supplied multiple times (max. 3 times, i.e.-VVV) for even more debug output. the way that three Vs is the ceilingβ¦ π¦-o,--output <logfile>β Save the full debug log to <logfile>. If the file already exists, it will be overwritten. This is the recommended way to gather logs fromflashprogbecause they will be verbose even if the on-screen messages are not verbose and don't require output redirection. obsessed with a log file ngl π-h,--helpβ Show a help text and exit. the little escape hatch. β¨(-l|--layout) <layout-file>,--fmap-file <fmap-file>,--fmap,--ifdβ Please see theflashrom(8)manual for information about layout files and other layout sources. (yes,flashrom(8). that's what it says. iykyk π§)--temporaryβ When the--temporaryoption is provided for any operation that alters the flash chip's configuration,flashprogwill attempt to write a temporary value that is not stored to flash. This requires special support by the flash chip for a volatile write status register command. The new value will be lost upon reset of the flash chip. Hence, it is futile to use this with external programmers that toggle power to the flash chip (e.g. Dediprog). so likeβ¦ temporary means TEMPORARY, bestie. π
β EXAMPLES β
just wanna print the current write-protection state of the internal BIOS flash? say less:
flashprog write-protect -p internal
or, if you're feeling formal:
flashprog write-protect status -p internal
and to temporarily enable the currently configured range:
flashprog write-protect enable -p internal --temporary
slay. π«Ά
π EXIT STATUS π
flashprog exits with 0 on success, 1 on most failures but with 3 if a call to mmap() fails. so if you see a 3, that's the mmap() girlie specifically. β¨
π REQUIREMENTS π
flashprog needs different access permissions for different programmers. See this section in the flashprog(8) manual for details. permissions are not one-size-fits-all, bestie. π
π BUGS π
You can report bugs, ask us questions or send success reports via our communication channels listed here: https://www.flashprog.org/Contact. success reports are literally welcome too, we love those π
π§ LICENSE π§
flashprog is covered by the GNU General Public License (GPL), version 2. Some files are additionally available under any later version of the GPL.
π COPYRIGHT π
Please see the individual files.
This manual page was written by Nico Huber and is derived from the flashprog(8) manual. It is licensed under the terms of the GNU GPL (version 2 or later). iconic authoring tbh. π
π₯ SEE ALSO π₯
k that's the whole page bestie, go forth and protect those blocks responsibly. and remember: this isflashprog-write-protect-v1.6, dated2026-07-17. mwah πβ¨π
π¦ where this page comes from
- nixos 26.05: flashprog 1.6
- nixpkgs unstable: flashprog 1.6
- ubuntu stonking: flashprog 1.6-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms