[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] docs/install: document CONFIG_X86_IOPL_IOPERM
|
From: |
Leah Rowe |
|
Subject: |
[PATCH 1/2] docs/install: document CONFIG_X86_IOPL_IOPERM |
|
Date: |
Sun, 14 Jan 2024 20:04:58 +0000 |
From: Leah Rowe <leah@libreboot.org>
also replaced some initial mentions of Libreboot with GNU Boot
Signed-off-by: Leah Rowe <leah@libreboot.org>
Signed-off-by: Leah Rowe <info@minifree.org>
---
site/docs/install/index.md | 56 ++++++++++++++++++++++++++++++++++----
1 file changed, 51 insertions(+), 5 deletions(-)
diff --git a/site/docs/install/index.md b/site/docs/install/index.md
index 38db94a..8a9b198 100644
--- a/site/docs/install/index.md
+++ b/site/docs/install/index.md
@@ -5,11 +5,6 @@ x-unreviewed: true
This section relates to installing Libreboot on supported targets.
-NOTE: if running `flashrom -p internal` for software based flashing, and you
-get an error related to `/dev/mem` access, you should reboot with
-`iomem=relaxed` kernel parameter before running flashrom, or use a kernel that
-has `CONFIG_STRICT_DEVMEM` not enabled.
-
Libreboot flashing can be risky business. Please ensure that you have external
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
@@ -21,6 +16,57 @@ 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.
+FLASH ERRORS (and workarounds)
+=======================
+
+Right out of the gate, some users may experience errors with flashrom when
+using the internal programmer. They are:
+
+/dev/mem access error
+---------------------
+
+NOTE: if running `flashrom -p internal` for software based flashing, and you
+get an error related to `/dev/mem` access, you should reboot with
+`iomem=relaxed` kernel parameter before running flashrom, or use a kernel that
+has `CONFIG_STRICT_DEVMEM` not enabled.
+
+On NetBSD and OpenBSD systems, the equivalent to `iomem=relaxed` in this case
+is `kernel.securelevel=-1`; see [NetBSD securelevel
+manual](https://wiki.netbsd.org/tutorials/kernel_secure_levels/)
+and [OpenBSD securelevel manual](https://man.openbsd.org/securelevel).
+
+ERROR: Could not get I/O privileges
+------------------------------------
+
+Error message: `ERROR: Could not get I/O privileges (Function not implemented)`
+
+If you get this while running `flashrom -p internal -w filename.rom` (or any
+internal flash operation), note: flashrom heavily uses ioperm/iopl functions
+to operate the internal flasher, at least on x86 machines.
+
+See: <https://lwn.net/Articles/804143/>
+
+Yeah, just enable `CONFIG_X86_IOPL_IOPERM` in your Linux kernel. This is
+a *build-time* option, so you must re-compile your kernel, or find a build that
+has this option enabled (IOPL emulation). Many default kernel configurations
+now disable this option.
+
+Here's a handy-dandy guide for building a kernel from source:
+<https://www.cyberciti.biz/tips/compiling-linux-kernel-26.html> - NOTE: the
+GNU Boot project recommends use of linux-libre, not linux, but this guide
should
+work with linux-libre releases. Here is GNU Linux-libre, the deblobbed linux
+kernel:
+<https://www.fsfla.org/ikiwiki/selibre/linux-libre/index.en.html>
+
+**BSD users:** On OpenBSD and NetBSD if you get similar errors, note that it
+should work here, but you need to boot with `kern.securelevel=-1`.
+See: [NetBSD securelevel
manual](https://wiki.netbsd.org/tutorials/kernel_secure_levels/)
+and [OpenBSD securelevel manpage](https://man.openbsd.org/securelevel).
+
+Otherwise, if you get such errors, it may just be that you're not root. You
+must run flashrom as root, at least to use the internal flasher (using external
+USB flashing dongles doesn't normally require root).
+
About ROM image file names
==========================
--
2.39.2
- [PATCH 1/2] docs/install: document CONFIG_X86_IOPL_IOPERM,
Leah Rowe <=