major target cleanup. it is now possible to have subtargets that can override many...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 8 Sep 2007 19:55:42 +0000 (19:55 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 8 Sep 2007 19:55:42 +0000 (19:55 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8694 3c298f89-4303-0410-b956-a3cf2f4a3e73

95 files changed:
Makefile
include/image.mk
include/kernel-build.mk
include/kernel-defaults.mk
include/kernel-version.mk
include/kernel.mk
include/scan.mk
include/subdir.mk
include/target.mk
include/toplevel.mk
package/acx/Makefile
package/admswconfig/Makefile
package/ar7-atm/Makefile
package/base-files/Makefile
package/bcm43xx-mac80211/Makefile
package/broadcom-diag/Makefile
package/broadcom-mmc/Makefile
package/broadcom-wl/Makefile
package/fonera-mp3-drv/Makefile
package/fonera-mp3/Makefile
package/foxboard-utils/Makefile
package/hostapd/Makefile
package/ipset/Makefile
package/nvram/Makefile
package/switch/Makefile
package/util-linux/Makefile
package/wlcompat/Makefile
package/yamonenv/Makefile
rules.mk
scripts/kconfig.pl [moved from scripts/config.pl with 100% similarity]
scripts/metadata.pl
target/linux/Makefile
target/linux/adm5120/Makefile
target/linux/adm5120/router_be/config-2.6.22 [moved from target/linux/adm5120eb/config/default with 100% similarity]
target/linux/adm5120/router_be/image/Makefile [moved from target/linux/adm5120eb/image/Makefile with 100% similarity]
target/linux/adm5120/router_be/image/lzma-loader [moved from target/linux/adm5120eb/image/lzma-loader with 100% similarity]
target/linux/adm5120/router_be/profiles/090-Zyxel.mk [moved from target/linux/adm5120eb/profiles/090-Zyxel.mk with 100% similarity]
target/linux/adm5120/router_be/profiles/100-Texas.mk [moved from target/linux/adm5120eb/profiles/100-Texas.mk with 100% similarity]
target/linux/adm5120/router_be/profiles/110-Atheros.mk [moved from target/linux/adm5120eb/profiles/110-Atheros.mk with 100% similarity]
target/linux/adm5120/router_be/profiles/110-None.mk [moved from target/linux/adm5120eb/profiles/110-None.mk with 100% similarity]
target/linux/adm5120/router_be/target.mk [new file with mode: 0644]
target/linux/adm5120/router_le/base-files/default/sbin/wget2nand [moved from target/linux/adm5120/base-files/default/sbin/wget2nand with 100% similarity]
target/linux/adm5120/router_le/config-2.6.22 [moved from target/linux/adm5120/config/default with 100% similarity]
target/linux/adm5120/router_le/profiles/100-Atheros.mk [moved from target/linux/adm5120/profiles/100-Atheros.mk with 100% similarity]
target/linux/adm5120/router_le/profiles/105-Texas.mk [moved from target/linux/adm5120/profiles/105-Texas.mk with 100% similarity]
target/linux/adm5120/router_le/profiles/110-Ralink.mk [moved from target/linux/adm5120/profiles/110-Ralink.mk with 100% similarity]
target/linux/adm5120/router_le/profiles/200-None.mk [moved from target/linux/adm5120/profiles/200-None.mk with 100% similarity]
target/linux/adm5120/router_le/profiles/Cellvision.mk [moved from target/linux/adm5120/profiles/Cellvision.mk with 100% similarity]
target/linux/adm5120/router_le/profiles/RB1xx.mk [moved from target/linux/adm5120/profiles/RB1xx.mk with 100% similarity]
target/linux/adm5120/router_le/target.mk [new file with mode: 0644]
target/linux/adm5120eb/Makefile [deleted file]
target/linux/adm5120eb/files [deleted symlink]
target/linux/adm5120eb/patches-2.6.22 [deleted symlink]
target/linux/amazon/Makefile
target/linux/amazon/config-2.6.21 [moved from target/linux/amazon/config/default with 100% similarity]
target/linux/amcc/Makefile
target/linux/amcc/config-2.6.21 [moved from target/linux/amcc/config/default with 100% similarity]
target/linux/ar7/Makefile
target/linux/ar7/config-2.6.22 [moved from target/linux/ar7/config/default with 100% similarity]
target/linux/at91/Makefile
target/linux/at91/config-2.6.22 [moved from target/linux/at91/config/default with 100% similarity]
target/linux/atheros/Makefile
target/linux/atheros/config-2.6.22 [moved from target/linux/atheros/config/default with 100% similarity]
target/linux/au1000/Makefile
target/linux/au1000/config-2.6.22 [moved from target/linux/au1000/config/default with 100% similarity]
target/linux/avr32/Makefile
target/linux/brcm-2.4/Makefile
target/linux/brcm-2.4/config-2.4.34 [moved from target/linux/brcm-2.4/config/default with 100% similarity]
target/linux/brcm47xx/Makefile
target/linux/brcm47xx/config-2.6.22 [moved from target/linux/brcm47xx/config/default with 100% similarity]
target/linux/brcm63xx/Makefile
target/linux/brcm63xx/config-2.6.22 [moved from target/linux/brcm63xx/config/default with 100% similarity]
target/linux/etrax/Makefile
target/linux/generic-2.4/config-default [moved from target/linux/generic-2.4/config-template with 100% similarity]
target/linux/generic-2.6/config-default [moved from target/linux/generic-2.6/config-template with 100% similarity]
target/linux/iop32x/Makefile
target/linux/iop32x/config-2.6.21 [moved from target/linux/iop32x/config/default with 100% similarity]
target/linux/ixp4xx/Makefile
target/linux/ixp4xx/config-2.6.21 [moved from target/linux/ixp4xx/config/default with 100% similarity]
target/linux/magicbox/Makefile
target/linux/magicbox/config-2.6.22 [moved from target/linux/magicbox/config/default with 100% similarity]
target/linux/pxa/Makefile
target/linux/pxa/config-2.6.21 [moved from target/linux/pxa/config/default with 100% similarity]
target/linux/rb532/Makefile
target/linux/rb532/config-2.6.22 [moved from target/linux/rb532/config/default with 100% similarity]
target/linux/rdc/Makefile
target/linux/rdc/config-2.6.22 [moved from target/linux/rdc/config/default with 100% similarity]
target/linux/rdc/config/profile-wl153 [deleted file]
target/linux/sibyte/Makefile
target/linux/sibyte/config-2.6.21 [moved from target/linux/sibyte/config/default with 100% similarity]
target/linux/uml/Makefile
target/linux/x86/Makefile
toolchain/Makefile
toolchain/gcc/Makefile
toolchain/uClibc/Makefile

index a5e03d1cb3c48fc09ecc3ff3b43da4bf345f5fb9..48a138db15e05a6b724d0162b42623d2fd18bdca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ clean: FORCE
        rm -rf $(TMP_DIR)
 
 dirclean: clean
-       rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(BUILD_DIR_TOOLCHAIN) $(BUILD_DIR_HOST)
+       rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST)
 
 # check prerequisites before starting to build
 prereq: $(package/stamp-prereq) $(target/stamp-prereq) ;
index fa08372007cee4f6becd5aff39d85234e9ffd00c..68ce0480d16d6c96db7fb9dd03e0ea43eb6ad495 100644 (file)
@@ -5,6 +5,7 @@
 # See /LICENSE for more information.
 #
 
+override TARGET_BUILD=
 include $(INCLUDE_DIR)/prereq.mk
 include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/host.mk
index 69e602aded1a0dcf62dfc5af1047c1babe2e5322..65907600c983584b275e717df49e7bb092b2bdc3 100644 (file)
@@ -1,60 +1,20 @@
-# 
+#
 # Copyright (C) 2006-2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-KERNEL_BUILD:=1
-
 include $(INCLUDE_DIR)/host.mk
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/prereq.mk
 
-override MAKEFLAGS=
-
-GENERIC_LINUX_CONFIG:=$(GENERIC_PLATFORM_DIR)/config-$(shell [ -f "$(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER)" ] && echo "$(KERNEL_PATCHVER)" || echo template ) 
-LINUX_CONFIG_DIR ?= ./config$(shell [ -d "./config-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
-LINUX_CONFIG ?= $(LINUX_CONFIG_DIR)/default
-
-ifneq ($(DUMP),)
-  TMP_CONFIG:=$(TMP_DIR)/.kconfig-$(BOARD)-$(KERNEL)
-  $(TMP_CONFIG): $(GENERIC_LINUX_CONFIG) $(LINUX_CONFIG)
-       $(SCRIPT_DIR)/config.pl + $^ > $@
-  -include $(TMP_CONFIG)
-  .SILENT: $(TMP_CONFIG)
+ifneq ($(DUMP),1)
+  override MAKEFLAGS=
 endif
 
-ifneq ($(CONFIG_PCI),)
-  FEATURES += pci
-endif
-ifneq ($(CONFIG_USB),)
-  FEATURES += usb
-endif
-ifneq ($(CONFIG_PCMCIA)$(CONFIG_PCCARD),)
-  FEATURES += pcmcia
-endif
-
-# remove duplicates
-FEATURES:=$(sort $(FEATURES))
-
-ifeq ($(DUMP),1)
-  all: dumpinfo
-else
+ifneq ($(DUMP),1)
   all: compile
 endif
 
-ifneq (,$(findstring uml,$(BOARD)))
-  LINUX_KARCH:=um
-else
-  LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
-       -e 's/mipsel/mips/' \
-       -e 's/mipseb/mips/' \
-       -e 's/powerpc/ppc/' \
-       -e 's/sh[234]/sh/' \
-       -e 's/armeb/arm/' \
-  )
-endif
-
 STAMP_PREPARED:=$(LINUX_DIR)/.prepared
 STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
 include $(INCLUDE_DIR)/quilt.mk
@@ -90,106 +50,54 @@ define BuildKernel
   $(STAMP_PREPARED): $(DL_DIR)/$(LINUX_SOURCE)
        -rm -rf $(KERNEL_BUILD_DIR)
        -mkdir -p $(KERNEL_BUILD_DIR)
-       $(call Kernel/Prepare)
+       $(Kernel/Prepare)
        touch $$@
 
   $(STAMP_CONFIGURED): $(STAMP_PREPARED) $(LINUX_CONFIG) $(GENERIC_LINUX_CONFIG) $(TOPDIR)/.config
-       $(call Kernel/Configure)
+       $(Kernel/Configure)
        touch $$@
 
   $(LINUX_DIR)/.modules: $(STAMP_CONFIGURED) $(LINUX_DIR)/.config FORCE
-       $(call Kernel/CompileModules)
+       $(Kernel/CompileModules)
        touch $$@
 
   $(LINUX_DIR)/.image: $(STAMP_CONFIGURED) FORCE
-       $(call Kernel/CompileImage)
+       $(Kernel/CompileImage)
        touch $$@
        
   mostlyclean: FORCE
-       $(call Kernel/Clean)
-
-  ifeq ($(DUMP),1)
-    dumpinfo:
-               @echo 'Target: $(BOARD)'
-               @echo 'Target-Kernel: $(KERNEL)'
-               @echo 'Target-Name: $(BOARDNAME) [$(KERNEL)]'
-               @echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'
-               @echo 'Target-Arch: $(ARCH)'
-               @echo 'Target-Features: $(FEATURES)'
-               @echo 'Linux-Version: $(LINUX_VERSION)'
-               @echo 'Linux-Release: $(LINUX_RELEASE)'
-               @echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'
-               @echo 'Target-Description:'
-               @getvar $(call shvar,Target/Description)
-               @echo '@@'
-               @echo 'Default-Packages: $(DEFAULT_PACKAGES)'
-    ifneq ($(DUMPINFO),)
-               @$(DUMPINFO)
-    endif
-  endif
+       $(Kernel/Clean)
 
   define BuildKernel
   endef
-endef
-
-define Profile/Default
-  NAME:=
-  PACKAGES:=
-endef
-
-confname=$(subst .,_,$(subst -,_,$(1)))
-define Profile
-  $(eval $(call Profile/Default))
-  $(eval $(call Profile/$(1)))
-  $(eval $(call shexport,Profile/$(1)/Config))
-  $(eval $(call shexport,Profile/$(1)/Description))
-  DUMPINFO += \
-       echo "Target-Profile: $(1)"; \
-       echo "Target-Profile-Name: $(NAME)"; \
-       echo "Target-Profile-Packages: $(PACKAGES)"; \
-       if [ -f ./config/profile-$(1) ]; then \
-               echo "Target-Profile-Kconfig: yes"; \
-       fi; \
-       echo "Target-Profile-Config: "; \
-       getvar "$(call shvar,Profile/$(1)/Config)"; \
-       echo "@@"; \
-       echo "Target-Profile-Description:"; \
-       getvar "$(call shvar,Profile/$(1)/Description)"; \
-       echo "@@"; \
-       echo;
-  ifeq ($(CONFIG_LINUX_$(call confname,$(KERNEL)_$(1))),y)
-    PROFILE=$(1)
-  endif
-endef
-
-$(eval $(call shexport,Target/Description))
 
-download: $(DL_DIR)/$(LINUX_SOURCE)
-prepare: $(STAMP_CONFIGURED)
-compile: $(LINUX_DIR)/.modules
-       $(MAKE) -C image compile
+  download: $(DL_DIR)/$(LINUX_SOURCE)
+  prepare: $(STAMP_CONFIGURED)
+  compile: $(LINUX_DIR)/.modules
+       $(MAKE) -C image compile TARGET_BUILD=
 
-oldconfig menuconfig: $(STAMP_PREPARED) FORCE
-       $(call Kernel/Configure)
-       $(SCRIPT_DIR)/config.pl '+' $(GENERIC_LINUX_CONFIG) $(LINUX_CONFIG) > $(LINUX_DIR)/.config
+  oldconfig menuconfig: $(STAMP_PREPARED) FORCE
+       $(Kernel/Configure)
+       $(LINUX_CONFCMD) > $(LINUX_DIR)/.config
        $(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) $@
-       $(SCRIPT_DIR)/config.pl '>' $(GENERIC_LINUX_CONFIG) $(LINUX_DIR)/.config > $(LINUX_CONFIG)
+       $(SCRIPT_DIR)/kconfig.pl '>' $(GENERIC_LINUX_CONFIG) $(LINUX_DIR)/.config > $(LINUX_CONFIG)
 
-install: $(LINUX_DIR)/.image
-       $(MAKE) -C image compile install
+  install: $(LINUX_DIR)/.image
+       TARGET_BUILD="" $(MAKE) -C image compile install
 
-clean: FORCE
-       rm -f $(STAMP_DIR)/.linux-compile
+  clean: FORCE
        rm -rf $(KERNEL_BUILD_DIR)
 
-rebuild: FORCE
+  rebuild: FORCE
        @$(MAKE) mostlyclean
        @if [ -f $(LINUX_KERNEL) ]; then \
                $(MAKE) clean; \
        fi
        @$(MAKE) compile
 
-image-prereq:
-       $(SUBMAKE) -s -C image prereq
+  image-prereq:
+       $(SUBMAKE) -s -C image prereq TARGET_BUILD=
 
-prereq: image-prereq
+  prereq: image-prereq
+
+endef
index 3916483adfbba42829d4810b7c6fe8a3cce3fcca..88f1c36758224d0a979ef01388cb772872d0e9f2 100644 (file)
@@ -46,11 +46,9 @@ define Kernel/Configure/2.6
        -$(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig prepare scripts
 endef
 define Kernel/Configure/Default
-       $(SCRIPT_DIR)/config.pl '+' $(GENERIC_LINUX_CONFIG) \
-               $(if $(wildcard ./config/profile-$(PROFILE)),'+' $(LINUX_CONFIG) ./config/profile-$(PROFILE), $(LINUX_CONFIG)) \
-               > $(LINUX_DIR)/.config.target
+       $(LINUX_CONFCMD) > $(LINUX_DIR)/.config.target
        $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config > $(LINUX_DIR)/.config.override
-       $(SCRIPT_DIR)/config.pl 'm+' $(LINUX_DIR)/.config.target $(LINUX_DIR)/.config.override >$(LINUX_DIR)/.config
+       $(SCRIPT_DIR)/kconfig.pl 'm+' $(LINUX_DIR)/.config.target $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config
        $(call Kernel/Configure/$(KERNEL))
        rm -rf $(KERNEL_BUILD_DIR)/modules
        @rm -f $(BUILD_DIR)/linux
@@ -88,7 +86,6 @@ define Kernel/CompileImage/Default
 endef
 
 define Kernel/Clean/Default
-       rm -f $(LINUX_DIR)/.linux-compile
        rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.configured
        rm -f $(LINUX_KERNEL)
        $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean
index ee3486fdb102487761cf9ec073098a86fa243359..508cf9934a5c72d0f4ae75d9e41b05067b4c281a 100644 (file)
@@ -1,11 +1,9 @@
 # Use the default kernel version if the Makefile doesn't override it
 
-ifeq ($(LINUX_VERSION),)
-  ifeq ($(KERNEL),2.4)
-    LINUX_VERSION:=2.4.34
-  else
-    LINUX_VERSION:=2.6.21.5
-  endif
+ifeq ($(KERNEL),2.4)
+  LINUX_VERSION?=2.4.34
+else
+  LINUX_VERSION?=2.6.21.5
 endif
 LINUX_RELEASE?=1
 
@@ -22,6 +20,6 @@ endif
 # disable the md5sum check for unknown kernel versions
 LINUX_KERNEL_MD5SUM?=x
 
-KERNEL:=2.$(word 2,$(subst ., ,$(strip $(LINUX_VERSION))))
-KERNEL_PATCHVER:=$(shell echo $(LINUX_VERSION) | cut -d. -f1,2,3 | cut -d- -f1)
+KERNEL?=2.$(word 2,$(subst ., ,$(strip $(LINUX_VERSION))))
+KERNEL_PATCHVER=$(shell echo $(LINUX_VERSION) | cut -d. -f1,2,3 | cut -d- -f1)
 
index 559b37e4a31a6d7000a773ae3acebda4d34b3446..b82668ea48d1755d6fada59b7b07788e8ad75083 100644 (file)
@@ -5,15 +5,15 @@
 # See /LICENSE for more information.
 #
 
-include $(INCLUDE_DIR)/kernel-version.mk
+ifeq ($(__target_inc),)
+  include $(INCLUDE_DIR)/target.mk
+endif
 
 ifeq ($(DUMP),1)
   KERNEL?=<KERNEL>
   BOARD?=<BOARD>
   LINUX_VERSION?=<LINUX_VERSION>
 else
-  include $(INCLUDE_DIR)/target.mk
-
   export GCC_HONOUR_COPTS=s
 
   ifeq ($(KERNEL),2.6)
@@ -30,9 +30,8 @@ else
     KERNEL_CROSS:=$(TARGET_CROSS)
   endif
 
-  PLATFORM_DIR := $(TOPDIR)/target/linux/$(BOARD)
   PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
-  KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
+  KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
   LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
 
   MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
@@ -46,8 +45,18 @@ else
 
   PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
 endif
-GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
-GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d "$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+
+ifneq (,$(findstring uml,$(BOARD)))
+  LINUX_KARCH:=um
+else
+  LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
+       -e 's/mipsel/mips/' \
+       -e 's/mipseb/mips/' \
+       -e 's/powerpc/ppc/' \
+       -e 's/sh[234]/sh/' \
+       -e 's/armeb/arm/' \
+  )
+endif
 
 
 define KernelPackage/Defaults
index 819c8ca5959629e8631afbf969831ce54836d3e8..dfe80fabaadca38a0c23ba097ac9437f78bd2ea5 100644 (file)
@@ -27,14 +27,14 @@ define PackageDir
        { \
                $$(call progress,Collecting $(SCAN_NAME) info: $(SCAN_DIR)/$(2)) \
                echo Source-Makefile: $(SCAN_DIR)/$(2)/Makefile; \
-               $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $(SCAN_DIR)/$(2) 2>/dev/null || echo "ERROR: please fix $(SCAN_DIR)/$(2)/Makefile" >&2; \
+               $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) 2>/dev/null || echo "ERROR: please fix $(SCAN_DIR)/$(2)/Makefile" >&2; \
                echo; \
        } > $$@ || true
 endef
 
 $(FILELIST):
        rm -f tmp/info/.files-$(SCAN_TARGET)-*
-       $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Kernel)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@
+       $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@
 
 tmp/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
        ( \
index 40a06ed9e13ab33533bb0af35d86463f99d9ff43..68afcc48a25444a0226debbc61db6bab4453aec3 100644 (file)
@@ -34,10 +34,10 @@ define subdir
   $(foreach target,$(SUBTARGETS),$(call subtarget,$(1),$(target)))
 endef
 
-# Parameters: <subdir> <name> <target>
+# Parameters: <subdir> <name> <target> <depends>
 define stampfile
   $(1)/stamp-$(3):=$(STAGING_DIR)/stamp/.$(2)_$(3)
-  $$($(1)/stamp-$(3)): $(TMP_DIR)/.build
+  $$($(1)/stamp-$(3)): $(TMP_DIR)/.build $(4)
        @+$(SCRIPT_DIR)/timestamp.pl -n $$($(1)/stamp-$(3)) $(1) $(4) || \
                $(MAKE) $$($(1)/flags-$(3)) $(1)/$(3)
        @mkdir -p $$$$(dirname $$($(1)/stamp-$(3)))
index b0a178e306d409319d0797fa11fe68c7edcc0a80..42f484af9d8d32f101572a29f1c0cc6b57eec638 100644 (file)
 # See /LICENSE for more information.
 #
 
-define AddProfile
-  ifeq ($(CONFIG_LINUX_$(1)),y)
-    $(call Profile/$(1))
-    PROFILE=$$(ID)
+ifneq ($(DUMP),)
+  all: dumpinfo
+endif
+
+ifneq ($(__target_inc),1)
+__target_inc=1
+
+TARGET_BUILD?=0
+
+
+target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
+ifeq ($(DUMP),)
+  PLATFORM_DIR:=$(TOPDIR)/target/linux/$(BOARD)
+  SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir))))
+else
+  PLATFORM_DIR:=${CURDIR}
+endif
+
+TARGETID:=$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))
+PLATFORM_SUBDIR:=$(PLATFORM_DIR)$(if $(SUBTARGET),/$(SUBTARGET))
+
+define Target
+  KERNEL_TARGETS+=$(1)
+  ifeq ($(DUMP),1)
+    ifeq ($(SUBTARGET),)
+      BuildTarget=$$(BuildTargets/DumpAll)
+    endif
+  endif
+endef
+
+ifneq ($(TARGET_BUILD),1)
+  include $(PLATFORM_DIR)/Makefile
+  ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
+    include $(PLATFORM_SUBDIR)/target.mk
+  endif
+else
+  ifneq ($(SUBTARGET),)
+    -include ./$(SUBTARGET)/target.mk
+  endif
+endif
+
+define Profile/Default
+  NAME:=
+  PACKAGES:=
+endef
+
+define Profile
+  $(eval $(call Profile/Default))
+  $(eval $(call Profile/$(1)))
+  $(eval $(call shexport,Profile/$(1)/Config))
+  $(eval $(call shexport,Profile/$(1)/Description))
+  DUMPINFO += \
+       echo "Target-Profile: $(1)"; \
+       echo "Target-Profile-Name: $(NAME)"; \
+       echo "Target-Profile-Packages: $(PACKAGES)"; \
+       if [ -f ./config/profile-$(1) ]; then \
+               echo "Target-Profile-Kconfig: yes"; \
+       fi; \
+       echo "Target-Profile-Config: "; \
+       getvar "$(call shvar,Profile/$(1)/Config)"; \
+       echo "@@"; \
+       echo "Target-Profile-Description:"; \
+       getvar "$(call shvar,Profile/$(1)/Description)"; \
+       echo "@@"; \
+       echo;
+  ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(2),$(2)_)$(1))),y)
+    PROFILE=$(1)
   endif
 endef
 
--include $(TMP_DIR)/.target.mk
+$(eval $(call shexport,Target/Description))
+
+
+include $(INCLUDE_DIR)/kernel-version.mk
+
+GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
+GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d "$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+
+GENERIC_LINUX_CONFIG:=$(firstword $(wildcard $(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) $(GENERIC_PLATFORM_DIR)/config-default))
+LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) $(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) $(subdir)/config-default)))
+LINUX_SUBCONFIG?=$(firstword $(wildcard $(PLATFORM_SUBDIR)/config-$(KERNEL_PATCHVER) $(PLATFORM_SUBDIR)/config-default))
+ifeq ($(LINUX_CONFIG),$(LINUX_SUBCONFIG))
+  LINUX_SUBCONFIG:=
+endif
+LINUX_CONFCMD=$(if $(LINUX_CONFIG),$(SCRIPT_DIR)/kconfig.pl + $(GENERIC_LINUX_CONFIG) $(if $(LINUX_SUBCONFIG),+ $(LINUX_CONFIG) $(LINUX_SUBCONFIG),$(LINUX_CONFIG)),true)
+
+ifeq ($(DUMP),1)
+  BuildTarget=$(BuildTargets/DumpCurrent)
+
+  ifneq ($(BOARD),)
+    TMP_CONFIG:=$(TMP_DIR)/.kconfig-$(call target_conf,$(TARGETID))
+    $(TMP_CONFIG): $(GENERIC_LINUX_CONFIG) $(LINUX_CONFIG) $(LINUX_SUBCONFIG)
+               $(LINUX_CONFCMD) > $@ || rm -f $@
+    -include $(TMP_CONFIG)
+    .SILENT: $(TMP_CONFIG)
+    .PRECIOUS: $(TMP_CONFIG)
+
+    ifneq ($(CONFIG_PCI),)
+      FEATURES += pci
+    endif
+    ifneq ($(CONFIG_USB),)
+      FEATURES += usb
+    endif
+    ifneq ($(CONFIG_PCMCIA)$(CONFIG_PCCARD),)
+      FEATURES += pcmcia
+    endif
+
+    # remove duplicates
+    FEATURES:=$(sort $(FEATURES))
+  endif
+endif
+
+define BuildTargets/DumpAll
+  dumpinfo:
+       @$(foreach SUBTARGET,$(KERNEL_TARGETS),$(SUBMAKE) -s DUMP=1 SUBTARGET=$(SUBTARGET); )
+endef
+
+define BuildTargets/DumpCurrent
+
+  dumpinfo:
+       @echo 'Target: $(TARGETID)'; \
+        echo 'Target-Board: $(BOARD)'; \
+        echo 'Target-Kernel: $(KERNEL)'; \
+        echo 'Target-Name: $(BOARDNAME) [$(KERNEL)]'; \
+        echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'; \
+        echo 'Target-Arch: $(ARCH)'; \
+        echo 'Target-Features: $(FEATURES)'; \
+        echo 'Linux-Version: $(LINUX_VERSION)'; \
+        echo 'Linux-Release: $(LINUX_RELEASE)'; \
+        echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
+        echo 'Target-Description:'; \
+        getvar $(call shvar,Target/Description); \
+        echo '@@'; \
+        echo 'Default-Packages: $(DEFAULT_PACKAGES)'; \
+        $(DUMPINFO)
+endef
 
-ifeq ($(IB),1)
-$(TMP_DIR)/.target.mk: $(TOPDIR)/.target.mk
-       $(CP) $< $@
+include $(INCLUDE_DIR)/kernel.mk
+ifeq ($(TARGET_BUILD),1)
+  include $(INCLUDE_DIR)/kernel-build.mk
+  BuildTarget?=$(BuildKernel)
 endif
 
+endif #__target_inc
index 8faf8e14372a396b93ab11f4a5fa942544d7d4f3..0a8bdedc3e9294a20206a05b9eb7a8b76ea895ec 100644 (file)
@@ -33,13 +33,12 @@ export SCAN_COOKIE
 prepare-tmpinfo: FORCE
        mkdir -p tmp/info
        +$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS="$(TOPDIR)/include/package*.mk" SCAN_DEPTH=4 SCAN_EXTRA=""
-       +$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="profiles/*.mk $(TOPDIR)/include/kernel*.mk" SCAN_DEPTH=2 SCAN_EXTRA=""
+       +$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="profiles/*.mk $(TOPDIR)/include/kernel*.mk" SCAN_DEPTH=2 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
        for type in package target; do \
                f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
                [ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $${type}_config < "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
        done
        ./scripts/metadata.pl package_mk < tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
-       ./scripts/metadata.pl target_mk < $(TMP_DIR)/.targetinfo > tmp/.target.mk
        touch $(TOPDIR)/tmp/.build
 
 .config: ./scripts/config/conf prepare-tmpinfo
index e65e14e3c2fd71d646922a4d759b807e2b3d50a6..77ec91b121d640dbdc126498a4b58be43b9680f9 100644 (file)
@@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/acx
   TITLE:=Driver for TI ACX1xx chipset
-  DEPENDS:=@LINUX_2_6 @!TARGET_AVR32 +wireless-tools
+  DEPENDS:=@LINUX_2_6 @!TARGET_avr32 +wireless-tools
   URL:=http://acx100.sourceforge.net/
   SUBMENU:=Wireless Drivers
   FILES:= $(PKG_BUILD_DIR)/acx.$(LINUX_KMOD_SUFFIX)
index a6b070870428531c208f51067ac7c072d7474669..0faec37e700a89a7f43e15470e66e3ff46eb884d 100644 (file)
@@ -22,7 +22,7 @@ define Package/admswconfig
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=ADM5120 Switch configuration tool
-  DEPENDS:=@TARGET_ADM5120||TARGET_ADM5120EB
+  DEPENDS:=@TARGET_adm5120
   URL:=http://sharon.esrac.ele.tue.nl/users/pe1rxq/linux-adm/admswconfig/
 endef
 
index 8286f3e4ebafbe507664665edf4aa0e9e812f70e..b9cba9ee7ff6ec6a5b11b5441b43b2de720b26fb 100644 (file)
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/sangam-atm/Default
   SUBMENU:=Network Devices
-  DEPENDS:=@TARGET_AR7 +kmod-atm 
+  DEPENDS:=@TARGET_ar7 +kmod-atm 
   TITLE:=AR7 ADSL driver
   FILES:=$(PKG_BUILD_DIR)/tiatm.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,tiatm)
index dcf0835ecc8442abfcc76c19b5deeb343757c367..9b8478dfc862658861c9fb0be2898d9178ac5c43 100644 (file)
@@ -71,7 +71,7 @@ endef
 define Package/libgcc
 $(call Package/gcc/Default)
   TITLE:=GCC support library
-  DEPENDS:=@!TARGET_AVR32 @!NATIVE_TOOLCHAIN
+  DEPENDS:=@!TARGET_avr32 @!NATIVE_TOOLCHAIN
 endef
 
 define Package/libssp
@@ -123,6 +123,11 @@ define Package/base-files$(TARGET)/install
        if [ -d $(PLATFORM_DIR)/base-files/default/. ]; then \
                $(CP) $(PLATFORM_DIR)/base-files/default/* $(1)/; \
        fi
+       $(if $(filter-out $(PLATFORM_DIR),$(PLATFORM_SUBDIR)), \
+               if [ -d $(PLATFORM_SUBDIR)/base-files/default/. ]; then \
+                       $(CP) $(PLATFORM_SUBDIR)/base-files/default/* $(1)/; \
+               fi \
+       )
        if [ "$(PROFILE)" != "Default" ]; then \
                if [ -d $(PLATFORM_DIR)/base-files/profile-$(PROFILE)/. ]; then \
                        $(CP) $(PLATFORM_DIR)/base-files/profile-$(PROFILE)/* $(1)/; \
index 34a1d767f91bec45549b9d83f49eafe27523af72..12520a1f7687272c2c67789e596ad97c5ac7a9ca 100644 (file)
@@ -20,7 +20,7 @@ endif
 define KernelPackage/bcm43xx-mac80211
   SUBMENU:=Wireless Drivers
   TITLE:=Broadcom 43xx wireless support
-  DEPENDS:=@TARGET_BRCM47XX +kmod-mac80211
+  DEPENDS:=@TARGET_brcm47xx +kmod-mac80211
   KCONFIG:=CONFIG_MAC80211
   FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX)
 #  AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211)
index 1ba4abf973a957af70b1cac079b19ecc8686e86d..73401fc220d0af8ea853fcca51dd2be80b339d23 100644 (file)
@@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/diag
   SUBMENU:=Other modules
-  DEPENDS:=@TARGET_BRCM_2_4||TARGET_BRCM47XX
+  DEPENDS:=@TARGET_brcm_2_4||TARGET_brcm47xx
   TITLE:=Driver for router LEDs and Buttons
   FILES:=$(PKG_BUILD_DIR)/diag.$(LINUX_KMOD_SUFFIX)
 endef
@@ -27,7 +27,7 @@ define Build/Prepare
 endef
 
 ifeq ($(BOARD),brcm-2.4)
-       BUILDFLAGS=-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include $(if $(CONFIG_LINUX_2_4),-DLINUX_2_4)
+       BUILDFLAGS=-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DLINUX_2_4
 endif
 
 define Build/Compile
index 889bcfa01126dcc7858136f8f5c2f921b1e302f3..5bfc8a2896ca8d3389a892f22c7a2e9765a42618 100644 (file)
@@ -23,7 +23,7 @@ MAKEFLAGS_KMOD:= -C "$(LINUX_DIR)" \
 
 define KernelPackage/broadcom-mmc
   SUBMENU:=Other modules
-  DEPENDS:=@TARGET_BRCM_2_4
+  DEPENDS:=@TARGET_brcm_2_4
   TITLE:=Kernel driver for the Linksys WRT54G MM/SD-Card Mod
   DESCRIPTION:=\
        Kernel driver for the Linksys WRT54G MM/SD-Card Mod
index 1a7da2d519e04c03ace89ff5be2eb96ac45cdde6..f468646cec35f063ec7e8a023b0938443041efa8 100644 (file)
@@ -25,13 +25,13 @@ define Package/broadcom-wl/Default
   CATEGORY:=Kernel modules
   DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
   SUBMENU:=Proprietary BCM43xx WiFi driver
-  SUBMENUDEP:=@TARGET_BRCM_2_4
+  SUBMENUDEP:=@TARGET_brcm_2_4
 endef
 
 define KernelPackage/brcm-wl/Default
   $(call Package/broadcom-wl/Default)
   SECTION:=kernel
-  DEPENDS:=@TARGET_BRCM_2_4
+  DEPENDS:=@TARGET_brcm_2_4
   TITLE:=Kernel driver for BCM43xx chipsets
   FILES:=$(PKG_BUILD_DIR)/kmod/wl$(1).o
   AUTOLOAD:=$(call AutoLoad,30,wl$(1))
index 60a45a707bc5e91c9049e2e40b2f38260171a1c2..1ce29e35fa393cfd2778b57bd03b9fe68daf1259 100644 (file)
@@ -18,7 +18,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/fonera-mp3-driver
   SUBMENU:=Other modules
-  DEPENDS:=@TARGET_ATHEROS
+  DEPENDS:=@TARGET_atheros
   TITLE:=Fonera-MP3 driver (VS1011X)
   FILES:=$(PKG_BUILD_DIR)/mp3_drv.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,25,mp3-drv)
index db8146f2eac64409b20ebe9d1af335e4b92eab06..d7431ff4d0a3d22457159d2c812e7f9555a25705 100644 (file)
@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/fonera-mp3d
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@TARGET_ATHEROS
+  DEPENDS:=@TARGET_atheros
   TITLE:=Daemon for fonera-mp3
 endef
 
index 465e5c68349169cb7118dd16fad52d02a8bf0e57..11fea9dc187f7d1bfd540288c186735fb1d3b993 100644 (file)
@@ -25,7 +25,7 @@ define Package/foxboard-utils
   CATEGORY:=Base system
   TITLE:=Foxboard base tools
   URL:=http://www.acmesystems.it
-  DEPENDS:=@TARGET_ETRAX
+  DEPENDS:=@TARGET_etrax
 endef
 
 define Package/foxboard-utils/description
index 76376f528505be68403c94595de2b5c2327edd7a..2e506201d1eccc338d18226f45f451da14aa777f 100644 (file)
@@ -36,7 +36,7 @@ endef
 
 define Package/hostapd
 $(call Package/hostapd/Default)
-  DEPENDS:=+libopenssl @!TARGET_AVR32 @!TARGET_ETRAX
+  DEPENDS:=+libopenssl @!TARGET_avr32 @!TARGET_etrax
   TITLE+= (full)
 endef
 
index 700b805ee0f61da4f53ddeae184b55ac84f7e900..9f6326b8cb17689a1ad375b2b78cd57b0046015c 100644 (file)
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/ipset
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=@!TARGET_ETRAX
+  DEPENDS:=@!TARGET_etrax
   TITLE:=Netfilter ip sets administration utility
   URL:=http://ipset.netfilter.org/
 endef
index e053a43b20fd7b8ac8bad166fc95266d80474a48..cc1371ec64156ada6173a5a79bd0a1f3fbebd24d 100644 (file)
@@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/nvram
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@TARGET_BRCM_2_4
+  DEPENDS:=@TARGET_brcm_2_4
   TITLE:=Broadcom config utility
 endef
 
index cdf1f512932e16f947f66509acf2ab84d0c6574e..74e5778e230375a53e3931b2b7dc7e023152f711 100644 (file)
@@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/switch
   SUBMENU:=Other modules
-  DEPENDS:=@TARGET_BRCM_2_4||TARGET_BRCM47XX
+  DEPENDS:=@TARGET_brcm_2_4||TARGET_brcm47xx
   TITLE:=Switch drivers
   FILES:= \
        $(PKG_BUILD_DIR)/switch-core.$(LINUX_KMOD_SUFFIX) \
index a4cfb90436bf844bf781d2d3ee4ff942b5c1ba64..2ea4c7e564fb402aec9b440125030f3de286f4ca 100644 (file)
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/util-linux/Default
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@!TARGET_ETRAX
+  DEPENDS:=@!TARGET_etrax
   URL:=http://www.kernel.org/pub/linux/utils/util-linux/
 endef
 
index 482ec4a2d276d7b6f6af52d235a91cdd02c76926..308a696f06177f724fed7adba39d309253dd77de 100644 (file)
@@ -16,8 +16,8 @@ include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/wlcompat/Default
   SUBMENU:=Proprietary BCM43xx WiFi driver
-  SUBMENUDEP:=@TARGET_BRCM_2_4
-  DEPENDS:=@TARGET_BRCM_2_4 @PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo +wireless-tools
+  SUBMENUDEP:=@TARGET_brcm_2_4
+  DEPENDS:=@TARGET_brcm_2_4 @PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo +wireless-tools
   TITLE:=Broadcom wl wrapper module
 endef
 
index 0cf6493e2de903320d7696f25d75bb65e7293063..9a323c28d8d3dcfec34101c814e6233e415f5512 100644 (file)
@@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/yamonenv
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@TARGET_AU1000
+  DEPENDS:=@TARGET_au1000
   TITLE:=YAMON configuration utility
   URL:=http://meshcube.org/nylon/stable/sources/
 endef
index eb62112a8226ababe204d34fed0538eb96620ad1..9d5fcd72b408d060c74135bb79da48cdb9521e38 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -5,6 +5,9 @@
 # See /LICENSE for more information.
 #
 
+ifneq ($(__rules_inc),1)
+__rules_inc=1
+
 ifeq ($(DUMP),)
   -include $(TOPDIR)/.config
 endif
@@ -13,8 +16,6 @@ include $(TOPDIR)/include/verbose.mk
 
 TMP_DIR:=$(TOPDIR)/tmp
 
-include $(TOPDIR)/include/target.mk
-
 export SHELL=/usr/bin/env bash -c '. $(TOPDIR)/include/shell.sh; eval "$$2"' --
 
 define qstrip
@@ -23,6 +24,7 @@ endef
 #"))
 
 ARCH:=$(call qstrip,$(CONFIG_ARCH))
+BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
 TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
 BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
 GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
@@ -37,7 +39,7 @@ SCRIPT_DIR:=$(TOPDIR)/scripts
 BUILD_DIR_BASE:=$(TOPDIR)/build_dir
 BUILD_DIR:=$(BUILD_DIR_BASE)/$(ARCH)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
 BUILD_DIR_HOST:=$(BUILD_DIR_BASE)/host
-BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(ARCH)
+BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(ARCH)_gcc$(GCCV)
 STAGING_DIR:=$(TOPDIR)/staging_dir/$(ARCH)
 STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
 TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/toolchain-$(ARCH)_gcc$(GCCV)
@@ -133,3 +135,5 @@ endef
 all:
 FORCE: ;
 .PHONY: FORCE
+
+endif #__rules_inc
similarity index 100%
rename from scripts/config.pl
rename to scripts/kconfig.pl
index fe135418ca1becae3ca613353f061a51bca7f3b3..2fcbf82dfa8ce785b9d2327da95f0e62e36cdddc 100755 (executable)
@@ -23,15 +23,16 @@ sub parse_target_metadata() {
        while (<>) {
                chomp;
                /^Target:\s*(.+)\s*$/ and do {
-                       my $conf = uc $1;
-                       $conf =~ tr/\.-/__/;
+                       my $conf = $1;
+                       $conf =~ tr#/\.\-/#___#;
                        $target = {
+                               id => $1,
                                conf => $conf,
-                               board => $1,
                                profiles => []
                        };
                        push @target, $target;
                };
+               /^Target-Board:\s*(.+)\s*$/ and $target->{board} = $1;
                /^Target-Kernel:\s*(\d+\.\d+)\s*$/ and $target->{kernel} = $1;
                /^Target-Name:\s*(.+)\s*$/ and $target->{name} = $1;
                /^Target-Path:\s*(.+)\s*$/ and $target->{path} = $1;
@@ -198,45 +199,6 @@ sub merge_package_lists($$) {
        return sort(@l);
 }
 
-sub gen_target_mk() {
-       my @target = parse_target_metadata();
-       
-       @target = sort {
-               $a->{board} cmp $b->{board}
-       } @target;
-       
-       foreach my $target (@target) {
-               my ($profiles_def, $profiles_eval);
-
-               foreach my $profile (@{$target->{profiles}}) {
-                       $profiles_def .= "
-  define Profile/$target->{conf}\_$profile->{id}
-    ID:=$profile->{id}
-    NAME:=$profile->{name}
-    PACKAGES:=".join(" ", merge_package_lists($target->{packages}, $profile->{packages}))."\n";
-                       $profile->{kconfig} and $profiles_def .= "    KCONFIG:=1\n";
-                       $profiles_def .= "  endef";
-                       $profiles_eval .= "
-\$(eval \$(call AddProfile,$target->{conf}\_$profile->{id}))"
-               }
-               print "
-ifeq (\$(CONFIG_TARGET_$target->{conf}),y)
-  define Target
-    KERNEL:=$target->{kernel}
-    BOARD:=$target->{board}
-    BOARDNAME:=$target->{name}
-    LINUX_VERSION:=$target->{version}
-    LINUX_RELEASE:=$target->{release}
-    LINUX_KARCH:=$target->{karch}
-    DEFAULT_PACKAGES:=".join(" ", @{$target->{packages}})."
-  endef$profiles_def
-endif$profiles_eval
-
-"
-       }
-       print "\$(eval \$(call Target))\n";
-}
-
 sub target_config_features(@) {
        my $ret;
 
@@ -265,7 +227,7 @@ sub gen_target_config() {
        print <<EOF;
 choice
        prompt "Target System"
-       default TARGET_BRCM_2_4
+       default TARGET_brcm_2_4
        reset if !DEVEL
        
 EOF
@@ -298,6 +260,14 @@ EOF
        print <<EOF;
 endchoice
 
+config TARGET_BOARD
+       string
+EOF
+       foreach my $target (@target) {
+               print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
+       }
+       print <<EOF;
+
 choice
        prompt "Target Profile"
 
@@ -559,7 +529,6 @@ EOF
 sub parse_command() {
        my $cmd = shift @ARGV;
        for ($cmd) {
-               /^target_mk$/ and return gen_target_mk();
                /^target_config$/ and return gen_target_config();
                /^package_mk$/ and return gen_package_mk();
                /^package_config$/ and return gen_package_config();
@@ -567,7 +536,6 @@ sub parse_command() {
        }
        print <<EOF
 Available Commands:
-       $0 target_mk [file]             Target metadata in makefile format
        $0 target_config [file]         Target metadata in Kconfig format
        $0 package_mk [file]            Package metadata in makefile format
        $0 package_config [file]        Package metadata in Kconfig format
index 1eb579e82e98b4afa916b59a88d2eb2130479f9b..828825011128de30973a466e5a46f52833a58be2 100644 (file)
@@ -8,5 +8,5 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/target.mk
 
 prereq clean download prepare compile install menuconfig oldconfig update refresh: FORCE
-       $(MAKE) -C $(BOARD) $@
+       TARGET_BUILD=1 $(MAKE) -C $(BOARD) $@
 
index f8436c04ed2e363fe1761903b40876fe1ec327c0..34c3b804a76acba80542154a7e8579ef6c4c9beb 100644 (file)
@@ -1,27 +1,20 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+
 include $(TOPDIR)/rules.mk
 
-ARCH:=mipsel
 BOARD:=adm5120
-BOARDNAME:=ADM5120 (Little Endian)
-FEATURES:=squashfs jffs2 tgz broken
-
 LINUX_VERSION:=2.6.22.4
+FEATURES:=squashfs jffs2 tgz broken
 
-define Target/Description
-       Build firmware images for Infineon/ADMtek ADM5120 based boards
-       (e.g : RouterBoard RB1xx, Compex WP54G-WRT ...)
-endef
+include $(INCLUDE_DIR)/target.mk
 
-include $(INCLUDE_DIR)/kernel-build.mk
 DEFAULT_PACKAGES += admswconfig
 
-# include the profiles
--include profiles/*.mk
-
-$(eval $(call BuildKernel))
+$(eval $(call Target,router_be))
+$(eval $(call Target,router_le))
+$(eval $(call BuildTarget))
diff --git a/target/linux/adm5120/router_be/target.mk b/target/linux/adm5120/router_be/target.mk
new file mode 100644 (file)
index 0000000..0d9154c
--- /dev/null
@@ -0,0 +1,9 @@
+ARCH:=mips
+SUBTARGET:=router_be
+BOARDNAME:=ADM5120 Boards (Big Endian)
+
+define Target/Description
+       Build firmware images for Infineon/ADMTek ADM5120 based boards running in big-endian mode
+       (e.g : ZyXEL Prestige 335WT ...)
+endef
+
diff --git a/target/linux/adm5120/router_le/target.mk b/target/linux/adm5120/router_le/target.mk
new file mode 100644 (file)
index 0000000..61da333
--- /dev/null
@@ -0,0 +1,9 @@
+ARCH:=mipsel
+SUBTARGET:=router_le
+BOARDNAME:=ADM5120 Boards (Little Endian)
+
+define Target/Description
+       Build firmware images for Infineon/ADMtek ADM5120 based boards
+       (e.g : RouterBoard RB1xx, Compex WP54G-WRT ...)
+endef
+
diff --git a/target/linux/adm5120eb/Makefile b/target/linux/adm5120eb/Makefile
deleted file mode 100644 (file)
index 9205c8b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-include $(TOPDIR)/rules.mk
-
-ARCH:=mips
-BOARD:=adm5120eb
-BOARDNAME:=ADM5120 (Big Endian)
-FEATURES:=squashfs pci usb broken
-
-LINUX_VERSION:=2.6.22.4
-
-define Target/Description
-       Build firmware images for Infineon/ADMTek ADM5120 based boards running in big-endian mode
-       (e.g : ZyXEL Prestige 335WT ...)
-endef
-
-include $(INCLUDE_DIR)/kernel-build.mk
-DEFAULT_PACKAGES += admswconfig
-
-# include the profiles
--include profiles/*.mk
-
-$(eval $(call BuildKernel))
diff --git a/target/linux/adm5120eb/files b/target/linux/adm5120eb/files
deleted file mode 120000 (symlink)
index aadc1cd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../adm5120/files
\ No newline at end of file
diff --git a/target/linux/adm5120eb/patches-2.6.22 b/target/linux/adm5120eb/patches-2.6.22
deleted file mode 120000 (symlink)
index 09e7342..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../adm5120/patches-2.6.22
\ No newline at end of file
index 1967d52f42a2febe58017707279cb820b754cccd..17f9d964941a61b971b776e82a556763a9f0763c 100644 (file)
@@ -10,6 +10,9 @@ ARCH:=mips
 BOARD:=amazon
 BOARDNAME:=Infineon Amazon
 FEATURES:=squashfs jffs2 broken
+LINUX_VERSION:=2.6.21.5
+
+include $(INCLUDE_DIR)/target.mk
 
 define Target/Description
        Build firmware images for Infineon Amazon boards
@@ -17,9 +20,7 @@ endef
 
 KERNELNAME:="uImage"
 
-include $(INCLUDE_DIR)/kernel-build.mk
-
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 4dd366caa9ac34685be7fd25397def5e4d1e48fe..a35783be4197be79a82547a377fb98b2c41f2ffe 100644 (file)
@@ -13,13 +13,13 @@ FEATURES:=jffs2
 
 LINUX_VERSION:=2.6.21.5
 
+include $(INCLUDE_DIR)/target.mk
+
 define Target/Description
        Build firmware images for the AMCC Taishan evaluation board
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 0beb8ae75d7644fb2dbe0f7123e128e7133035ea..772222ac757046d28759cf3b2e148ffb4b456de6 100644 (file)
@@ -13,12 +13,12 @@ FEATURES:=squashfs jffs2 atm
 
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+
 define Target/Description
        Build firmware images for TI AR7 based routers
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index f8ca6f6be37d05b6021a28b6050b6d4d4e6011cb..7a9a1adcc34bf9ed5a94aebe41c1284952f2b399 100644 (file)
@@ -14,14 +14,15 @@ FEATURES:=squashfs usb
 #LINUX_VERSION:=2.6.21.5
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+
+KERNELNAME:="uImage"
+
 define Target/Description
   Build fimware images for Figment Design Labs VersaLink board.
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-
 #include the profiles
 -include profiles/*.mk
 
-KERNELNAME:="uImage"
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 611345f4bbf5f25e7debcbf886ec59032288f616..fc48efd5ded8b297f2cfa502209c3a3fce850b9d 100644 (file)
@@ -13,14 +13,15 @@ FEATURES:=squashfs jffs2
 
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+
+DEFAULT_PACKAGES += kmod-madwifi
+
 define Target/Description
        Build firmware images for Atheros SoC boards
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-DEFAULT_PACKAGES += kmod-madwifi
-
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index d7b9f739ab7f6fa2b953555f53456fa21d2f0b79..f7dcb03ed6a2586fca19af9c6f058ea8bcf7f7af 100644 (file)
@@ -13,14 +13,14 @@ FEATURES:=jffs2 usb pci
 
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+DEFAULT_PACKAGES += yamonenv
+
 define Target/Description
        Build firmware for AMD Alchemy 1500 boards
        (e.g. 4G-Systems Mesh/Access Cube ...)
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-DEFAULT_PACKAGES += yamonenv
-
 define Kernel/BuildImage
        $(call Kernel/BuildImage/Default)
        $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec $(LINUX_DIR)/zImage.flash.srec
@@ -30,5 +30,5 @@ endef
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
 
index 4ab8534760795a4e39b6ecfcd97bce0f387f7f13..01d5838fe4d8adcb4c9023dd857bd225e5bb9112 100644 (file)
@@ -10,18 +10,15 @@ ARCH:=avr32
 BOARD:=avr32
 BOARDNAME:=Atmel AVR32
 FEATURES:=squashfs
-
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+
 define Target/Description
   Build firmware images for ATNGW100 board
 endef
 
-KERNEL:=2.6
-
-include $(INCLUDE_DIR)/kernel-build.mk
-
 #include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index ed7336daeaca26ac004236152d909d294c3c68ea..da5cf6404f3718498fee8e33945900d41abac3ed 100644 (file)
@@ -11,17 +11,18 @@ BOARD:=brcm-2.4
 BOARDNAME:=Broadcom BCM947xx/953xx
 FEATURES:=squashfs
 
+KERNEL:=2.4
+
+include $(INCLUDE_DIR)/target.mk
+
+DEFAULT_PACKAGES += kmod-switch kmod-diag nvram 
+
 define Target/Description
        Build firmware images for Broadcom based routers
        (e.g. Linksys WRT54G(S), Asus WL-500g, Motorola WR850G)
 endef
 
-KERNEL:=2.4
-
-include $(INCLUDE_DIR)/kernel-build.mk
-DEFAULT_PACKAGES += kmod-switch kmod-diag nvram
-
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 11485fe056e84f9532a73b7a317a31e1c33ce024..5804ee9768c343beb9f4e800a9b25dff95914a47 100644 (file)
@@ -13,15 +13,15 @@ FEATURES:=squashfs usb
 
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+DEFAULT_PACKAGES += kmod-switch kmod-diag
+
 define Target/Description
        Build firmware images for Broadcom based routers
        (e.g. Netgear WGT634U)
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-DEFAULT_PACKAGES += kmod-switch kmod-diag
-
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 32bfd06feaa4a243a5e474400b6207f52b120836..93670c6eed5bf3d919889144d5bb6ddf25413381 100644 (file)
@@ -10,17 +10,16 @@ ARCH:=mips
 BOARD:=brcm63xx
 BOARDNAME:=Broadcom BCM963xx
 FEATURES:=squashfs jffs2 broken usb atm
-
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+
 define Target/Description
        Build firmware images for Broadcom based xDSL/routers
        (e.g. Inventel Livebox, Siemens SE515)
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 7c9b76fa65a32a82f39686e2d52607e1abbc6967..c837550062414a9cb0c45e66bbab5e1d2cc0a4be 100644 (file)
@@ -12,7 +12,10 @@ BOARDNAME:=Foxboard (ETRAX 100LX)
 FEATURES:=squashfs jffs2
 LINUX_VERSION:=2.6.19.2
 
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
+
+KERNELNAME:="zImage"
+DEFAULT_PACKAGES += foxboard-utils
 
 define Target/Description
        Build fimware images for the FOXBOARD made by acmesystems.it
@@ -31,14 +34,10 @@ define Kernel/Prepare
        $(call Kernel/Prepare/Fox)
 endef
 
-DEFAULT_PACKAGES += foxboard-utils
+#include the profiles
+-include profiles/*.mk
 
+$(eval $(call BuildTarget))
 $(eval $(call RequireCommand,/usr/local/cris/gcc-cris, \
        Please install the binary cris toolchain. \
 ))
-
-#include the profiles
--include profiles/*.mk
-
-KERNELNAME:="zImage"
-$(eval $(call BuildKernel))
index 529a7e048a45b878864cf0d394d736be78e84d26..c097955f3433de1427100f978d8a12cbb7d3281b 100644 (file)
@@ -13,12 +13,9 @@ FEATURES:=squashfs jffs2
 
 LINUX_VERSION:=2.6.21.5
 
-define Target/Description
-endef
-
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
 
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 25b60a47b720fe3c96c4b7be6d6802b9d885ea27..f68f62bc7de98353f331198d74f6ffee4002a416 100644 (file)
@@ -13,12 +13,9 @@ FEATURES:=squashfs
 
 LINUX_VERSION:=2.6.21.6
 
-define Target/Description
-endef
-
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
 
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index e003330f053b9ba4e60fab6293d1203b81a4cc3f..a20158b5221628980b07d8ce6b09ac4bc5fecc60 100644 (file)
@@ -13,9 +13,9 @@ FEATURES:=squashfs jffs2
 
 LINUX_VERSION:=2.6.22.4
 
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
 
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 3e0e6cd3b33d945db9c1b8cea3f7edd3e8741a07..ad44af27e47dad02aa91c00f55306a21f7225496 100644 (file)
@@ -13,13 +13,13 @@ FEATURES:=jffs2 broken
 
 LINUX_VERSION:=2.6.21.5
 
+include $(INCLUDE_DIR)/target.mk
+
 define Target/Description
        Stub for boards based on intel PXA
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index ee2360187c9e393d48bf1053b9f0a6388974e75a..608f0aca148de186817d98abacf940763f818bb4 100644 (file)
@@ -13,9 +13,9 @@ FEATURES:=jffs2 pci tgz
 
 LINUX_VERSION:=2.6.22.4
 
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
 
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 5af5e85c6eb51fa84f8e0ca61109c37bc07d8686..ac49adeb97482b715a7600b94a1ddf9d268d2712 100644 (file)
@@ -13,15 +13,15 @@ FEATURES:=squashfs jffs2 broken
 
 LINUX_VERSION:=2.6.22.4
 
+include $(INCLUDE_DIR)/target.mk
+
 define Target/Description
         Build firmware images for RDC321x based routers
         (e.g. Airlink101 AR525W, Linksys WRT54R, Sitecom WL-153)
 endef
 
-include $(INCLUDE_DIR)/kernel-build.mk
-
 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
-    define Kernel/SetInitramfs
+  define Kernel/SetInitramfs
        echo "r6040 parent=wlan0" > $(TARGET_DIR)/etc/modules.d/99-r6040
        $(RM) $(TARGET_DIR)/sbin/init
        ln -s /etc/preinit $(TARGET_DIR)/sbin/init
@@ -29,10 +29,10 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
        sed -i 's,/sbin/init,/bin/busybox init,g' $(TARGET_DIR)/init
        mv $(TARGET_DIR)/init $(TARGET_DIR)/linuxrc
        sed -i 's,eth0,eth1,g' $(TARGET_DIR)/etc/config/network
-    endef
+  endef
 endif
 
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
diff --git a/target/linux/rdc/config/profile-wl153 b/target/linux/rdc/config/profile-wl153
deleted file mode 100644 (file)
index 3ab59a8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# CONFIG_MTD_RDC3210_ALLOW_JFFS2 is not set
-CONFIG_MTD_RDC3210_SIZE=0x200000
index 35cdb37f2ec188409014d96ab0c3d8fd45a0c3c4..aa8acea1ce470ef382929351bf73f90bd3b952de 100644 (file)
@@ -13,9 +13,9 @@ FEATURES:=broken
 
 LINUX_VERSION:=2.6.21.5
 
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
 
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index a6be082d0b943d83c06dd8355d7cc492ddc2460c..e31ef02bb73b6dc28fb80a7922de3841f8dd5cb1 100644 (file)
@@ -25,11 +25,11 @@ LINUX_CONFIG:=$(CURDIR)/config/$(ARCH)
 
 LINUX_VERSION:=2.6.22.4
 
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
 
 # include the profiles
 -include profiles/*.mk
 
 endif
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
index 705cc84ad1e4938b07da69413817972a0755b1b0..771fd191f9b001457ec545bc4dabcf51cc60c89f 100644 (file)
@@ -13,11 +13,11 @@ FEATURES:=squashfs jffs2 ext2
 
 LINUX_VERSION:=2.6.22.4
 
-include $(INCLUDE_DIR)/kernel-build.mk
+include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += kmod-natsemi kmod-ne2k-pci
 
 # include the profiles
 -include profiles/*.mk
 
-$(eval $(call BuildKernel))
+$(eval $(call BuildTarget))
 
index 80bdf485dfad28fd9e0ed40655c52cc2014084e7..cbc726ef013b90cbff93b921b44a0319336b80ba 100644 (file)
@@ -39,6 +39,8 @@ $(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk
 $(curdir)//compile = $(1)/prepare
 $(curdir)//install = $(1)/compile
 
-$(eval $(call stampfile,$(curdir),toolchain,install))
+$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed:
+
+$(eval $(call stampfile,$(curdir),toolchain,install,$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed))
 $(eval $(call subdir,$(curdir)))
 
index 2c865246641b78ae6bcd6ff8fdfb4dbead9c1608..a326bb716f13cb3a0c04ae9cbd64449b9f3f0bac 100644 (file)
@@ -33,7 +33,7 @@ BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
 
 include $(INCLUDE_DIR)/host-build.mk
 
-STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed
+STAMP_BUILT:=$(STAGING_DIR)/stamp/.gcc-initial_installed
 BUILD_DIR1:=$(BUILD_DIR_HOST)/gcc-$(PKG_VERSION)-initial
 BUILD_DIR2:=$(BUILD_DIR_HOST)/gcc-$(PKG_VERSION)-final
 
index d117cbd890f5614bec9f6dc28e532115f95d842a..af2af48e06b39ae0e0c4df7e906b89555705e4a3 100644 (file)
@@ -22,8 +22,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION)
 
 include $(INCLUDE_DIR)/host-build.mk
 
-STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed
-STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc-utils_installed
+STAMP_BUILT:=$(STAGING_DIR)/stamp/.uclibc_installed
+STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.uclibc-utils_installed
 
 UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
                -e 's/i.86/i386/' \