Changeset 6384


Ignorieren:
Zeitstempel:
27.12.2010 20:48:34 (vor 7 Jahren)
Autor:
er13
Nachricht:

toolchain:

  • exclude kernel-headers from the download-toolchain
  • install the right ones at the build-time
  • refs #842, refs #348
Ort:
trunk
Dateien:
8 bearbeitet

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/make/linux/Makefile.in

    r6289 r6384  
    55KERNEL_DIR:=$(SOURCE_DIR_ROOT)/kernel/ref-$(KERNEL_LAYOUT)-$(KERNEL_REF)-$(AVM_VERSION) 
    66KERNEL_SOURCE_DIR:=$(KERNEL_DIR)/linux 
    7 KERNEL_HEADERS_DEVEL_DIR:=$(TARGET_TOOLCHAIN_DIR)/linux-dev 
     7KERNEL_HEADERS_DEVEL_DIR:=$(TARGET_TOOLCHAIN_DIR)/linux-dev/$(KERNEL_VERSION) 
    88KERNEL_HEADERS_DIR:=$(KERNEL_SOURCE_DIR)/include 
    99KERNEL_TARGET_DIR:=kernel 
  • trunk/make/linux/kernel.mk

    r6289 r6384  
    142142    touch $@ 
    143143 
    144 $(KERNEL_DIR)/.headers_installed: $(KERNEL_DIR)/.prepared 
     144$(KERNEL_HEADERS_DEVEL_DIR)/include/linux/version.h: $(KERNEL_DIR)/.prepared 
    145145ifeq ($(strip $(FREETZ_KERNEL_VERSION_2_6_13_1)),y) 
    146146    $(call COPY_KERNEL_HEADERS,$(KERNEL_BUILD_ROOT_DIR),$(KERNEL_HEADERS_DEVEL_DIR),{asm$(comma)asm-generic$(comma)linux}) 
     
    155155    touch $@ 
    156156 
    157 # Install the kernel headers to the toolchain dir if necessary 
    158 ifeq ($(strip $(FREETZ_BUILD_TOOLCHAIN)),y) 
    159 $(KERNEL_DIR)/.depend_done: $(KERNEL_DIR)/.headers_installed 
    160 else 
    161 $(KERNEL_DIR)/.depend_done: $(KERNEL_DIR)/.prepared 
    162 endif 
    163     touch $@ 
    164  
    165 $(KERNEL_BUILD_ROOT_DIR)/$(KERNEL_IMAGE): $(KERNEL_DIR)/.depend_done $(TOOLS_DIR)/lzma $(TOOLS_DIR)/lzma2eva 
     157target-toolchain-kernel-headers: $(TARGET_TOOLCHAIN_KERNEL_VERSION_HEADER) 
     158$(TARGET_TOOLCHAIN_KERNEL_VERSION_HEADER): $(TOPDIR)/.config $(KERNEL_HEADERS_DEVEL_DIR)/include/linux/version.h | $(if $(FREETZ_BUILD_TOOLCHAIN),$(TARGET_TOOLCHAIN_STAGING_DIR),$(TARGET_CROSS_COMPILER)) 
     159    @$(call COPY_KERNEL_HEADERS,$(KERNEL_HEADERS_DEVEL_DIR),$(TARGET_TOOLCHAIN_STAGING_DIR)/usr) 
     160    @touch $@ 
     161 
     162$(KERNEL_BUILD_ROOT_DIR)/$(KERNEL_IMAGE): $(KERNEL_DIR)/.prepared $(TOOLS_DIR)/lzma $(TOOLS_DIR)/lzma2eva 
    166163    $(call _ECHO, kernel image... ) 
    167164    $(SUBMAKE) -C $(KERNEL_BUILD_ROOT_DIR) \ 
     
    211208kernel-precompiled: pkg-echo-start $(KERNEL_TARGET_DIR)/$(KERNEL_TARGET_BINARY) $(KERNEL_MODULES_DIR)/.modules-$(KERNEL_LAYOUT) pkg-echo-done 
    212209 
    213 kernel-configured: $(KERNEL_DIR)/.depend_done 
     210kernel-configured: $(KERNEL_DIR)/.prepared 
    214211 
    215212kernel-modules: $(KERNEL_DIR)/.modules-$(KERNEL_LAYOUT) 
     
    254251    @$(call _ECHO_DONE) 
    255252 
    256 .PHONY: kernel-configured kernel-modules kernel-menuconfig kernel-oldconfig 
     253.PHONY: kernel-configured kernel-modules kernel-menuconfig kernel-oldconfig target-toolchain-kernel-headers 
  • trunk/toolchain/make/Makefile.in

    r6274 r6384  
    4646TARGET_TOOLCHAIN_STAGING_DIR:=$(FREETZ_BASE_DIR)/$(TOOLCHAIN_BUILD_DIR)/$(TARGET_TOOLCHAIN_COMPILER)/$(REAL_GNU_TARGET_NAME) 
    4747TARGET_CROSS_COMPILER:=$(TARGET_TOOLCHAIN_STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc 
     48TARGET_TOOLCHAIN_KERNEL_VERSION_HEADER:=$(TARGET_TOOLCHAIN_STAGING_DIR)/usr/include/linux/version.h 
    4849TARGET_UTILS_DIR:=$(TARGET_TOOLCHAIN_STAGING_DIR)/target-utils 
    4950 
  • trunk/toolchain/make/download-toolchain.mk

    r6257 r6384  
    4040 
    4141download-toolchain: $(KERNEL_CROSS_COMPILER) kernel-configured \ 
    42             $(TARGET_CROSS_COMPILER) \ 
     42            $(TARGET_CROSS_COMPILER) target-toolchain-kernel-headers \ 
    4343            $(TARGET_SPECIFIC_ROOT_DIR)/lib/libc.so.0 $(TARGET_SPECIFIC_ROOT_DIR)/lib/libgcc_s.so.1 \ 
    4444            $(CCACHE) uclibcxx libtool-host 
  • trunk/toolchain/make/target-toolchain.mk

    r6215 r6384  
    4141target-toolchain: $(TARGET_TOOLCHAIN_DIR) $(TARGET_TOOLCHAIN_STAGING_DIR) \ 
    4242            $(TARGET_TOOLCHAIN_SYMLINK_DOT_FILE) \ 
    43             kernel-configured uclibc-configured \ 
     43            kernel-configured uclibc-configured target-toolchain-kernel-headers \ 
    4444            $(TARGET_TOOLCHAIN) 
    4545 
  • trunk/toolchain/make/target/gcc/gcc.mk

    r6380 r6384  
    120120GCC_BUILD_DIR1:=$(TARGET_TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-initial 
    121121 
    122 $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.unpacked $(GCC_INITIAL_PREREQ) 
     122$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.unpacked $(GCC_INITIAL_PREREQ) | target-toolchain-kernel-headers 
    123123    mkdir -p $(GCC_BUILD_DIR1) 
    124124    (cd $(GCC_BUILD_DIR1); $(RM) config.cache; \ 
  • trunk/toolchain/make/target/uclibc/uclibc.mk

    r6383 r6384  
    9292        HOSTCC="$(TOOLCHAIN_HOSTCC) $(UCLIBC_HOST_CFLAGS)" headers \ 
    9393        $(if $(FREETZ_TARGET_UCLIBC_VERSION_0_9_28),install_dev,install_headers) 
    94     $(call COPY_KERNEL_HEADERS,$(UCLIBC_KERNEL_HEADERS_DIR),$(TARGET_TOOLCHAIN_STAGING_DIR)/usr) 
    9594    touch $@ 
    9695 
     
    135134        RUNTIME_PREFIX=$(TARGET_TOOLCHAIN_STAGING_DIR)/usr/ \ 
    136135        install_runtime install_dev 
    137     $(call COPY_KERNEL_HEADERS,$(UCLIBC_KERNEL_HEADERS_DIR),$(TARGET_TOOLCHAIN_STAGING_DIR)/usr) 
    138136    # Copy some files to make mklibs happy 
    139137ifneq ($(strip $(UCLIBC_VERSION)),0.9.28) 
  • trunk/toolchain/make/toolchain-common.in

    r6380 r6384  
    8787 
    8888 
    89 TOOLCHAIN_EXCLUDE_FILES := *uClibc++* *g++-uc libtool* aclocal 
     89TOOLCHAIN_EXCLUDE_FILES := *uClibc++* *g++-uc libtool* aclocal lib32 
     90# Union of versions 2.6.13, 2.6.19, and 2.6.28 
     91KERNEL_HEADERS_SUBDIRS := asm asm-generic drm linux mtd rdma scsi sound video 
    9092 
    9193# $1 - toolchain base dir 
     
    9698    tname="$${dname}$(if $(strip $(2)),-$(strip $(2)))"; \ 
    9799    $(RM) $(DL_DIR)/$${tname}.tar.lzma; \ 
    98     $(TOOLS_DIR)/tar -C $${droot} -c $${dname} $(foreach f,$(TOOLCHAIN_EXCLUDE_FILES),--exclude $(f)) | \ 
     100    $(TOOLS_DIR)/tar -C $${droot} -c $${dname} $(foreach f,$(TOOLCHAIN_EXCLUDE_FILES) $(addprefix include/,$(KERNEL_HEADERS_SUBDIRS)),--exclude $(f)) | \ 
    99101    $(TOOLS_DIR)/lzma e -si $(DL_DIR)/$${tname}.tar.lzma -d25; 
    100102endef 
     
    104106# $3 - subdirs to be copied (optional, if omitted all subdirs are copied) 
    105107define COPY_KERNEL_HEADERS 
    106     if [ ! -f $(strip $(2))/include/linux/version.h ] ; then \ 
     108    if ! diff -q $(strip $(1))/include/linux/version.h $(strip $(2))/include/linux/version.h >/dev/null 2>&1 ; then \ 
     109        $(RM) -r $(addprefix $(strip $(2))/include/,$(KERNEL_HEADERS_SUBDIRS)); \ 
    107110        mkdir -p $(strip $(2))/include/; \ 
    108111        cp -pLR $(strip $(1))/include/$(if $(strip $(3)),$(strip $(3)),*) $(strip $(2))/include/; \ 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.