Changeset 3


Ignore:
Timestamp:
Feb 3, 2010, 10:41:16 PM (10 years ago)
Author:
amain
Message:

Add openwrt/merge-config: merge debwrt config with openwrt config
Add openwrt/build: build openwrt

Location:
debwrt/trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • debwrt/trunk/Makefile

    r2 r3  
    2626include config/config.mk
    2727include openwrt/openwrt.mk
     28include openwrt/openwrt-deliver.mk
    2829
    29 world: .config
     30world: .config openwrt/build
    3031        @echo REVISION=$$REVISION
    3132        @echo RELEASE=$$RELEASE
    32         @echo DEBWRTVERSION=$$OPENWRTVERSION
     33        @echo DEBWRTVERSION=$$DEBWRTVERSION
    3334        @echo Make DebWrt
    3435
    35 clean: config-clean
     36clean: config-clean openwrt/clean
    3637        @rm -f .config .config.old
    3738
  • debwrt/trunk/openwrt/openwrt.mk

    r2 r3  
    2121openwrt/deliver: openwrt/build
    2222openwrt/build: openwrt/prepare
    23 openwrt/prepare: openwrt/checkout openwrt/patch openwrt/merge-config openwrt/link-download
    24 openwrt/merge-config: openwrt/checkout openwrt/patch
    2523
    26 openwrt/link-download: openwrt/checkout
     24openwrt/prepare: openwrt/checkout openwrt/patch openwrt/merge-config openwrt/download-link
     25ifeq ("$(origin V)", "command line")
     26        $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) V=$(V)
     27else
     28        $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR)
     29endif
     30
     31openwrt/merge-config: $(TMP_DIR) openwrt/checkout openwrt/patch
     32        @# Copy default OpenWrt settings
     33        cp $(CONFIG_DIR)/openwrt.defconfig $(TMP_DIR)/.config_openwrt
     34        @# Merge default OpenWrt settings with menu settings
     35        cat .config | grep -v -e CONFIG_TARGET_BOARD -e "^#" >> $(TMP_DIR)/.config_openwrt
     36        @# Merge default and menu settings with possibly altered settings in make menuconfig in OpenWrt
     37        touch $(OPENWRT_BUILD_DIR)/.config
     38        cp $(OPENWRT_BUILD_DIR)/.config $(OPENWRT_BUILD_DIR)/.config.org
     39        @$(SCRIPT_KCONFIG) + $(OPENWRT_BUILD_DIR)/.config.org $(TMP_DIR)/.config_openwrt > $(OPENWRT_BUILD_DIR)/.config
     40        @# Make sure the config is clean
     41        $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) defconfig
     42        @# Copy DebWrt config to the build dir - used to set kernel compile options
     43        cp .config $(OPENWRT_BUILD_DIR)/.config.debwrt
     44
     45openwrt/download-link: openwrt/checkout
    2746        cd $(OPENWRT_BUILD_DIR) && if [ -d $(OPENWRT_DOWNLOAD_DIR) -a ! -e dl ]; then ln -snf $(OPENWRT_DOWNLOAD_DIR) dl; fi
    2847
    2948openwrt/patch: openwrt/checkout
    30         patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(OPENWRT_PATCHES_DIR)/001_disable_all_openwrt_packages
    31         patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(OPENWRT_PATCHES_DIR)/002_install_kernel_modules_and_merge_debwrt_config
    32         #patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(OPENWRT_PATCHES_DIR)/003_set_kernel_version
    33         patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(OPENWRT_PATCHES_DIR)/004_save_environment_variables
     49        patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(PATCHES_DIR_OPENWRT)/001_disable_all_openwrt_packages
     50        patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(PATCHES_DIR_OPENWRT)/002_install_kernel_modules_and_merge_debwrt_config
     51        #patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(PATCHES_DIR_OPENWRT)/003_set_kernel_version
     52        patch -d $(OPENWRT_BUILD_DIR) -p 0 -N < $(PATCHES_DIR_OPENWRT)/004_save_environment_variables
    3453        touch $@
    3554
  • debwrt/trunk/rules/debwrt.mk

    r2 r3  
    1717
    1818RELEASE:=Angel
     19RELEASE_DATE=$(shell LC_ALL=c date +"%d %B %Y")
    1920REVISION:=$(shell $(SCRIPT_GET_REVISION))
    20 DEBWRTVERSION:=$(RELEASE)$(if $(REVISION), ($(REVISION)))
     21DEBWRTVERSION:=$(RELEASE) - $(RELEASE_DATE)$(if $(REVISION), - $(REVISION))
    2122
    2223# Include DebWrt config
     
    3839BUILD_DIR_BASE:=$(TOPDIR)/build
    3940
     41# Config dir
     42CONFIG_DIR:=$(TOPDIR)/config
     43
     44# bin/delivery dir
     45BIN_DIR:=$(TOPDIR)/bin
     46
     47# tmp dir
     48TMP_DIR:=$(TOPDIR)/tmp
     49
     50# OpenWrt patches directory
     51PATCHES_DIR_OPENWRT=$(TOPDIR)/openwrt/patches
     52
    4053# OpenWrt Build (checkout) directory
    4154OPENWRT_BUILD_DIR:=$(BUILD_DIR_BASE)/openwrt-$(BOARD)-$(OPENWRT_REVISION)-$(LINUX_VERSION)
     
    4760export
    4861
     62$(TMP_DIR) $(BIN_DIR) $(OPENWRT_BUILD_DIR):
     63        mkdir -p $@
     64
  • debwrt/trunk/rules/scripts.mk

    r2 r3  
    1919SCRIPT_CLEAN_EXEC:=$(SCRIPT_DIR)/clean_exec.sh
    2020SCRIPT_GET_REVISION:=$(SCRIPT_DIR)/getrevision.sh
     21SCRIPT_KCONFIG:=$(SCRIPT_DIR)/kconfig.pl
Note: See TracChangeset for help on using the changeset viewer.