system76 / firmware-update

System76 Firmware Update Utility
GNU General Public License v3.0
204 stars 15 forks source link

uecflash issue with binaries from newer systems #26

Closed crawfxrd closed 3 years ago

crawfxrd commented 3 years ago

Binaries built on Pop!_OS 20.10 and Fedora 33 fail to flash. uecflash exits immediately after verifying the first block write. This leaves the system in an unbootable state until the EC is reset by disconnecting AC and battery.

Binaries produced with these do not work:

Binaries produced with these did work:

crawfxrd commented 3 years ago

Using the linker file from the 20.04 build, relinking, and regenerating the binary, it works with uecflash.

cp ~/ec.lk build/system76/oryp6/2020-11-05/ec.lk
sdld -nf build/system76/oryp6/2020-11-05/ec.lk
makebin -s 65536 -p < build/system76/oryp6/2020-11-05/ec.ihx > build/system76/oryp6/2020-11-05/ec.rom

The resulting binary is the same size: 33950 bytes instead of 34014 bytes.