android4.4.2内核移植3.4.1

01◑ 内核源码总目录下Makefile文件修改:                                

195行:

ARCH ?= $(SUBARCH)替换成:

ARCH ?= arm

 

02◑ arch/arm下makefile:                                

①差7行

# testing for a specific architecture or later rather impossible.

arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)

arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)

# Only override the compiler option if ARMv6. The ARMv6K extensions are      第62行  

 

 

 

替换成:

# testing for a specific architecture or later rather impossible.

GCCVERSION =  $(shell $(CC) -dumpversion | cut -f2 -d.)

arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)

ifeq ($(GCCVERSION), 8)

ifeq ($(CONFIG_ARCH_S5P6818),y)                //S5P6818        

arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv8-a,-march=armv5t -Wa$(comma)-march=armv8-a)

endif

endif

 

arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)

# Only override the compiler option if ARMv6. The ARMv6K extensions are      第69行  


 

②差9行

 

第199行:machine-$(CONFIG_ARCH_ZYNQ)        := zynq

 

 

 

下添加:

第206行:machine-$(CONFIG_ARCH_ZYNQ)        := zynq 
machine-$(CONFIG_ARCH_S5P4418)         := s5p4418
machine-$(CONFIG_ARCH_S5P6818)         := s5p6818

 

③差11行

214:plat-$(CONFIG_PLAT_VERSATILE)    := versatile

 

下添加:

223:plat-$(CONFIG_PLAT_VERSATILE)    := versatile
plat-$(CONFIG_ARCH_S5P4418)    := s5p4418
plat-$(CONFIG_ARCH_S5P6818)    := s5p6818

 

④差13行

265:KBUILD_IMAGE := xipImage

 

下添加:

else ifeq ($(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE),y)
KBUILD_IMAGE := zImage-dtb

 

⑤差16行

    $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@

 

下添加:

zImage-dtb: vmlinux scripts
    $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@

 

316:end

 

下添加:

# Add build option for nexell SoC
ifeq ($(CONFIG_ARCH_CPU_SLSI),y)
include $(srctree)/$(machdirs)/Makefile
include $(srctree)/$(platdirs)/Makefile
endif

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-----

 

posted @ 2015-10-22 14:47  瘋耔  阅读(568)  评论(0编辑  收藏  举报
跳至侧栏