update documentation for new lbmk implementation

many commands have changed since lbmk audit 2

Signed-off-by: Leah Rowe <leah@libreboot.org>
master
Leah Rowe 2023-09-15 05:38:12 +01:00
parent a985886bc6
commit 72452988d8
15 changed files with 79 additions and 70 deletions

View File

@ -23,7 +23,7 @@ It is possible to use *any* keymap in GRUB.
Custom keyboard layout
----------------------
Keymaps are stored in `resources/grub/keymap/`
Keymaps are stored in `config/grub/keymap/`
You can use the `ckbcomp` program to generate a keymap, based on Xorg keymap
files:
@ -38,7 +38,7 @@ file (generated by ckbcomp) and run it through `grub-mklayout` like so:
cat frazerty | ./grub/grub-mklayout -o frazerty.gkb
Place the newly created `.gkb` file under `resources/grub/keymap` in lbmk. When
Place the newly created `.gkb` file under `config/grub/keymap` in lbmk. When
you build libreboot, a ROM image with GRUB payload and your newly created
keymap will be available under the `bin/` directory.
[Learn how to build libreboot ROM images](../build/)

View File

@ -142,7 +142,7 @@ to [docs/uboot/](../uboot/) for more info about the U-Boot payload.
- [Qemu arm64](../misc/emulation.md)
TODO: More hardware is supported. See `resources/coreboot/` in lbmk. Update
TODO: More hardware is supported. See `config/coreboot/` in lbmk. Update
the above list!
'Supported' means that the build scripts know how to build ROM images

View File

@ -112,7 +112,7 @@ d945gclf据上次报告根本无法启动。D510MO 仍在 lbmk 中,但
- [Qemu arm64](../misc/emulation.md)
计划:支持更多硬件。见 lbmk 中的 `resources/coreboot/`。更新上面的列表!
计划:支持更多硬件。见 lbmk 中的 `config/coreboot/`。更新上面的列表!
所谓“支持”,即指构建脚本知道如何构建这些机器的 ROM 镜像,并且机器经过测试(确认能够工作)。也可能会有例外;换言之,这是“官方”支持的机器列表。

View File

@ -3,8 +3,27 @@ title: ich9utils
x-toc-enable: true
...
If all you want to do is change the MAC address, you might use `nvmutil`
instead. See: [nvmutil documentation](../install/nvmutil.md).
**THIS PAGE IS OBSOLETE. Releases after Libreboot 20230625 no longer include
ich9utils; instead, ICH9M descriptors and gbe nvm configurations are provided
pre-assembled. Coreboot's bincfg can regenerate them if you wish, and/or you
can modify the ifd file with coreboot's ifdtool. You can use nvmutil to modify
the GbE NVM MAC address**
**If all you want to do is change the MAC address, you might use `nvmutil`
instead. See: [nvmutil documentation](../install/nvmutil.md).**
The documentation below is *still valid*, if you actually want to use ich9utils.
You can find it in older Libreboot releases, up to Libreboot 20230625. The only
modification that ich9gen permitted was to change the MAC address, and ifdtool
can set read-only mode via `--unlock` argument on a ROM, so ich9utils was a
moving (read: not moving) part that basically did the same thing as providing
static images.
The initial plan was to rewrite ich9utils in a cleaner coding style, like that
used in nvmutil, but then it was decided instead that ich9utils would be
scrapped.
Anyway, ich9utils documentation:
Introduction
============
@ -58,21 +77,11 @@ ich9utils
=========
You can find `ich9utils` on the [Git page](../../git.md) or you can download
`lbmk` from the same page and run the following command in there:
`lbmk` from the same page at an under revision (around Libreboot 20230625 or
so), and find it under `util/ich9utils/`.
./build module ich9utils
You may also find it in the source code tar archives, on releases.
In `lbmk`, you can use the following command to generate descriptors:
./build descriptors ich9m
The libreboot build system will use the descriptors under `descriptors/ich9m`
when building ROM images for these machines.
Alternatively, you can just clone `ich9utils` directly and run `make` in the
directory, and run the `ich9gen` program directly.
Go in there and type `make` to get the binaries: `ich9deblob`, `ich9gen`
and `ich9show`.
ICH9 show utility {#ich9show}
================
@ -91,6 +100,11 @@ to use a custom macaddress, you can supply an argument like so:
ich9gen --macaddress 00:1f:16:80:80:80
**WARNING: ich9gen's `--macaddress` functionality does NOT check for all-zero
MAC addresses, nor does it prevents multicast addresses. A valid MAC address
is non-zero, and unicast. This is why you should use `nvmutil` because it does
this check.**
The above MAC address is just an example. It is recommended that you use the
MAC address officially assigned to your NIC.
@ -103,6 +117,9 @@ Three new files will be created:
- `ich9fdgbe_16m.bin`: this is for GM45 laptops with the 16MB flash
chip.
**NOTE: You can also use the `--lock` and `--unlock` arguments in ifdtool, to
accomplish the same result of locking or unlocking a descriptor.**
These files contain the descriptor+GbE region and are suitable for systems
that have an Intel GbE NIC present. The flash regions (as defined by the
Intel Flash Descriptor) are set *read-write* which means that you can also

View File

@ -115,7 +115,7 @@ You *must* ensure that the blobs were inserted.
Some examples of how to do that in lbmk:
./build module cbutils
./build coreboot utils
Now you find `cbutitls/default`, which is a directory containing `cbfstool`
and `ifdtool`. Do this on your ROM image (`libreboot.rom` in the example
@ -167,7 +167,7 @@ the [nvmutil documentation](nvmutil.md).
**WARNING: This is broken in Libreboot 20221214's src archive. It fails when
attempting to use cbfstool, due to a faulty check in a script. This is fixed in
recent Libreboot releases or revisions. The fix is as
follows:
follows (though you really should use a new release by now):
Edit line 137 in `resources/scripts/blobs/inject`. The line in 20221214 says
this:

View File

@ -118,7 +118,7 @@ You *must* ensure that the blobs were inserted.
Some examples of how to do that in lbmk:
./build module cbutils
./build coreboot utils
Now you find `cbutitls/default`, which is a directory containing `cbfstool`
and `ifdtool`. Do this on your ROM image (`libreboot.rom` in the example
@ -170,7 +170,7 @@ the [nvmutil documentation](nvmutil.md).
**WARNING: This is broken in Libreboot 20221214's src archive. It fails when
attempting to use cbfstool, due to a faulty check in a script. This is fixed in
recent Libreboot releases or revisions. The fix is as
follows:
follows (though, you really should use a newer release by now):
Edit line 137 in `resources/scripts/blobs/inject`. The line in 20221214 says
this:

View File

@ -1,3 +1,6 @@
nvmutil assimilation
====================
Detailed revision history can be found in the Git repository; for code,
look at `lbmk.git` and for documentation, look at `lbwww.git`.

View File

@ -72,7 +72,11 @@ could build it yourself or you could also clone `lbmk.git` and [install build
dependencies](..//build/#first-install-build-dependencies), then inside lbmk,
do:
./build rpi-pico serprog
./build serprog rp2040 pico
or for the W version:
./build serprog rp2040 pico_w
This will automatically build the rpi-pico firmware, and the file will be
at `bin/serprog/rpi-pico-serprog.uf2`. This binary will be provided
@ -457,18 +461,17 @@ install flashrom. Do this after downloading the
NOTE: debian, arch or void can be written instead of ubuntu2004. the debian
script is also applicable to newer ubuntu versions
./fetch flashrom
./build module flashrom
./handle make file -b flashrom
If the `ubuntu2004` script complains about missing dependencies, just modify
the script and remove those dependencies. The script is located
at `resources/scripts/build/dependencies/ubuntu2004` and it is written for
the dependencies config to remove those dependencies. The script is located
at `config/dependencies/ubuntu2004` and it is written for
Ubuntu 20.04, but it should work fine in other Linux distributions that use
the `apt-get` package manager.
A `flashrom/` directory will be present, with a `flashrom` executable inside
of it. If you got an error about missing package when running the dependencies
command above, tweak `resources/scripts/build/dependencies/ubuntu2004`. That
command above, tweak `config/dependencies/ubuntu2004`. That
script downloads and installs build dependencies in apt-get and it is intended
for use on x86-64 systems running Ubuntu 20.04, but it should work in Raspbian
on the Raspberry Pi.
@ -484,8 +487,8 @@ argument in flashrom. This mitigates stability issues.
If you downloaded the flashrom source code directly, you can go into the
directory and simply type `make`. In the libreboot build system, build
dependencies are documented in script located
at `resources/scripts/build/dependencies/` which you can install
dependencies are documented in configuration files located
at `config/dependencies/` which you can install
using the `apt-get` software.
How to use flashrom

View File

@ -55,7 +55,11 @@ could build it yourself or you could also clone `lbmk.git` and [install build
dependencies](..//build/#first-install-build-dependencies), then inside lbmk,
do:
./build rpi-pico serprog
./build serprog rp2040 pico
or for the W version:
./build serprog rp2040 pico_w
This will automatically build the rpi-pico firmware, and the file will be
at `bin/serprog/rpi-pico-serprog.uf2`. This binary will be provided
@ -319,18 +323,17 @@ Flashrom 是用来读出、擦除、重写 NOR flash 内容的软件。
注意:你可以输入 debian、arch 或 void 来替换 ubuntu。debian 脚本也可以用于新版 ubuntu。
./fetch flashrom
./build module flashrom
./handle make file -b flashrom
如果 `ubuntu2004` 报告了依赖缺失,编辑一下这个脚本,把缺失的依赖移除就行了。脚本位于 `resources/scripts/build/dependencies/ubuntu2004`,它是写给 Ubuntu 20.04 的,但在其他使用 `apt-get` 包管理器的 Linux 发行版应该也能用。
如果 `ubuntu2004` 报告了依赖缺失,编辑一下这个脚本,把缺失的依赖移除就行了。脚本位于 `config/dependencies/ubuntu2004`,它是写给 Ubuntu 20.04 的,但在其他使用 `apt-get` 包管理器的 Linux 发行版应该也能用。
接下来,会出现一个 `flashrom/` 目录,其中有一个 `flashrom` 可执行文件。如果你在运行上面的依赖命令的时候,出现了缺失包的错误,则修改 `resources/scripts/build/dependencies/ubuntu2004`。那个脚本会在 apt-get 中下载并安装构建依赖,它是为运行 Ubuntu 的 x86-64 系统写的,但在树莓派上的 Raspbian 应该能用。
接下来,会出现一个 `flashrom/` 目录,其中有一个 `flashrom` 可执行文件。如果你在运行上面的依赖命令的时候,出现了缺失包的错误,则修改 `config/dependencies/ubuntu2004`。那个脚本会在 apt-get 中下载并安装构建依赖,它是为运行 Ubuntu 的 x86-64 系统写的,但在树莓派上的 Raspbian 应该能用。
或者,你可以直接从上游下载 flashrom位于<https://flashrom.org/Flashrom>
如果你是在 ThinkPad X200 上刷写 Macronix flash 芯片,则要使用一个 flashrom 的特别修改版,下载地址在这里:<https://vimuser.org/hackrom.tar.xz> —— 其中有修改版的源代码,也有可以直接运行的二进制文件。将 `--workaround-mx` 参数传给 flashrom。这会缓解稳定性问题。
如果你直接下载了 flashrom 源代码,你可以进入目录并直接运行 `make`。在 libreboot 构建系统中,`resources/scripts/build/dependencies/` 处的脚本写明了构建依赖,你可以直接使用 `apt-get` 软件安装。
如果你直接下载了 flashrom 源代码,你可以进入目录并直接运行 `make`。在 libreboot 构建系统中,`config/dependencies/` 处的脚本写明了构建依赖,你可以直接使用 `apt-get` 软件安装。
如何使用 flashrom
===================

View File

@ -60,11 +60,11 @@ of the libreboot Git repository.
Then, download coreboot:
./fetch_trees coreboot
./update project trees coreboot
Finally, compile the `cbutils` module:
./build module cbutils
./build coreboot utils
Among other things, this will produce a `cbfstool` executable under any of the
subdirectories in `coreboot/` under `util/cbfstool/cbfstool
@ -79,7 +79,7 @@ You will also want to build `flashrom` which libreboot recommends for reading
from and/or writing to the boot flash. In the libreboot build system, you can
build it by running this command:
./build module flashrom
./handle make file -b flashrom
An executable will be available at `flashrom/flashrom` after you have done
this.
@ -131,7 +131,7 @@ menu to switch to, if present.
You can find `grub.cfg` under lbmk (for this purpose, it's best to use the
lbmk one, not the release one - unless you're using a release after 20230625).
Find it at path: `resources/grub/config/grub.cfg`.
Find it at path: `config/grub/config/grub.cfg`.
So, you can *add* `grubtest.cfg` as normal, test that, and
then *add* `grub.cfg` once you're happy, and it will override the default.

View File

@ -83,11 +83,11 @@ image:
You can build `cbfstool` in the libreboot build system. Run this command:
./build module cbutils
./build coreboot utils
This assumes that you already downloaded coreboot:
./fetch_trees coreboot
./update project trees coreboot
This, in turn, assumes that you have installed the build dependencies for
libreboot. On Ubuntu 20.04 and other apt-get distros, you can do this:
@ -159,9 +159,9 @@ GRUB using the libreboot build system. Run the following commands (assuming
you have the correct build dependencies installed) to build GRUB, from the
libreboot Git repository:
./fetch_trees grub
./update project repo grub
./build module grub
./build grub utils
The following executable will then be available under the `grub/` directory:

View File

@ -53,18 +53,18 @@ Coreboot Config
Coreboot payloads (GRUB, Seabios, etc) are built separately.
You therefore only need to focus on the coreboot config(s) for `board.`
All of these configs are stored under resources/coreboot/`board`
All of these configs are stored under config/coreboot/`board`
The easiest way to start a new configuration for a given board is to copy an existing
configuration and make the necessary modifications.
For example, if one wanted to port the t420s, then the t420 config would be an excellent
starting point.
cp -r resources/coreboot/t420_12mb/ resources/coreboot/t420s_12mb
cp -r config/coreboot/t420_12mb/ config/coreboot/t420s_12mb
You can then easily modify the existing coreboot configs for you board via lbmk.
./modify coreboot configs t420s_12mb
./handle make config -m coreboot t420s_12mb
This script will provide a curses interface through which you can easily modify the
necessary variables and settings.

View File

@ -50,18 +50,18 @@ libreboot як `плата.`
Корисні навантаження Coreboot (GRUB, Seabios, і так далі) будуються окремо.
Ви таким чином тільки потребуєте фокусуватись на конфігурації(ях) coreboot для `плати.`
Всі з цих конфігурацій зберігаються під resources/coreboot/`плата`
Всі з цих конфігурацій зберігаються під config/coreboot/`плата`
Найпростіший шлях почати нову конфігурацію для даної плати це копіювати існуючу
конфігурацію і зробити потрібні модифікації.
Наприклад, якщо хтось хотів би перенести t420s, тоді конфігурація t420 була би відмінною
початковою точкою.
cp -r resources/coreboot/t420_12mb/ resources/coreboot/t420s_12mb
cp -r config/coreboot/t420_12mb/ config/coreboot/t420s_12mb
Ви можете потім легко модифікувати існуючі конфігурації coreboot для вашої плати через lbmk.
./modify coreboot configs t420s_12mb
./handle make config -m coreboot t420s_12mb
Цей сценарій надать інтерфейс curses, через який ви можете легко модифікувати
потрібні змінні та налаштування.

View File

@ -17,7 +17,7 @@ Building and Testing
Libreboot can be built for qemu just like any other board.
`./build boot roms qemu_x86_12mb`
./build boot roms qemu_x86_12mb
In order to test the resulting roms, you must have qemu installed on the host machine.
Test the roms by pointing qemu to the rom in bios mode.

View File

@ -5,23 +5,6 @@ x-toc-enable: true
TODO: this page is very old, and could do with an update.
High Pitched Whining Noise on Idle in Debian or Devuan
======================================================================
Start powertop automatically at boot time.
Included with libreboot is a script called 'powertop.debian'. Run this
as root and it will setup powertop to run with --auto-tune at boot
time. Load the file in your text editor to see how it does that.
sudo ./resources/scripts/misc/powertop.debian
Might want to run with --calibrate first
If powertop doesn't work, another way (reduces battery life slightly)
is to add *processor.max\_cstate=2* to the *linux* line in grub.cfg,
using [this guide](../linux/grub_cbfs.md).
High Pitched Whining Noise on Idle in Arch-based distros
==============================================================