kernel: Fix building kernel platform with in-tree out

This was originally verified against out-of-tree, which is already an
absolute path. With in-tree out, the path is relative. Since pwd is
changed to the root of the kernel platform tree, the dist path needs to
be absolute.

Fixes: 7cd90ecd (kernel: Support building from kernel platform)
Change-Id: Ib9cecdc5f8bfd3345afc73c050ab6214ac4c48d6
This commit is contained in:
Aaron Kling
2025-09-23 17:08:39 -05:00
committed by Zabuka_zuzu
parent b5ba30c958
commit 3c00b75fd1

View File

@@ -717,7 +717,7 @@ $(TARGET_PREBUILT_INT_KERNEL): $(DEPMOD) $(KERNEL_MODULES_PARTITION_FILE_LIST) $
@echo "Building $(BOARD_KERNEL_IMAGE_NAME)"
@mkdir -p $(KERNEL_OUT)
@rm -rf $(KERNEL_PATH)/out
$(hide) cd $(KERNEL_PATH) && ./tools/bazel --output_user_root=$(abspath $(KERNEL_OUT)/bazel-out) run --experimental_convenience_symlinks=ignore --cpu=$(KERNEL_ARCH) //$(KERNEL_SRC):$(TARGET_KERNEL_PLATFORM_TARGET)_dist -- --destdir=$(KERNEL_OUT)
$(hide) cd $(KERNEL_PATH) && ./tools/bazel --output_user_root=$(abspath $(KERNEL_OUT)/bazel-out) run --experimental_convenience_symlinks=ignore --cpu=$(KERNEL_ARCH) //$(KERNEL_SRC):$(TARGET_KERNEL_PLATFORM_TARGET)_dist -- --destdir=$(abspath $(KERNEL_OUT))
$(if $(BOOT_KERNEL_MODULES),\
$(call build-image-kernel-modules-lineage,$(addprefix $(KERNEL_OUT)/,$(BOOT_KERNEL_MODULES)),$(KERNEL_VENDOR_RAMDISK_MODULES_OUT),,$(KERNEL_VENDOR_RAMDISK_DEPMOD_STAGING_DIR),$(KERNEL_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),,,)\
)