scripts
scripts copied to clipboard
Script incorrectly show LG 22CV241 is hardware write protected when it isn't
There appears to be something on some versions of the LG 22CV241 Chromebase that causes the Mr Chromebox script to report that the flash ic is hardware write protected when it isn't, as some people confirm they have been able to use the script to flash the UEFI rom and others cannot. The pcb sticker on my LG 22CV241 says it is v3.01 C1 C 14.06.27. I removed the write protect screw near the LAN socket. Fitted insulating tape to the metal chassis fixing point. Put insulating spacers between the pcb and the chassis and between the screw head and the pcb. Checked with a meter that the isolated section of the solder track was not shorted to earth and also checked directly on pin 3 of the flash ic that it wasn't connected to earth. It actually had a reading of about 16K ohms to earth. So it definitely, absolutely, was not earthed. But running the Mr Chromebox firmware-utli.sh script said it was still write protected! I have installed the Flex OS on over 20 Chromeboxes and 4 or 5 various Chrome books and this is the first device that I have had this problem with. I eventually used the Mr Chromebox Unbricking guide to flash the coreboot_edk2-monroe-mrchromebox_20240223.rom to it, after extract the VPD from the devices firmware and adding it to the rom file. It worked first time, which I think also confirms that the write protect pin 3 was not earthed.
I realise that this is an old device but I have seen a number of posts where people have had this problem and thought that it might help to raise it.
I don't believe this is actually script problem. The script simply reports whether it is possible to disable software WP.
On a device where the script reports WP enabled, exit the script and run 'sudo crossystem wpsw_cur' and see what ChromeOS says the WP status is. If it's the same/enabled, then the script is not the problem
Thanks for the prompt reply.
I'm running OS Flex on it now and that doesn't have an easy way to get to a terminal that allows sudo commands, and your command doesn't work at the crosh prompt. I'll have to read up on how to get to a proper terminal.
What lead me to believe something in some versions of the LG 22CV241 is fooling your script is that your script correctly identifies some as not being hardware write protected but identifies others as still being hardware write protected when they aren't.
Running my script or the crossystem command after you've already flashed the firmware isn't going to provide any useful info.
ChromeOS/crossystem will determine hardware WP state by sampling a GPIO, but without a board schematic it's hard to say what might be causing that to read enabled/grounded with the screw removed.
But again, my script reports WP enabled only if flashrom --wp-status
returns enabled
and flashrom --wp-disable
fails to disable software WP. If hardware WP is disabled, the latter command will succeed.
Flashing the firmware with an external programmer completely bypasses the board's hardware WP state by applying Vcc to the WP pin, so the ability to do so tells you nothing about the board WP state
Unfortunately there's nothing I can do now then to give you any more information about why it fails to see that the write protect pin 3 is not earthed. Although it's an old device I thought with the extra checks I made to confirm that the hardware write protect had definitely been removed it may have helped find a cause and help other people coming across the same problem.
Thanks for you help and for the excellent unbricking guide.