diff --git a/SOURCES/10-devicetree.install b/SOURCES/10-devicetree.install
old mode 100755
new mode 100644
index 3345391b682e72a8cb6041ad9bb7e291bbf84eec..fdea5ecec13249323b1d43e6e7d5d65af077b3ec
--- a/SOURCES/10-devicetree.install
+++ b/SOURCES/10-devicetree.install
@@ -2,7 +2,7 @@
 
 # set -x
 
-if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]
+if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 || "$(uname -m)" == riscv64 ]]
 then
 COMMAND="$1"
 KERNEL_VERSION="$2"
diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec
index f988fc9135fbca898f9f94310c91c5834e6d0d50..928a3b3e6ec20f27d2c99d55ea324b2988761e18 100644
--- a/SPECS/grubby.spec
+++ b/SPECS/grubby.spec
@@ -1,41 +1,42 @@
 # What?  No.
 %define __brp_mangle_shebangs %{nil}
 
-Name: grubby
-Version: 8.40
-Release: 77%{?dist}
-Summary: Command line tool for updating bootloader configs
-License: GPL-2.0-or-later
-Source1: grubby-bls
+Name:                 grubby
+Version:              8.40
+Release:              77%{?dist}
+Summary:              Command line tool for updating bootloader configs
+License:              GPL-2.0-or-later
+Source1:              grubby-bls
 # Source2: rpm-sort.c
-Source3: COPYING
-Source5: 95-kernel-hooks.install
-Source6: 10-devicetree.install
-Source7: grubby.8
-
-BuildRequires: gcc
-BuildRequires: glib2-devel
-BuildRequires: libblkid-devel
-BuildRequires: make
-BuildRequires: pkgconfig
-BuildRequires: popt-devel
-BuildRequires: rpm-devel
-BuildRequires: sed
-%ifarch aarch64 x86_64 %{power64}
-BuildRequires: grub2-tools-minimal
-Requires: grub2-tools-minimal
-Requires: grub2-tools
+Source3:              COPYING
+Source5:              95-kernel-hooks.install
+Source6:              10-devicetree.install
+Source7:              grubby.8
+
+
+BuildRequires:        gcc
+BuildRequires:        glib2-devel
+BuildRequires:        libblkid-devel
+BuildRequires:        make
+BuildRequires:        pkgconfig
+BuildRequires:        popt-devel
+BuildRequires:        rpm-devel
+BuildRequires:        sed
+%ifarch aarch64 x86_64 %{power64} riscv64
+BuildRequires:        grub2-tools-minimal
+Requires:             grub2-tools-minimal
+Requires:             grub2-tools
 %endif
 %ifarch s390 s390x
-Requires: s390utils-core
+Requires:             s390utils-core
 %endif
-Requires: findutils
-Requires: util-linux
+Requires:             findutils
+Requires:             util-linux
 
-ExcludeArch: %{ix86}
-Conflicts:	uboot-tools < 2021.01-0.1.rc2
-Obsoletes:	%{name}-bls < %{version}-%{release}
-Obsoletes:	%{name}-deprecated < %{version}-%{release}
+ExcludeArch:          %{ix86}
+Conflicts:            uboot-tools < 2021.01-0.1.rc2
+Obsoletes:            %{name}-bls < %{version}-%{release}
+Obsoletes:            %{name}-deprecated < %{version}-%{release}
 
 %description
 This package provides a grubby compatibility script that manages
@@ -74,6 +75,9 @@ fi
 %{_mandir}/man8/grubby.8*
 
 %changelog
+* Thu Dec 12 2024 Release Engineering <releng@rockylinux.org> - 8.40-77
+- Add riscv64 device tree support
+
 * Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 8.40-77
 - Bump release for October 2024 mass rebuild:
   Resolves: RHEL-64018