From 9c201a1c461b6055eec393030ef9e76d43a61983 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Tue, 15 Feb 2022 10:55:38 +0000
Subject: [PATCH] wic: respect WIC_BOOTLOADER_TIMEOUT in qemu configs

While doing other maintenance in this area I've noticed that some
kickstart files use hard-coded timeout values instead of the
WIC_BOOTLOADER_TIMEOUT variable defined by Oniro.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 meta-oniro-core/wic/x-qemu-efi-disk.wks.in      | 2 +-
 meta-oniro-core/wic/x-qemux86-directdisk.wks.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-oniro-core/wic/x-qemu-efi-disk.wks.in b/meta-oniro-core/wic/x-qemu-efi-disk.wks.in
index 24409d66..a65abff1 100644
--- a/meta-oniro-core/wic/x-qemu-efi-disk.wks.in
+++ b/meta-oniro-core/wic/x-qemu-efi-disk.wks.in
@@ -2,7 +2,7 @@
 # long-description: Creates a partitioned EFI disk image that the user
 # can directly dd to boot media.
 
-bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=squashfs"
+bootloader --ptable gpt --timeout=${WIC_BOOTLOADER_TIMEOUT} --append="rootwait rootfstype=squashfs"
 part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid
 ${WIC_ROOTA_PARTITION}
 ${WIC_ROOTB_PARTITION}
diff --git a/meta-oniro-core/wic/x-qemux86-directdisk.wks.in b/meta-oniro-core/wic/x-qemux86-directdisk.wks.in
index 22de3e1f..2157da81 100644
--- a/meta-oniro-core/wic/x-qemux86-directdisk.wks.in
+++ b/meta-oniro-core/wic/x-qemux86-directdisk.wks.in
@@ -18,7 +18,7 @@
 # 0 |
 #   4096KiB
 
-bootloader --source bootimg-pcbios --timeout=0 --append="oprofile.timer=1 rootfstype=${ROOT_FSTYPE}"
+bootloader --source bootimg-pcbios --timeout=${WIC_BOOTLOADER_TIMEOUT} --append="oprofile.timer=1 rootfstype=${ROOT_FSTYPE}"
 
 part --source bootimg-pcbios --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
 ${WIC_ROOTA_PARTITION}
-- 
GitLab