I have already gone through and installed linux on my chromebook. I went back after to see what it would take to modify the coreboot ROM and followed the documentation. (Compiling Custom Firmware | Chrultrabook Docs) I compiled the kernel, but when I got to manually flashing the flashrom command will not read my chip. I am on an HP Chromebook 11a-nb0013ax and the error given is:
Reading flash… read_flash: region (00000000…0xffffff) is readable, reading range (00000000…0xffffff).
Cannot read 0x001000 bytes at 0xf7f000: Input/output error
read_flash: failed to read (00000000…0xffffff).
Read operation failed!
FAILED.
restore_power_management: Re-enabling power management.
FAILED
- what flashrom binary are you using? downloaded from where?
./flashrom -R
reports? - what is the full command line are you using?
sudo ./flashrom -p internal -r current.rom -V
I used the flashrom provided by Manually Flashing ROMs | Chrultrabook Docs, specifically https://files.tree123.org/utils/x86_64/gnu/flashrom.
I also tried to use flashrom from the AUR, with the same results.
I should probably just get rid of that binary. Use the binary from mrchromebox.tech instead.
I cloned the source code from MrChromebox and installed flashrom, with the same result
Additional information: I have confirmed that write protect is turned off, even though that shouldn’t matter in this situation. I also opened the chromebook earlier today and dried running the command without the security screw, with no change in outcome.
I am running Arch Linux
using -V
would have produced much more output than what you provided. use -V -o flashrom.log
and attach the log here or upload to pastebin
I don’t know what that is, and I’m not going to look it up. Board name?
if the firmware utility script runs and shows a menu, then there is no issue reading the firmware, just a matter of 1) version of flashrom, 2) command line used, and 3) unloading any kernel modules that interfere
Snappy, and the utility script does run successfully.
flashrom MrChromebox-v1.5.0 on Linux 6.13.1-arch2-1 (x86_64)
flashrom was built with GCC 14.2.1 20250128, little endian
Command line (7 args): flashrom -p internal -r current.rom -V -o flashrom.log
Initializing internal programmer
get_mtd_info: device_name: “intel-spi”, is_writeable: 1, numeraseregions: 0, total_size: 16777216, erasesize: 4096
Opened /dev/mtd0 successfully
The following protocols are supported: Programmer-specific.
Probing for Programmer Opaque flash chip, 0 kB: Added layout entry 00000000 - 00ffffff named complete flash
Found Programmer flash chip “Opaque flash chip” (16384 kB, Programmer-specific) on internal.
Found Programmer flash chip “Opaque flash chip” (16384 kB, Programmer-specific).
Skipping writeprotect-based unlocking for read/verify operations.
Reading flash… read_flash: region (00000000…0xffffff) is readable, reading range (00000000…0xffffff).
Cannot read 0x001000 bytes at 0xf7f000: Input/output error
read_flash: failed to read (00000000…0xffffff).
Read operation failed!
FAILED.
-
are you unloading the kernel modules like the script does?
-
why are you reading the whole flash vs just the bios region?
I was following Manually Flashing ROMs | Chrultrabook Docs
“Backup your current rom, just in case things go wrong: ./flashrom -p internal -r current.rom”
I am not unloading the kernel modules like the script does, and I am not sure how I would do that. I looked at the script and did not see what commands are being used, but I did not have much time to look. I will look further at the scripts in question later.
I am new to firmware flashing but I am not new to linux. I am in no rush, so respond when you can.
I found some time to look into the script.
running “rmmod spi_intel_platform >/dev/null 2>&1” as root caused a different output for flashrom:
flashrom MrChromebox-v1.5.0 on Linux 6.13.1-arch2-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org
coreboot table found at 0x7aa29000.
Found chipset “Intel Apollo Lake”.
Enabling flash write… Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-only.
FREG1: BIOS region (0x00001000-0x00f7efff) is read-write.
FREG5: Device Expansion region (0x00f7f000-0x00ffffff) is locked.
Not all flash regions are freely accessible by flashrom. This is most likely
due to an active ME. Please see ME (Management Engine) — flashrom documentation for details.
At least some flash regions are read protected. You have to use a flash
layout and include only accessible regions. For write operations, you’ll
additionally need the --noverify-all switch. See manpage for more details.
OK.
Warning: unexpected second chipset match: “Intel Apollo Lake”
ignoring, please report lspci and board URL to [email protected]
with ‘CHIPSET: your board name’ in the subject line.
Found Winbond flash chip “W25Q128.W” (16384 kB, Programmer-specific) on internal.
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to [email protected] if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
How to mark chip as tested — flashrom documentation
Thanks for your help!
Reading flash… read_flash: cannot read inside Device Expansion region (0xf7f000…0xffffff).
Read operation failed!
FAILED.
I will continue trying to find the other peices to the puzzle, have a good night
this is why the script only reads the bios region (--ifd -i bios
) on Intel platform devices
Adding that allows me to read the current firmware, but not write the new firmware.
flashrom MrChromebox-v1.5.0 on Linux 6.13.1-arch2-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org
coreboot table found at 0x7aa29000.
Found chipset “Intel Apollo Lake”.
Enabling flash write… Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-only.
FREG1: BIOS region (0x00001000-0x00f7efff) is read-write.
FREG5: Device Expansion region (0x00f7f000-0x00ffffff) is locked.
Not all flash regions are freely accessible by flashrom. This is most likely
due to an active ME. Please see ME (Management Engine) — flashrom documentation for details.
At least some flash regions are read protected. You have to use a flash
layout and include only accessible regions. For write operations, you’ll
additionally need the --noverify-all switch. See manpage for more details.
OK.
Warning: unexpected second chipset match: “Intel Apollo Lake”
ignoring, please report lspci and board URL to [email protected]
with ‘CHIPSET: your board name’ in the subject line.
Found Winbond flash chip “W25Q128.W” (16384 kB, Programmer-specific) on internal.
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to [email protected] if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
You can also try to follow the instructions here:
How to mark chip as tested — flashrom documentation
Thanks for your help!
Reading ich descriptor… done.
Using region: “bios”.
Reading old flash chip contents… read_flash: cannot read inside Device Expansion region (0xf7f000…0xffffff).
FAILED.
command line please
sudo flashrom -p internal --ifd -i bios -w coreboot*.rom
you forgot the -N
on the end, which tells flashrom to ignore regions which aren’t being written to
Thank you for you help, the new coreboot image has been written and it says verified. I am going to restart now and hope my chromebook still boots :D,
Issues resolved
The flashing was successful, no issues that I can see.