Difference between revisions of "Board:lenovo/x60"

From coreboot
Jump to: navigation, search
(cbmem console)
(Building the ROM without proprietary blobs)
 
(140 intermediate revisions by 6 users not shown)
Line 1: Line 1:
= Lenovo ThinkPad X60s =
+
Coreboot supports all variants of the ThinkPad X60 Series. (X60, X60s, X60 Tablet).
 +
 
 +
Aside from pre-sales configuration (display, processor speed, optional components) it looks like every X60 variant uses the same motherboard schematic.
 +
 
 +
== Status ==
 +
 
 +
* Some ACPI issues with Windows needs to be fixed.
 +
* Works well with GNU/Linux.
 +
* The Wacom Digitizer now works on the X60 Tablet.
 +
 
 +
==Installation and Flashing==
 +
 
 +
Follow the tutorial below to install Coreboot on the ThinkPad X60 Series.
 +
 
 +
[[Board:lenovo/x60/Installation]]
 +
 
 +
== 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 [http://libreboot.org/ Libreboot] distribution [http://libreboot.org/docs/index.html#recommended_wifi lists Wifi chipsets not needing proprietary software to work].
 +
 
 
== Status ==
 
== Status ==
 
{{Status|
 
{{Status|
Line 26: Line 47:
 
|Onboard_VGA_status = OK
 
|Onboard_VGA_status = OK
 
|Onboard_ethernet_status = OK
 
|Onboard_ethernet_status = OK
|Onboard_ethernet_comments = Intel 82573L
+
|Onboard_ethernet_comments = [[Intel_82573_Ethernet_controller|Intel 82573L]]
 
|Onboard_audio_status = OK
 
|Onboard_audio_status = OK
|Onboard_modem_status = N/A
+
|Onboard_modem_status = Untested
 
|Onboard_firewire_status = N/A
 
|Onboard_firewire_status = N/A
 
|Smartcard_status = N/A
 
|Smartcard_status = N/A
Line 59: Line 80:
 
|PS2_mouse_status = N/A
 
|PS2_mouse_status = N/A
 
|Game_port_status = N/A
 
|Game_port_status = N/A
|IR_status = N/A
+
|IR_status = WIP
 +
|IR_comments = [http://review.coreboot.org/#/c/5242/ Submited for review]
 
|Speaker_status = N/A
 
|Speaker_status = N/A
 
|DiskOnChip_status = N/A
 
|DiskOnChip_status = N/A
Line 80: Line 102:
 
|Flashrom_comments = See [[Lenovo_x60x]]
 
|Flashrom_comments = See [[Lenovo_x60x]]
 
}}
 
}}
 +
{| border="0" style="font-size: smaller" valign="top"
 +
|- bgcolor="#6699dd"
 +
|- bgcolor="#6699ff"
 +
| colspan ="9" | '''Laptop specific'''
 +
{{Statusitem|Name=Tablet Touchscreen|Status={{{COM5_status|OK}}}|Comments={{{COM5_comments|x60 tablet wacom "penabled"}}}}}
 +
{{Statusitem|Name=thinkpad_acpi module compatibility|Status={{{thinkpad_acpi_status|OK}}}|Comments={{{thinkpad_acpi_comments|modprobe thinkpad_acpi works}}}}}
 +
|}<includeonly>[[Category:Tutorials]]</includeonly><noinclude>
  
 
== proprietary components status ==
 
== proprietary components status ==
* CPU Microcode (optional?)
+
* 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): without it you will get no graphics during early boot, until the kernel initializes the intel graphic card
+
* VGA option rom (optional): Native graphics initialization (free replacement) is also available and merged in the master repo. 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.
 
* 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)
 +
 +
== Building the ROM without proprietary blobs ==
 +
 +
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.
 +
 +
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>
 +
git reset --hard 8ffc085e1affaabbe3dca8ac6a89346b71dfc02e
 +
</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>
 +
Apply the following patches in this order:
 +
<pre>
 +
# Text mode patch for X60 native graphics (main patch already merged in coreboot. See 6723 on coreboot gerrit)
 +
git fetch http://review.coreboot.org/coreboot refs/changes/25/6725/3 && git cherry-pick FETCH_HEAD
 +
 +
# Permanently enable wlan/wwan/bluetooth/trackpoint
 +
git fetch http://review.coreboot.org/coreboot refs/changes/58/7058/3 && git cherry-pick FETCH_HEAD
 +
 +
# If you want legacy brightness controls (if using this, make sure not to include the ACPI brightness patch below):
 +
git fetch http://review.coreboot.org/coreboot refs/changes/48/7048/4 && git cherry-pick FETCH_HEAD
 +
 +
# OR if you want ACPI brightness controls (if using this, make sure not to include the legacy brightness patch above):
 +
git fetch http://review.coreboot.org/coreboot refs/changes/31/6731/7 && git cherry-pick FETCH_HEAD
 +
# Fix uneven backlight levels (for ACPI brightness controls):
 +
git fetch http://review.coreboot.org/coreboot refs/changes/49/7049/1 && git cherry-pick FETCH_HEAD
 +
 +
# ACPI brightness patches above were abandoned due to Windows incompatibility. If you only want to use GNU/Linux, then it should work fine.
 +
</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 = 7BETC7WW (2.08 )
 +
    Mainboard / Mainboard vendor = Lenovo
 +
    Mainboard / Mainboard model = ThinkPad X60 / X60s / X60t
 +
    Mainboard / ROM chip size = 2048 KB (2 MB)
 +
    Mainboard / SMBIOS Serial Number = L3BH242
 +
    Mainboard / SMBIOS Version Number = ThinkPad X60s
 +
    Mainboard / SMBIOS Manufacturer = LENOVO
 +
    Mainboard / SMBIOS Product name = 1702L8G
 +
    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)
 +
    Generic Drivers / Digitizer = Autodetect
 +
    Console / Send console output to a CBMEM buffer = enable
 +
    Payload / Add a payload = An ELF executable payload
 +
    Payload / Payload path and filename = grub.elf
 +
 +
Now go back into Devices:
 +
 +
    Devices / Run VGA Option ROMs = disable
 +
    Devices / Run Option ROMs on PCI devices = disable
 +
</pre>
 +
 +
Alternatively for X60 Tablet; it's the same as above, but with these differences:
 +
<pre>
 +
    General setup / Local version string = 7JET23WW (1.08 )
 +
    Mainboard / SMBIOS Serial Number = L3B8281
 +
    Mainboard / SMBIOS Version Number = ThinkPad X60 Tablet
 +
    Mainboard / SMBIOS Product name = 6364WJ1
 +
    Generic Drivers / Digitizer = Present
 +
</pre>
 +
 +
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.
 +
 
== TODO ==
 
== TODO ==
 
=== Non-free components replacements ===
 
=== Non-free components replacements ===
* Replace the non-free VGA option rom by making native graphics init work.
+
* <s>Replace the non-free VGA option rom by making native graphics init work.</s> (native graphics available in master)
* Create a Native graphics<->VGA option rom.
+
* 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.
+
* <s>Make backlight work without the non-free option rom.</s> See [http://www.coreboot.org/Board:lenovo/x60#Building_without_proprietary_blobs]
  
=== Other things ===
+
=== Windows currently doesn't boot (STOP A5 error) ===
* Add support for more batteries in ACPI.
+
* Make the wifi card and/or the laptop produce less heat.
+
* Finish and merge support for thinkpad_acpi linux kernel module
+
* Sometimes some dock USB port aren't initialized => fix that
+
  
 +
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).
  
== Features ==
+
Booting with SeaBIOS and the VGA ROM (vbios) can be used to boot it, but booting ends with the message outlined here: [http://paste.debian.net/plain/122557 STOP A5]
=== cbmem console ===
+
To get cbmem console working you need the non-free i915 option rom or native graphics(doesn't work yet, don't use).
+
Even with a dummy VGA option rom it fails:
+
[root@X60 cbmem]# ./cbmem -c -VVV
+
Looking for coreboot table at 0
+
Mapping 1MB of physical memory at 0x0.
+
Unmapping 1MB of virtual memory at 0xb7463000.
+
Looking for coreboot table at f0000
+
Mapping 1MB of physical memory at 0xf0000.
+
Failed to mmap /dev/mem: Operation not permitted
+
[root@X60 cbmem]# dmesg -c
+
[26300.943482] Program cbmem tried to access /dev/mem between f0000->1f0000.
+
  
Using fmem doesn't work either:
+
More information can be found [http://www.coreboot.org/ACPI#STOP_0xa5 here]
[root@X60 cbmem]# ./cbmem -c -VVV
+
Looking for coreboot table at 0
+
Mapping 1MB of physical memory at 0x0.
+
Unmapping 1MB of virtual memory at 0xb74ae000.
+
Looking for coreboot table at f0000
+
Mapping 1MB of physical memory at 0xf0000.
+
Unmapping 1MB of virtual memory at 0xb74ae000.
+
No console found in coreboot table.
+
[root@X60 cbmem]# dmesg -c
+
[26404.984342] fmem init_module 449: init
+
[26404.984349] fmem find_symbols 439: set guess_page_is_ram: c10440b0
+
  
=== thinkpad_acpi compatibility ===
+
===high pitched noise from the board during low power states===
First cherry-pick the commits that permit thinkpad_acpi to work:
+
git fetch http://review.coreboot.org/coreboot refs/changes/56/1556/1 && git cherry-pick FETCH_HEAD
+
git fetch http://review.coreboot.org/coreboot refs/changes/57/1557/1 && git cherry-pick FETCH_HEAD
+
  
Dmidecode from the BIOS says:
+
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:
BIOS Information
+
Vendor: LENOVO
+
Version: 7BETC7WW (2.08 )
+
So in make menuconfig go in
+
General setup  --->
+
And modify Local version string accordinly
+
(7BETC7WW (2.08 )) Local version string
+
  
Then locate the following in dmidecode:
+
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.
System Information
+
Manufacturer: LENOVO
+
Product Name: 1707Y8W
+
Version: ThinkPad X60
+
Serial Number: L3BY949
+
Then in
+
Mainboard  --->
+
do that:
+
(L3BY949) Serial number
+
(ThinkPad X60) Version number
+
(LENOVO) BIOS table vendor string
+
  
Then configure and build coreboot as usual
+
Another option (for increased battery life and lower temperatures) is to use '''powertop --auto-tune''', or set 'Tunables' in powertop (without any parameters).
 +
 
 +
== 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
 +
* Fix that warning:
 +
[  14.566817] ACPI Warning: 0x00000400-0x0000041f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 1 (20130117/utaddress-251)
 +
By using that advise:
 +
<phcoder> GNUtoo-x60: in this case it looks like same range is declared twice in DSDT/SSDT
  
To modprobe the module use that:
+
== Documentation ==
modprobe thinkpad_acpi force_load=1 debug=0xffff fan_control=1 experimental=1
+
* The touchscreen serial port is on irq 5 at port 0x0200. [http://forum.bongofish.co.uk/index.php?topic=2307.0 Some additional info from a x61t wacom]

Latest revision as of 15:47, 15 October 2014

Coreboot supports all variants of the ThinkPad X60 Series. (X60, X60s, X60 Tablet).

Aside from pre-sales configuration (display, processor speed, optional components) it looks like every X60 variant uses the same motherboard schematic.

Status

  • Some ACPI issues with Windows needs to be fixed.
  • Works well with GNU/Linux.
  • The Wacom Digitizer now works on the X60 Tablet.

Installation and Flashing

Follow the tutorial below to install Coreboot on the ThinkPad X60 Series.

Board:lenovo/x60/Installation

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

Device/functionality Status Comments
CPU
CPU works OK Core Duo Mobile (L2300), PBGA479
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 Ricoh rl5c476
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
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 Ultrabase X6
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 WIP Submited for review
PC speaker N/A
DiskOnChip 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
Flashrom OK See Lenovo_x60x
Laptop specific
Tablet Touchscreen OK x60 tablet wacom "penabled"
thinkpad_acpi module compatibility OK modprobe thinkpad_acpi works

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 and merged in the master repo. 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.
  • EC(Embedded Controller) => you do not have to touch it(just leave it where it is)

Building the ROM without proprietary blobs

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.

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:

git reset --hard 8ffc085e1affaabbe3dca8ac6a89346b71dfc02e

Install all of the coreboot build dependencies listed at Build_HOWTO and then build the crossgcc toolchain:

make crossgcc-i386

Apply the following patches in this order:

# Text mode patch for X60 native graphics (main patch already merged in coreboot. See 6723 on coreboot gerrit)
git fetch http://review.coreboot.org/coreboot refs/changes/25/6725/3 && git cherry-pick FETCH_HEAD

# Permanently enable wlan/wwan/bluetooth/trackpoint
git fetch http://review.coreboot.org/coreboot refs/changes/58/7058/3 && git cherry-pick FETCH_HEAD

# If you want legacy brightness controls (if using this, make sure not to include the ACPI brightness patch below):
git fetch http://review.coreboot.org/coreboot refs/changes/48/7048/4 && git cherry-pick FETCH_HEAD

# OR if you want ACPI brightness controls (if using this, make sure not to include the legacy brightness patch above):
git fetch http://review.coreboot.org/coreboot refs/changes/31/6731/7 && git cherry-pick FETCH_HEAD
# Fix uneven backlight levels (for ACPI brightness controls):
git fetch http://review.coreboot.org/coreboot refs/changes/49/7049/1 && git cherry-pick FETCH_HEAD

# ACPI brightness patches above were abandoned due to Windows incompatibility. If you only want to use GNU/Linux, then it should work fine.

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

    General setup / Expert mode = enable
    General setup / Local version string = 7BETC7WW (2.08 )
    Mainboard / Mainboard vendor = Lenovo
    Mainboard / Mainboard model = ThinkPad X60 / X60s / X60t
    Mainboard / ROM chip size = 2048 KB (2 MB)
    Mainboard / SMBIOS Serial Number = L3BH242
    Mainboard / SMBIOS Version Number = ThinkPad X60s
    Mainboard / SMBIOS Manufacturer = LENOVO
    Mainboard / SMBIOS Product name = 1702L8G
    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)
    Generic Drivers / Digitizer = Autodetect
    Console / Send console output to a CBMEM buffer = enable
    Payload / Add a payload = An ELF executable payload
    Payload / Payload path and filename = grub.elf

Now go back into Devices:

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

Alternatively for X60 Tablet; it's the same as above, but with these differences:

    General setup / Local version string = 7JET23WW (1.08 )
    Mainboard / SMBIOS Serial Number = L3B8281
    Mainboard / SMBIOS Version Number = ThinkPad X60 Tablet
    Mainboard / SMBIOS Product name = 6364WJ1
    Generic Drivers / Digitizer = Present

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.

TODO

Non-free components replacements

  • Replace the non-free VGA option rom by making native graphics init work. (native graphics available in master)
  • 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 [1]

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.

Another option (for increased battery life and lower temperatures) is to use powertop --auto-tune, or set 'Tunables' in powertop (without any parameters).

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
  • Fix that warning:
[   14.566817] ACPI Warning: 0x00000400-0x0000041f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 1 (20130117/utaddress-251)

By using that advise:

<phcoder> GNUtoo-x60: in this case it looks like same range is declared twice in DSDT/SSDT

Documentation