From 162770809f5722d37b75235c561b6d8230d79ba9 Mon Sep 17 00:00:00 2001 From: kmiit Date: Thu, 12 Jun 2025 17:51:43 +0800 Subject: [PATCH] qcom: Build dtbos inline --- qcom/Makefile | 1 + qcom/audio/Kbuild | 2 ++ qcom/audio/Makefile | 19 ------------------- qcom/bt/Makefile | 9 --------- qcom/camera/Kbuild | 15 ++------------- qcom/camera/Makefile | 20 -------------------- qcom/data/Makefile | 9 --------- qcom/display/Makefile | 9 --------- qcom/dsp/Makefile | 9 --------- qcom/eSE/Makefile | 9 --------- qcom/eva/Makefile | 9 --------- qcom/graphics/Makefile | 9 --------- qcom/mm/Makefile | 9 --------- qcom/mmrm/Makefile | 9 --------- qcom/nfc/Makefile | 12 ------------ qcom/synx/Kbuild | 15 ++------------- qcom/synx/Makefile | 19 ------------------- qcom/video/Makefile | 9 --------- qcom/wlan/Makefile | 10 ---------- 19 files changed, 7 insertions(+), 196 deletions(-) delete mode 100644 qcom/audio/Makefile delete mode 100644 qcom/bt/Makefile delete mode 100644 qcom/camera/Makefile delete mode 100644 qcom/data/Makefile delete mode 100644 qcom/display/Makefile delete mode 100644 qcom/dsp/Makefile delete mode 100644 qcom/eSE/Makefile delete mode 100644 qcom/eva/Makefile delete mode 100644 qcom/graphics/Makefile delete mode 100644 qcom/mm/Makefile delete mode 100644 qcom/mmrm/Makefile delete mode 100644 qcom/nfc/Makefile delete mode 100644 qcom/synx/Makefile delete mode 100644 qcom/video/Makefile delete mode 100644 qcom/wlan/Makefile diff --git a/qcom/Makefile b/qcom/Makefile index 5b4a02d5..e2bd4d1e 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -360,4 +360,5 @@ endif always-y := $(dtb-y) subdir-y := $(dts-dirs) +subdir-y += audio bt camera data display dsp eSE eva graphics mm mmrm nfc synx video wlan clean-files := *.dtb *.dtbo diff --git a/qcom/audio/Kbuild b/qcom/audio/Kbuild index 2995f6c5..01711968 100644 --- a/qcom/audio/Kbuild +++ b/qcom/audio/Kbuild @@ -1,3 +1,5 @@ +DTC_INCLUDE += $(srctree)/../sm8750-modules/qcom/opensource/audio-kernel/include + ifeq ($(CONFIG_ARCH_PINEAPPLE), y) dtbo-y += pineapple-audio.dtbo \ pineapple-audio-cdp.dtbo \ diff --git a/qcom/audio/Makefile b/qcom/audio/Makefile deleted file mode 100644 index d541b817..00000000 --- a/qcom/audio/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -AUDIO_DEVICETREE_ROOT=$(KERNEL_SRC)/$(M) -AUDIO_KERNEL_ROOT=$(AUDIO_DEVICETREE_ROOT)/../../opensource/audio-kernel/include - -KBUILD_OPTIONS += KBUILD_DTC_INCLUDE=$(AUDIO_KERNEL_ROOT) -KBUILD_OPTIONS += KBUILD_EXTMOD_DTS=. -KBUILD_OPTIONS += KERNEL_ROOT=$(ROOT_DIR)/$(KERNEL_DIR) -KBUILD_OPTIONS += MODNAME=audio-devicetree - - -all: dtbs - -dtbs: - $(MAKE) -C $(KERNEL_SRC) M=$(M) dtbs $(KBUILD_OPTIONS) - -modules_install: - $(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean diff --git a/qcom/bt/Makefile b/qcom/bt/Makefile deleted file mode 100644 index ef33f916..00000000 --- a/qcom/bt/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS += KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/camera/Kbuild b/qcom/camera/Kbuild index 8b848089..c44d7647 100644 --- a/qcom/camera/Kbuild +++ b/qcom/camera/Kbuild @@ -1,17 +1,6 @@ -# Use current $(MSM_ARCH) to set config/ makefile path -CAMERA_TARGET_MKFILE_PATH := $(CAMERA_DEVICETREE_ROOT)/config/$(MSM_ARCH).mk -# Check to see if current target makefile exists -CAMERA_TARGET_EXISTS := $(or $(and $(wildcard $(CAMERA_TARGET_MKFILE_PATH)),y),n) +DTC_INCLUDE += $(srctree)/../sm8750-modules/qcom/opensource/camera-kernel -# Since Kernel SI can support multiple ARCH's this allows only the current selected target ARCH -# to compile. -ifeq ($(CAMERA_TARGET_EXISTS), y) -include $(CAMERA_TARGET_MKFILE_PATH) -else -# Print a warning but do not throw an error to allow bring-up of new targets! -$(warning [$(MODNAME)] $(MSM_ARCH) is not a valid target, make sure config\ folder contains a makefile named $(MSM_ARCH).mk) -$(warning [$(MODNAME)] driver is NOT being enabled!) -endif +include $(srctree)/$(src)/config/sun.mk always-y := $(dtbo-y) $(dtb-y) subdir-y := $(dts-dirs) diff --git a/qcom/camera/Makefile b/qcom/camera/Makefile deleted file mode 100644 index ba9b560b..00000000 --- a/qcom/camera/Makefile +++ /dev/null @@ -1,20 +0,0 @@ - -CAMERA_DEVICETREE_ROOT=$(KERNEL_SRC)/$(M) -CAMERA_KERNEL_ROOT=$(CAMERA_DEVICETREE_ROOT)/../../opensource/camera-kernel - -KBUILD_OPTIONS += CAMERA_DEVICETREE_ROOT=$(KERNEL_SRC)/$(M) -KBUILD_OPTIONS += KBUILD_DTC_INCLUDE=$(CAMERA_KERNEL_ROOT) -KBUILD_OPTIONS += KBUILD_EXTMOD_DTS=. -KBUILD_OPTIONS += KERNEL_ROOT=$(ROOT_DIR)/$(KERNEL_DIR) -KBUILD_OPTIONS += MODNAME=camera-devicetree - -all: dtbs - -dtbs: - $(MAKE) -C $(KERNEL_SRC) M=$(M) dtbs $(KBUILD_OPTIONS) - -modules_install: - $(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean diff --git a/qcom/data/Makefile b/qcom/data/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/data/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/display/Makefile b/qcom/display/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/display/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/dsp/Makefile b/qcom/dsp/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/dsp/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/eSE/Makefile b/qcom/eSE/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/eSE/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/eva/Makefile b/qcom/eva/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/eva/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/graphics/Makefile b/qcom/graphics/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/graphics/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/mm/Makefile b/qcom/mm/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/mm/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/mmrm/Makefile b/qcom/mmrm/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/mmrm/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/nfc/Makefile b/qcom/nfc/Makefile deleted file mode 100644 index f2d100f2..00000000 --- a/qcom/nfc/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -KBUILD_OPTIONS += KBUILD_EXTMOD_DTS=. - -all: dtbs - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) - -modules_install: - $(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean \ No newline at end of file diff --git a/qcom/synx/Kbuild b/qcom/synx/Kbuild index c6b9be42..605a6c47 100644 --- a/qcom/synx/Kbuild +++ b/qcom/synx/Kbuild @@ -1,17 +1,6 @@ -# Use current $(MSM_ARCH) to set config/ makefile path -SYNX_TARGET_MKFILE_PATH := $(SYNX_DEVICETREE_ROOT)/config/$(MSM_ARCH).mk -# Check to see if current target makefile exists -SYNX_TARGET_EXISTS := $(or $(and $(wildcard $(SYNX_TARGET_MKFILE_PATH)),y),n) +DTC_INCLUDE += $(srctree)/../sm8750-modules/qcom/opensource/synx-kernel -# Since Kernel SI can support multiple ARCH's this allows only the current selected target ARCH -# to compile. -ifeq ($(SYNX_TARGET_EXISTS), y) -include $(SYNX_TARGET_MKFILE_PATH) -else -# Print a warning but do not throw an error to allow bring-up of new targets! -$(warning [$(MODNAME)] $(MSM_ARCH) is not a valid target, make sure config\ folder contains a makefile named $(MSM_ARCH).mk) -$(warning [$(MODNAME)] driver is NOT being enabled!) -endif +include $(srctree)/$(src)/config/sun.mk always-y := $(dtbo-y) $(dtb-y) subdir-y := $(dts-dirs) diff --git a/qcom/synx/Makefile b/qcom/synx/Makefile deleted file mode 100644 index e3ef2242..00000000 --- a/qcom/synx/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -SYNX_DEVICETREE_ROOT=$(shell pwd) -SYNX_KERNEL_ROOT=$(SYNX_DEVICETREE_ROOT)/../../opensource/synx-kernel - -KBUILD_OPTIONS += SYNX_DEVICETREE_ROOT=$(shell pwd) -KBUILD_OPTIONS += KBUILD_DTC_INCLUDE+=$(SYNX_KERNEL_ROOT) -KBUILD_OPTIONS += KBUILD_EXTMOD_DTS=. -KBUILD_OPTIONS += KERNEL_ROOT=$(ROOT_DIR)/$(KERNEL_DIR) -KBUILD_OPTIONS += MODNAME=synx-devicetree - -all: dtbs - -dtbs: - $(MAKE) -C $(KERNEL_SRC) M=$(M) dtbs $(KBUILD_OPTIONS) - -modules_install: - $(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean diff --git a/qcom/video/Makefile b/qcom/video/Makefile deleted file mode 100644 index b1e0dfe9..00000000 --- a/qcom/video/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -KBUILD_OPTIONS+=KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS) diff --git a/qcom/wlan/Makefile b/qcom/wlan/Makefile deleted file mode 100644 index 4b03b08a..00000000 --- a/qcom/wlan/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -KBUILD_OPTIONS += KBUILD_EXTMOD_DTS=. - -all: dtbs - -clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) clean - -%: - $(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)