From 899e60c8bdb4e25bf900c5c227daa722376671bb Mon Sep 17 00:00:00 2001 From: eliot Date: Sat, 17 Feb 2018 18:00:29 +0100 Subject: [PATCH] Internally flashing x200 --- guider.mdwn | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/guider.mdwn b/guider.mdwn index 169abb7..8b7bdde 100644 --- a/guider.mdwn +++ b/guider.mdwn @@ -22,12 +22,7 @@ When installing an OS on a Libreboot (/Coreboot) system, use these [guides](http When installing Debian I used [this guide](https://libreboot.org/docs/gnulinux/encrypted_debian.html) in particular, while also encrypting /boot (named boot thus with the resulting full name lvm/matrix-boot, size a couple of hundreds MB). The guide uses LUKS->LVM->Partitions, thus everything is encrypted. You don't need to install GRUB since it is already on the libreboot ROM (if you're using the GRUB payload), however, using a local GRUB makes it possible to [change GRUB config](https://libreboot.org/docs/gnulinux/grub_cbfs.html) without reflashing ROM. But reflashing ROM can be done in the OS. 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 ... - +###Building 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 @@ -39,10 +34,8 @@ If you don't encrypt /boot the default GRUB-scripts works better, i e it boots a 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 - + #sudo ./flashrom -p internal -r ~/this_is_my0.rom + #build libreboot, for the ROM @@ -50,16 +43,17 @@ If you don't encrypt /boot the default GRUB-scripts works better, i e it boots a sudo ./oldbuild dependencies trisquel7 #download and build necessary - ./download grub -y - ./download coreboot -y + ./download grub coreboot crossgcc seabios -y + ./oldbuild module crossgcc ./oldbuild module grub ./oldbuild module coreboot + ./oldbuild module seabios #finally build the ROM we want - ./oldbuild roms withgrub x200_8mb + #./oldbuild roms withgrub x200_8mb - cd bin/grub - ls + #cd bin/grub + #ls #./oldbuild clean all @@ -73,6 +67,27 @@ If you don't encrypt /boot the default GRUB-scripts works better, i e it boots a #sudo ./flash update libreboot.rom +###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 + + ./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 + + #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 + ###KGPE-D16 ####General -- 2.39.2