2023-07-10 15:43:08 +00:00
|
|
|
---
|
|
|
|
title: Installation instructions
|
|
|
|
x-toc-enable: true
|
|
|
|
...
|
|
|
|
|
2024-05-27 11:02:00 +00:00
|
|
|
Flashprog
|
|
|
|
=========
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
**NOTE: Canoeboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
|
|
|
now, as of 3 May 2024, which is a fork of flashrom.**
|
|
|
|
|
|
|
|
This section relates to installing canoeboot on supported targets.
|
2023-07-10 15:43:08 +00:00
|
|
|
|
2024-08-26 02:12:42 +00:00
|
|
|
**Disable security before flashing**
|
|
|
|
================================
|
2024-01-04 09:21:57 +00:00
|
|
|
|
2024-08-26 02:12:42 +00:00
|
|
|
**Before internal flashing, you must first disable `/dev/mem` protections. Make
|
|
|
|
sure to re-enable them after you're finished.**
|
2024-01-04 09:21:57 +00:00
|
|
|
|
2024-08-26 02:12:42 +00:00
|
|
|
**See: [Disabling /dev/mem protection](devmem.md)**
|
2024-01-04 09:21:57 +00:00
|
|
|
|
2023-07-10 15:43:08 +00:00
|
|
|
PRECAUTIONS
|
|
|
|
===========
|
|
|
|
|
2023-10-26 00:10:41 +00:00
|
|
|
Canoeboot flashing can be risky business. Please ensure that you have external
|
2023-07-10 15:43:08 +00:00
|
|
|
flashing equipment, in case anything goes wrong. The general rule of thumb with
|
|
|
|
firmware is this: if it's non-free, replace it, but if you're already running
|
|
|
|
free firmware and it works nicely for you, you do not need to update it.
|
2023-10-26 00:10:41 +00:00
|
|
|
However, you might want to tweak it or try out newer releases of Canoeboot if
|
2023-07-10 15:43:08 +00:00
|
|
|
they have bug fixes for your board, and/or new security fixes.
|
|
|
|
|
|
|
|
If you're already running libre firmware on your board, you should decide for
|
|
|
|
sure whether you wish to risk it. See changelogs on
|
|
|
|
the [release announcements via the news page](/news/) and decide for yourself.
|
|
|
|
|
|
|
|
About ROM image file names
|
|
|
|
==========================
|
|
|
|
|
|
|
|
Init types and display mode
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
NOTE: regardless of init type, on desktops, an external/add-on GPU can always
|
2023-10-26 00:10:41 +00:00
|
|
|
be used. On laptop hardware in Canoeboot, libgfxinit will always be used. On
|
2023-07-10 15:43:08 +00:00
|
|
|
desktop/server hardware, if available, libgfxinit will also always be used by
|
|
|
|
default (but in that setup, SeaBIOS can be used if you want to use an add-on
|
|
|
|
graphics card, e.g. on KCMA-D8, KGPE-D16, GA-G41M-ES2L)
|
|
|
|
|
|
|
|
**This means that on desktop hardware such as KCMA-D8, KGPE-D16, G43T-AM3,
|
|
|
|
GA-G41M-ES2L and others, you can use either the internal GPU or an add-on
|
|
|
|
PCI-E graphics card. Simply use a ROM image that starts with SeaBIOS, and you
|
|
|
|
can use both. On desktop/server hardware, libgfxinit simply means that you
|
|
|
|
CAN use the internal graphics chip, but you don't have to; external add-on
|
|
|
|
GPUs will also still work! However, if libgfxinit is enabled, that disables
|
|
|
|
coreboot from loading/executing PCI option ROMs which means you MUST use SeaBIOS
|
|
|
|
if you wish to use the add-on cards!**
|
|
|
|
|
|
|
|
### libgfxinit
|
|
|
|
|
|
|
|
In this setup, on supported systems, coreboot's own native video initialization
|
|
|
|
code is used. This is referred to generically as libgfxinit, which is coreboot's
|
|
|
|
library in `3rdparty/libgfxinit` but not all boards with native video
|
|
|
|
initialization use libgfxinit; some of them are using coreboot's older style
|
|
|
|
of video initialization method, written purely in C.
|
|
|
|
|
|
|
|
#### corebootfb (libgfxinit)
|
|
|
|
|
|
|
|
high resolution coreboot framebuffer used on startup
|
|
|
|
|
|
|
|
#### txtmode (libgfxinit)
|
|
|
|
|
|
|
|
int10h text mode is used on startup.
|
|
|
|
|
|
|
|
### vgarom
|
|
|
|
|
2023-10-26 00:10:41 +00:00
|
|
|
NOTE: no configs in Canoeboot are currently available that use this method.
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
With this method, coreboot is finding, loading and executing a VGA option ROM
|
|
|
|
for your graphics hardware. This would not be done on laptops, because that
|
2023-10-26 00:10:41 +00:00
|
|
|
implies supplying non-free binary blobs in Canoeboot, so this setup would only
|
2023-07-10 15:43:08 +00:00
|
|
|
ever be provided on desktop hardware where no GPU exists or where it is
|
|
|
|
desirable for you to use an external/add-on graphics card
|
|
|
|
|
|
|
|
#### vesafb (vgarom)
|
|
|
|
|
|
|
|
high resolution VESA framebuffer used on startup. This is equivalent
|
|
|
|
to `corebootfb` (high resolution framebuffer), but for setups where a VGA
|
|
|
|
Option ROM is used.
|
|
|
|
|
|
|
|
#### txtmode (vgarom)
|
|
|
|
|
|
|
|
int10h text mode is used on startup
|
|
|
|
|
|
|
|
### normal
|
|
|
|
|
|
|
|
int10h text mode startup is implied here. The `vesafb` mode is unavailable here.
|
|
|
|
For `vesafb` mode, please use init type `vgarom`; most useful for GRUB payloads
|
|
|
|
or perhaps Tianocore.
|
|
|
|
|
|
|
|
In this setup, coreboot is neither implementing libgfxinit / native graphics
|
|
|
|
initialization nor is it finding/loading/executing VGA option ROMs. In this
|
|
|
|
setup, SeaBIOS would most likely be used for that.
|
|
|
|
|
2023-10-26 00:10:41 +00:00
|
|
|
The `normal` setup is supported in the Canoeboot build system, but not
|
2023-07-10 15:43:08 +00:00
|
|
|
currently used. It is there for desktop hardware that will be added in the
|
|
|
|
future, where those desktop boards do not have an onboard GPU and therefore an
|
|
|
|
add-on GPU is always used..
|
|
|
|
|
|
|
|
Payload names
|
|
|
|
-------------
|
|
|
|
|
|
|
|
### grub
|
|
|
|
|
|
|
|
ROM images with just `grub` in the file name will start first with the GRUB
|
|
|
|
payload. They may or may not also provide other payloads in the menu, such as
|
|
|
|
memtest86+, SeaBIOS, Tianacore and so on.
|
|
|
|
|
|
|
|
### seabios
|
|
|
|
|
|
|
|
ROM images with just `seabios` in the file name will start first with the
|
|
|
|
SeaBIOS payload. They will only contain SeaBIOS, but may also contain memtest as
|
|
|
|
an option in the boot menu.
|
|
|
|
|
|
|
|
### seabios\_withgrub
|
|
|
|
|
|
|
|
ROM images that have `seabios_withgrub` in the file name start with SeaBIOS
|
|
|
|
first, but also have GRUB available in the boot menu when you press ESC.
|
|
|
|
|
2024-05-27 11:02:00 +00:00
|
|
|
ROM images with this and `grubonly` in the image start SeaBIOS, but only load
|
|
|
|
GRUB from SeaBIOS and the SeaBIOS menu is disabled. Use these images if you
|
|
|
|
only want GRUB; they are provided on systems that only have VGA ROM-based
|
|
|
|
initialisation, usually discrete graphics cards on desktop machines.
|
|
|
|
|
2023-07-10 15:43:08 +00:00
|
|
|
Which systems are supported?
|
|
|
|
============================
|
|
|
|
|
|
|
|
[Refer to the hardware compatibility page](../hardware/)
|
|
|
|
|
2024-05-27 11:02:00 +00:00
|
|
|
Intel GbE MAC address (IFD-based systems)
|
|
|
|
=====================================================================
|
|
|
|
|
|
|
|
You can change the MAC address in flash, on these machines. See:
|
|
|
|
[nvmutil documentation](nvmutil.md)
|
|
|
|
|
|
|
|
The MAC address is stored in a region of the boot flashed called *GbE NVM*
|
|
|
|
which is short for *gigabit ethernet non-volatile memory*. Refer to the
|
|
|
|
following article:
|
|
|
|
|
|
|
|
For GM45/ICH9M systems (e.g. ThinkPad X200/T400, Dell Latitude E6400), see:
|
|
|
|
[ich9utils documentation](ich9utils.md) (you can also use nvmutil, see link
|
|
|
|
above)
|
|
|
|
|
|
|
|
Canoeboot puts a default MAC address in the available ROM images, but this is
|
|
|
|
a generic MAC address and it's identical on every ROM image. Technically, you
|
|
|
|
can use it but if you encounter other Canoeboot users on the same ethernet
|
|
|
|
switch, using the same physical network as you, you will encounter a MAC
|
|
|
|
address conflict.
|
|
|
|
|
|
|
|
NOTE: R500 thinkpads do not have an Intel gigabit ethernet NIC, so on that
|
|
|
|
laptop you can just flash the default ROM and you do not have to worry.
|
|
|
|
|
|
|
|
There are also some Intel X4X platforms that use an ICH10 southbridge,
|
|
|
|
supported in Canoeboot, but these are flashed in a *descriptorless* setup,
|
|
|
|
which means that the MAC address is irrelevant (either there will be an Intel
|
|
|
|
PHY module that is now unusable, and you use an add-on card, or it doesn't use
|
|
|
|
an Intel PHY module and the onboard NIC is usable).
|
|
|
|
|
2023-07-10 15:43:08 +00:00
|
|
|
Install via host CPU (internal flashing)
|
|
|
|
========================================
|
|
|
|
|
|
|
|
On all mainboards is a built-in programmer, which can read, erase and rewrite
|
|
|
|
the boot flash. However, it is not always usable by default. For example, it
|
|
|
|
may be configured to restrict write privileges by the host CPU.
|
|
|
|
|
|
|
|
In some situations, the host CPU can rewrite/erase/dump the boot flash.
|
|
|
|
This is called *internal flashing*. This means that you will run software,
|
2024-01-27 22:35:38 +00:00
|
|
|
namely `flashprog`, to read/erase/write the contents of the boot flash from a
|
2023-07-10 15:43:08 +00:00
|
|
|
running operating system on the target device.
|
|
|
|
|
|
|
|
NOTE: please also read the sections further down this page. On some systems,
|
|
|
|
external flashing is required. This means that you power the system down and
|
|
|
|
use a special tool that connects to and reprograms the boot flash.
|
|
|
|
|
|
|
|
NOTE: in some cases, external flashing is possible but special steps are
|
|
|
|
required. This depends on your mainboard. Again, please read this page
|
|
|
|
carefully.
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
Run flashprog on host CPU
|
2023-07-10 15:43:08 +00:00
|
|
|
------------------------
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
You can simply take any ROM image from the canoeboot project, and flash it.
|
|
|
|
Boot a GNU+Linux distribution on the target device, and install flashprog.
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
In some cases, this is not possible or there are other considerations. Please
|
|
|
|
read this section *carefully*.
|
|
|
|
|
|
|
|
### Flash chip size
|
|
|
|
|
|
|
|
Use this to find out:
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
flashprog -p internal
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
In the output will be information pertaining to your boot flash.
|
|
|
|
|
|
|
|
### Howto: read/write/erase the boot flash
|
|
|
|
|
|
|
|
How to read the current chip contents:
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
sudo flashprog -p internal:laptop=force_I_want_a_brick,boardmismatch=force -r dump.bin
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
You should still make several dumps, even if you're flashing internally, to
|
|
|
|
ensure that you get the same checksums. Check each dump using `sha1sum`
|
|
|
|
|
|
|
|
How to erase and rewrite the chip contents:
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
sudo flashprog -p internal:laptop=force_I_want_a_brick,boardmismatch=force -w canoeboot.rom
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
If you are re-flashing a GM45+ICH9M laptop (e.g. ThinkPad X200/X200S/X200T,
|
|
|
|
T400, T500, R400, W500 etc - but not R500), you should run the ich9gen utility
|
|
|
|
to preserve your mac address.
|
|
|
|
Please read the ich9utils documentation:
|
|
|
|
[/docs/install/ich9utils.html](/docs/install/ich9utils.html)
|
|
|
|
|
|
|
|
NOTE: `force_I_want_a_brick` is not scary. Do not be scared! This merely disables
|
2024-01-27 22:35:38 +00:00
|
|
|
the safety checks in flashprog. Flashrom and coreboot change a lot, over the years,
|
2023-07-10 15:43:08 +00:00
|
|
|
and sometimes it's necessary to use this option. If you're scared, then just
|
|
|
|
follow the above instructions, but remove that option. So, just use `-p internal`.
|
|
|
|
If that doesn't work, next try `-p internal:boardmismatch=force`. If that doesn't
|
|
|
|
work, try `-p internal:boardmismatch=force,laptop=force_I_want_a_brick`. So long
|
|
|
|
as you *ensure* you're using the correct ROM for your machine, it will be safe
|
2024-01-27 22:35:38 +00:00
|
|
|
to run flashprog. These extra options just disable the safetyl checks in flashprog.
|
2023-07-10 15:43:08 +00:00
|
|
|
There is nothing to worry about.
|
|
|
|
|
|
|
|
If successful, it will either say `VERIFIED` or it will say that the chip
|
|
|
|
contents are identical to the requested image.
|
|
|
|
|
|
|
|
NOTE: there are exceptions where the above is not possible. Read about them in
|
|
|
|
the sections below:
|
|
|
|
|
|
|
|
### Exceptions
|
|
|
|
|
|
|
|
#### If your boot flash is currently write-protected
|
|
|
|
|
|
|
|
[You must flash it externally](spi.md)
|
|
|
|
|
|
|
|
#### DELL Latitute E6400 laptop (easy to flash, similar to X200/T400)
|
|
|
|
|
2023-10-26 00:10:41 +00:00
|
|
|
See: [Dell Latitute E6400 Canoeboot Installation Guide](e6400.md)
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
#### ThinkPad X200/T400/T500/W500/R400/R500 vendor BIOS
|
|
|
|
|
|
|
|
If you're running one of these, it cannot be flashed internally if you're still
|
|
|
|
running the non-free Lenovo BIOS firmware.
|
|
|
|
|
|
|
|
[You must flash it externally](spi.md)
|
|
|
|
|
|
|
|
See notes further down on this page. We have guides for specific thinkpads,
|
|
|
|
related to disassembly and reassembly so that you can access the flash.
|
|
|
|
|
|
|
|
Please also see notes about the built-in MAC address inside the boot flash, for
|
|
|
|
the onboard NIC (ethernet one); not relevant on R500, which doesn't use an
|
|
|
|
Intel NIC.
|
|
|
|
|
|
|
|
#### Intel D510MO and D410PT running non-free Intel BIOS
|
|
|
|
|
|
|
|
[You must flash it externally](spi.md)
|
|
|
|
|
|
|
|
D410PT is more or less the same board as D510MO, but we would like more info
|
2023-10-26 00:10:41 +00:00
|
|
|
about this board. If you have a D410PT mainboard, please contact the Canoeboot
|
2023-07-10 15:43:08 +00:00
|
|
|
project via IRC and ping `leah` before you flash it. When you do so, please
|
|
|
|
reference this paragraph on this web page.
|
|
|
|
|
|
|
|
#### Gigabyte GA-G41M-ES2l (any firmware)
|
|
|
|
|
|
|
|
Ignore this section. Internal flashing *is* possible, but there are two chips
|
|
|
|
and you must flash both chips. Refer to the guide:\
|
|
|
|
[Gigabyte GA-G41M-ES2L installation guide](ga-g41m-es2l.html)
|
|
|
|
|
|
|
|
#### Macbook1,1 running non-free Apple EFI firmware
|
|
|
|
|
|
|
|
This laptop requires external flashing. Remove the mainboard and refer to
|
2023-10-26 00:10:41 +00:00
|
|
|
the [external flashing guide](spi.md); if Canoeboot is already running, you
|
2023-07-10 15:43:08 +00:00
|
|
|
can flash internally.
|
|
|
|
|
|
|
|
MacBook2,1 can be flashed internally.
|
|
|
|
|
|
|
|
#### ASUS KFSN4-DRE?
|
|
|
|
|
2023-07-17 15:45:56 +00:00
|
|
|
Simply boot GNU+Linux with the default vendor firmware, and flash it internally,
|
2023-07-10 15:43:08 +00:00
|
|
|
but before you do: take a push pin, remove the metal pin, and superglue the
|
|
|
|
plastic part to the chip. Then remove the chip after you booting your
|
2023-07-17 15:45:56 +00:00
|
|
|
GNU+Linux system. Install a new chip, and flash *that*.
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
This board uses LPC flash in a PLCC32 socket. This coreboot page shows an
|
|
|
|
example of the push pin as a proof of concept:
|
|
|
|
<http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools>
|
|
|
|
|
|
|
|
#### ASUS KGPE-D16 running non-free ASUS BIOS
|
|
|
|
|
|
|
|
[You must flash it externally](spi.md)
|
|
|
|
|
|
|
|
#### ASUS KCMA-D8 running non-free ASUS BIOS
|
|
|
|
|
|
|
|
[You must flash it externally](spi.md)
|
|
|
|
|
|
|
|
#### ASUS D945GCLF running non-free Intel BIOS
|
|
|
|
|
|
|
|
[You must flash it externally](spi.md)
|
|
|
|
|
2024-05-04 08:54:51 +00:00
|
|
|
#### ThinkPad X60/X60S/X60T/T60 with Lenovo BIOS {#flashrom_lenovobios}
|
|
|
|
|
extreme cleanup / grandiose gesture
make canoeboot a truly GNU FSDG compliant coreboot distro,
by removing all overly positive reference to Libreboot;
what remains is technical in nature, so as to provide
historical context since Canoeboot is a fork of Libreboot.
I've stated before that I wish to take a more neutral tone
toward the FSF, in contrast to the *coldboot war* of 2023
when GNU Boot started.
Canoeboot was heavily linking to Libreboot, even going so far
as to call itself "inferior" and tell the reader to use
Libreboot.
From now on, Canoeboot will be maintained as though I actually
believed in FSF propoganda. I don't, but its users do. Treat
them with respect. My reason for providing Canoeboot is
precisely that I wish for such people to have a high quality
coreboot distro, much unlike the inferior *GNU Boot* project;
inferior because to this day, it's still based on very old
Libreboot, with not much changed (of any real substance)
relative to the Libreboot 20220710 release on which it forked.
In general, I've also found a lot of stragglers from when
Canoeboot started, where paragraphs referred to Libreboot that
should have actually referred to Canoeboot, or paragraphs
with Libreboot-specific information that does not make sense
in the Canoeboot project e.g. references to vendor scripts.
The resulting canoeboot.org will now look no different to any
typical reader than a typical FSF-aligned project.
There is a next stage to this, which will become apparent to
everyone if I have my way.
Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-10 02:12:44 +00:00
|
|
|
The sections below will tell you to use staticly linked executables built from
|
|
|
|
Libreboot 20160907 sources, because no Libreboot or Libreboot-based release since
|
|
|
|
then (at least as of 8 May 2024) has provided these, but the ones in
|
|
|
|
Libreboot 20160907 will still work just fine. Libreboot 20160907 is GNU FSDG
|
|
|
|
compliant (it was even one of the three *GNU Libreboot* releases), so FSF fans
|
|
|
|
needn't worry. There won't be any magic numbers. Though, gdb symbols were
|
|
|
|
accidentally not turned off during build so those binaries are quite huge. That's
|
|
|
|
just about the only idiosyncrasy.
|
|
|
|
|
2024-05-04 08:54:51 +00:00
|
|
|
**NOTE: the section below pertaining to Libreboot 20160907 static binaries references
|
|
|
|
flashrom. Canoeboot recommends flashprog nowadays, but if you're using that
|
|
|
|
utils archive, please note that it is from a time when Canoeboot used
|
|
|
|
flashrom. Use flashrom there as that's what included in those binaries.
|
|
|
|
Canoeboot does not currently document how to patch flashprog for sst/macronix
|
|
|
|
on X60/T60, when going (in software) from lenovobios to canoeboot.**
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
NOTE: If BIOS password auth is enabled, you can clear it by shorting pins on
|
|
|
|
an EEPROM and then resetting the password in Lenovo BIOS, prior to flashing
|
2023-10-26 00:10:41 +00:00
|
|
|
Canoeboot. For T60, see:
|
2023-07-10 15:43:08 +00:00
|
|
|
<https://ounapuu.ee/posts/2022/10/13/recovering-password-locked-thinkpad-t60/>
|
|
|
|
(TODO: link something here for X60)
|
|
|
|
|
|
|
|
X60 BIOS password (Lenovo): you might find info here:
|
|
|
|
<https://bios-pw.org/>
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
You can just get bucts from the libreboot project, same thing for the patched
|
|
|
|
flashrom. In the Libreboot 20160907 release, there is a *utility* archive, which
|
|
|
|
has statically compiled executables. They still work just fine on modern
|
|
|
|
systems, and they can be used for this purpose.
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
Here are a list of targets:
|
|
|
|
|
|
|
|
* ThinkPad X60/X60S/X60T: flash the X60 ROM
|
|
|
|
* ThinkPad T60 with Intel GPU: flash the T60 ROM
|
|
|
|
* ThinkPad T60 with ATI GPU: flash the Headless T60 ROM (no video init, but you
|
|
|
|
can get a serial console on the RS232 port if you use the Advanced Dock or
|
|
|
|
Advanced Mini Dock. Connect to it from another machine, using null modem
|
|
|
|
cable and USB serial adapter; *Screen* can connect to the serial console
|
2023-07-17 15:45:56 +00:00
|
|
|
and you will run it at 115200 baud rate. agetty/fgetty in GNU+Linux can give
|
2023-07-10 15:43:08 +00:00
|
|
|
you a serial console in your OS)
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
Download and build flashprog, using the instructions
|
2023-07-10 15:43:08 +00:00
|
|
|
on [the Git page](../../git.md), and download the `bucts` software using the
|
|
|
|
notes on that very same page.
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
You can replace Lenovo BIOS with Canoeboot, using flashprog running on the host
|
2023-07-10 15:43:08 +00:00
|
|
|
CPU. However, there are some considerations.
|
|
|
|
|
|
|
|
Firstly, make sure that the yellow CMOS battery is installed, and functioning
|
|
|
|
correctly. You could check the voltage. The battery is a CR2032
|
|
|
|
coin cell and it *should* be providing a 3V signal. You should check this while
|
|
|
|
it is connected to the board, because this will give a more accurate reading
|
|
|
|
(if the battery is weak, it will have severe voltage drop when there is any
|
|
|
|
load on it, which there will be. This coincell powers the real-time clock and
|
|
|
|
CMOS memory).
|
|
|
|
|
|
|
|
Lenovo BIOS restricts write access, but there is a weakness in it. With a
|
2024-01-27 22:35:38 +00:00
|
|
|
specially patched flashprog binary, you can easily flash it but the top 64KiB
|
2023-07-10 15:43:08 +00:00
|
|
|
region of the boot flash, containing your bootblock, cannot be flashed just
|
|
|
|
yet. However, there is a register called the *Backup Control* or *BUC* register
|
|
|
|
and in that register is a status bit called *Top Swap* or *TS*.
|
|
|
|
|
|
|
|
There are *2* bootblocks possible. The *other* bootblock is below the upper
|
|
|
|
64KiB one, which can't be flashed, but the lower one can. By using bucts, you
|
|
|
|
can set the machine to boot using that lower 64KiB bootblock, which is
|
|
|
|
read-write. You do this by setting the BUC.TS register to 1, using the `bucts`
|
|
|
|
program referenced below.
|
|
|
|
|
2023-10-26 00:10:41 +00:00
|
|
|
The Canoeboot ROM images already have the upper 64KiB bootblock copied to the lower
|
2023-07-10 15:43:08 +00:00
|
|
|
one, so you don't have to worry about copying it yourself.
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
If you build flashprog using the Canoeboot build system, there will be three
|
2023-07-10 15:43:08 +00:00
|
|
|
binaries:
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
* `flashprog`
|
|
|
|
* `flashprog_i945_sst`
|
|
|
|
* `flashprog_i945_mx`
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
It's these last two binaries that you should use. Now compile bucts (just
|
|
|
|
run `make` in the bucts source directory).
|
|
|
|
|
|
|
|
Run the bucts tool:
|
|
|
|
|
|
|
|
sudo ./bucts 1
|
|
|
|
|
|
|
|
Ensure that your CMOS battery is connected too. Now you must determine whether
|
|
|
|
you have Macronix or SST. An X60/T60 thinkpad will have either an SST or a
|
|
|
|
Macronix chip. The Macronix chip will have "MX" written on the chip. You will
|
2024-01-27 22:35:38 +00:00
|
|
|
use `flashprog_i945_sst` for the SST chip, and `flashprog_i945_mx` for the
|
2023-07-10 15:43:08 +00:00
|
|
|
Macronix chip.
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
Now run flashprog (for SST):
|
2023-07-10 15:43:08 +00:00
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
sudo ./flashprog_i945_sst -p internal -w coreboot.rom
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
Or Macronix:
|
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
sudo ./flashprog_i945_mx -p internal -w coreboot.rom
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
NOTE: you *can* just run both. One of them will succeed. It is perfectly
|
2024-01-27 22:35:38 +00:00
|
|
|
harmless to run both versions of flashprog. In fact, you should do so!
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
You'll see a lot of errors. This is normal. You should see something like:
|
|
|
|
|
|
|
|
```
|
|
|
|
Reading old flash chip contents... done.
|
|
|
|
Erasing and writing flash chip... spi_block_erase_20 failed during command execution at address 0x0
|
|
|
|
Reading current flash chip contents... done. Looking for another erase function.
|
|
|
|
spi_block_erase_52 failed during command execution at address 0x0
|
|
|
|
Reading current flash chip contents... done. Looking for another erase function.
|
|
|
|
Transaction error!
|
|
|
|
spi_block_erase_d8 failed during command execution at address 0x1f0000
|
|
|
|
Reading current flash chip contents... done. Looking for another erase function.
|
|
|
|
spi_chip_erase_60 failed during command execution
|
|
|
|
Reading current flash chip contents... done. Looking for another erase function.
|
|
|
|
spi_chip_erase_c7 failed during command execution
|
|
|
|
Looking for another erase function.
|
|
|
|
No usable erase functions left.
|
|
|
|
FAILED!
|
|
|
|
Uh oh. Erase/write failed. Checking if anything has changed.
|
|
|
|
Reading current flash chip contents... done.
|
|
|
|
Apparently at least some data has changed.
|
|
|
|
Your flash chip is in an unknown state.
|
|
|
|
```
|
|
|
|
|
|
|
|
If you see this, rejoice! It means that the flash was successful. Please do not
|
|
|
|
panic. Shut down now, and wait a few seconds, then turn back on again.
|
|
|
|
|
2024-08-26 02:12:42 +00:00
|
|
|
If you *did* run flashrom and it failed to flash, but you set bucts to 1 and
|
2023-07-10 15:43:08 +00:00
|
|
|
shut down, don't worry. Just remove the yellow coin-cell battery (it's underneath
|
|
|
|
the keyboard, connected to the mainboard), wait a minute or two, reconnect the
|
2024-01-27 22:35:38 +00:00
|
|
|
coin-cell and try again from scratch. In this instance, if flashprog didn't do
|
2023-07-10 15:43:08 +00:00
|
|
|
anything, and didn't flash anything, it means you still have Lenovo BIOS but
|
|
|
|
if bucts is set to 1, you can flush it and set it back to 0. BUC.TS is stored in
|
|
|
|
volatile memory, powered by that CR2032 coin-cell battery.
|
|
|
|
|
|
|
|
Assuming that everything went well:
|
|
|
|
|
|
|
|
Flash the ROM for a second time. For this second flashing attempt, the upper
|
2024-01-27 22:35:38 +00:00
|
|
|
64KiB bootblock is now read-write. Use the *unpatched* flashprog binary:
|
2023-07-10 15:43:08 +00:00
|
|
|
|
2024-01-27 22:35:38 +00:00
|
|
|
sudo ./flashprog -p internal -w canoeboot.rom
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
To reset bucts, do this:
|
|
|
|
|
|
|
|
sudo ./bucts 0
|
|
|
|
|
|
|
|
ONLY set bucts back to 0 if you're sure that the upper 64KiB bootblock is
|
2024-01-27 22:35:38 +00:00
|
|
|
flashed. It is flashed if flashprog said VERIFIED when running the above
|
2023-07-10 15:43:08 +00:00
|
|
|
command.
|
|
|
|
|
|
|
|
If it said VERIFIED, shut down. If it didn't say VERIFIED, make sure bucts is
|
2023-10-26 00:10:41 +00:00
|
|
|
still set to 1, and consult the Canoeboot project on IRC for advice, and avoid
|
2023-07-10 15:43:08 +00:00
|
|
|
shutting down your system until you get help.
|
|
|
|
|
2023-10-26 00:10:41 +00:00
|
|
|
If all went well, Canoeboot should now be booting and you should be able to
|
2023-07-10 15:43:08 +00:00
|
|
|
boot into your operating system.
|
|
|
|
|
|
|
|
If you messed up, there are external flashing instructions. See main navigation
|
|
|
|
menu on this page. These "external" instructions teach you how to flash
|
|
|
|
externally, using special equipment (requires disassembling your laptop and
|
|
|
|
removing the mainboard).
|
|
|
|
|
|
|
|
Install using external flashing equipment
|
|
|
|
=========================================
|
|
|
|
|
|
|
|
In many situations, the host CPU is restricted from rewriting/erasing/dumping
|
|
|
|
the boot flash. In this situations, you must re-flash the chip (containing the
|
|
|
|
boot firmware) externally. This is called *external flashing*.
|
|
|
|
|
|
|
|
DO NOT buy CH341A! Read the above link, which explains why you shouldn't use it.
|
|
|
|
CH341A will damage your flash chip, and other components on your mainboard.
|
|
|
|
|
|
|
|
How to use external flashing equipment
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[Externally rewrite 25xx NOR flash via SPI protocol](spi.md)
|
|
|
|
|
|
|
|
DELL Latitude E6400 laptop (easy to flash, similar to X200/T400)
|
|
|
|
-------------------------
|
|
|
|
|
2023-10-26 00:10:41 +00:00
|
|
|
See: [Dell Latitute E6400 Canoeboot Installation Instructions](e6400.md)
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
ASUS KFSN4-DRE
|
|
|
|
--------------
|
|
|
|
|
|
|
|
The KFSN4-DRE has an LPC chip. Most people have been flashing these
|
|
|
|
internally, hot-swapping the chip out after boot, preserving the original chip,
|
2024-01-27 22:35:38 +00:00
|
|
|
and using flashprog on a new chip as described above.
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
TODO: Document PLCC32 (LPC) flashing.
|
|
|
|
The [FlexyICE](https://www.coreboot.org/FlexyICE) has been used to flash these
|
|
|
|
chips, but it is hard to find now. A custom flasher may be made such as
|
2024-01-27 22:35:38 +00:00
|
|
|
[flashprog serprog stm32](https://github.com/wosk/stm32-vserprog-lpc) or
|
|
|
|
[teensy flasher](https://www.flashprog.org/Teensy_3.1_SPI_%2B_LPC/FWH_Flasher)
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
TARGET: Apple Macbook2,1, Macbook1,1 and iMac5,2 (i945 platform)
|
|
|
|
----------------------------------------------------------------
|
|
|
|
|
|
|
|
iMac5,2 is essentially the same board as Macbook2,1, and it is compatible with
|
2023-10-26 00:10:41 +00:00
|
|
|
Canoeboot.
|
2023-07-10 15:43:08 +00:00
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[Macbook2,1 and MacBook1,1 installation guide](../hardware/macbook21.md)
|
|
|
|
|
|
|
|
iMac5,2 isn't documented but you can find the flash chip on that board quite
|
|
|
|
easily. See the generic flashing guide:\
|
|
|
|
[Externally rewrite 25xx NOR flash via SPI protocol](spi.md)
|
|
|
|
|
|
|
|
TARGET: Gigabyte GA-G41M-ES2L mainboard
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[Gigabyte GA-G41M-ES2L](ga-g41m-es2l.md)
|
|
|
|
|
|
|
|
TARGET: Intel D510MO and D410PT mainboards
|
|
|
|
------------------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[Intel D510MO and D410PT boards](d510mo.md)
|
|
|
|
|
|
|
|
TARGET: Intel D945GCLF mainboard
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[Intel D945GCLF](d945gclf.md)
|
|
|
|
|
|
|
|
TARGET: ASUS KGPE-D16 mainboard
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ASUS KGPE-D16](kgpe-d16.md)
|
|
|
|
|
|
|
|
TARGET: ASUS KCMA-D8 mainboard
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ASUS KCMA-D8](../hardware/kcma-d8.md)
|
|
|
|
|
|
|
|
TARGET: ASUS Chromebook C201 laptop
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ASUS Chromebook C201](c201.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad X60 laptop
|
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ThinkPad X60](x60_unbrick.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad X60 Tablet laptop
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ThinkPad X60 Tablet](x60tablet_unbrick.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad T60 laptop
|
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ThinkPad T60](t60_unbrick.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad X200 laptop
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ThinkPad X200](x200_external.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad X200S or X200 Tablet laptop
|
|
|
|
---------------------------------------------------
|
|
|
|
|
|
|
|
Software-wise, identical to regular X200 but SMD rework skills are required.
|
|
|
|
You must de-solder the default flash chip, and replace it with another one.
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[25xx NOR flashing guide](spi.md)
|
|
|
|
|
|
|
|
That guide, linked above, has instructions for how to deal with these machines.
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad T400 laptop
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ThinkPad T400](t400_external.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad T400S laptop
|
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
Software-wise, identical to regular T400 but SMD rework skills are required.
|
|
|
|
You must de-solder the default flash chip, and replace it with another one.
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[25xx NOR flashing guide](spi.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad R400 laptop
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ThinkPad R400](r400_external.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad T500 or W500 laptop
|
|
|
|
-------------------------------------------
|
|
|
|
|
|
|
|
These two laptops have identical mainboard, except for a few minor changes.
|
|
|
|
|
|
|
|
Refer to the following article:\
|
|
|
|
[ThinkPad T500/W500](t500_external.md)
|
|
|
|
|
|
|
|
TARGET: Lenovo ThinkPad R500 laptop
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
Refer to the following laptop:\
|
|
|
|
[ThinkPad R500](../hardware/r500.md)
|