From: eliot Date: Sat, 17 Feb 2018 15:32:28 +0000 (+0100) Subject: Trying to flash X200 internally X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=17e63dba44980486ca7078cfe7ee5edbfc310552;p=inbyggd-frihet-wiki.git Trying to flash X200 internally --- diff --git a/guider.mdwn b/guider.mdwn index ed4bf3e..7092bfc 100644 --- a/guider.mdwn +++ b/guider.mdwn @@ -23,6 +23,57 @@ When installing Debian I used [this guide](https://libreboot.org/docs/gnulinux/e If you don't encrypt /boot the default GRUB-scripts works better, i e it boots automatically, at least until the scripts are improved upon. +###X200 +####Flashing Externally [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" + +clone libreboot ... + +#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 + +./download flashrom +cd flashrom +sudo apt-get install libusb-1.0-0-dev build-dep linux-image-$(uname -r) +make install #needs sudo? +make + +#backup current rom +sudo ./flashrom -p internal -r ~/this_is_my0.rom +sudo ./flashrom -p internal -r ~/this_is_my1.rom +sudo ./flashrom -p internal -r ~/this_is_my2.rom + + +#build libreboot, for the ROM + +#dependencies for Debian +sudo ./oldbuild dependencies trisquel7 + +#download and build necessary +./download grub -y +./download coreboot -y +./oldbuild module grub +./oldbuild module coreboot + +#finally build the ROM we want +./oldbuild roms withgrub x200_8mb + +cd bin/grub +ls + +#./oldbuild clean all + + +## Moving on +#cp new.rom ich9deblob/x86_64 +#cd ich9deblob/x86_64 +#/ich9gen --macaddress XX:XX:XX:XX:XX:XX +#dd if=ich9fdgbe_8m.bin of=libreboot.rom bs=1 count=12k conv=notrunc #for 8mb chip +#mv new.rom ../../ +#sudo ./flash update libreboot.rom + + ###KGPE-D16 ####General @@ -61,7 +112,7 @@ For our software configs, see: [[https://github.com/Eliot-Roxbergh/dotFIles/]] TODO improve GRUB config -####Flasha +####Flashing Buy a couple of flash chips in case of you breaking them, and to test different payloads. Furthermore, one could buy a proprietary chip just to debug the hardware. ROM-chip (eg.): Winbond W25Q16DV (Note: the image built from Libreboot needs to match the ROM size. Specifically, if you're choosing pre-built this must match exactly AFAIK)