###X200
-####Flashing Internally [WIP]!
- To internally flash your ROM use the kernel parameter "iomem=relaxed". Thus, if you boot manually you would enter e g "linux=vmlinuz.. iomem=relaxed"
- #Get a newer version of flashrom than in Debian repo
- #In my case the older version did not detect the exact chip on x200
- #This was fixed by cloning and building the most recent version
+####Flashing Internally
+To internally flash your ROM use the kernel parameter "iomem=relaxed". Thus, if you boot manually you would enter e g "linux=vmlinuz.. iomem=relaxed".
- #Note these tools are built and ready [at](https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/libreboot_r20160907_util.tar.xz) or similar
+Get a newer version of flashrom than in Debian repo. In my case the older version did not detect the exact chip on x200, which was fixed by getting most recent version
+
+Note these tools are built and ready [at](https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/libreboot_r20160907_util.tar.xz) or similar
#backup current rom
- sudo ./flashrom -p internal -r ~/this_is_my0.rom
+ sudo ./flashrom -p internal -r libreboot.rom
#remove old GRUB (test) config
./cbfstool libreboot.rom remove -n grubtest.cfg
#get the new GRUB (test) config into your ROM
./cbfstool libreboot.rom add -n grubtest.cfg -f grubtest.cfg -t raw
+ #change background in GRUB menu (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
+
sudo ./flash update libreboot.rom
5 DI (IO0) -> 18
- #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=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..
+ sha512sum factory*.rom #they _should_ be the same
- #Flash ROM (can try different speeds)
+ #Flash ROM (can try different speeds), choose an appropriate ROM (keyboard layout, GRUB/Seabios)
./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 was very difficult - seemingly at random - to achieve a configuration such as read and write had good reliability.
# Furthermore, writing had good success rate while reading was 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.
+ # If the sum EXACTLY matches atleast once, it is reasonable to assume that the write indeed succeeded (we believe).
##Coreboot