From ef00522f5f563c4ed59afc34c783438ed5988a08 Mon Sep 17 00:00:00 2001 From: eliot Date: Sat, 18 Sep 2021 17:37:10 +0200 Subject: [PATCH] --- guider.mdwn | 84 ++++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/guider.mdwn b/guider.mdwn index a5480f2..f571afa 100644 --- a/guider.mdwn +++ b/guider.mdwn @@ -6,6 +6,8 @@ No warranty provided. Here you will find some results from our meetings. BEFORE flashing laptops make sure EC version is up to date (yes it's proprietary). (Link for fun: .. __Sorry for broken link!__) +# Coreboot and Libreboot general + ## GRUB ### Boot manually For some setups the default GRUB script does not work. Either try updating the grub.cfg (next section) or boot manually (below). @@ -78,7 +80,7 @@ Note these tools are built and ready [at](https://www.mirrorservice.org/sites/li ### Our external flashing setup BeagleBone Black (BBB), powered by USB. 5A 2A -Tip: Dont power anything from a regular (computer) ATX power supply, it will work but is unreliable and a time waster. +Tip: Don't power anything from a regular (computer) ATX power supply, it will work but is unreliable and a time waster. Current setup is to connect to the BBB via Ethernet to a router and thus SSH. Can also connect directly with the SPI interface, see Libreboot flashing guide. Pomona chip holders @@ -131,7 +133,47 @@ This works very good with openbsd6.0(and 6.2), read more [here](https://libreboo [update] I have run openbsd 6.2 with libreboot on thinkpad x200 for about two months now without any errors, still no update on the harddisk crypto -### Building Libreboot +## Extend 2MB ROM to 8MB + +### Here is the script we use to flash 8mb chip + +``` +root@beaglebone:~# cat flashme_8mb.sh +echo 'Creating a 8mb Libreboot Rom' +echo 'creating the file /home/flashing_d16/libreSept16/8mb_free.rom' +echo 'dd ing' +touch /home/flashing_d16/libreSept16/8mb_free.rom +echo ' ' > /home/flashing_d16/libreSept16/8mb_free.rom +echo 'Zeros then image' +dd if=/dev/zero bs=6144k count=1 of=/home/flashing_d16/libreSept16/8mb_free.rom +echo 'Writing image' +dd if=/home/flashing_d16/libreSept16/libreboot_r20160907_grub_kgpe-d16/kgpe-d16_svenska_txtmode.rom >> /home/flashing_d16/libreSept16/8mb_free.rom +ls -lah /home/flashing_d16/libreSept16/8mb_free.rom +echo 'Its flashing time' +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -w /home/flashing_d16/libreSept16/8mb_free.rom +echo 'everything is done' +echo 'plz verify' +echo ' +cd directory-with-size +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory3.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory4.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory5.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory6.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory7.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory8.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory9.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory10.rom +/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory11.rom +sha512sum factory*.rom +' + +``` + + +## Building Libreboot This script worked 2019-04, however we noted that the cryptomount program had less features in the version from Git at that time, compared to the 2016 stable release. Unlike Coreboot, this build process is fairly automated and does not present any customization choices by default @@ -189,44 +231,6 @@ Unlike Coreboot, this build process is fairly automated and does not present any ## LASTLY FLASH TO CHIP (here internally) #sudo ./flashrom/flashrom -p internal -w x200.rom -## Extend 2MB ROM to 8MB - -### Here is the script we use to flash 8mb chip - -``` -root@beaglebone:~# cat flashme_8mb.sh -echo 'Creating a 8mb Libreboot Rom' -echo 'creating the file /home/flashing_d16/libreSept16/8mb_free.rom' -echo 'dd ing' -touch /home/flashing_d16/libreSept16/8mb_free.rom -echo ' ' > /home/flashing_d16/libreSept16/8mb_free.rom -echo 'Zeros then image' -dd if=/dev/zero bs=6144k count=1 of=/home/flashing_d16/libreSept16/8mb_free.rom -echo 'Writing image' -dd if=/home/flashing_d16/libreSept16/libreboot_r20160907_grub_kgpe-d16/kgpe-d16_svenska_txtmode.rom >> /home/flashing_d16/libreSept16/8mb_free.rom -ls -lah /home/flashing_d16/libreSept16/8mb_free.rom -echo 'Its flashing time' -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -w /home/flashing_d16/libreSept16/8mb_free.rom -echo 'everything is done' -echo 'plz verify' -echo ' -cd directory-with-size -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory3.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory4.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=1024 -r factory5.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory6.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory7.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=256 -r factory8.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory9.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory10.rom -/home/flashing_d16/libreSept16/libreboot_r20160907_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=2048 -r factory11.rom -sha512sum factory*.rom -' - -``` ## Specific guides ### T400 without blobs (Coreboot) -- 2.39.2