new file mode 100755
@@ -0,0 +1,41 @@
+#!/usr/bin/env perl
+use strict;
+
+print <<EOF;
+config ALL
+ bool
+ default y
+
+EOF
+
+while (<>) {
+ chomp;
+ next if /^CONFIG_SIGNED_PACKAGES/;
+ next unless /^CONFIG_([^=]+)=(.*)$/;
+
+ my $var = $1;
+ my $val = $2;
+ my $type;
+
+ next if $var eq 'ALL';
+
+ if ($val eq 'y') {
+ $type = "bool";
+ } elsif ($val eq 'm') {
+ $type = "tristate";
+ } elsif ($val =~ /^".*"$/) {
+ $type = "string";
+ } elsif ($val =~ /^\d+$/) {
+ $type = "int";
+ } else {
+ warn "WARNING: no type found for symbol CONFIG_$var=$val\n";
+ next;
+ }
+
+ print <<EOF;
+config $var
+ $type
+ default $val
+
+EOF
+}
@@ -25,11 +25,20 @@ $(BIN_DIR)/$(IB_NAME).tar.bz2: clean
rm -rf $(PKG_BUILD_DIR)
mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
$(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
- -cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
+ cd $(TOPDIR) && find target/linux -name 'Config.in' -print0 | xargs -0 -I\{\} sh -c 'mkdir -p $(PKG_BUILD_DIR)/$$(dirname {}); $(CP) -L {} $(PKG_BUILD_DIR)/'
+ mkdir -p $(PKG_BUILD_DIR)/config
+ $(TOPDIR)/target/convert-config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/config/fromdotconfig.in
+ mkdir -p $(PKG_BUILD_DIR)/target
+ $(CP) $(TOPDIR)/target/Config.in $(PKG_BUILD_DIR)/target/
+ sed -e 's/CONFIG_SIGNED_PACKAGES=y/# CONFIG_SIGNED_PACKAGES is not set/' $(TOPDIR)/.config | \
+ sed -e 's/CONFIG_MAKE_TOOLCHAIN=y/# CONFIG_MAKE_TOOLCHAIN is not set/' \
+ > $(PKG_BUILD_DIR)/.config
$(CP) \
$(INCLUDE_DIR) $(SCRIPT_DIR) \
$(TOPDIR)/rules.mk \
./files/Makefile \
+ $(TOPDIR)/config \
+ ./files/Config.in \
./files/repositories.conf \
$(TMP_DIR)/.targetinfo \
$(TMP_DIR)/.packageinfo \
new file mode 100644
@@ -0,0 +1,23 @@
+# Copyright (C) 2006-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+mainmenu "OpenWrt Configuration"
+
+source "config/fromdotconfig.in"
+
+config MODULES
+ option modules
+ bool
+ default y
+
+config HAVE_DOT_CONFIG
+ bool
+ default y
+
+source "config/Config-images.in"
+
+source "config/Config-version.in"
+
@@ -33,6 +33,7 @@ Available Commands:
info: Show a list of available target profiles
clean: Remove images and temporary build files
image: Build an image (see below for more information).
+ menuconfig: Alter image generation configuration
Building images:
By default 'make image' will create an image with the default
@@ -201,3 +202,23 @@ endif
.SILENT: help info image
+scripts/config/mconf:
+ @$(MAKE) -s -C scripts/config all CC="$(HOSTCC_WRAPPER)"
+
+$(eval $(call rdep,scripts/config,scripts/config/mconf))
+
+scripts/config/conf:
+ @$(MAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
+
+config: scripts/config/conf FORCE
+ $< Config.in
+
+oldconfig: scripts/config/conf FORCE
+ $< --$(if $(confdefault),$(confdefault),old)config Config.in
+
+menuconfig: scripts/config/mconf FORCE
+ if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
+ cp $(HOME)/.openwrt/defconfig .config; \
+ fi
+ $< Config.in
+
@@ -91,7 +91,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2: clean
rm -rf \
$(SDK_BUILD_DIR)/target/linux/*/files* \
$(SDK_BUILD_DIR)/target/linux/*/patches*
- ./convert-config.pl $(TOPDIR)/.config > $(SDK_BUILD_DIR)/Config-build.in
+ $(TOPDIR)/target/convert-config.pl $(TOPDIR)/.config > $(SDK_BUILD_DIR)/Config-build.in
$(CP) -L \
$(TOPDIR)/LICENSE \
$(TOPDIR)/rules.mk \
deleted file mode 100755
@@ -1,41 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-
-print <<EOF;
-config ALL
- bool
- default y
-
-EOF
-
-while (<>) {
- chomp;
- next if /^CONFIG_SIGNED_PACKAGES/;
- next unless /^CONFIG_([^=]+)=(.*)$/;
-
- my $var = $1;
- my $val = $2;
- my $type;
-
- next if $var eq 'ALL';
-
- if ($val eq 'y') {
- $type = "bool";
- } elsif ($val eq 'm') {
- $type = "tristate";
- } elsif ($val =~ /^".*"$/) {
- $type = "string";
- } elsif ($val =~ /^\d+$/) {
- $type = "int";
- } else {
- warn "WARNING: no type found for symbol CONFIG_$var=$val\n";
- next;
- }
-
- print <<EOF;
-config $var
- $type
- default $val
-
-EOF
-}