From c182be2c572fd8939ade55c4a7a259df1c185170 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Fri, 18 Mar 2022 16:56:57 +0100
Subject: [PATCH] grub: enable halt and echo modules

Those are required by the upcoming grub.cfg boot script.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 meta-oniro-core/recipes-bsp/grub/grub-efi_%.bbappend | 6 ++++--
 meta-oniro-core/recipes-bsp/grub/grub_%.bbappend     | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/meta-oniro-core/recipes-bsp/grub/grub-efi_%.bbappend b/meta-oniro-core/recipes-bsp/grub/grub-efi_%.bbappend
index d9811a91..c6df2a20 100644
--- a/meta-oniro-core/recipes-bsp/grub/grub-efi_%.bbappend
+++ b/meta-oniro-core/recipes-bsp/grub/grub-efi_%.bbappend
@@ -12,5 +12,7 @@
 TARGET_CFLAGS:remove = "-Werror=array-bounds"
 
 # Make sure that GRUB can load squashfs, so that it can mount the system image
-# and load the kernel, or other modules, from there directly.
-GRUB_BUILDIN:append = " squash4"
+# and load the kernel, or other modules, from there directly. In addition add
+# echo and halt modules, so that the GRUB boot script can print diagnostic
+# messages or shut down on error.
+GRUB_BUILDIN:append = " squash4 halt echo"
diff --git a/meta-oniro-core/recipes-bsp/grub/grub_%.bbappend b/meta-oniro-core/recipes-bsp/grub/grub_%.bbappend
index d9811a91..c6df2a20 100644
--- a/meta-oniro-core/recipes-bsp/grub/grub_%.bbappend
+++ b/meta-oniro-core/recipes-bsp/grub/grub_%.bbappend
@@ -12,5 +12,7 @@
 TARGET_CFLAGS:remove = "-Werror=array-bounds"
 
 # Make sure that GRUB can load squashfs, so that it can mount the system image
-# and load the kernel, or other modules, from there directly.
-GRUB_BUILDIN:append = " squash4"
+# and load the kernel, or other modules, from there directly. In addition add
+# echo and halt modules, so that the GRUB boot script can print diagnostic
+# messages or shut down on error.
+GRUB_BUILDIN:append = " squash4 halt echo"
-- 
GitLab