From 0474bc55f2d74aa34f4869546d1ad3a51d7a277a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 13 May 2017 08:33:20 -0700 Subject: Cleanup more pseudo-code --- docs/gnulinux/encrypted_parabola.md | 45 ++++++++++++++++++++++++------------- docs/gnulinux/grub_cbfs.md | 9 +++++--- docs/hardware/gm45_remove_me.md | 45 ++++++++++++++++++++++++------------- docs/hardware/x200.md | 9 +++++--- docs/install/index.md | 9 +++++--- docs/install/r400_external.md | 32 +++++++++++++++++--------- docs/install/t400_external.md | 32 +++++++++++++++++--------- docs/install/t500_external.md | 32 +++++++++++++++++--------- docs/install/t60_unbrick.md | 9 +++++--- docs/install/x60_unbrick.md | 9 +++++--- docs/install/x60tablet_unbrick.md | 9 +++++--- 11 files changed, 162 insertions(+), 78 deletions(-) (limited to 'docs') diff --git a/docs/gnulinux/encrypted_parabola.md b/docs/gnulinux/encrypted_parabola.md index e37e4f6b..479f804d 100644 --- a/docs/gnulinux/encrypted_parabola.md +++ b/docs/gnulinux/encrypted_parabola.md @@ -163,10 +163,13 @@ on Reading through, it seems like Serpent (encryption) and Whirlpool (hash) is the best option. -I am initializing LUKS with the following:\ -\# **cryptsetup -v --cipher serpent-xts-plain64 --key-size 512 --hash +I am initializing LUKS with the following: + + # cryptsetup -v --cipher serpent-xts-plain64 --key-size 512 --hash whirlpool --iter-time 500 --use-random --verify-passphrase luksFormat -/dev/sda1** Choose a **secure** passphrase here. Ideally lots of +/dev/sda1 + + Choose a **secure** passphrase here. Ideally lots of lowercase/uppercase numbers, letters, symbols etc all in a random pattern. The password length should be as long as you are able to handle without writing it down or storing it anywhere. @@ -307,9 +310,12 @@ following would have also made it work:\ I also like to install other packages (base-devel, compilers and so on) and wpa\_supplicant/dialog/iw/wpa\_actiond are needed for wireless after -the install:\ -\# **pacstrap /mnt base base-devel wpa\_supplicant dialog iw -wpa\_actiond** +the install: + + # pacstrap /mnt base base-devel wpa\_supplicant dialog iw +wpa\_actiond + + Configure the system -------------------- @@ -587,9 +593,12 @@ from the ROM image: $ ./cbfstool libreboot.rom remove -n grubtest.cfg -and insert the modified grubtest.cfg:\ -\$ **./cbfstool libreboot.rom add -n grubtest.cfg -f grubtest.cfg -t -raw**\ +and insert the modified grubtest.cfg: + + # ./cbfstool libreboot.rom add -n grubtest.cfg -f grubtest.cfg -t +raw + +\ Now refer to [../install/#flashrom](../install/#flashrom). Cd (up) to the libreboot\_util directory and update the flash chip contents: @@ -625,10 +634,13 @@ the main config still links (in the menu) to grubtest.cfg, so that you don't have to manually switch to it, in case you ever want to follow this guide again in the future (modifying the already modified config). Inside libreboot\_util/cbfstool/{armv7l i686 x86\_64}, we can do this -with the following command:\ -\$ **sed -e 's:(cbfsdisk)/grub.cfg:(cbfsdisk)/grubtest.cfg:g' -e +with the following command: + + # sed -e 's:(cbfsdisk)/grub.cfg:(cbfsdisk)/grubtest.cfg:g' -e 's:Switch to grub.cfg:Switch to grubtest.cfg:g' < grubtest.cfg > -grub.cfg**\ +grub.cfg + +\ Delete the grub.cfg that remained inside the ROM: $ ./cbfstool libreboot.rom remove -n grub.cfg @@ -666,9 +678,12 @@ will be asked to enter your passphrase a second time. A workaround is to put a keyfile inside initramfs, with instructions for the kernel to use it when booting. This is safe, because /boot/ is encrypted (otherwise, putting a keyfile inside initramfs would be a bad idea).\ -Boot up and login as root or your user. Then generate the key file:\ -\# **dd bs=512 count=4 if=/dev/urandom of=/etc/mykeyfile -iflag=fullblock**\ +Boot up and login as root or your user. Then generate the key file: + + # dd bs=512 count=4 if=/dev/urandom of=/etc/mykeyfile +iflag=fullblock + +\ Insert it into the luks volume: # cryptsetup luksAddKey /dev/sdX /etc/mykeyfile diff --git a/docs/gnulinux/grub_cbfs.md b/docs/gnulinux/grub_cbfs.md index 624dec62..ea7f7f51 100644 --- a/docs/gnulinux/grub_cbfs.md +++ b/docs/gnulinux/grub_cbfs.md @@ -180,10 +180,13 @@ difference: the menuentry 'Switch to grub.cfg' will be changed to grubtest.cfg. This is so that the main config still links (in the menu) to grubtest.cfg, so that you don't have to manually switch to it, in case you ever want to follow this guide again in the future (modifying -the already modified config). From /libreboot\_util/cbfstool, do:\ -\$ **sed -e 's:(cbfsdisk)/grub.cfg:(cbfsdisk)/grubtest.cfg:g' -e +the already modified config). From /libreboot\_util/cbfstool, do: + + # sed -e 's:(cbfsdisk)/grub.cfg:(cbfsdisk)/grubtest.cfg:g' -e 's:Switch to grub.cfg:Switch to grubtest.cfg:g' < grubtest.cfg > -grub.cfg**\ +grub.cfg + +\ Delete the grub.cfg that remained inside the ROM: diff --git a/docs/hardware/gm45_remove_me.md b/docs/hardware/gm45_remove_me.md index 062fe545..31882fb7 100644 --- a/docs/hardware/gm45_remove_me.md +++ b/docs/hardware/gm45_remove_me.md @@ -88,15 +88,24 @@ Two new files will be created: Assuming that your libreboot image is named **libreboot.rom**, copy the file to where **libreboot.rom** is located and then insert the descriptor+gbe file into the ROM image.\ -For 16MiB flash chips:\ -\$ **dd if=ich9fdgbe\_16m.bin of=libreboot.rom bs=1 count=12k -conv=notrunc**\ -For 8MiB flash chips:\ -\$ **dd if=ich9fdgbe\_8m.bin of=libreboot.rom bs=1 count=12k -conv=notrunc**\ -For 4MiB flash chips:\ -\$ **dd if=ich9fdgbe\_4m.bin of=libreboot.rom bs=1 count=12k -conv=notrunc**\ +For 16MiB flash chips: + + # dd if=ich9fdgbe\_16m.bin of=libreboot.rom bs=1 count=12k +conv=notrunc + +\ +For 8MiB flash chips: + + # dd if=ich9fdgbe\_8m.bin of=libreboot.rom bs=1 count=12k +conv=notrunc + +\ +For 4MiB flash chips: + + # dd if=ich9fdgbe\_4m.bin of=libreboot.rom bs=1 count=12k +conv=notrunc + +\ Your libreboot.rom image is now ready to be flashed on the system. Refer back to [../install/\#flashrom](../install/#flashrom) for how to flash @@ -196,9 +205,12 @@ Intel. Only the Intel NICs need a GbE region in the flash chip. Assuming that your libreboot image is named **libreboot.rom**, copy the **deblobbed\_descriptor.bin** file to where **libreboot.rom** is located -and then run:\ -\$ **dd if=deblobbed\_descriptor.bin of=libreboot.rom bs=1 count=12k -conv=notrunc** +and then run: + + # dd if=deblobbed\_descriptor.bin of=libreboot.rom bs=1 count=12k +conv=notrunc + + Alternatively, if you got a the **deblobbed\_4kdescriptor.bin** file (no GbE defined), do this: \$ **dd if=deblobbed\_4kdescriptor.bin @@ -239,9 +251,12 @@ Simply run (with factory.rom in the same directory): It will generate a 4KiB descriptor file (only the descriptor, no GbE). Insert that into a factory.rom image (NOTE: do this on a copy of it. -Keep the original factory.rom stored safely somewhere):\ -\$ **dd if=demefactory\_4kdescriptor.bin of=factory\_nome.rom bs=1 -count=4k conv=notrunc** +Keep the original factory.rom stored safely somewhere): + + # dd if=demefactory\_4kdescriptor.bin of=factory\_nome.rom bs=1 +count=4k conv=notrunc + + TODO: test this.\ TODO: lenovobios (GM45 thinkpads) still write-protects parts of the diff --git a/docs/hardware/x200.md b/docs/hardware/x200.md index c6f9230a..61d80660 100644 --- a/docs/hardware/x200.md +++ b/docs/hardware/x200.md @@ -228,9 +228,12 @@ be useful for RAM compatibility info (note: coreboot raminit is different, so this page might be BS) pehjota started collecting some steppings for different CPUs on several -X200 laptops. You can get the CPUID by running:\ -\$ **dmesg | sed -n 's/\^.\* microcode: CPU0 -sig=0x\\(\[\^,\]\*\\),.\*\$/\\1/p'** +X200 laptops. You can get the CPUID by running: + + # dmesg | sed -n 's/\^.\* microcode: CPU0 +sig=0x\\(\[\^,\]\*\\),.\*\$/\\1/p' + + What pehjota wrote: The laptops that have issues resuming from suspend, as well as a laptop that (as I mentioned earlier in \#libreboot) won't diff --git a/docs/install/index.md b/docs/install/index.md index 4ae683e6..2a0b1ef6 100644 --- a/docs/install/index.md +++ b/docs/install/index.md @@ -329,9 +329,12 @@ When you have booted up again, you must also do this: $ sudo ./flash i945lenovo\_secondflash [yourrom.rom](#rom) -If flashing fails at this stage, try the following:\ -\$ **sudo ./flashrom/i686/flashrom -p -internal:laptop=force\_I\_want\_a\_brick -w [yourrom.rom](#rom)** +If flashing fails at this stage, try the following: + + # sudo ./flashrom/i686/flashrom -p +internal:laptop=force\_I\_want\_a\_brick -w [yourrom.rom](#rom) + + You should see within the output the following:\ **"Updated BUC.TS=0 - 128kb address range 0xFFFE0000-0xFFFFFFFF is diff --git a/docs/install/r400_external.md b/docs/install/r400_external.md index 7d5721aa..45bc329c 100644 --- a/docs/install/r400_external.md +++ b/docs/install/r400_external.md @@ -227,13 +227,22 @@ In this case, the output was: Please specify which chip definition to use with the -c option. How to backup factory.rom (change the -c option as neeed, for your flash -chip):\ -\# **./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**\ +chip): + + # ./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 + +\ Note: the **-c** option is not required in libreboot's patched flashrom, because the redundant flash chip definitions in *flashchips.c* have been removed.\ @@ -253,9 +262,12 @@ flashing it. Although there is a default MAC address inside the ROM image, this is not what you want. **Make sure to always change the MAC address to one that is correct for your system.** -Now flash it:\ -\# **./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w -path/to/libreboot/rom/image.rom -V** +Now flash it: + + # ./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w +path/to/libreboot/rom/image.rom -V + + ![](images/x200/disassembly/0015.jpg) diff --git a/docs/install/t400_external.md b/docs/install/t400_external.md index b3773c34..f5ea561b 100644 --- a/docs/install/t400_external.md +++ b/docs/install/t400_external.md @@ -225,13 +225,22 @@ In this case, the output was: Please specify which chip definition to use with the -c option. How to backup factory.rom (change the -c option as neeed, for your flash -chip):\ -\# **./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**\ +chip): + + # ./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 + +\ Note: the **-c** option is not required in libreboot's patched flashrom, because the redundant flash chip definitions in *flashchips.c* have been removed.\ @@ -251,9 +260,12 @@ flashing it. Although there is a default MAC address inside the ROM image, this is not what you want. **Make sure to always change the MAC address to one that is correct for your system.** -Now flash it:\ -\# **./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w -path/to/libreboot/rom/image.rom -V** +Now flash it: + + # ./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w +path/to/libreboot/rom/image.rom -V + + ![](images/x200/disassembly/0015.jpg) diff --git a/docs/install/t500_external.md b/docs/install/t500_external.md index 567f9159..87697a71 100644 --- a/docs/install/t500_external.md +++ b/docs/install/t500_external.md @@ -242,13 +242,22 @@ In this case, the output was: Please specify which chip definition to use with the -c option. How to backup factory.rom (change the -c option as neeed, for your flash -chip):\ -\# **./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**\ +chip): + + # ./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 + +\ Note: the **-c** option is not required in libreboot's patched flashrom, because the redundant flash chip definitions in *flashchips.c* have been removed.\ @@ -268,9 +277,12 @@ flashing it. Although there is a default MAC address inside the ROM image, this is not what you want. **Make sure to always change the MAC address to one that is correct for your system.** -Now flash it:\ -\# **./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w -path/to/libreboot/rom/image.rom -V** +Now flash it: + + # ./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w +path/to/libreboot/rom/image.rom -V + + ![](images/x200/disassembly/0015.jpg) diff --git a/docs/install/t60_unbrick.md b/docs/install/t60_unbrick.md index 82600eee..05141904 100644 --- a/docs/install/t60_unbrick.md +++ b/docs/install/t60_unbrick.md @@ -141,9 +141,12 @@ Flashrom binaries for ARM (tested on a BBB) are distributed in libreboot\_util. Alternatively, libreboot also distributes flashrom source code which can be built. -SSH'd into the BBB:\ -\# **./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w -yourrom.rom** +SSH'd into the BBB: + + # ./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w +yourrom.rom + + It should be **Verifying flash\... VERIFIED** at the end. If flashrom complains about multiple flash chip definitions detected, then choose diff --git a/docs/install/x60_unbrick.md b/docs/install/x60_unbrick.md index 64488443..fdedcb11 100644 --- a/docs/install/x60_unbrick.md +++ b/docs/install/x60_unbrick.md @@ -126,9 +126,12 @@ Flashrom binaries for ARM (tested on a BBB) are distributed in libreboot\_util. Alternatively, libreboot also distributes flashrom source code which can be built. -SSH'd into the BBB:\ -\# **./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w -yourrom.rom** +SSH'd into the BBB: + + # ./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w +yourrom.rom + + It should be **Verifying flash\... VERIFIED** at the end. If flashrom complains about multiple flash chip definitions detected, then choose diff --git a/docs/install/x60tablet_unbrick.md b/docs/install/x60tablet_unbrick.md index 5f18db8b..f05a7142 100644 --- a/docs/install/x60tablet_unbrick.md +++ b/docs/install/x60tablet_unbrick.md @@ -105,9 +105,12 @@ Flashrom binaries for ARM (tested on a BBB) are distributed in libreboot\_util. Alternatively, libreboot also distributes flashrom source code which can be built. -SSH'd into the BBB:\ -\# **./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w -yourrom.rom** +SSH'd into the BBB: + + # ./flashrom -p linux\_spi:dev=/dev/spidev1.0,spispeed=512 -w +yourrom.rom + + It should be **Verifying flash\... VERIFIED** at the end. If flashrom complains about multiple flash chip definitions detected, then choose -- cgit v1.2.3-70-g09d2