Difference between revisions of "Board:lenovo/t60"

From coreboot
Jump to: navigation, search
(T60 with ATI Mobility Radeon)
 
(45 intermediate revisions by 4 users not shown)
Line 1: Line 1:
works fine with GNU/Linux, some ACPI issues with Windows needs to be fixed.
+
Coreboot supports all ThinkPad T60/T60p Series laptops.
= Lenovo ThinkPad T60 =
 
Both the
 
*t60
 
*t60p
 
Have been reported to boot coreboot.  
 
  
 
==Installation and Flashing==
 
==Installation and Flashing==
 
  [[Board:lenovo/x60/Installation| Instructions on Installation and flashing the x60 or t60 ]]
 
  [[Board:lenovo/x60/Installation| Instructions on Installation and flashing the x60 or t60 ]]
  
== Pre-compiled ROM images ==
+
== Wifi chipsets ==
  
For easy installation, you do not need to build from source to flash coreboot on the T60 - but only if it has an Intel GPU. If it has an ATI graphics chipset, then libreboot '''will not work'''.
+
Lenovo BIOS has a whitelist of approved PCI ID's for wifi cards. Coreboot does not, so you are free to use any wifi chipset of your choosing once coreboot is installed.
  
Also, be sure to have the [http://libreboot.org/docs/index.html#supported_t60_list correct LCD panel]
+
The [http://libreboot.org/ Libreboot] distribution [http://libreboot.org/docs/hcl/index.html#recommended_wifi lists Wifi chipsets not needing proprietary software to work].
 
 
The libreboot project [http://libreboot.org/docs/release.html has pre-compiled ROM images available] which are updated regularly for this machine. These images already have the dd trick applied (for the bucts trick outlined in the link above) and the archives come with scripts to pre-patch flashrom.
 
 
 
Use [http://libreboot.org/docs/index.html#flashrom_lenovobios this tutorial] to flash them. NOTE: If you want to backup factory.bin (original Lenovo BIOS), follow [http://www.coreboot.org/Board:lenovo/x60/Installation coreboot's tutorial] first, up to Step 2.
 
  
 
== Status ==
 
== Status ==
Line 104: Line 95:
 
== proprietary components status ==
 
== proprietary components status ==
 
* CPU Microcode (optional?) - works fine without. See [http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf]
 
* CPU Microcode (optional?) - works fine without. See [http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf]
* VGA option rom (optional): Native graphics initialization (free replacement) is also available with [http://review.coreboot.org/#/c/5345 this patch] that is under review. Note that the replacement doesn't work yet with seabios but works with grub(as a payload) or libpayload based payloads. SeaBIOS can be used with SeaVGABIOS (coreboot linear framebuffer option in seabios menuconfig) but the native graphics implementation currently lacks INT 10H and VBT.  
+
* VGA option rom (optional): Native graphics initialization (free replacement) is also available for models with a Intel gpu.
 
* EC(Embedded Controller) =>  you do not have to touch it(just leave it where it is)
 
* EC(Embedded Controller) =>  you do not have to touch it(just leave it where it is)
  
== TODO ==
+
== Building the ROM without proprietary blobs ==
=== Non-free components replacements ===
 
* <s>Replace the non-free VGA option rom by making native graphics init work.</s> See [http://www.coreboot.org/Board:lenovo/t60#Make_backlight_.28Fn_keys.29_control_work_with_native_gpu_init] (under review on 5345 changeset, review.coreboot.org]
 
* Create a Native graphics<->VGA option rom. '''SeaVGABIOS (part of SeaBIOS) might be the answer. INT 10H and VBT are missing in native graphics.'''
 
* <s>Make backlight work without the non-free option rom.</s> See 6731 on review.coreboot.org
 
  
== Text Mode ==
+
TODO: these instructions should still work, but they are outdated. Bring them up to date, using the latest coreboot revision.
  
When using native graphics instead of the VBIOS, you can enable Text Mode in menuconfig, under Display.
+
This basically means:
 +
* No microcode updates
 +
* Native graphics (replacement for the proprietary Video BIOS / VGA Option ROM)
 +
* GRUB2 payload
  
Disable 'Keep VESA Framebuffer'. This is for booting payloads like MemTest86+ which expect text-mode graphics.
+
In this configuration, only GNU/Linux is known to work. If you plan to use other operating systems, you might be out of luck.
 +
* Note, this configuration only works for T60's with the Intel GMA950 video chipset. ATI GPU won't work, because they lack native graphics support.
  
Use [http://review.coreboot.org/#/c/6725/ this patch].
+
Download coreboot like usual:
 +
<pre>
 +
git clone http://review.coreboot.org/coreboot
 +
cd coreboot
 +
</pre>
 +
At the time of writing for (for these instructions), the following git revision was used:
 +
<pre>
 +
Install all of the coreboot build dependencies listed at [http://www.coreboot.org/Build_HOWTO Build_HOWTO] and then build the crossgcc toolchain:
 +
<pre>
 +
make crossgcc-i386
 +
</pre>
 +
Now you will want this basic configuration for X60/X60s (in '''make menuconfig'''):
 +
<pre>
 +
    General setup / Expert mode = enable
 +
    General setup / Local version string = 79ETE7WW (2.27 )
 +
    Mainboard / Mainboard vendor = Lenovo
 +
    Mainboard / Mainboard model = ThinkPad T60 / T60p
 +
    Mainboard / ROM chip size = 2048 KB (2 MB)
 +
    Mainboard / SMBIOS Serial Number = L3DKE06
 +
    Mainboard / SMBIOS Version Number = ThinkPad T60
 +
    Mainboard / SMBIOS Manufacturer = LENOVO
 +
    Mainboard / SMBIOS Product name = 1951FEG
 +
    Chipset / Include CPU microcode in CBFS = Do not include microcode updates
 +
    Devices / Use native graphics initialization = enable
 +
    Display / Keep VESA framebuffer = disable (disable for text-mode graphics, enable for coreboot vesa framebuffer)
 +
    Console / Send console output to a CBMEM buffer = enable
 +
    Payload / Add a payload = An ELF executable payload
 +
    Payload / Payload path and filename = grub.elf
  
Also, enable it for T60 with [http://paste.debian.net/plain/122565 this patch]
+
Go back into Devices:
  
==="whining" (buzzing) noise when idle===
+
    Devices / Run VGA Option ROMs = disable
 +
    Devices / Run Option ROMs on PCI devices = disable
 +
</pre>
  
Use "idle=halt" (higher power consumption) or "processor.max_cstate=2" (higher power consumption, but not as bad) kernel parameter in GRUB.
 
  
Note:
+
SMBIOS values were taken by running '''dmidecode''' with the factory BIOS.
Boot without these options, and there will be a high pitched noise coming from the board when the system is idle.
 
A better workaround is to boot without these options, and run '''sudo powertop'''
 
  
Under "tunables", set all options to "Good" settings. This kills the noise.
+
Note, the above assumes that you already built your grub.elf from source along with everything that you need. Building GRUB is not covered here.
'''By using this, power consumption falls lower: near the levels in Lenovo BIOS''' (better battery life).
 
  
You can also use '''sudo powertop --auto-tune''' instead.
+
Put your grub.elf in the coreboot directory and then run '''make'''. Alternatively, you could go back into menuconfig and select coreboot's own GRUB payload config, which will automatically download and build the GRUB payload. Building it yourself can be more flexible, though, since you get to choose what modules you want and you can use your own configs.
  
== Make backlight (Fn keys) control work with native gpu init ==
+
=== T60 with ATI Mobility Radeon ===
 +
Model with an ATI gpu need an option for display to work.
 +
To do this look up the pci id using lspci and adapt CONFIG_VGA_BIOS_ID in menuconfig accordingly.
 +
e.g. "1002,7145"
  
You first need native graphics support (free VBIOS replacement). Apply [http://review.coreboot.org/#/c/5345 this patch] using '''cherry pick''' on top of master.
+
You have to extract the ATI Option ROM from running system, as the vendor BIOS does patch the ATOMBIOS structure, but coreboot does not.
 +
Vendor BIOS does:
 +
* Set IOBaseAddr offset
 +
* Update connector list
 +
* Update VRAM_UsageByFirmware
 +
* Update MultimediaCapabilityInfo
 +
* Update CompassionateData
 +
* Update DAC_Info
 +
* Update TDMS_Info
  
See [http://libreboot.org/docs/future/old.html#x60_native_notes x60 notes] and [http://libreboot.org/docs/future/old.html#t60_native_notes t60 notes].
+
You can use radeon_bios_decode to decode the ATOMBIOS structure.
  
This is one way to get backlight controls working. Another method is shown in changeset 6731 on review.coreboot.org. If you use this, also apply this patch to fix uneven backlight levels: [http://paste.debian.net/plain/122548 patch] - also, [http://paste.debian.net/plain/122563 apply this patch]
+
== TODO ==
 
+
=== Non-free components replacements ===
=== Other things ===
+
* <s>Replace the non-free VGA option rom by making native graphics init work.</s> See [http://www.coreboot.org/Board:lenovo/t60#Make_backlight_.28Fn_keys.29_control_work_with_native_gpu_init] (under review on 5345 changeset, review.coreboot.org]
* Add support for more batteries in ACPI.
+
* Create a Native graphics<->VGA option rom. '''SeaVGABIOS (part of SeaBIOS) might be the answer. INT 10H and VBT are missing in native graphics.'''
* Make the wifi card and/or the laptop produce less heat.
+
* <s>Make backlight work without the non-free option rom.</s> See 6731 on review.coreboot.org
* Finish and merge support for thinkpad_acpi linux kernel module
+
=== Windows currently doesn't boot (STOP A5 error) ===
* Sometimes some dock USB port aren't initialized => fix that
 
 
 
== Windows currently doesn't boot (STOP A5 error) ==
 
  
 
Windows 7 was tested and fails to boot at the moment.
 
Windows 7 was tested and fails to boot at the moment.
Line 159: Line 183:
  
 
More information can be found [http://www.coreboot.org/ACPI#STOP_0xa5 here]
 
More information can be found [http://www.coreboot.org/ACPI#STOP_0xa5 here]
 +
 +
===high pitched noise from the board during low power states===
 +
 +
<s>During low power state (cstate 3), a high-pitched "humming" noise eminates from the board. Some discussion has been made about this; suggestions include "using an oscilliscope in clever ways" (to detect where the noise is coming from to debug the issue). There are some workarounds:
 +
 +
Use "idle=halt" (higher power consumption) or "processor.max_cstate=2" (higher power consumption, but not as bad) kernel parameter in GRUB. These increase heat and power consumption. </s> The CPU noise on core duo CPUs is highly reduced by https://review.coreboot.org/#/c/16901/ and likely was not a problem on core 2 duo CPUs.
 +
 +
Another option (for increased battery life and lower temperatures) is to use '''powertop --auto-tune''', or set 'Tunables' in powertop (without any parameters). This solves noise coming from the USB ports which is not related to the CPU low power states.
 +
 +
=== ATOMBIOS parser / updater ===
 +
 +
Implement a ATOMBIOS updater in coreboot to patch the ATI Option ROM.
 +
 +
=== Other things ===
 +
* Add support for more batteries in ACPI.
 +
* Make the wifi card and/or the laptop produce less heat.
 +
* Sometimes some dock USB port aren't initialized => fix that

Latest revision as of 09:20, 29 October 2017

Coreboot supports all ThinkPad T60/T60p Series laptops.

Installation and Flashing

 Instructions on Installation and flashing the x60 or t60 

Wifi chipsets

Lenovo BIOS has a whitelist of approved PCI ID's for wifi cards. Coreboot does not, so you are free to use any wifi chipset of your choosing once coreboot is installed.

The Libreboot distribution lists Wifi chipsets not needing proprietary software to work.

Status

This table needs review. I copied the x60 table and ran through it from memory, expresscard comes to mind...

Device/functionality Status Comments
CPU
CPU works OK
L1 cache enabled OK
L2 cache enabled OK
L3 cache enabled N/A
Multiple CPU support N/A
Multi-core support OK
Hardware virtualization OK
RAM
EDO N/A
SDRAM N/A
SO-DIMM N/A
DDR N/A
DDR2 OK
DDR3 N/A
Dual channel support OK
ECC support N/A
On-board Hardware
On-board IDE 3.5" N/A
On-board IDE 2.5" N/A
On-board SATA OK
On-board SCSI N/A
On-board USB OK
On-board VGA OK
On-board Ethernet OK Intel 82573L
On-board Audio OK
On-board Modem Untested
On-board FireWire N/A
On-board Smartcard reader N/A
On-board CompactFlash N/A
On-board PCMCIA OK
On-board Wifi N/A
On-board Bluetooth N/A
On-board SD card reader N/A
Add-on slots/cards
ISA add-on cards N/A
Audio/Modem-Riser (AMR/CNR) cards N/A
PCI add-on cards N/A
Mini-PCI add-on cards OK
Mini-PCI-Express add-on cards Unknown
PCI-X add-on cards N/A
AGP graphics cards N/A
PCI Express x1 add-on cards N/A
PCI Express x2 add-on cards N/A
PCI Express x4 add-on cards N/A
PCI Express x8 add-on cards N/A
PCI Express x16 add-on cards N/A
PCI Express x32 add-on cards N/A
HTX add-on cards N/A
Legacy / Super I/O
Floppy N/A
Serial port 1 (COM1) OK located in docking station
Serial port 2 (COM2) N/A
Parallel port N/A
PS/2 keyboard N/A
PS/2 mouse N/A
Game port N/A
Infrared Untested
PC speaker N/A
DiskOnChip N/A
Input
Trackpoint N/A
Touchpad N/A
Fn Hotkeys N/A
Fingerprint Reader N/A
Laptop
Docking VGA N/A
Docking LAN N/A
Docking USB N/A
Docking Audio N/A
Docking Displayport N/A
Thinklight N/A
Webcam N/A
Miscellaneous
Sensors / fan control OK
Hardware watchdog N/A
SMBus OK
CAN bus N/A
CPU frequency scaling OK
Other powersaving features OK
ACPI OK
Reboot OK
Poweroff OK
Suspend OK
Nonstandard LEDs OK LEDs are controlled by Embedded Controller (EC). Working without special support.
High precision event timers (HPET) OK
Random number generator (RNG) N/A
Wake on modem ring Unknown
Wake on LAN Unknown
Wake on keyboard Unknown
Wake on mouse Unknown
TPM Unknown
Flashrom OK See Board:lenovo/x60/Installation


proprietary components status

  • CPU Microcode (optional?) - works fine without. See http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf
  • VGA option rom (optional): Native graphics initialization (free replacement) is also available for models with a Intel gpu.
  • EC(Embedded Controller) => you do not have to touch it(just leave it where it is)

Building the ROM without proprietary blobs

TODO: these instructions should still work, but they are outdated. Bring them up to date, using the latest coreboot revision.

This basically means:

  • No microcode updates
  • Native graphics (replacement for the proprietary Video BIOS / VGA Option ROM)
  • GRUB2 payload

In this configuration, only GNU/Linux is known to work. If you plan to use other operating systems, you might be out of luck.

  • Note, this configuration only works for T60's with the Intel GMA950 video chipset. ATI GPU won't work, because they lack native graphics support.

Download coreboot like usual:

git clone http://review.coreboot.org/coreboot
cd coreboot

At the time of writing for (for these instructions), the following git revision was used:

Install all of the coreboot build dependencies listed at [http://www.coreboot.org/Build_HOWTO Build_HOWTO] and then build the crossgcc toolchain:
<pre>
make crossgcc-i386

Now you will want this basic configuration for X60/X60s (in make menuconfig):

    General setup / Expert mode = enable
    General setup / Local version string = 79ETE7WW (2.27 )
    Mainboard / Mainboard vendor = Lenovo
    Mainboard / Mainboard model = ThinkPad T60 / T60p
    Mainboard / ROM chip size = 2048 KB (2 MB)
    Mainboard / SMBIOS Serial Number = L3DKE06
    Mainboard / SMBIOS Version Number = ThinkPad T60
    Mainboard / SMBIOS Manufacturer = LENOVO
    Mainboard / SMBIOS Product name = 1951FEG
    Chipset / Include CPU microcode in CBFS = Do not include microcode updates
    Devices / Use native graphics initialization = enable
    Display / Keep VESA framebuffer = disable (disable for text-mode graphics, enable for coreboot vesa framebuffer)
    Console / Send console output to a CBMEM buffer = enable
    Payload / Add a payload = An ELF executable payload
    Payload / Payload path and filename = grub.elf

Go back into Devices:

    Devices / Run VGA Option ROMs = disable
    Devices / Run Option ROMs on PCI devices = disable


SMBIOS values were taken by running dmidecode with the factory BIOS.

Note, the above assumes that you already built your grub.elf from source along with everything that you need. Building GRUB is not covered here.

Put your grub.elf in the coreboot directory and then run make. Alternatively, you could go back into menuconfig and select coreboot's own GRUB payload config, which will automatically download and build the GRUB payload. Building it yourself can be more flexible, though, since you get to choose what modules you want and you can use your own configs.

T60 with ATI Mobility Radeon

Model with an ATI gpu need an option for display to work. To do this look up the pci id using lspci and adapt CONFIG_VGA_BIOS_ID in menuconfig accordingly. e.g. "1002,7145"

You have to extract the ATI Option ROM from running system, as the vendor BIOS does patch the ATOMBIOS structure, but coreboot does not. Vendor BIOS does:

  • Set IOBaseAddr offset
  • Update connector list
  • Update VRAM_UsageByFirmware
  • Update MultimediaCapabilityInfo
  • Update CompassionateData
  • Update DAC_Info
  • Update TDMS_Info

You can use radeon_bios_decode to decode the ATOMBIOS structure.

TODO

Non-free components replacements

  • Replace the non-free VGA option rom by making native graphics init work. See [1] (under review on 5345 changeset, review.coreboot.org]
  • Create a Native graphics<->VGA option rom. SeaVGABIOS (part of SeaBIOS) might be the answer. INT 10H and VBT are missing in native graphics.
  • Make backlight work without the non-free option rom. See 6731 on review.coreboot.org

Windows currently doesn't boot (STOP A5 error)

Windows 7 was tested and fails to boot at the moment.

The native graphics implementation lacks INT 10H and VBT, and GRUB cannot boot it. Booting with SeaBIOS+SeaVGABIOS results in graphical corruption (and no boot).

Booting with SeaBIOS and the VGA ROM (vbios) can be used to boot it, but booting ends with the message outlined here: STOP A5

More information can be found here

high pitched noise from the board during low power states

During low power state (cstate 3), a high-pitched "humming" noise eminates from the board. Some discussion has been made about this; suggestions include "using an oscilliscope in clever ways" (to detect where the noise is coming from to debug the issue). There are some workarounds:

Use "idle=halt" (higher power consumption) or "processor.max_cstate=2" (higher power consumption, but not as bad) kernel parameter in GRUB. These increase heat and power consumption. The CPU noise on core duo CPUs is highly reduced by https://review.coreboot.org/#/c/16901/ and likely was not a problem on core 2 duo CPUs.

Another option (for increased battery life and lower temperatures) is to use powertop --auto-tune, or set 'Tunables' in powertop (without any parameters). This solves noise coming from the USB ports which is not related to the CPU low power states.

ATOMBIOS parser / updater

Implement a ATOMBIOS updater in coreboot to patch the ATI Option ROM.

Other things

  • Add support for more batteries in ACPI.
  • Make the wifi card and/or the laptop produce less heat.
  • Sometimes some dock USB port aren't initialized => fix that