From: eliot Date: Sat, 3 Feb 2018 16:55:19 +0000 (+0100) Subject: Starting explaining flash D16 X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=01f943bf110549516d90ba2e64a25d711de7b91b;p=inbyggd-frihet-wiki.git Starting explaining flash D16 --- diff --git a/guider.mdwn b/guider.mdwn index fb7c582..1dcb352 100644 --- a/guider.mdwn +++ b/guider.mdwn @@ -63,7 +63,48 @@ For software config and settings see: [[https://github.com/Eliot-Roxbergh/dotFIl TODO improve GRUB config ####Flasha -TODO + +Flash chippet: Winbond W25Q16DV + + 1 CS -> 17 SPIO_CSO (red) + 2 DO (IO1) -> 21 SPIO_DO (black) + 3 /WP (IO2) -> 3.3V (yellow) + 4 GND -> GND (green) + + 8 VCC -> 3.3V (blue) + 7 /HOLD (IO3) -> 3.3V (orange) + 6 CLK -> 22 SPIO_SCLK (grey) + 5 DI (IO0) -> 18 (purple) + + + #change background (dest must be called background.png /jpg) + ./cbfstool yourrom.rom remove background.png -n background.png + ./cbfstool yourrom.rom add -f background.png -n background.png -t raw + + #remember to backup current image if you'd like + #can read current contents a nr of times and they should be the same + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory3.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory4.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory5.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory6.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory7.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory8.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory9.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory10.rom + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory11.rom + sha512sum factory*.rom #they should be the same.. + + #Flash ROM (can try different speeds) + ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w ~/libreboot_r20160907_grub_kgpe-d16/kgpe-d16_svenska_txtmode.rom + + ## NOTE ## + # In my case (KGPE-D16) it is very difficult - seemingly at random - to achieve a configuration such as read and write has good reliability. + # Furthermore, writing has good success rate while reading is more error prone. + # Thus, it is possible to write to the ROM and read (e.g.) 10 times and compare the resulting `sha512sum` to that of the ROM downloaded from Libreboot. + # If the sum EXACTLY matches atleast once, it is reasonable to assume that the write indeed succeeded. ##Coreboot