From 4dd202a4ba513c8a9f30ec42acc030480adfe842 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 7 Jun 2024 15:32:48 +0200 Subject: [PATCH] website: docs: install: flashrom: document I/O port access. Signed-off-by: Leah Rowe Signed-off-by: Leah Rowe GNUtoo: fixed section underline, rebased, commit message, split patch. Acked-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- website/pages/docs/install/install.md | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/website/pages/docs/install/install.md b/website/pages/docs/install/install.md index 3e4d1ca..aeba7b1 100644 --- a/website/pages/docs/install/install.md +++ b/website/pages/docs/install/install.md @@ -35,6 +35,38 @@ 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: + +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: + - 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: + + +**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 ==========================