From 86594951a9a97965f0fb6c6ea44d4e88521dcec2 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Thu, 4 Nov 2021 13:53:53 +0000
Subject: [PATCH] x-efi-systemd-microcode.wks.in: Let the bootloader timeout be
 configurable

In this way, a blueprint can set a silent bootloader.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
 meta-oniro-core/conf/distro/include/oniro-wic.inc  | 2 ++
 meta-oniro-core/wic/x-efi-systemd-microcode.wks.in | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-oniro-core/conf/distro/include/oniro-wic.inc b/meta-oniro-core/conf/distro/include/oniro-wic.inc
index ac843b04..01ebeee5 100644
--- a/meta-oniro-core/conf/distro/include/oniro-wic.inc
+++ b/meta-oniro-core/conf/distro/include/oniro-wic.inc
@@ -33,6 +33,8 @@ APPDATA_PARTITION_SIZE ?= "1G"
 # Default root filesystem type is squashfs.
 ROOT_FSTYPE ?= "squashfs"
 
+WIC_BOOOTLOADER_TIMEOUT ?= "5"
+
 #
 # Use this to include extra wic configuration per partition
 #
diff --git a/meta-oniro-core/wic/x-efi-systemd-microcode.wks.in b/meta-oniro-core/wic/x-efi-systemd-microcode.wks.in
index 89af7d87..e4422f82 100644
--- a/meta-oniro-core/wic/x-efi-systemd-microcode.wks.in
+++ b/meta-oniro-core/wic/x-efi-systemd-microcode.wks.in
@@ -16,7 +16,7 @@
 # |  |
 # 0  4096KiB
 
-bootloader --ptable gpt --timeout=5 --append=" rootfstype=${ROOT_FSTYPE} "
+bootloader --ptable gpt --timeout=${WIC_BOOOTLOADER_TIMEOUT} --append=" rootfstype=${ROOT_FSTYPE} "
 
 part --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
 ${WIC_ROOTA_PARTITION}
-- 
GitLab