mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
1. Add BUILD.bazel file. 2. Add build target of kernel module and required include folder srctree.* in Makefile to fix the build issue 3. The tr (a build tool defined by kleaf in the sandbox) which supported by toybox will cause the conversion of header files to file_define to fail. Fixed it by separating with two tr commands. Bug 4344670 Change-Id: I56dcc148960f3b7703335943281589f42caa9af7 Signed-off-by: Jian-Min Liu <jianminl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066225 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
24 lines
778 B
Makefile
24 lines
778 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
|
|
ifeq ($(origin srctree.nvconftest), undefined)
|
|
srctree.nvconftest := $(abspath $(NV_BUILD_KERNEL_NVCONFTEST_OUT))
|
|
endif
|
|
|
|
ifeq ($(origin srctree.nvidia-oot), undefined)
|
|
export srctree.nvidia-oot := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))
|
|
endif
|
|
|
|
ifeq ($(origin srctree.hwpm), undefined)
|
|
export srctree.hwpm := $(KERNEL_SRC)/../../../hwpm
|
|
endif
|
|
|
|
EXTRA_SYMBOLS += $(O)/../../../hwpm/drivers/tegra/hwpm/Module.symvers
|
|
|
|
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
|
|
M ?= $(shell pwd)
|
|
|
|
modules modules_install clean:
|
|
$(MAKE) -C $(KERNEL_SRC) M=$(M) \
|
|
srctree.nvidia-oot=$$PWD KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" $(@)
|