mali-driver: Remove Android makefile with old-style build rules
authorBruno Martins <bgcngm@gmail.com>
Sat, 16 Dec 2023 22:51:32 +0000 (22:51 +0000)
committerBruno Martins <bgcngm@gmail.com>
Sun, 7 Jul 2024 15:04:50 +0000 (16:04 +0100)
These build rules are no longer needed, devices now build the module
as a real external kernel module.

Change-Id: I11546f3dbfe40e8cbcf0653b0a7274a81a7ad328

Android.mk [deleted file]
bifrost/Android.mk [deleted file]
midgard/Android.mk [deleted file]
utgard/Android.mk [deleted file]

diff --git a/Android.mk b/Android.mk
deleted file mode 100644 (file)
index fd43b36..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (C) 2021-2022 The LineageOS Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-ifneq ($(filter bifrost midgard utgard,$(TARGET_AMLOGIC_GPU_ARCH)),)
-MALI_PATH := $(abspath $(call my-dir))
-include  $(abspath $(call my-dir))/$(TARGET_AMLOGIC_GPU_ARCH)/Android.mk
-endif
diff --git a/bifrost/Android.mk b/bifrost/Android.mk
deleted file mode 100644 (file)
index f1a4bcd..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (C) 2021-2023 The LineageOS Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-ifeq ($(TARGET_PREBUILT_KERNEL),)
-MALI_GPU_VARIANT ?= bifrost
-MALI_DRV_VERSION ?= r32p1
-#MALI_PATH        := $(abspath $(call my-dir))
-GPU_PATH         := $(MALI_GPU_VARIANT)/$(MALI_DRV_VERSION)/kernel/drivers/gpu/arm/midgard
-GPU_CONFIGS      := CONFIG_MALI_MIDGARD=m CONFIG_MALI_MIDGARD_DVFS=y CONFIG_MALI_DMA_BUF_MAP_ON_DEMAND=y CONFIG_MALI_BACKEND=gpu
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE        := mali
-LOCAL_MODULE_SUFFIX := .ko
-LOCAL_MODULE_CLASS  := ETC
-LOCAL_MODULE_PATH   := $(TARGET_OUT_VENDOR)/lib/modules
-LOCAL_CFLAGS        := -Wno-error -Wno-pointer-sign -Wno-error=frame-larger-than=
-LOCAL_C_INCLUDES    := \
-    $(MALI_PATH)/$(GPU_PATH)/backend/gpu \
-    $(MALI_PATH)/$(GPU_PATH)/platform/devicetree \
-    $(MALI_PATH)/$(GPU_PATH)/ipa \
-    $(MALI_PATH)/$(GPU_PATH) \
-    $(MALI_PATH)/dvalin/kernel/include
-
-_mali_intermediates := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE))
-_mali_ko := $(_mali_intermediates)/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
-KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
-GPU_CFLAGS := $(LOCAL_CFLAGS) $(addprefix -I,$(LOCAL_C_INCLUDES)) -DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_MIDGARD_DVFS -DCONFIG_MALI_BACKEND=gpu -DCONFIG_MALI_DMA_BUF_MAP_ON_DEMAND=1 -DCONFIG_MALI_DMA_BUF_LEGACY_COMPAT=0
-
-$(_mali_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME)
-       @mkdir -p $(dir $@)
-       @cp -R $(MALI_PATH)/* $(dir $@)/
-       $(PATH_OVERRIDE) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_OUT) M=$(abspath $(_mali_intermediates))/$(GPU_PATH) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_CLANG_TRIPLE) $(KERNEL_CC) EXTRA_CFLAGS="$(GPU_CFLAGS)" $(GPU_CONFIGS) modules
-       $(TARGET_KERNEL_CLANG_PATH)/bin/llvm-strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali_kbase.ko; \
-       cp $(dir $@)/$(GPU_PATH)/mali_kbase.ko $@;
-
-include $(BUILD_SYSTEM)/base_rules.mk
-endif
diff --git a/midgard/Android.mk b/midgard/Android.mk
deleted file mode 100644 (file)
index da3c001..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Copyright (C) 2021-2023 The LineageOS Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-ifeq ($(TARGET_PREBUILT_KERNEL),)
-
-MALI_GPU_VARIANT ?= midgard
-MALI_DRV_VERSION ?= r28p0
-#MALI_PATH        := $(abspath $(call my-dir))
-GPU_PATH         := $(MALI_GPU_VARIANT)/$(MALI_DRV_VERSION)/kernel/drivers/gpu/arm/midgard
-GPU_CONFIGS      := CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_DEVICETREE=y CONFIG_MALI_MIDGARD_DVFS=y CONFIG_MALI_BACKEND=gpu
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE        := mali
-LOCAL_MODULE_SUFFIX := .ko
-LOCAL_MODULE_CLASS  := ETC
-LOCAL_MODULE_PATH   := $(TARGET_OUT_VENDOR)/lib/modules
-LOCAL_CFLAGS        := -Wno-error -Wno-pointer-sign -Wno-error=frame-larger-than=
-LOCAL_C_INCLUDES    := \
-    $(MALI_PATH)/$(GPU_PATH)/backend/gpu \
-    $(MALI_PATH)/$(GPU_PATH)/platform/devicetree \
-    $(MALI_PATH)/$(GPU_PATH)/ipa \
-    $(MALI_PATH)/$(GPU_PATH) \
-    $(MALI_PATH)/dvalin/kernel/include
-
-_mali_intermediates := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE))
-_mali_ko := $(_mali_intermediates)/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
-KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
-GPU_CFLAGS := $(LOCAL_CFLAGS) $(addprefix -I,$(LOCAL_C_INCLUDES)) -DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_MIDGARD_DVFS -DCONFIG_MALI_BACKEND=gpu
-
-$(_mali_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME)
-       @mkdir -p $(dir $@)
-       @cp -R $(MALI_PATH)/* $(dir $@)/
-       $(hide) +$(KERNEL_MAKE_CMD) $(PATH_OVERRIDE) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_OUT) M=$(abspath $(_mali_intermediates))/$(GPU_PATH) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) EXTRA_CFLAGS="$(GPU_CFLAGS)" $(GPU_CONFIGS) modules
-       $(TARGET_KERNEL_CLANG_PATH)/bin/llvm-strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali_kbase.ko; \
-       cp $(dir $@)/$(GPU_PATH)/mali_kbase.ko $@;
-
-include $(BUILD_SYSTEM)/base_rules.mk
-endif
diff --git a/utgard/Android.mk b/utgard/Android.mk
deleted file mode 100644 (file)
index 5e09215..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright (C) 2021-2023 The LineageOS Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-ifeq ($(TARGET_PREBUILT_KERNEL),)
-MALI_GPU_VARIANT ?= utgard
-#MALI_DRV_VERSION ?= r10p0
-MALI_DRV_VERSION ?= r8p0
-#MALI_PATH        := $(abspath $(call my-dir))
-GPU_PATH         := $(MALI_GPU_VARIANT)/$(MALI_DRV_VERSION)
-GPU_CONFIGS      := CONFIG_MALI400=m  CONFIG_MALI450=m CONFIG_AM_VDEC_H264_4K2K=y
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE        := mali
-LOCAL_MODULE_SUFFIX := .ko
-LOCAL_MODULE_CLASS  := ETC
-LOCAL_MODULE_PATH   := $(TARGET_OUT_VENDOR)/lib/modules
-LOCAL_CFLAGS        := -Wno-error -Wno-pointer-sign -Wno-error=frame-larger-than=
-LOCAL_C_INCLUDES    := \
-    $(MALI_PATH)/$(GPU_PATH)/backend/gpu \
-    $(MALI_PATH)/$(GPU_PATH)/platform/devicetree \
-    $(MALI_PATH)/$(GPU_PATH)/ipa \
-    $(MALI_PATH)/$(GPU_PATH) \
-    $(MALI_PATH)/dvalin/kernel/include
-
-_mali_intermediates := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE))
-_mali_ko := $(_mali_intermediates)/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
-KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
-GPU_CFLAGS := $(LOCAL_CFLAGS) $(addprefix -I,$(LOCAL_C_INCLUDES))  -DCONFIG_MALI400=m -DCONFIG_MALI450=m
-
-$(_mali_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME)
-       @mkdir -p $(dir $@)
-       @cp -R $(MALI_PATH)/* $(dir $@)/
-       @cp -R $(MALI_PATH)/$(MALI_GPU_VARIANT)/platform $(dir $@)/$(GPU_PATH)
-       $(hide) +$(KERNEL_MAKE_CMD) $(PATH_OVERRIDE) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_OUT) M=$(abspath $(_mali_intermediates))/$(GPU_PATH) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) EXTRA_CFLAGS="$(GPU_CFLAGS)" $(GPU_CONFIGS) modules
-       $(TARGET_KERNEL_CLANG_PATH)/bin/llvm-strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali.ko; \
-       cp $(dir $@)/$(GPU_PATH)/mali.ko $@;
-
-include $(BUILD_SYSTEM)/base_rules.mk
-endif