From 3e1c87b38115bd7fcb9b85d6956a579322abccf7 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Sat, 19 Feb 2022 11:54:08 +0000
Subject: [PATCH] oniro-image-common: depend on kernel-image

The rootfs already contains kernel modules so updating the image without
updating the kernel would cause a skew that would most likely prevent
the system from working.

On some platforms the kernel must be in a special area, as the
bootloader is more limited or closed, and the update process needs to
copy it to make progress.

On other platforms, we can use a more capable bootloader to load the
kernel from the rootfs directly. For all such platforms we want to add
the kernel-image package to the base oniro dependencies.

The kernel-image package is somewhat suboptimal, as ideally we would put
the kernel image into the root directory, making the /boot directory an
empty mount point for the boot partition.

Since doing this exceeds my skills and patience, the second best thing
will do.

Closes: https://booting.oniroproject.org/distro/oniro/-/issues/240

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 meta-oniro-core/recipes-core/images/oniro-image-common.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-oniro-core/recipes-core/images/oniro-image-common.inc b/meta-oniro-core/recipes-core/images/oniro-image-common.inc
index 62d502de..42310df8 100644
--- a/meta-oniro-core/recipes-core/images/oniro-image-common.inc
+++ b/meta-oniro-core/recipes-core/images/oniro-image-common.inc
@@ -11,6 +11,7 @@ IMAGE_INSTALL:append = "\
 			packagegroup-net-essentials \
 			packagegroup-ble-essentials \
 			sysota \
+			kernel-image \
 			"
 
 IMAGE_INSTALL:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-client', '', d)} "
-- 
GitLab