diff options
author | Leah Rowe <leah@libreboot.org> | 2024-06-12 00:58:22 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-06-12 00:58:22 +0100 |
commit | 0b37653ab908093a108cfe3cbcb4e8d378428d26 (patch) | |
tree | 4fd3b33c728b8c8aed5b6b3df7867c02b8887b71 /config/grub/nvme/patches/0004-prefix/0002-don-t-print-error-if-module-not-found.patch | |
parent | 1952db55540606b2fb00ddd4be9e358dbc99ef8b (diff) |
grub: only enable nvme if needed on a board
remove nvme support from the "default" grub tree
now there are three trees:
* default: no xhci or nvme patches
* nvme: contains nvme support
* xhci: contains xhci and nvme support
this is in case a bug like lbmk issue #216 ever occurs
again, as referenced before during lbmk audit 5
there is no indication that the nvme patch causes any
issues, but after previous experience i want to be sure
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/grub/nvme/patches/0004-prefix/0002-don-t-print-error-if-module-not-found.patch')
-rw-r--r-- | config/grub/nvme/patches/0004-prefix/0002-don-t-print-error-if-module-not-found.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/config/grub/nvme/patches/0004-prefix/0002-don-t-print-error-if-module-not-found.patch b/config/grub/nvme/patches/0004-prefix/0002-don-t-print-error-if-module-not-found.patch new file mode 100644 index 00000000..f4cf939e --- /dev/null +++ b/config/grub/nvme/patches/0004-prefix/0002-don-t-print-error-if-module-not-found.patch @@ -0,0 +1,34 @@ +From 6237c5762edccc1e1fa4746b1d4aa5e8d81e4883 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Sun, 5 Nov 2023 16:36:22 +0000 +Subject: [PATCH 1/1] don't print error if module not found + +still set grub_errno accordingly, and otherwise +behave the same. in libreboot, we remove a lot of +modules but then rely on loading a grub.cfg +provided by a distro; in almost all cases that works, +but also in almost all cases, that will try to load +a module we don't actually need, but then it prints +a message. this can annoy some users, so silence it. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + grub-core/kern/dl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c +index af3bd00d0..21d0cedb1 100644 +--- a/grub-core/kern/dl.c ++++ b/grub-core/kern/dl.c +@@ -486,7 +486,7 @@ grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e) + + s = grub_dl_find_section (e, ".modname"); + if (!s) +- return grub_error (GRUB_ERR_BAD_MODULE, "no module name found"); ++ return (grub_errno = GRUB_ERR_BAD_MODULE); + + mod->name = grub_strdup ((char *) e + s->sh_offset); + if (! mod->name) +-- +2.39.2 + |