Skip to content

Commit

Permalink
esp-qcom-image: remove unused dirs and files
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ricardosalveti committed Dec 4, 2024
1 parent cf406b9 commit f5c1048
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions recipes-kernel/images/esp-qcom-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit f5c1048

Please sign in to comment.