diff --git a/kernel/kernel-4.9/Makefile b/kernel/kernel-4.9/Makefile index 5c7ad93d6..4b20e449c 100644 --- a/kernel/kernel-4.9/Makefile +++ b/kernel/kernel-4.9/Makefile @@ -4,6 +4,8 @@ KERNEL_OVERLAYS += $(CURDIR)/../nvidia KERNEL_OVERLAYS += $(CURDIR)/../nvgpu KERNEL_OVERLAYS += $(CURDIR)/../nvgpu-next KERNEL_OVERLAYS += $(CURDIR)/../nvidia-t23x +LI_MT9M021_KERNEL_PATH=./li-mt9m021/kernel/nvidia-spiri +KERNEL_OVERLAYS += $(CURDIR)/../../$(LI_MT9M021_KERNEL_PATH) else override KERNEL_OVERLAYS := $(subst :, ,$(KERNEL_OVERLAYS)) endif diff --git a/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile b/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile index 99b6232c5..5be2c2320 100644 --- a/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile +++ b/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile @@ -98,6 +98,39 @@ DTB_NEW_RULE_LIST := $(dtb-y) DTBO_LIST += $(dtbo-y) DTBO_NEW_RULE_LIST := $(dtbo-y) +######### Include RidgeRun +LI_MT9M021_PATH=$(tegra-rel-dtstree)/../source/li-mt9m021/hardware/nvidia-spiri +LI_MT9M021_MAKEFILE_PATH=$(tegra-dtstree)/../../li-mt9m021/hardware/nvidia-spiri/platform/ + +dtb-y := +dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d))) +dts_mfiles_d = $(call dts_makefile, $(LI_MT9M021_MAKEFILE_PATH), Makefile) + +ifneq ($(dts_mfiles_d),) +dts-include := +include $(dts_mfiles_d) + +dtb-y := $(addprefix $(LI_MT9M021_PATH)/,$(dtb-y)) +dtbo-y := $(addprefix $(LI_MT9M021_PATH)/,$(dtbo-y)) + +ifneq ($(dts-include),) +DTC_FLAGS += $(addprefix -i $(LI_MT9M021_PATH)/,$(dts-include)) +DTCCPP_FLAGS += $(addprefix -I$(LI_MT9M021_PATH)/,$(dts-include)) + +DTC_FLAGS += -i $(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-include +DTC_FLAGS += -i $(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-dts +DTC_FLAGS += -i $(LI_MT9M021_MAKEFILE_PATH)/t18x/common/kernel-dts +DTCCPP_FLAGS += -I$(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-include +DTCCPP_FLAGS += -I$(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-dts +DTCCPP_FLAGS += -I$(LI_MT9M021_MAKEFILE_PATH)/t18x/common/kernel-dts +endif +endif + +DTB_LIST += $(dtb-y) +DTB_NEW_RULE_LIST += $(dtb-y) +DTBO_LIST += $(dtbo-y) +DTBO_NEW_RULE_LIST += $(dtbo-y) + # Now save DTB_LIST to dtb-y dtb-y := $(DTB_LIST) dtbo-y := $(DTBO_LIST) diff --git a/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig b/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig index 0fa3a1c86..c5c9d92c3 100644 --- a/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig +++ b/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig @@ -1196,3 +1196,4 @@ CONFIG_IRQ_POLL=y CONFIG_ARCH_TEGRA_18x_SOC=y CONFIG_ARCH_TEGRA_19x_SOC=y CONFIG_ARCH_TEGRA_23x_SOC=y +CONFIG_VIDEO_I2C_SPIRI_CAM=y