mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-18 20:37:56 +00:00
samples: add rule to dump current .config into a defconfig
... and one to restore it, of course. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
parent
3a0575282f
commit
143c1430c9
@ -15,13 +15,14 @@ _ct_ng () {
|
|||||||
stop_steps=$(echo "${steps}" |sed -r -e 's/(^| )/+\1/;')
|
stop_steps=$(echo "${steps}" |sed -r -e 's/(^| )/+\1/;')
|
||||||
|
|
||||||
actions='help menuconfig oldconfig saveconfig extractconfig
|
actions='help menuconfig oldconfig saveconfig extractconfig
|
||||||
|
defconfig olddefconfig
|
||||||
build build. build-all build-all.
|
build build. build-all build-all.
|
||||||
wiki-samples list-samples list-samples-short list-steps
|
wiki-samples list-samples list-samples-short list-steps
|
||||||
show-tuple show-all show-config
|
show-tuple show-all show-config
|
||||||
clean distclean updatetools
|
clean distclean updatetools
|
||||||
tarball version'
|
tarball version'
|
||||||
|
|
||||||
vars="RESTART= STOP= PREFIX= V="
|
vars="RESTART= STOP= PREFIX= V= DEFCONFIG="
|
||||||
|
|
||||||
ct_ng_opts="${samples} ${show_samples} ${build_samples}
|
ct_ng_opts="${samples} ${show_samples} ${build_samples}
|
||||||
${steps} ${start_steps} ${stop_steps}
|
${steps} ${start_steps} ${stop_steps}
|
||||||
|
@ -60,6 +60,47 @@ Samples can be later recalled by calling
|
|||||||
with the target tuple they represent.
|
with the target tuple they represent.
|
||||||
."
|
."
|
||||||
.TP
|
.TP
|
||||||
|
.B defconfig
|
||||||
|
Save the current configuration to a mini-defconfig file, that contains only
|
||||||
|
the strictly required symbols to reproduce the configuraiton. defconfig files
|
||||||
|
are much smaller than a complete .config, so it is easy to send by mail. As
|
||||||
|
only non-default symbols are present in a defconfig, it easy to spot the
|
||||||
|
meaningfull values. Also, it is easy to use defconfig files with newer
|
||||||
|
versions of
|
||||||
|
.BR crosstool-NG .
|
||||||
|
By default the mini-defconfig is saved to a file named
|
||||||
|
.IR defconfig ,
|
||||||
|
unless the variable
|
||||||
|
.B $DEFCONFIG
|
||||||
|
is set, in which case the mini-defconfig will be saved to the file referenced
|
||||||
|
by
|
||||||
|
.BR $DEFCONFIG .
|
||||||
|
|
||||||
|
Note: only the
|
||||||
|
.I .config
|
||||||
|
file for
|
||||||
|
.B crosstool-NG
|
||||||
|
is saved. Config files for the components are
|
||||||
|
.B not
|
||||||
|
saved. Use
|
||||||
|
.B saveconfig
|
||||||
|
for that
|
||||||
|
."
|
||||||
|
.TP
|
||||||
|
.B olddefconfig
|
||||||
|
Configure
|
||||||
|
.B crosstool-NG
|
||||||
|
using a mini-defconfig file (previously saved with
|
||||||
|
.B defconfig
|
||||||
|
or manually edited). The default mini-defconfig is rad from the file
|
||||||
|
.IR defconfig ,
|
||||||
|
unless the vraiable
|
||||||
|
.B $DEFCONFIG
|
||||||
|
is set, inwhich case the mini-defconfig will be read from the file referenced
|
||||||
|
by
|
||||||
|
.B $DEFCONFIG
|
||||||
|
."
|
||||||
|
.TP
|
||||||
.B build
|
.B build
|
||||||
Builds the configured toolchain.
|
Builds the configured toolchain.
|
||||||
."
|
."
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# The configurators rules
|
# The configurators rules
|
||||||
|
|
||||||
configurators = menuconfig nconfig oldconfig
|
configurators = menuconfig nconfig oldconfig defconfig olddefconfig
|
||||||
PHONY += $(configurators)
|
PHONY += $(configurators)
|
||||||
|
|
||||||
$(configurators): config_files
|
$(configurators): config_files
|
||||||
@ -27,6 +27,14 @@ oldconfig: .config
|
|||||||
@$(ECHO) " CONF $(KCONFIG_TOP)"
|
@$(ECHO) " CONF $(KCONFIG_TOP)"
|
||||||
$(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP)
|
$(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP)
|
||||||
|
|
||||||
|
defconfig: .config
|
||||||
|
@$(ECHO) ' GEN $@'
|
||||||
|
$(SILENT)$(CONF) --savedefconfig=$${CONFIG-defconfig} $(KCONFIG_TOP)
|
||||||
|
|
||||||
|
olddefconfig:
|
||||||
|
@$(ECHO) ' CONF $@'
|
||||||
|
$(SILENT)$(CONF) --defconfig=$${CONFIG-defconfig} $(KCONFIG_TOP)
|
||||||
|
|
||||||
# Always be silent, the stdout an be >.config
|
# Always be silent, the stdout an be >.config
|
||||||
extractconfig:
|
extractconfig:
|
||||||
@$(awk) 'BEGIN { dump=0; } \
|
@$(awk) 'BEGIN { dump=0; } \
|
||||||
@ -50,3 +58,6 @@ help-config::
|
|||||||
@echo ' oldconfig - Update current config using a provided .config as base'
|
@echo ' oldconfig - Update current config using a provided .config as base'
|
||||||
@echo ' extractconfig - Extract to stdout the configuration items from a'
|
@echo ' extractconfig - Extract to stdout the configuration items from a'
|
||||||
@echo ' build.log file piped to stdin'
|
@echo ' build.log file piped to stdin'
|
||||||
|
@echo ' defconfig - Save current config as a mini-defconfig to $${CONFIG}'
|
||||||
|
@echo ' olddefconfig - Update config from a mini-defconfig $${CONFIG}'
|
||||||
|
@echo ' (default: $${CONFIG}=./defconfig)'
|
||||||
|
Loading…
Reference in New Issue
Block a user