|
| 1 | +# Skulls - [Thinkpad T440P](https://pcsupport.lenovo.com/us/zh/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t440p) |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +## Latest release |
| 6 | +Get it from our [release page](https://github.com/merge/skulls/releases) |
| 7 | +* __coreboot__: We take coreboot's master branch at the time we build a release image. |
| 8 | +![[common/doc/haswell_latest_versions.md]] |
| 9 | + |
| 10 | +Note: This release includes a non-free binary blob `mrc.bin` that is used |
| 11 | +for dram initialisation. |
| 12 | + |
| 13 | +## table of contents |
| 14 | +* [TL;DR](#tldr) |
| 15 | +* [First-time installation](#first-time-installation) |
| 16 | +* [Updating](#updating) |
| 17 | +* [Why does this work](#why-does-this-work) |
| 18 | +* [How to rebuild](#how-to-reproduce-the-release-images) |
| 19 | + |
| 20 | +## TL;DR |
| 21 | +1. run `sudo ./skulls.sh -b t440p` on your current T440P Linux system |
| 22 | +2. Power down, remove the battery. Remove the keyboard and palmrest. Connect |
| 23 | +a hardware flasher to an external PC (or a Raspberry Pi with a SPI 8-pin chip clip |
| 24 | +can directly be used), and run |
| 25 | +`sudo ./external_install_bottom.sh` on the lower chip |
| 26 | +and `sudo ./external_install_top.sh -b t440p` on the top chip of the two. |
| 27 | +3. For updating later, run `./skulls.sh -b t440p`. No need to disassemble. |
| 28 | + |
| 29 | +And always use the latest [released](https://github.com/merge/skulls/releases) |
| 30 | +package. This will be tested. The git master |
| 31 | +branch is _not_ meant to be stable. Use it for testing only. |
| 32 | + |
| 33 | +## First-time installation |
| 34 | +#### before you begin |
| 35 | +Run Linux on your T440P, install `dmidecode` and run |
| 36 | +`sudo ./skulls.sh -b t440p`. It simply prints system information and |
| 37 | +helps you to be up to date. |
| 38 | + |
| 39 | +Make sure you have the latest skulls package release by running |
| 40 | +`./skulls.sh -b t440p -U`. |
| 41 | + |
| 42 | +#### preparation: required hardware |
| 43 | +* An 8 Pin SOIC Clip, for example from |
| 44 | +[Pomona electronics](https://www.pomonaelectronics.com/products/test-clips/soic-clip-8-pin) |
| 45 | +(you'll find it |
| 46 | +[somewhere](https://geizhals.eu/?fs=pomona+test+clip+5250) online) |
| 47 | +* 6 [female](https://electronics.stackexchange.com/questions/37783/how-can-i-create-a-female-jumper-wire-connector) |
| 48 | +[jumper wires](https://en.wikipedia.org/wiki/Jump_wire) like |
| 49 | +[these](https://geizhals.eu/jumper-cable-female-female-20cm-a1471094.html) |
| 50 | +to connect the clip to a hardware flasher (if not included with the clip) |
| 51 | +* a hardware flasher |
| 52 | +[supported by flashrom](https://www.flashrom.org/Flashrom/0.9.9/Supported_Hardware#USB_Devices), see below for the examples we support |
| 53 | + |
| 54 | +#### open up the T440P |
| 55 | +Follow any disassembly tutorial you can find online. You need to almost |
| 56 | +fully disassemble if you want to flash (unlock and me_cleaner) the 8M chip |
| 57 | +too. The 2 chips are rotated 180 degrees to one another on |
| 58 | +the board. |
| 59 | + |
| 60 | +The 4MB chip: |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +The 8MB chip: |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +... choose __one of the following__ supported flashing hardware examples: |
| 69 | + |
| 70 | +#### Hardware Example: Raspberry Pi 3 |
| 71 | +![[common/doc/hw_rpi.md]] |
| 72 | + |
| 73 | +Now copy the Skulls release tarball over to the Rasperry Pi and |
| 74 | +[continue](#unpack-the-skulls-release-archive) on the Pi. |
| 75 | + |
| 76 | +#### Hardware Example: CH341A based |
| 77 | +The CH341A from [Winchiphead](http://www.wch.cn/), a USB interface chip, |
| 78 | +is used by some cheap memory programmers. |
| 79 | +The one we describe can be bought at |
| 80 | +aliexpress |
| 81 | +but it's available [elsewhere](https://geizhals.eu/?fs=ch341a) too. |
| 82 | +This means you need a different computer running a Linux based system here. |
| 83 | +Also, we don't use the included 3,3V power output (provides too little power), |
| 84 | +but a separate power supply. If you don't have any, consider getting a AMS1117 |
| 85 | +based supply for a second USB port (like [this](https://de.aliexpress.com/item/1PCS-AMS1117-3-3V-Mini-USB-5V-3-3V-DC-Perfect-Power-Supply-Module/32785334595.html) or [this](https://www.ebay.com/sch/i.html?_nkw=ams1117+usb)). |
| 86 | + |
| 87 | +* Leave the P/S Jumper connected (programmer mode, 1a86:5512 USB device) |
| 88 | +* Connect 3,3V from your external supply to the Pomona clip's (or hook) VCC |
| 89 | +* Connect GND from your external supply to GND on your CH341A programmer |
| 90 | +* Connect your clip or hooks to the rest of the programmer's SPI pins |
| 91 | +* Connect the programmer (and power supply, if USB) to your PC's USB port |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +#### unpack the Skulls release archive |
| 96 | + |
| 97 | + |
| 98 | + tar -xf skulls-<version>.tar.xz |
| 99 | + cd skulls-<version> |
| 100 | + |
| 101 | + |
| 102 | +#### ifd unlock and me_cleaner: the 8MB chip |
| 103 | + |
| 104 | +With the chips at the edge of the board closer to you, this is the right |
| 105 | +chip. Flashing the 8MB chip is optional but highly recommended. |
| 106 | +It has the same pinout as the 4MB chip, but the two chips are soldered |
| 107 | +the opposite way around. When you don't unlock the 8MB chip |
| 108 | +with an external flasher, you can't flash internally and fix the |
| 109 | +[security issues](https://en.wikipedia.org/wiki/Intel_Management_Engine#Security_vulnerabilities) |
| 110 | +in the |
| 111 | +[Intel Management Engine](https://en.wikipedia.org/wiki/Intel_Management_Engine). |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + sudo ./external_install_bottom.sh -m -k <backup-file-to-create> |
| 116 | + |
| 117 | + |
| 118 | +That's it. Keep the backup safe. Here are the options (just so you know): |
| 119 | + |
| 120 | +* The `-m` option applies `me_cleaner -S -d` before flashing back, see |
| 121 | +[me_cleaner](https://github.com/corna/me_cleaner). |
| 122 | +* The `-l` option will (re-)lock your flash ROM, in case you want to force |
| 123 | +yourself (and others) to hardware-flashing, see [updating](#updating). |
| 124 | + |
| 125 | +#### Your BIOS: the 4MB chip |
| 126 | +This is the left chip of the 2. Choose the image to flash during running: |
| 127 | + |
| 128 | + |
| 129 | + sudo ./external_install_top.sh -b t440p -k <backup-file-to-create> |
| 130 | + |
| 131 | + |
| 132 | +This selects and flashes it and that's it. |
| 133 | +Keep the backup safe, assemble and |
| 134 | +turn on the T440P. coreboot will do hardware init and start SeaBIOS. |
| 135 | + |
| 136 | +## Updating |
| 137 | +If you have locked your flash (i.e. `./external_install_bottom -l`) you can |
| 138 | +flash externally using `external_install_top.sh -b t440p` just like the |
| 139 | +first time, see above. Only the "upper" 4MB chip has to be written. |
| 140 | + |
| 141 | +It is recommended to do the update directly on your T440P using Linux |
| 142 | +though. This is considered more safe for your hardware and is very convenient - |
| 143 | +just install the "flashrom" program and run `./skulls.sh -b t440p`, see below. |
| 144 | + |
| 145 | +1. boot Linux with the `iomem=relaxed` boot parameter (for example in /etc/default/grub `GRUB_CMDLINE_LINUX_DEFAULT`) |
| 146 | +2. [download](https://github.com/merge/skulls/releases) the latest Skulls release tarball and unpack it or check for updates by running `./skulls.sh -b t440p -U`. |
| 147 | +3. run `sudo ./skulls.sh -b t440p` and choose the image to flash. |
| 148 | + |
| 149 | +Hint: In case your Linux distribution's GRUB bootloader doesn't use the full |
| 150 | +screen, put the line `GRUB_GFXMODE=1366x768x32` in your `/etc/default/grub` file |
| 151 | +(and run `update_grub`). |
| 152 | + |
| 153 | +## Why does this work? |
| 154 | +On the T440P, there are 2 physical "BIOS" chips. The 4MB |
| 155 | +one holds the actual bios we can generate using coreboot, and the 8MB |
| 156 | +one holds the rest that you can [modify yourself once](#first-time-installation), |
| 157 | +if you like, but strictly speaking, you |
| 158 | +[don't need to touch it at all](https://www.coreboot.org/Board:lenovo/x230#Building_Firmware). |
| 159 | +What's this "rest"? |
| 160 | +Mainly a tiny binary used by the Ethernet card and the Intel Management Engine. |
| 161 | +Read the [coreboot documentation](https://doc.coreboot.org/mainboard/lenovo/t440p.html) |
| 162 | +for more details. |
| 163 | + |
| 164 | +## how to reproduce the release images |
| 165 | +* `git clone https://github.com/merge/skulls` |
| 166 | +* `cd skulls/t440p` |
| 167 | +* `git checkout 1.0.0` for the release you want to build. |
| 168 | +* `./build.sh` and choose the configuration you want to build. |
| 169 | + |
| 170 | +### replace the splashscreen image |
| 171 | +![[common/doc/splashscreen.md]] |
0 commit comments