diff options
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | docs/overview.txt | 16 | ||||
-rw-r--r-- | kconfig/kconfig.mk | 10 | ||||
-rwxr-xr-x | tools/extract-config.sh (renamed from tools/ct-ng.extract-config) | 4 |
4 files changed, 27 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in index 70541f3..4940eff 100644 --- a/Makefile.in +++ b/Makefile.in @@ -66,11 +66,9 @@ clean-doc: #-------------------------------------- # Install rules -install-bin: install-lib $(BINDIR) +install-bin: $(BINDIR) @echo " INST ct-ng" @install -m 755 ct-ng $(BINDIR)/ct-ng - @echo " LN ct-ng.extract-config" - @ln -sf $(LIBDIR)/tools/ct-ng.extract-config $(BINDIR)/ct-ng.extract-config install-lib: $(LIBDIR) install-lib-main install-lib-samples diff --git a/docs/overview.txt b/docs/overview.txt index 9b30589..1f936c2 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -165,6 +165,22 @@ CT_BROKEN: brave enough, you can try and debug them. They are hidden behind CT_BROKEN, which itself is hiddent behind EXPERIMENTAL. +Re-building an existing toolchain | +----------------------------------+ + +If you have an existing toolchain, you can re-use the options used to build it +to create a new toolchain. That needs a very little bit of effort on your side +but is quite easy. The options to build a toolchain are saved in the build log +file that is saved within the toolchain. crosstool-NG can extract those options +to recreate a new configuration: + ct-ng extractconfig </path/to/your/build.log + +will extract those options, prompt you for the new ones, which you can later +edit with menuconfig. + +Of course, if your build log was compressed, you'd have to use something like: + bzcat /path/to/your/build.log.bz2 |ct-ng extractconfig + ________________________ / Running crosstool-NG / diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk index 4765374..d812e82 100644 --- a/kconfig/kconfig.mk +++ b/kconfig/kconfig.mk @@ -7,7 +7,7 @@ export PROJECTVERSION=$(CT_VERSION) KCONFIG_TOP = config/config.in obj = $(CT_TOP_DIR)/kconfig -PHONY += clean help oldconfig menuconfig config defoldconfig +PHONY += clean help oldconfig menuconfig config defoldconfig extractconfig # Darwin (MacOS-X) does not have proper libintl support ifeq ($(shell uname -s),Darwin) @@ -51,7 +51,7 @@ $(CT_TOP_DIR)/config.gen/tools.in:: $(TOOLS_CONFIG_FILES) done >>$@ @echo "endmenu" >>$@ -config menuconfig oldconfig defoldconfig:: $(KCONFIG_TOP) +config menuconfig oldconfig defoldconfig extractconfig:: $(KCONFIG_TOP) $(KCONFIG_TOP): @ln -s $(CT_LIB_DIR)/config config @@ -68,11 +68,17 @@ oldconfig:: $(obj)/conf $(CONFIG_FILES) defoldconfig:: $(obj)/conf $(CONFIG_FILES) @yes "" |$< -s $(KCONFIG_TOP) >/dev/null +extractconfig:: $(obj)/conf $(CONFIG_FILES) + @$(CT_LIB_DIR)/tools/extract-config.sh >.config + @$< -s $(KCONFIG_TOP) + # Help text used by make help help-config:: @echo ' config - Update current config using a line-oriented program' @echo ' menuconfig - Update current config using a menu based program' @echo ' oldconfig - Update current config using a provided .config as base' + @echo ' extractconfig - Create a new config using options extracted from a' + @echo ' build log piped into stdin' # Cheesy build diff --git a/tools/ct-ng.extract-config b/tools/extract-config.sh index 8221d86..b5c77c6 100755 --- a/tools/ct-ng.extract-config +++ b/tools/extract-config.sh @@ -3,9 +3,9 @@ # This scripts extracts a crosstool-NG configuration from the log file # of a toolchain build with crosstool-NG. -# Usage: $0 <logfile> +# Usage: cat <logfile> |$0 -cat "$1" |awk ' +awk ' BEGIN { dump = 0; } |