X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-kexec/blobdiff_plain/4e93cb000786b18ffd9929f33055cad2a7cebbcf..76b7ce1b4f9828baf75c68eb54773b53825a4604:/Makefile diff --git a/Makefile b/Makefile index 43b5487..544acff 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,20 @@ -# In this string we need to use -D__SOME__ command for define which platform we use -# And C preprocessor use only code for platform, we defined -# For example if we use Texas Instruments OMAP 3430 - we should use -# EXTRA_CFLAGS += -D__PLAT_TI_OMAP3430__ -# Else if we need for Freescale i.MX31 - we should use -# EXTRA_CFLAGS += -D__PLAT_FREESCALE_IMX31__ +KDIR=$(PWD)/../out/target/product/generic/obj/PARTITIONS/kernel_intermediates/build +ARCH=arm +CROSS_COMPILE=arm-eabi- +CROSS_PATH=$(PWD)/../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin -# I don't yet have this fully set up for the droid x yet -# This line seems to work on my X, otherwise use the line -# That's commented out. -EXTRA_CFLAGS += -D__PLAT_TI_OMAP3430__ -Wall -march=arm -# EXTRA_CFLAGS += -mfpu=neon +SYS_CALL_TABLE := $(shell grep ' T sys_call_table$$' $(KDIR)/System.map | cut -f1 -d' ') +KERNEL_RESTART_PREPARE := $(shell grep ' T kernel_restart_prepare$$' $(KDIR)/System.map | cut -f1 -d' ') -# Make this match the optimisation values of the kernel you're -# loading this into. Should work without changes, but it seems to -# crash on the Nexus One and Droid Pro. If you're compiling on an -# Evo 4g, set this value to 1 and change the EXTRA_CFLAGS value to -# something appropriate to your phone -# EXTRA_CFLAGS += -O0 +EXTRA_CFLAGS += -DCONFIG_KEXEC -Wall -DSYS_CALL_TABLE=0x$(SYS_CALL_TABLE) -DKERNEL_RESTART_PREPARE=0x$(KERNEL_RESTART_PREPARE) obj-m += kexec_load.o kexec_load-objs := kexec.o machine_kexec.o mmu.o sys.o core.o relocate_kernel.o \ - proc-v7.o tlb-v7.o cache-v7.o abort-ev7.o copypage-v6.o entry-common.o driver_sys.o + proc-v7.o tlb-v7.o cache-v7.o abort-ev7.o pabort-v7.o copypage-v6.o driver_sys.o all: - make -C kernel/ M=$(PWD) modules + PATH=$(CROSS_PATH):$(PATH) CROSS_COMPILE=$(CROSS_COMPILE) ARCH=$(ARCH) make -C $(KDIR) M=$(PWD) modules clean: - make -C kernel/ M=$(PWD) clean + PATH=$(CROSS_PATH):$(PATH) CROSS_COMPILE=$(CROSS_COMPILE) ARCH=$(ARCH) make -C $(KDIR) M=$(PWD) clean rm -f *.order