From f5c1048aaa4f674ce286bd7303cd93de9d651967 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Mon, 2 Dec 2024 21:11:11 +0000 Subject: [PATCH] esp-qcom-image: remove unused dirs and files OE creates a set of directories and files which are desired on standard images, but are not required for ESP as this is a minimal non-rootfs standard image. Remove everything but the 'EFI' folder from the ESP image via a custom IMAGE_PREPROCESS_COMMAND command, as the base files and directories are needed during the rootfs task. Signed-off-by: Ricardo Salveti --- recipes-kernel/images/esp-qcom-image.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-kernel/images/esp-qcom-image.bb b/recipes-kernel/images/esp-qcom-image.bb index 038da2202..ff33205a0 100644 --- a/recipes-kernel/images/esp-qcom-image.bb +++ b/recipes-kernel/images/esp-qcom-image.bb @@ -24,3 +24,8 @@ IMAGE_ROOTFS_EXTRA_SPACE = "0" IMAGE_LINGUAS = "" IMAGE_FEATURES = "" + +remove_unused_files() { + find ${IMAGE_ROOTFS} -mindepth 1 ! -path "${IMAGE_ROOTFS}/EFI*" -exec rm -rf {} + +} +IMAGE_PREPROCESS_COMMAND:append = " remove_unused_files"