Changeset 2


Ignore:
Timestamp:
Feb 2, 2010, 12:22:21 AM (10 years ago)
Author:
amain
Message:

Add OpenWrt checkout, patch and menuconfig.
Add general support for shell scripts and make functions
Set DebWrt RELEASE and REVISION

Location:
debwrt/trunk
Files:
9 added
7 edited

Legend:

Unmodified
Added
Removed
  • debwrt/trunk/Makefile

    r1 r2  
    2020all: world
    2121
     22include rules/functions.mk
     23include rules/scripts.mk
    2224include rules/debwrt.mk
    2325include rules/help.mk
     
    2628
    2729world: .config
     30        @echo REVISION=$$REVISION
     31        @echo RELEASE=$$RELEASE
     32        @echo DEBWRTVERSION=$$OPENWRTVERSION
    2833        @echo Make DebWrt
    2934
  • debwrt/trunk/config/mconf/confdata.c

    r1 r2  
    416416        if (!out)
    417417                return 1;
    418         sym = sym_lookup("OPENWRTVERSION", 0);
     418        sym = sym_lookup("DEBWRTVERSION", 0);
    419419        sym_calc_value(sym);
    420420        time(&now);
  • debwrt/trunk/config/mconf/mconf.c

    r1 r2  
    10831083        conf_read(NULL);
    10841084
    1085         sym = sym_lookup("OPENWRTVERSION", 0);
     1085        sym = sym_lookup("DEBWRTVERSION", 0);
    10861086        sym_calc_value(sym);
    10871087        sprintf(menu_backtitle, _("DebWrt %s Configuration"),
  • debwrt/trunk/config/mconf/symbol.c

    r1 r2  
    6262                sym_add_default(sym, p);
    6363
    64         sym = sym_lookup("OPENWRTVERSION", 0);
     64        sym = sym_lookup("DEBWRTVERSION", 0);
    6565        sym->type = S_STRING;
    6666        sym->flags |= SYMBOL_AUTO;
    67         p = getenv("OPENWRTVERSION");
     67        p = getenv("DEBWRTVERSION");
    6868        if (p)
    6969                sym_add_default(sym, p);
  • debwrt/trunk/openwrt

    • Property svn:ignore set to
      checkout
      patch
  • debwrt/trunk/openwrt/openwrt.mk

    r1 r2  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
     18OPENWRT_PATCHES_DIR=$(TOPDIR)/openwrt/patches
    1819
     20openwrt/all: openwrt/deliver
     21openwrt/deliver: openwrt/build
     22openwrt/build: openwrt/prepare
     23openwrt/prepare: openwrt/checkout openwrt/patch openwrt/merge-config openwrt/link-download
     24openwrt/merge-config: openwrt/checkout openwrt/patch
     25
     26openwrt/link-download: openwrt/checkout
     27        cd $(OPENWRT_BUILD_DIR) && if [ -d $(OPENWRT_DOWNLOAD_DIR) -a ! -e dl ]; then ln -snf $(OPENWRT_DOWNLOAD_DIR) dl; fi
     28
     29openwrt/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
     34        touch $@
     35
     36openwrt/checkout:
     37        rm -rf $(OPENWRT_BUILD_DIR)
     38        mkdir -p $(OPENWRT_BUILD_DIR)
     39ifeq ($(IS_OPENWRT_TRUNK),y)
     40        cd $(OPENWRT_BUILD_DIR) && svn co svn://svn.openwrt.org/openwrt/trunk/ .
     41else
     42        cd $(OPENWRT_BUILD_DIR) && svn co -r $(OPENWRT_REVISION) svn://svn.openwrt.org/openwrt/trunk/ .
     43endif
     44        touch $@
     45
     46openwrt/menuconfig: openwrt/prepare
     47        $(SCRIPT_CLEAN_EXEC) $(MAKE) -C $(OPENWRT_BUILD_DIR) menuconfig
     48
     49openwrt/clean:
     50        rm -rf $(OPENWRT_BUILD_DIR)
     51        rm -f openwrt/checkout
     52        rm -f openwrt/patch
     53
  • debwrt/trunk/rules/debwrt.mk

    r1 r2  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
     18RELEASE:=Angel
     19REVISION:=$(shell $(SCRIPT_GET_REVISION))
     20DEBWRTVERSION:=$(RELEASE)$(if $(REVISION), ($(REVISION)))
     21
     22# Include DebWrt config
     23-include $(TOPDIR)/.config
     24
    1825# Board [example: ar7xx]
    1926BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
     
    2330
    2431# OpenWrt Revision to checkout [rXXXX]
    25 OPENWRT_REVISION:=$(call qstrip, $(CONFIG_OPENWRT_REVISION))
     32OPENWRT_REVISION:=$(call qstrip,$(CONFIG_OPENWRT_REVISION))
    2633
    2734# OpenWrt Revision is trunk [y or emtpy]
    28 IS_OPENWRT_TRUNK:=$(call qstrip, $(CONFIG_OPENWRT_REVISION_TRUNK))
     35IS_OPENWRT_TRUNK:=$(call qstrip,$(CONFIG_OPENWRT_REVISION_TRUNK))
     36
     37# Base BuildDir
     38BUILD_DIR_BASE:=$(TOPDIR)/build
    2939
    3040# OpenWrt Build (checkout) directory
    31 BUILD_DIR:=$(BUILD_DIR_BASE)/openwrt-$(BOARD)-$(OPENWRT_REVISION)-$(LINUX_VERSION)
     41OPENWRT_BUILD_DIR:=$(BUILD_DIR_BASE)/openwrt-$(BOARD)-$(OPENWRT_REVISION)-$(LINUX_VERSION)
    3242
    3343# Alternate OpenWrt download directory
Note: See TracChangeset for help on using the changeset viewer.