system76 / ec

System76 Open Source Embedded Controller
GNU General Public License v3.0
319 stars 72 forks source link

Docs: clarify that `flash_internal` won't work when firmware is locked, and how to unlock it #424

Closed leviport closed 8 months ago

leviport commented 8 months ago

When testing #423, I noticed that flash_internal wasn't working on a serw13. After checking master back out, I'm still saying the same behavior (BOARD=system76/serw13 was specified in a config.mk in this case and builds successfully without flash_internal):

system76@serw13-2k:~/firmware-open/ec$ make flash_internal
    Finished release [optimized] target(s) in 0.08s
[sudo] password for system76:
file board: Ok("system76/serw13")
file version: Ok("2023-12-12_6f1e653-dirty")
ec board: Ok("system76/serw13")
ec version: Ok("2023-12-12_6f1e653-dirty")
Waiting 5 seconds for all keys to be released
Sync
Result: Err(Protocol(1))
Sync
System will shut off in 5 seconds
Sync
failed to flash 'build/ec.rom': Protocol(1)
make: *** [src/board/system76/common/common.mk:136: flash_internal] Error 1

The machine does not shut off after this.

crawfxrd commented 8 months ago

Documentation needs to be updated to clarify internal flashing will not work if firmware is locked (CONFIG_SECURITY=y).

leviport commented 8 months ago

Ah yep, that explains it. I wonder how many times I've forgotten that.