-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
T430s guides #77
Open
Siproqu
wants to merge
2
commits into
linuxboot:master
Choose a base branch
from
Siproqu:T430s-guides
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
T430s guides #77
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
layout: default | ||
title: Lenovo T430s | ||
nav_order: 1 | ||
permalink: /t430s-building/ | ||
parent: Step 1 - Building Heads | ||
grand_parent: Installing and configuring | ||
--- | ||
|
||
Lenovo T430s | ||
==== | ||
|
||
<!-- markdownlint-disable MD033 --> | ||
<details open markdown="block"> | ||
<summary> | ||
Table of contents | ||
</summary> | ||
{: .text-delta } | ||
1. TOC | ||
{:toc} | ||
</details> | ||
<!-- markdownlint-enable MD033 --> | ||
|
||
This guide only documents build options you might be interested in, which are: | ||
If you are not interested in those options follow the [General Building](/general-building/) guide. | ||
|
||
- Setting an arbitrary MAC address. | ||
- Change some BIOS options (like swap the fn and ctrl-key) | ||
|
||
# Preparation | ||
|
||
Follow the [General Building](/general-building/) until you have installed all dependencies and cloned the tree. _Do not_ execute `make BOARD=t430s-maximized` yet! | ||
|
||
# Edit build (optional) | ||
|
||
## Change MAC (via coreboots bincfg) | ||
|
||
```bash | ||
cd coreboot/utils/bincfg/ | ||
make | ||
|
||
# | ||
# Open gbe-82579LM.set and change the MAC address. | ||
# | ||
|
||
./bincfg gbe-82579LM.spec gbe-82579LM.set gbe_0x1000.bin | ||
cat gbe_0x1000.bin gbe_0x1000.bin > /path_to_heads_dir/blobs/t430s/gbe.bin | ||
``` | ||
|
||
## BIOS options | ||
|
||
You can enable certain options like: swap the fn and ctrl key, enable sticky fn key etc. | ||
|
||
``` | ||
cd ~/ | ||
git clone https://github.com/coreboot/coreboot.git | ||
cd coreboot/src/mainboard/lenovo/t430s/ | ||
# Open the cmos.default file and enable or disable the options you like. Save the file and close it. | ||
git diff cmos.default > ~/heads/patches/coreboot-4.13/0061-cmos-settings.patch | ||
``` | ||
|
||
## Set different flash chip in flashrom arguments | ||
|
||
**This step is only necessary if non of the detected chips matches MX25L12835F/MX25L12845E/MX25L12865E.** | ||
|
||
- Open `heads/boards/t430s-maximized.config` with an editor. | ||
- Search for `CONFIG_FLASHROM_OPTIONS=` | ||
- Replace `-c MX25L12835F/MX25L12845E/MX25L12865E` with `-c <your chip name>`. | ||
|
||
Run the build again and copy the new `coreboot.rom` to the USB dongle. | ||
|
||
# Build Heads | ||
``` | ||
make BOARD=t430s-maximized | ||
``` | ||
|
||
Wait. Building will take some time... | ||
|
||
The `coreboot.rom` image will be copied to `build/coreboot-4.13/t430s-maximized/coreboot.rom`. | ||
Copy it to a USB dongle and follow the [Flashing Guide](/t430s-flashing/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
--- | ||
layout: default | ||
title: Lenovo T430s | ||
nav_order: 1 | ||
permalink: /t430s-flashing/ | ||
parent: Step 2 - Flashing Guides | ||
grand_parent: Installing and configuring | ||
--- | ||
|
||
# Lenovo T430s | ||
|
||
|
||
<!-- markdownlint-disable MD033 --> | ||
<details open markdown="block"> | ||
<summary> | ||
Table of contents | ||
</summary> | ||
{: .text-delta } | ||
1. TOC | ||
{:toc} | ||
</details> | ||
<!-- markdownlint-enable MD033 --> | ||
|
||
## Prerequisits | ||
|
||
### Hardware | ||
- The USB dongle with the Heads binary (`coreboot.com`). | ||
- A Raspberry Pi and either: | ||
- jumper wires (6xFemale-Female, 3xFemale-Male), a Bread-Board | ||
- OR 6xFemale-Female, 3 jumper wires, the equipment to solder a "Y-jumper wire" to connect two pins to one 3v3 output. | ||
- A [Pamona SOIC-8 Clip](https://www.pomonaelectronics.com/products/test-clips/soic-clip-8-pin) (You can also try a cheaper one, but I failed with it). | ||
- A computer to connect to the RasperrbyPi | ||
|
||
### Software | ||
|
||
- `raspi-config` to enable SPI on the RaspberryPi. If your Raspberry runs the default OS ([Raspberry Pi OS](https://www.raspberrypi.org/software/)) it is already installed. | ||
- `flashrom` on the Raspberry Pi (`sudo apt install flashrom`). | ||
- (optional) [OpenBoardView](https://openboardview.org/) | ||
|
||
|
||
## Flash Heads | ||
|
||
### **Disassemble the laptop** | ||
|
||
Follow _chapter 9_ of the [Lenovo maintenance guide](https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/t430s_t430si_hmm_en_0b48538_01.pdf) to disassembly the laptop. | ||
You do not have to remove the smart card reader, the speakers and the Bluetooth card and its switch. | ||
|
||
Though don't forget to remove the media card reader (page 75). | ||
|
||
After you have taken out the mainboard flip it around. | ||
|
||
The flash memory is located here: | ||
|
||
![T430s-board](/images/T430s_board.jpg) | ||
|
||
And has the following pin layout. | ||
|
||
![T430s-chip](/images/T430s_chip_annotated.jpg) | ||
|
||
In case you want reassure yourself: get the [board view file](https://drive.google.com/file/d/0B2mH6ffKfXjCUWJUb0FKa2g5SE0/view) to check out the pin layout there. You can open it with [OpenBoardView](https://openboardview.org/). | ||
|
||
### **Prepare the Raspberry Pi** | ||
|
||
First, you need to enable the SPI device on the Rapsberry Pi. | ||
|
||
Do this by run `sudo raspi-config` and enable it under `Interface Options`. Reboot the Raspberry Pi. | ||
|
||
Now connect the clip to the Raspberry Pi by using the jumper wires: | ||
|
||
| Pi Pin | GPIO | chip pin | | ||
|--------|------|--------------| | ||
| 1 | First 3v3 | Vcc (8) | | ||
| 17 | Second 3v3 | WB (3), HOLD (7) | | ||
| 19 | 10 | MOSI (5) | | ||
| 21 | 9 | MISO (2) | | ||
| 23 | 11 | CLK (6) | | ||
| 24 | 8 | CS0 (1) | | ||
| 39 | Ground | GND (4) | | ||
|
||
Since the RaspberryPi has only two 3v3 outputs you need to connect the WB and HOLD pin to the same 3v3 output. Use the bread board or your soldered wire for that. | ||
|
||
### **Probe the chip** | ||
|
||
Connect your USB dongle to the Raspberry and `cd` into it. | ||
|
||
Connect the clip to the chip. | ||
|
||
> In case flashrom can't detect or read the chip consider the following: | ||
> - If your Raspberry Pi is connected to an laptop USB port plugin the laptop to the AC. | ||
> - The legs of the chip are really tiny and wear down quickly. Does the clip has a proper connection to the chips legs? | ||
> - Checkout flashroms [common problems](https://www.flashrom.org/Common_problems). | ||
> - If noting helps you probably have to replace the chip on the mainboard. | ||
> Here is a [guide](https://tobiasmanske.de/posts/thinkpad-coreboot-part1/) for that. | ||
|
||
Detect the chip. | ||
|
||
``` | ||
sudo flashrom -p linbux_spi:dev=/dev/spidev0.0,spispeed=10000 | ||
``` | ||
|
||
Flashrom should detect **two** chip types. One of them is `MX25L12835F/MX25L12845E/MX25L12865E`. Ignore the other one. | ||
|
||
In case **non** of the detected chips match `MX25L12835F/MX25L12845E/MX25L12865E` you have to rebuild Coreboot unfortunately. | ||
|
||
> If you have to rebuild: | ||
> - Write down the name of the chip and follow [the build guide](/t430s-building/#set-different-flash-chip-in-flashrom-arguments) to edit the configuration. | ||
> - Also replace `MX25L12835F/MX25L12845E/MX25L12865E` with your chip name in each of the commands below. | ||
|
||
### **Backup and flash** | ||
|
||
1. Backup the current BIOS | ||
|
||
``` | ||
sudo flashrom -p linbux_spi:dev=/dev/spidev0.0,spispeed=10000 -c MX25L12835F/MX25L12845E/MX25L12865E -r ./dump_1.bin | ||
sudo flashrom -p linbux_spi:dev=/dev/spidev0.0,spispeed=10000 -c MX25L12835F/MX25L12845E/MX25L12865E -r ./dump_2.bin | ||
sudo flashrom -p linbux_spi:dev=/dev/spidev0.0,spispeed=10000 -c MX25L12835F/MX25L12845E/MX25L12865E -r ./dump_3.bin | ||
``` | ||
|
||
2. Compare hash sums | ||
|
||
``` | ||
sha256sum -b dump_1.bin > hashvalues.txt | ||
sha256sum -b dump_2.bin >> hashvalues.txt | ||
sha256sum -b dump_3.bin >> hashvalues.txt | ||
``` | ||
Compare the hash sums. If they do not match, read the content again and compare until they match. | ||
|
||
Copy the dumps and `hashvalues.txt` to your USB dongle. | ||
|
||
Those dumps are your backup of the current BIOS! You can flash them in case something went wrong and your laptop won't boot. | ||
|
||
3. Flash Heads | ||
|
||
``` | ||
sudo flashrom -p linbux_spi:dev=/dev/spidev0.0,spispeed=10000 -c MX25L12835F/MX25L12845E/MX25L12865E -w coreboot.rom | ||
``` | ||
|
||
Once its done assemble your laptop and boot into Heads. | ||
|
||
Continue with [configuring keys](/Configuring-Keys/). | ||
|
||
# Archived Technical Details and References | ||
|
||
- [Maintenance guide for the T430s](https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/t430s_t430si_hmm_en_0b48538_01.pdf) ([archive](https://web.archive.org/web/20201112013412/https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/t430s_t430si_hmm_en_0b48538_01.pdf)) | ||
- [T430s board view](https://drive.google.com/file/d/0B2mH6ffKfXjCUWJUb0FKa2g5SE0/view) ([archive](https://archive.org/details/t430s.boardview.11263-1_UMA)) | ||
- [Flash Memory Reference - MX25L12835F](https://www.mxic.com.tw/Lists/Datasheet/Attachments/7397/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf) ([archive](https://web.archive.org/web/20210816122225/https://www.mxic.com.tw/Lists/Datasheet/Attachments/7397/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf)) | ||
- [Solder new flash memory](https://tobiasmanske.de/posts/thinkpad-coreboot-part1/) ([archive](https://web.archive.org/web/20210824072910/https://tobiasmanske.de/posts/thinkpad-coreboot-part1/)) | ||
- [Flashrom RaspberryPi guide](https://flashrom.org/RaspberryPi) ([archive](https://web.archive.org/web/20210604150505/https://flashrom.org/RaspberryPi)) | ||
- [RaspberryPi Pin Layout](https://pinout.xyz/pinout/spi) ([archive](https://web.archive.org/web/20210818215850/https://pinout.xyz/)) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Siproqu That is confirmed to work?
I tested this on x230 which confirmed to not work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Siproqu Can you generated a GBE blob by modifying the bincfg /gbe-82579LM set using the same MAC address you used to test this? Then use a tool like
vbindiff
to show the differences between the blob you just created and the original that uses the MAC00:de:ad:c0:ff:ee
. As the validation is only a checksum, it is quite possible that the MAC you used and00:de:ad:c0:ff:ee
both generate the same checksum but for most other MAC addresses this would not work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tlaurion It's been a while since I've done that (and since then a default coreboot is running on the board), but as far as I remember it worked.
@Thrilleratplay Will do it. And fix the guide if necessary. But Heads is a little low in the priority list at the moment. Please give me some time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could confirm that generating the gbe blob with bincfg works fine. I'll change the wiki entry in the next days.
Probably did something wrong when I simply changed the MAC via hexeditor. Anyways.
Will also update linuxboot/heads#1019 and linuxboot/heads#723 (if still needed?).
Sorry that everything takes so long and so many mistakes happen. Heads is currently very low on the priority unfortunately.