Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] grub: support loading devicetrees
Date: Sun, 05 May 2024 19:00:34 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50203@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages grub-dtb
https://github.com/void-linux/void-packages/pull/50203

grub: support loading devicetrees
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**


A patch file from https://github.com/void-linux/void-packages/pull/50203.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grub-dtb-50203.patch --]
[-- Type: text/x-diff, Size: 2722 bytes --]

From 5cd329d53db3fb31ed62246c04eeb92c7c514939 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 5 May 2024 10:06:58 -0400
Subject: [PATCH] grub: support loading devicetrees

---
 srcpkgs/grub/patches/devicetree-loading.patch | 50 +++++++++++++++++++
 srcpkgs/grub/template                         |  2 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/grub/patches/devicetree-loading.patch

diff --git a/srcpkgs/grub/patches/devicetree-loading.patch b/srcpkgs/grub/patches/devicetree-loading.patch
new file mode 100644
index 00000000000000..b2284bf0f35937
--- /dev/null
+++ b/srcpkgs/grub/patches/devicetree-loading.patch
@@ -0,0 +1,50 @@
+support loading a devicetree based on GRUB_DEFAULT_DTB in /etc/default/grub
+
+looks in /boot/dtbs/dtbs-${version}/${GRUB_DEFAULT_DTB}
+
+based on https://src.fedoraproject.org/rpms/grub2/blob/rawhide/f/0022-Add-devicetree-loading.patch
+
+--- a/util/grub-mkconfig.in
++++ b/util/grub-mkconfig.in
+@@ -255,7 +255,8 @@
+   GRUB_ENABLE_CRYPTODISK \
+   GRUB_BADRAM \
+   GRUB_OS_PROBER_SKIP_LIST \
+-  GRUB_DISABLE_SUBMENU
++  GRUB_DISABLE_SUBMENU \
++  GRUB_DEFAULT_DTB
+ 
+ if test "x${grub_cfg}" != "x"; then
+   rm -f "${grub_cfg}.new"
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -129,6 +129,14 @@
+ 
+   echo "	insmod gzio" | sed "s/^/$submenu_indentation/"
+ 
++  if test -n "${dtb}" ; then
++    message="$(gettext_printf "Loading devicetree ...")"
++    sed "s/^/$submenu_indentation/" << EOF
++	echo	'$(echo "$message" | grub_quote)'
++	devicetree	${rel_dirname}/${dtb}
++EOF
++  fi
++
+   if [ x$dirname = x/ ]; then
+     if [ -z "${prepare_root_cache}" ]; then
+       prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
+@@ -250,6 +258,14 @@
+     gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
+   fi
+ 
++  dtb=
++  for i in "dtbs-${version}" "dtbs-${alt_version}"; do
++    if test -f "${dirname}/dtbs/${i}/${GRUB_DEFAULT_DTB}" ; then
++      dtb="dtbs/${i}/${GRUB_DEFAULT_DTB}"
++      break
++    fi
++  done
++
+   config=
+   for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
+     if test -e "${i}" ; then
diff --git a/srcpkgs/grub/template b/srcpkgs/grub/template
index 6f2dcb03684fdc..5bf8c1d7909f80 100644
--- a/srcpkgs/grub/template
+++ b/srcpkgs/grub/template
@@ -1,7 +1,7 @@
 # Template file for 'grub'
 pkgname=grub
 version=2.12
-revision=1
+revision=2
 hostmakedepends="python3 pkg-config flex freetype-devel font-unifont-bdf help2man
  automake gettext-devel-tools"
 makedepends="libusb-compat-devel ncurses-devel freetype-devel liblzma-devel

             reply	other threads:[~2024-05-05 17:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 17:00 classabbyamp [this message]
2024-05-12 18:27 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50203@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).