1 Star 0 Fork 100

src-NestOS/grub2

forked from src-openEuler/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0178-Set-a-devicetree-var-in-a-BLS-config-if-GRUB_DEFAULT.patch 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
hanzj0122_admin 提交于 2020-07-29 20:47 . update to 2.04
From 6af4cfe6059cdce1ff72db3c72e77097e1285cc0 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Sun, 15 Sep 2019 10:05:29 +0200
Subject: [PATCH 178/220] Set a devicetree var in a BLS config if
GRUB_DEFAULT_DTB is present
The BootLoaderSpec mentions that a devicetree field can be used to pass a
Device Tree (DT) to the kernel, for the platforms that use it to describe
information about the hardware.
The blscfg module supports parsing the field from the BLS snippets but it
allows to set a DT for all the entries if a devicetree env var is defined.
Make the grub2-mkconfig tool to set this variable if GRUB_DEFAULT_DTB was
defined in the /etc/default/grub file.
Resolves: rhbz#1751307
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub.d/10_linux.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 301594a..1520b7e 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -138,6 +138,10 @@ EOF
if [ -n "${GRUB_EARLY_INITRD_LINUX_CUSTOM}" ]; then
${grub_editenv} - set early_initrd="${GRUB_EARLY_INITRD_LINUX_CUSTOM}"
fi
+
+ if [ -n "${GRUB_DEFAULT_DTB}" ]; then
+ ${grub_editenv} - set devicetree="${GRUB_DEFAULT_DTB}"
+ fi
fi
exit 0
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-nest-os/grub2.git
git@gitee.com:src-nest-os/grub2.git
src-nest-os
grub2
grub2
master

搜索帮助