FLASHPROG-WRITE-PROTECT(8)

πŸ“¦
version 1.6 Β· 4 versions
, in nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’– 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 the enable operation. set the range FIRST, then lock it. order matters, bestie, it's the way that… yeah. πŸ”₯
  • range <start>,<len> β€” Configures the protected range. start and length specify the range in decimal, octal (0 prefix), or hexadecimal (0x prefix) numbers of bytes. Any zero-length range will unprotect the entire flash (e.g. range 0,0). so 0,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 in flashprog(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 the flashprog(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 by flashprog -L without 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 from flashprog because 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 the flashrom(8) manual for information about layout files and other layout sources. (yes, flashrom(8). that's what it says. iykyk 🧚)
  • --temporary β€” When the --temporary option is provided for any operation that alters the flash chip's configuration, flashprog will 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.


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 is flashprog-write-protect-v1.6, dated 2026-07-17. mwah πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from