From: Jiyu Yang Date: Tue, 17 Jul 2018 10:48:02 +0000 (+0800) Subject: enable --strip-debug to reduce module size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1e8115c39802a471f38aba12c37d9e9c1df399f3;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git enable --strip-debug to reduce module size Change-Id: I494faba45e38226b94d46187f1b9be52c0d8e2db --- diff --git a/dvalin/kernel/drivers/gpu/arm/midgard/Kbuild b/dvalin/kernel/drivers/gpu/arm/midgard/Kbuild index 9d3ab61..1f67aa0 100755 --- a/dvalin/kernel/drivers/gpu/arm/midgard/Kbuild +++ b/dvalin/kernel/drivers/gpu/arm/midgard/Kbuild @@ -66,7 +66,7 @@ DEFINES +=-DMALI_KBASE_PLATFORM_PATH=$(src)/platform/$(CONFIG_MALI_PLATFORM_NAME endif DEFINES += -I$(srctree)/drivers/staging/android -#ldflags-y += --strip-debug +ldflags-y += --strip-debug # Use our defines when compiling ccflags-y += $(DEFINES) -I$(KBASE_PATH) -I$(KBASE_PLATFORM_PATH) -I$(UMP_PATH) -I$(srctree)/include/linux diff --git a/gpu-v2.mk b/gpu-v2.mk index 028d6ab..61f1ca6 100644 --- a/gpu-v2.mk +++ b/gpu-v2.mk @@ -24,7 +24,7 @@ $(PRODUCT_OUT)/ramdisk.img:mali.ko $(PRODUCT_OUT)/system.img:mali.ko mali.ko: $(GPU_ARCH).ko - cp $(PRODUCT_OUT)/$(GPU_MODS_OUT)/$(GPU_ARCH).ko $(PRODUCT_OUT)/$(GPU_MODS_OUT)/mali.ko + echo "$(GPU_ARCH).ko build finished" #TODO rm shell cmd # utgard-modules $(MESON_GPU_DIR) $(GPU_DRV_VERSION) $(KERNEL_ARCH) @@ -40,11 +40,12 @@ define utgard-modules $(MAKE) -C $(shell pwd)/$(PRODUCT_OUT)/obj/KERNEL_OBJ M=$(shell pwd)/$(PRODUCT_OUT)/obj/mali \ ARCH=$(3) CROSS_COMPILE=$(PREFIX_CROSS_COMPILE) CONFIG_MALI400=m CONFIG_MALI450=m \ EXTRA_CFLAGS="-DCONFIG_MALI400=m -DCONFIG_MALI450=m" \ + EXTRA_LDFLAGS+="--strip-debug" \ CONFIG_AM_VDEC_H264_4K2K=y modules @echo "GPU_MODS_OUT is $(GPU_MODS_OUT)" mkdir -p $(PRODUCT_OUT)/$(GPU_MODS_OUT) - cp $(PRODUCT_OUT)/obj/mali/mali.ko $(PRODUCT_OUT)/$(GPU_MODS_OUT)/utgard.ko + cp $(PRODUCT_OUT)/obj/mali/mali.ko $(PRODUCT_OUT)/$(GPU_MODS_OUT)/mali.ko endef #$(call midgard-modules,$(MESON_GPU_DIR),$(MESON_GPU_DIR)/midgard/$(GPU_DRV_VERSION),$(KERNEL_ARCH)) @@ -57,11 +58,12 @@ define midgard-modules $(MAKE) -C $(shell pwd)/$(PRODUCT_OUT)/obj/KERNEL_OBJ M=$(shell pwd)/$(PRODUCT_OUT)/obj/t83x/kernel/drivers/gpu/arm/midgard \ ARCH=$(3) CROSS_COMPILE=$(PREFIX_CROSS_COMPILE) \ EXTRA_CFLAGS="-DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_MIDGARD_DVFS -DCONFIG_MALI_BACKEND=gpu" \ + EXTRA_LDFLAGS+="--strip-debug" \ CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_DEVICETREE=y CONFIG_MALI_MIDGARD_DVFS=y CONFIG_MALI_BACKEND=gpu modules mkdir -p $(PRODUCT_OUT)/$(GPU_MODS_OUT) @echo "GPU_MODS_OUT is $(GPU_MODS_OUT)" - cp $(PRODUCT_OUT)/obj/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase.ko $(PRODUCT_OUT)/$(GPU_MODS_OUT)/midgard.ko + cp $(PRODUCT_OUT)/obj/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase.ko $(PRODUCT_OUT)/$(GPU_MODS_OUT)/mali.ko @echo "make mali module finished current dir is $(shell pwd)" endef @@ -75,11 +77,12 @@ define bifrost-modules $(MAKE) -C $(shell pwd)/$(PRODUCT_OUT)/obj/KERNEL_OBJ M=$(shell pwd)/$(PRODUCT_OUT)/obj/bifrost/kernel/drivers/gpu/arm/midgard \ ARCH=$(3) CROSS_COMPILE=$(PREFIX_CROSS_COMPILE) \ EXTRA_CFLAGS="-DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_MIDGARD_DVFS -DCONFIG_MALI_BACKEND=gpu" \ + EXTRA_LDFLAGS+="--strip-debug" \ CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_DEVICETREE=y CONFIG_MALI_MIDGARD_DVFS=y CONFIG_MALI_BACKEND=gpu modules mkdir -p $(PRODUCT_OUT)/$(GPU_MODS_OUT) @echo "GPU_MODS_OUT is $(GPU_MODS_OUT)" - cp $(PRODUCT_OUT)/obj/bifrost/kernel/drivers/gpu/arm/midgard/mali_kbase.ko $(PRODUCT_OUT)/$(GPU_MODS_OUT)/bifrost.ko + cp $(PRODUCT_OUT)/obj/bifrost/kernel/drivers/gpu/arm/midgard/mali_kbase.ko $(PRODUCT_OUT)/$(GPU_MODS_OUT)/mali.ko @echo "make mali module finished current dir is $(shell pwd)" endef