Changeset db5651c in freewrt for target/linux/Makefile


Ignore:
Timestamp:
Sep 12, 2006, 8:11:35 PM (19 years ago)
Author:
Waldemar Brodkorb <wbx@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
eec1f7b
Parents:
a3abab6
Message:

merge wbx-target-cleanup to trunk.

  • mk directory for some top level makefiles (build.mk,vars.mk)
  • add a separate configfs partition to all models, 128 kb big
  • add model and platform specific startup files and kernel configs
  • delete target/linux/package, add all addon kernel packages to packages
  • simplify target/linux/brcm-2.4/Makefile, abstraction to mk/ comes later
  • add target/image directory, place where the different images are created
  • default off for all extra packages, be sure that you enable all packages you need to get a dsl-capable router. snapshots will be created by a specific config which contains all needed stuff (iptables, pppoe, pptp, haserl, webif)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@588 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • target/linux/Makefile

    ra3abab6 rdb5651c  
     1# $FreeWRT$
     2#-
     3# This file is part of the FreeWRT project. FreeWRT is copyrighted
     4# material, please see the LICENCE file in the top-level directory
     5# or at http://www.freewrt.org/licence for details.
     6
    17include $(TOPDIR)/rules.mk
    2 
    3 PKG_OS:=$(shell uname -s)
    4 PKG_CPU:=$(shell uname -m)
    5 
    6 IB_NAME:=FreeWRT-ImageBuilder-$(PKG_OS)-$(PKG_CPU)
    7 IB_DIR:=$(BUILD_DIR)/$(IB_NAME)
    88
    99define kernel_template
    1010
    11 $(1)/$(2)-clean:
     11$(1)/$(2)/$(3)-clean:
    1212        @$(TRACE) target/linux/$(2)-$(1)-clean
    13         $(MAKE) -C $(2)-$(1) BOARD="$(2)" clean
     13        $(MAKE) -C $(2)-$(1) BOARD="$(2)" MODEL="$(3)" clean
    1414
    15 $(1)/$(2)-prepare:
     15$(1)/$(2)/$(3)-prepare:
    1616        @$(TRACE) target/linux/$(2)-$(1)-prepare
    17         $(MAKE) -C $(2)-$(1) BOARD="$(2)" prepare
     17        $(MAKE) -C $(2)-$(1) BOARD="$(2)" MODEL="$(3)" prepare
    1818
    19 $(1)/$(2)-compile:
     19$(1)/$(2)/$(3)-compile:
    2020        @$(TRACE) target/linux/$(2)-$(1)-compile
    21         $(MAKE) -C $(2)-$(1) BOARD="$(2)" compile
     21        $(MAKE) -C $(2)-$(1) BOARD="$(2)" MODEL="$(3)" compile
    2222
    23 $(1)/$(2)-rebuild:
     23$(1)/$(2)/$(3)-rebuild:
    2424        @$(TRACE) target/linux/$(2)-$(1)-rebuild
    25         $(MAKE) -C $(2)-$(1) BOARD="$(2)" rebuild
     25        $(MAKE) -C $(2)-$(1) BOARD="$(2)" MODEL="$(3)" rebuild
    2626
    27 $(1)/$(2)-install:
     27$(1)/$(2)/$(3)-install:
    2828        @$(TRACE) target/linux/$(2)-$(1)-install
    29         $(MAKE) -C $(2)-$(1) BOARD="$(2)" install
     29        $(MAKE) -C $(2)-$(1) BOARD="$(2)" MODEL="$(3)" install
    3030
    31 $(1)/$(2)-image: $(1)/$(2)-install
    32         @$(TRACE) target/linux/image-install
    33         $(MAKE) -C image KERNEL="$(1)" BOARD="$(2)" install
    34 
    35 $(1)/$(2)-install-ib:
    36         @$(TRACE) target/linux/image-install-ib
    37         $(MAKE) -C image KERNEL="$(1)" BOARD="$(2)" IB_DIR="$(IB_DIR)" install-ib
    38         echo '$$$$(eval $$$$(call image_template,$(2),$(1)))' >> $(IB_DIR)/kernel.mk
    39 
    40 
    41 ifeq ($(FWRT_LINUX_$(3)),y)
    42 clean: $(1)/$(2)-clean
    43 prepare: $(1)/$(2)-prepare
    44 compile: $(1)/$(2)-compile
    45 rebuild: $(1)/$(2)-rebuild
    46 $(BIN_DIR)/$(IB_NAME).tar.bz2 install: $(1)/$(2)-image
    47 install-ib: $(1)/$(2)-install-ib
    48 package/%:
    49         $(MAKE) -C $(2)-$(1) BOARD="$(2)" $$@
     31ifeq ($(FWRT_LINUX_$(4)),y)
     32clean: $(1)/$(2)/$(3)-clean
     33prepare: $(1)/$(2)/$(3)-prepare
     34compile: $(1)/$(2)/$(3)-compile
     35rebuild: $(1)/$(2)/$(3)-rebuild
     36install: $(1)/$(2)/$(3)-install
    5037endif
    5138
    52 .PHONY: $(1)/$(2)-clean $(1)/$(2)-prepare $(1)/$(2)-compile $(1)/$(2)-rebuild $(1)/$(2)-install $(1)/$(2)-image $(1)/$(2)-install-ib
     39.PHONY: $(1)/$(2)/$(3)-clean $(1)/$(2)/$(3)-prepare \
     40        $(1)/$(2)/$(3)-compile $(1)/$(2)/$(3)-rebuild \
     41        $(1)/$(2)/$(3)-install
    5342endef
    5443
    55 .PHONY: clean prepare compile rebuild install imagebuilder install-ib
    56 
    57 install-ib:
    58 
    59 $(BIN_DIR)/$(IB_NAME).tar.bz2: 
    60         rm -rf $(IB_DIR)
    61         mkdir -p $(IB_DIR)/packages
    62         mkdir -p $(IB_DIR)/lbin
    63         mkdir -p $(IB_DIR)/scripts
    64         $(CP) ./imagebuilder/* $(IB_DIR)/
    65         $(CP) $(TOPDIR)/bin/packages/*.ipk $(IB_DIR)/packages/
    66         $(CP) $(TOPDIR)/lbin/* $(IB_DIR)/lbin/
    67         $(CP) $(TOPDIR)/scripts/ipkg $(IB_DIR)/scripts/
    68         $(MAKE) install-ib
    69         $(CP) $(TOPDIR)/rules.mk $(IB_DIR)
    70         $(CP) $(TOPDIR)/vars.mk $(IB_DIR)
    71         $(CP) ./image $(IB_DIR)/
    72         $(CP) $(TOPDIR)/.config $(IB_DIR)/
    73         find $(IB_DIR) -name .svn | xargs rm -rf
    74         find $(IB_DIR) -name CVS | xargs rm -rf
    75         (cd $(BUILD_DIR); tar c $(IB_NAME) | bzip2 -c > $(BIN_DIR)/$(IB_NAME).tar.bz2)
    76 
    77 ifeq ($(FWRT_PACKAGE_IMAGEBUILDER),y)
    78 install: $(BIN_DIR)/$(IB_NAME).tar.bz2
    79 endif
     44.PHONY: clean prepare compile rebuild install
    8045
    8146prepare:
    82         @$(TRACE) target/linux/image-prepare
    83         $(MAKE) -C image prepare
    8447compile:
    85         @$(TRACE) target/linux/image-compile
    86         $(MAKE) -C image compile
    8748install:
    8849rebuild:
    8950clean:
    9051
    91 $(eval $(call kernel_template,2.4,brcm,2_4_BRCM))
    92 $(eval $(call kernel_template,2.4,ar7,2_4_AR7))
    93 $(eval $(call kernel_template,2.4,x86,2_4_X86))
    94 $(eval $(call kernel_template,2.6,brcm,2_6_BRCM))
    95 $(eval $(call kernel_template,2.6,x86,2_6_X86))
    96 $(eval $(call kernel_template,2.4,ar531x,2_4_AR531X))
    97 $(eval $(call kernel_template,2.6,aruba,2_6_ARUBA))
    98 $(eval $(call kernel_template,2.6,au1000,2_6_AU1000))
    99 $(eval $(call kernel_template,2.6,xscale,2_6_XSCALE))
    100 $(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE))
     52# asus models
     53$(eval $(call kernel_template,2.4,brcm,asus-wl500g,2_4_BRCM_ASUS_WL500G))
     54$(eval $(call kernel_template,2.4,brcm,asus-wl500g-deluxe,2_4_BRCM_ASUS_WL500G_DELUXE))
     55$(eval $(call kernel_template,2.4,brcm,asus-wl500g-premium,2_4_BRCM_ASUS_WL500G_PREMIUM))
     56# linksys models
     57$(eval $(call kernel_template,2.4,brcm,linksys-wrt54gs-10,2_4_BRCM_LINKSYS_WRT54GS_1_0))
     58$(eval $(call kernel_template,2.4,brcm,linksys-wrt54gs-11,2_4_BRCM_LINKSYS_WRT54GS_1_1))
     59$(eval $(call kernel_template,2.4,brcm,linksys-wrt54gs-4,2_4_BRCM_LINKSYS_WRT54GS_4))
     60$(eval $(call kernel_template,2.4,brcm,linksys-wrt54g-10,2_4_BRCM_LINKSYS_WRT54G_1_0))
     61$(eval $(call kernel_template,2.4,brcm,linksys-wrt54g-11,2_4_BRCM_LINKSYS_WRT54G_1_1))
     62$(eval $(call kernel_template,2.4,brcm,linksys-wrt54g-20,2_4_BRCM_LINKSYS_WRT54G_2_0))
     63$(eval $(call kernel_template,2.4,brcm,linksys-wrt54g-22,2_4_BRCM_LINKSYS_WRT54G_2_2))
     64$(eval $(call kernel_template,2.4,brcm,linksys-wrt54g-30,2_4_BRCM_LINKSYS_WRT54G_3_0))
     65$(eval $(call kernel_template,2.4,brcm,linksys-wrt54gl,2_4_BRCM_LINKSYS_WRT54GL))
     66$(eval $(call kernel_template,2.4,brcm,linksys-wrt54g3g,2_4_BRCM_LINKSYS_WRT54G3G))
     67# netgear models
     68$(eval $(call kernel_template,2.4,brcm,netgear-wgt634u,2_4_BRCM_NETGEAR_WGT634U))
Note: See TracChangeset for help on using the changeset viewer.