-
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial support for the ThinkPad T440p #1282
Commits on Jan 18, 2023
-
Add script for obtaining Haswell mrc.bin blob
I based this script on the Coreboot docs: https://doc.coreboot.org/northbridge/intel/haswell/mrc.bin.html. While adding an integrity check to ensure we're obtaining the correct blob. Also, it's worth surfacing that the SHA-1 for the resulting binary is the same SHA that Libreboot uses in their integrity check: https://notabug.org/libreboot/lbmk/src/master/resources/scripts/download/mrc#L95. However, I elected to use SHA-256 for extra paranoia.
Configuration menu - View commit details
-
Copy full SHA for 5cce937 - Browse repository at this point
Copy the full SHA 5cce937View commit details -
Add initial T440p Coreboot defconfig
I generated this config by walking through Coreboot's `make menuconfig`. The plan is to pare down verbose defaults and tweak from here.
Configuration menu - View commit details
-
Copy full SHA for e325976 - Browse repository at this point
Copy the full SHA e325976View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96f0c5b - Browse repository at this point
Copy the full SHA 96f0c5bView commit details -
Adjust T440p default Coreboot defconfig options
Remove options that haven't deviated from defaults in the Coreboot Kconfig, despite being saved by `make savedefconfig`. Also, add `CONFIG_BOARD_LENOVO_THINKPAD_T440P`, which was missing from the `make savedefconfig` output, causing Heads builds to fail. And finally, bump `CONFIG_CBFS_SIZE` to `0x800000` (8 MiB to bytes to hexadecimal). This value for the CBFS size is arbitrary. Originally, I had totaled the size of all binary blobs, subtracted that from the T440p's ROM size (12 MiB), and used the remaining space as the CBFS size (~11.68 MiB). However, this caused very long RAM initialization times (courtesy of `cbmem -t`). And, an anecdote in https://groups.google.com/a/chromium.org/g/chromium-os-reviews/c/lUqRrGUoEBY/m/ka7L1f2BS8gJ suggested that this value needs to be a power of 2. So, I picked a size I expected our Linux payload to fit into that was a power of 2 that I also expected would leave enough space in the ROM for the IFD, ME, GbE, and Coreboot. Now, it takes less than a second for RAM initialization after flashing/first boot (anecdotally, it seems the MRC needs to be "trained?").
Configuration menu - View commit details
-
Copy full SHA for f079211 - Browse repository at this point
Copy the full SHA f079211View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65be2c5 - Browse repository at this point
Copy the full SHA 65be2c5View commit details -
Add intel_iommu=igfx_off to T440p Coreboot kernel parameters
Without this, neither Qubes OS nor the Qubes OS installer would start. Presumably, because we're "kexecing" from an already running kernel, we need this set at the Coreboot level? Testing revealed that including `intel_iommu=igfx_off` in the `CONFIG_BOOT_KERNEL_ADD` board config option did nothing. And, the Qubes OS default boot option already contains `intel_iommu=igfx_off`. See: - https://www.qubes-os.org/doc/installation-troubleshooting/#not-asking-for-vnc-because-we-dont-have-a-network--x-startup-failed-aborting-installation--pane-is-dead-error-during-installation - https://github.com/Qubes-Community/Contents/blob/master/docs/troubleshooting/intel-igfx-troubleshooting.md - https://www.kernel.org/doc/html/v5.10/x86/intel-iommu.html?highlight=igfx_off#graphics-problems
Configuration menu - View commit details
-
Copy full SHA for 24d23ff - Browse repository at this point
Copy the full SHA 24d23ffView commit details
Commits on Jan 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c23ed54 - Browse repository at this point
Copy the full SHA c23ed54View commit details
Commits on Jan 24, 2023
-
t440p: disable NVMe support in Linux kernel
I went through all of the different options we copied from the Librem config. The only thing that stood out as irrelevant was NVMe support. However, I'm not a Linux kernel expert, and I didn't do a deep dive, so I'm sure there is still room for improvement.
Configuration menu - View commit details
-
Copy full SHA for 7a29db1 - Browse repository at this point
Copy the full SHA 7a29db1View commit details -
Add script for obtaining T440p me.bin blob
I performed an analysis of the differences between an me.bin blob I extracted from my T440p and the me.bin blob from Lenovo's website: linuxboot#1282 (comment).
Configuration menu - View commit details
-
Copy full SHA for ed8c74e - Browse repository at this point
Copy the full SHA ed8c74eView commit details
Commits on Feb 26, 2023
-
Rename T440p export-blobs script to extract
More aligned with the naming conventions of xx20 and xx30's extract.sh.
Configuration menu - View commit details
-
Copy full SHA for 9368404 - Browse repository at this point
Copy the full SHA 9368404View commit details -
I extracted the ifd.bin blob from my T440p using the blobs/t440p/extract script.
Configuration menu - View commit details
-
Copy full SHA for 7c32d4e - Browse repository at this point
Copy the full SHA 7c32d4eView commit details -
- I extracted the gbe.bin blob from my T440p's original ROM using the blobs/t440p/extract script. - Using a hex editor, I corrected the sign bit in part 0 that I found was malformed in my analysis: linuxboot#1282 (comment). - After correcting the sign bit, nvmutil showed that both parts of my gbe.bin blob had valid checksums. - Finally, I used nvmutil to set the MAC address to 00:de:ad:c0:ff:ee.
Configuration menu - View commit details
-
Copy full SHA for e6c34bd - Browse repository at this point
Copy the full SHA e6c34bdView commit details -
Make T440p scripts use Coreboot from environment
Before, the T440p blob scripts would look for Coreboot using the find command. Now, we require the user to specify the path to Coreboot in the COREBOOT_DIR environment variable. Also, add an output directory argument to each script. These changes will make it easier to integrate with the Heads build system and CI.
Configuration menu - View commit details
-
Copy full SHA for 144f9c1 - Browse repository at this point
Copy the full SHA 144f9c1View commit details -
Make T440p Coreboot build depend on blob files
Now, when you run `make BOARD=any-t440p-variant`, the build system automatically fetches mrc.bin and me.bin.
Configuration menu - View commit details
-
Copy full SHA for 1dc5d4e - Browse repository at this point
Copy the full SHA 1dc5d4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5083ba3 - Browse repository at this point
Copy the full SHA 5083ba3View commit details -
CircleCI: Install crosfirmware.sh dependencies
We need extra dependencies to support Coreboot's util/crosfirmware.sh to extract the T440p's mrc.bin.
Configuration menu - View commit details
-
Copy full SHA for 3efec15 - Browse repository at this point
Copy the full SHA 3efec15View commit details
Commits on Feb 28, 2023
-
Make T440p scripts work with relative paths
Because we're using pushd/popd to make the Coreboot util invocation cleaner, we need to use realpath so that the scripts will work with any user input.
Configuration menu - View commit details
-
Copy full SHA for 63eab71 - Browse repository at this point
Copy the full SHA 63eab71View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4a09e8 - Browse repository at this point
Copy the full SHA e4a09e8View commit details -
CircleCI: Make the T440p depend on Librem boards
This change will improve build times by allowing the T440p to share the Coreboot 4.17 cache with the Librem boards. Once we update the other ThinkPad boards to use Coreboot 4.19, we'll make the T440p depend on the X230 again. Co-authored-by: Thierry Laurion <insurgo@riseup.net>
Configuration menu - View commit details
-
Copy full SHA for 1dd9c26 - Browse repository at this point
Copy the full SHA 1dd9c26View commit details