--- zzzz-none-000/linux-4.4.60/arch/arm/Makefile 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/arch/arm/Makefile 2021-02-04 17:41:59.000000000 +0000 @@ -22,11 +22,16 @@ ifeq ($(CONFIG_ARM_MODULE_PLTS),y) LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds endif +LDFLAGS_vmlinux += --gc-sections OBJCOPYFLAGS :=-O binary -R .comment -S GZFLAGS :=-9 #KBUILD_CFLAGS +=-pipe +ifndef CONFIG_FUNCTION_TRACER +KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections +endif + # Never generate .eh_frame KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) @@ -251,9 +256,11 @@ else MACHINE := endif +ifeq ($(CONFIG_ARCH_QCOM),) ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) MACHINE := endif +endif machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) @@ -264,6 +271,10 @@ else KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) endif +else +ifeq ($(CONFIG_ARCH_QCOM),y) +KBUILD_CPPFLAGS := -I$(srctree)/arch/arm/mach-qcom/include $(KBUILD_CPPFLAGS) +endif endif export TEXT_OFFSET GZFLAGS MMUEXT @@ -288,6 +299,9 @@ core-y += arch/arm/crypto/ core-y += arch/arm/firmware/ core-y += $(machdirs) $(platdirs) +# AVM(begin) +core-y += arch/arm/avm_enh/ +# AVM(end) drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/