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

@@ -10,10 +10,10 @@ export srctree.nvidia-oot := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIS
endif
ifeq ($(origin srctree.hwpm), undefined)
export srctree.hwpm := $(KERNEL_SRC)/../../../hwpm
export srctree.hwpm := $(KERNEL_SRC)/../hwpm
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
M ?= $(shell pwd)