kleaf: Use kernel-source path as kbuild

Use the kernel-source folder name to hide the kernel version path,
and this folder will be created as symlink. Before building kernel,
the script will build the symlink based on the kernel version of
environment variable. The advantage of this is that there is no need
to change the path whenever the version is updated, and the build
can be switched between different kernel version.

Bug 4344670

Change-Id: Idfc285fee7472bb3d76b6a6cdc1334df5958f4a0
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158772
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
Jian-Min Liu
2024-06-18 06:54:04 +00:00
committed by mobile promotions
parent 7ca2ec7115
commit a984cae1fc
2 changed files with 3 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ kernel_module(
"sound/soc/tegra-virt-alt/snd-soc-tegra-virt-t210ref-pcm.ko", "sound/soc/tegra-virt-alt/snd-soc-tegra-virt-t210ref-pcm.ko",
"sound/tegra-safety-audio/safety-i2s.ko", "sound/tegra-safety-audio/safety-i2s.ko",
], ],
kernel_build = "//android-common-kernel/6.1/kernel-source:tegra_android", kernel_build = "//nvidia-build/kleaf:tegra_android",
deps = [ deps = [
"//hwpm/drivers/tegra/hwpm:hwpm", "//hwpm/drivers/tegra/hwpm:hwpm",
], ],

View File

@@ -10,10 +10,10 @@ export srctree.nvidia-oot := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIS
endif endif
ifeq ($(origin srctree.hwpm), undefined) ifeq ($(origin srctree.hwpm), undefined)
export srctree.hwpm := $(KERNEL_SRC)/../../../hwpm export srctree.hwpm := $(KERNEL_SRC)/../hwpm
endif endif
EXTRA_SYMBOLS += $(O)/../../../hwpm/drivers/tegra/hwpm/Module.symvers EXTRA_SYMBOLS += $(OUT_DIR)/../hwpm/drivers/tegra/hwpm/Module.symvers
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
M ?= $(shell pwd) M ?= $(shell pwd)