Ignore:
Timestamp:
Feb 28, 2010, 7:10:24 PM (10 years ago)
Author:
amain
Message:

Create openWrt kernel headers image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debwrt/trunk/openwrt/openwrt-deliver.mk

    r10 r11  
    2929ERROR_MSG_NOCONF:=" not defined. Make sure OpenWrt build finished."
    3030
    31 openwrt/deliver: openwrt/deliver/prepare  openwrt/deliver/clean                         \
    32                                  openwrt/deliver/image    openwrt/deliver/kernel-modules        \
    33                                  openwrt/deliver/packages openwrt/deliver/config
     31openwrt/deliver: openwrt/deliver/prepare        openwrt/deliver/clean                   \
     32                                 openwrt/deliver/image          openwrt/deliver/kernel-modules  \
     33                                 openwrt/deliver/packages       openwrt/deliver/config              \
     34                                 openwrt/deliver/kernel-headers
    3435
    3536openwrt/deliver/prepare: openwrt/deliver/import-config openwrt/deliver/check
     
    6162openwrt/deliver/image: openwrt/deliver/prepare
    6263        mkdir -p $(INSTALL_DIR)
    63         if  [ "" != $(call qstrip,$(CONFIG_OPENWRT_TARGET_IMAGE_NAME)) ]; then \
    64                 cp -a ${OPENWRT_BIN_DIR}/$(call qstrip,$(CONFIG_OPENWRT_TARGET_IMAGE_NAME)) $(INSTALL_DIR)/$(TARGET_IMAGE_NAME); \
     64        if  [ "unknown" != $(call qstrip,$(CONFIG_OPENWRT_TARGET_IMAGE_NAME_BIN)) ]; then \
     65                cp -a ${OPENWRT_BIN_DIR}/$(call qstrip,$(CONFIG_OPENWRT_TARGET_IMAGE_NAME_BIN)) $(INSTALL_DIR)/$(TARGET_IMAGE_NAME_BIN); \
    6566        else  \
    66                 echo "TODO: openwrt/deliver/image"; \
     67                echo "Failed to copy firmware BIN image. Configure image name in config/image_name.in"; \
     68        fi
     69        if  [ "unknown" != $(call qstrip,$(CONFIG_OPENWRT_TARGET_IMAGE_NAME_TRX)) ]; then \
     70                cp -a ${OPENWRT_BIN_DIR}/$(call qstrip,$(CONFIG_OPENWRT_TARGET_IMAGE_NAME_TRX)) $(INSTALL_DIR)/$(TARGET_IMAGE_NAME_TRX); \
     71        else  \
     72                echo "Failed to copy firmware TRX image. Configure image name in config/image_name.in"; \
     73        fi
     74        if [ ! -e $(INSTALL_DIR)/$(TARGET_IMAGE_NAME_BIN) -a ! -e $(INSTALL_DIR)/$(TARGET_IMAGE_NAME_TRX) ]; then \
     75                echo "Failed to copy a firmware image. Investigate." && false; \
    6776        fi
    6877
     
    7988        tar czf $(INSTALL_DIR)/$(MODULES_TAR_GZ) -C $(INSTALL_DIR_OPENWRT_MODULES) .
    8089
     90openwrt/deliver/kernel-headers: openwrt/deliver/prepare
     91        mkdir -p $(INSTALL_DIR_OPENWRT_HEADERS)
     92        mkdir -p $(INSTALL_DIR_OPENWRT_HEADERS)/usr/src/${OPENWRT_LINUX_VERSION}
     93        cd $(OPENWRT_LINUX_DIR)
     94        find . -path './include/*' -prune \
     95                -o -path './scripts/*' -prune -o -type f \
     96                \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
     97                -name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
     98                -print | cpio -pd --preserve-modification-time
     99        cp -a drivers/media/dvb/dvb-core/*.h $(INSTALL_DIR_OPENWRT_HEADERS)/usr/src/${OPENWRT_LINUX_VERSION}/drivers/media/dvb/dvb-core
     100        cp -a drivers/media/video/*.h $(INSTALL_DIR_OPENWRT_HEADERS)/usr/src/${OPENWRT_LINUX_VERSION}/drivers/media/video
     101        cp -a drivers/media/dvb/frontends/*.h $(INSTALL_DIR_OPENWRT_HEADERS)/usr/src/${OPENWRT_LINUX_VERSION}/drivers/media/dvb/frontends
     102        cp -a scripts include $(INSTALL_DIR_OPENWRT_HEADERS)/usr/src/${OPENWRT_LINUX_VERSION}
     103        (find arch -name include -type d -print | \
     104                xargs -n1 -i: find : -type f) | \
     105                cpio -pd --preserve-modification-time $(INSTALL_DIR_OPENWRT_HEADERS)/usr/src/${OPENWRT_LINUX_VERSION}
     106
    81107openwrt/deliver/packages: openwrt/deliver/prepare
    82108        mkdir -p $(INSTALL_DIR_OPENWRT_PACKAGES)
Note: See TracChangeset for help on using the changeset viewer.