Changeset 21567


Ignore:
Timestamp:
2010-05-24T22:38:36+02:00 (7 years ago)
Author:
nico
Message:

toolchain/kernel-headers: simplify linux headers installation (remove legacy hacks, cleanup)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/toolchain/kernel-headers/Makefile

    r20872 r21567  
    3636endif 
    3737 
    38 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1) 
    39   LINUX_ASM_INCLUDES:=arch/$(LINUX_KARCH)/include/asm 
    40 else 
    41   LINUX_ASM_INCLUDES:=include/asm 
    42 endif 
    43  
    4438KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \ 
    4539        ARCH=$(LINUX_KARCH) \ 
     40        CC="$(KERNEL_CC)" \ 
     41        CFLAGS="$(TARGET_CFLAGS)" \ 
     42        CROSS_COMPILE=$(TARGET_CROSS) \ 
    4643        KBUILD_HAVE_NLS=no \ 
    4744        CONFIG_SHELL=$(BASH) 
    48  
    49 define Host/Prepare/pre/powerpc 
    50         if [ -d $(HOST_BUILD_DIR)/include/asm-ppc ]; then \ 
    51                 mkdir -p $(PKG_BUILD_DIR)/include/asm-powerpc/; \ 
    52                 $(CP) $(HOST_BUILD_DIR)/include/asm-ppc/* $(HOST_BUILD_DIR)/include/asm-powerpc/; \ 
    53                 rm -rf $(HOST_BUILD_DIR)/include/asm-ppc; \ 
    54                 ln -s $(HOST_BUILD_DIR)/include/asm-powerpc $(HOST_BUILD_DIR)/include/asm-ppc; \ 
    55         fi 
    56 endef 
    5745 
    5846ifneq ($(LINUX_HAS_HEADERS_INSTALL),) 
     
    6048        mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr 
    6149        $(KMAKE) \ 
    62                 CROSS_COMPILE=$(TARGET_CROSS) \ 
    6350                INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/" \ 
    6451                headers_install 
     52        if [ -d $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \ 
     53                $(CP) \ 
     54                        $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm/. \ 
     55                        $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH)/; \ 
     56        fi 
    6557  endef 
    6658else 
    6759  define Host/Prepare/all 
     60        $(KMAKE) include/linux/version.h include/asm 
    6861        mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include 
    6962        cp -pLR $(HOST_BUILD_DIR)/include/asm $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/ 
     
    8578        $(CP) \ 
    8679                $(HOST_BUILD_DIR)/include/linux/user.h \ 
    87                 $(HOST_BUILD_DIR)/include/linux/autoconf.h \ 
    8880                $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/linux/ 
    8981        ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch-v10/arch \ 
     
    114106        $(SED) 's/@expr length/@-expr length/' $(HOST_BUILD_DIR)/Makefile 
    115107        yes '' | $(KMAKE) oldconfig 
    116         $(KMAKE) include/linux/version.h $(LINUX_ASM_INCLUDES) 
    117         if [ -d $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \ 
    118                 $(CP) \ 
    119                         $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm/. \ 
    120                         $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH)/; \ 
    121         fi 
    122         $(call Host/Prepare/pre/$(ARCH)) 
    123108        $(call Host/Prepare/all) 
    124109        $(call Host/Prepare/post/$(ARCH)) 
Note: See TracChangeset for help on using the changeset viewer.