📄 editing-an-ecos-savefile.html
字号:
><PRE
CLASS="SCREEN"
>cdl_option CYGSEM_KERNEL_EXCEPTIONS_DECODE {
# This option is not active
# The parent CYGPKG_KERNEL_EXCEPTIONS is disabled
...
};
...
cdl_option CYGIMP_IDLE_THREAD_YIELD {
# This option is not active
# ActiveIf constraint: (CYGNUM_KERNEL_SCHED_PRIORITIES == 1)
# CYGNUM_KERNEL_SCHED_PRIORITIES == 32
# --> 0
...
}; </PRE
></TD
></TR
></TABLE
><P
>For <TT
CLASS="LITERAL"
>CYGIMP_IDLE_THREAD_YIELD</TT
> the
savefile lists the expression that must be satisfied if the option
is to be active, followed by the current value of all entities that
are referenced in the expression, and finally the result of evaluating
that expression.</P
><P
>Not all options are directly modifiable in the savefile. First,
the value of packages (which is the version of that package loaded
into the configuration) cannot be modified here.</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_package CYGPKG_KERNEL {
# Packages cannot be added or removed, nor can their version be changed,
# simply by editing their value. Instead the appropriate configuration
# should be used to perform these actions.
...
}; </PRE
></TD
></TR
></TABLE
><P
>The version of a package can be changed using e.g.: </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>$ ecosconfig version 1.3 CYGPKG_KERNEL</PRE
></TD
></TR
></TABLE
><P
>Even though a package’s value cannot be modified
here, it is still important for the savefile to contain the details.
In particular packages may impose constraints on other configurable
entities and may be referenced by other configurable entities. Also
it would be difficult to understand or extract the configuration’s
hierarchy if the packages were not listed in the appropriate places
in the savefile.</P
><P
>Some components (or, conceivably, options) do not have any
associated data. Typically they serve only to introduce another
level in the hierarchy, which can be useful in the context of the
GUI configuration tool.</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_component CYGPKG_HAL_COMMON_INTERRUPTS {
# There is no associated value.
}; </PRE
></TD
></TR
></TABLE
><P
>Other components or options have a calculated value. These
are not user-modifiable, but typically the value will depend on
other options which can be modified. Such calculated options can
be useful when controlling what gets built or what ends up in the
generated configuration header files. A calculated value may also
effect other parts of the configuration, for instance, via a <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>requires</I
></SPAN
> constraint.</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_option BUFSIZ {
# Calculated value: CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO ? CYGNUM_LIBC_STDIO_BUFSIZE : 0
# CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO == 1
# CYGNUM_LIBC_STDIO_BUFSIZE == 256
# Current_value: 256
}; </PRE
></TD
></TR
></TABLE
><P
>A special type of calculated value is the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>interface</I
></SPAN
>.
The value of an interface is the number of active and enabled options
which <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>implement</I
></SPAN
> that interface. Again the value
of an interface cannot be modified directly; only by modifying the
options which implement the interface. However, an interface can
be referenced by other parts of the configuration. </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>cdl_interface CYGINT_KERNEL_SCHEDULER {
# Implemented by CYGSEM_KERNEL_SCHED_MLQUEUE, active, enabled
# Implemented by CYGSEM_KERNEL_SCHED_BITMAP, active, disabled
# This value cannot be modified here.
# Current_value: 1
# Requires: 1 == CYGINT_KERNEL_SCHEDULER
# CYGINT_KERNEL_SCHEDULER == 1
# --> 1 </PRE
></TD
></TR
></TABLE
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
># The following properties are affected by this value
# interface CYGINT_KERNEL_SCHEDULER
# Requires: 1 == CYGINT_KERNEL_SCHEDULER
}; </PRE
></TD
></TR
></TABLE
><P
>If the configurable entity is modifiable then there will be
lines like the following:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>
cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE {
...
# Flavor: bool
# No user value, uncomment the following line to provide one.
# user_value 1
# value_source default
# Default value: 1
...
}; </PRE
></TD
></TR
></TABLE
><P
>Configurable entities can have one of four different flavors:
none, bool, data and booldata. Flavor none indicates that there
is no data associated with the entity, typically it just acts as
a placeholder in the overall hierarchy. Flavor bool is the most
common, it is a simple yes-or-no choice. Flavor data is for more
complicated configuration choices, for instance the size of an array
or the name of a device. Flavor booldata is a combination of bool
and data: the option can be enabled or disabled, and there is some
additional data associated with the option as well.</P
><P
>In the above example the user has not modified this particular
option, as indicated by the comment and by the commented-out <TT
CLASS="LITERAL"
>user_value</TT
> line.
To disable this option the file should be edited to:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_option CYGSEM_KERNEL_SCHED_MLQUEUE {
...
# Flavor: bool
# No user value, uncomment the following line to provide one.
user_value 0
# value_source default
# Default value: 1
...
} </PRE
></TD
></TR
></TABLE
><P
>The comment preceding the <TT
CLASS="LITERAL"
>user_value
0</TT
> line can be removed if desired, otherwise it
will be removed automatically the next time the file is read and
updated by the configuration tools.</P
><P
>Much the same process should be used for options with the
data flavor, for example:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>
cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
# Flavor: data
# No user value, uncomment the following line to provide one.
# user_value 3600
# value_source default
# Default value: 3600
# Legal values: -90000 to 90000
}; </PRE
></TD
></TR
></TABLE
><P
>can be changed to:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
# Flavor: data
user_value 7200
# value_source default
# Default value: 3600
# Legal values: -90000 to 90000 }; </PRE
></TD
></TR
></TABLE
><P
>Note that the original text provides the default value in
the <TT
CLASS="LITERAL"
>user_value</TT
> comment,
on the assumption that the desired new value is likely to be similar
to the default value. The <TT
CLASS="LITERAL"
>value_source</TT
> comment
does not need to be updated, it will be fixed up if the savefile
is fed back into the configuration system and regenerated.</P
><P
>For options with the booldata flavor, the <TT
CLASS="LITERAL"
>user_value</TT
> line
needs take two arguments. The first argument is for the boolean
part, the second for the data part. For example:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>
cdl_component CYGNUM_LIBM_COMPATIBILITY {
# Flavor: booldata
# No user value, uncomment the following line to provide one.
# user_value 1 POSIX
# value_source default
# Default value: 1 POSIX
# Legal values: “POSIX” “IEEE” “XOPEN” “SVID”
...
}; </PRE
></TD
></TR
></TABLE
><P
>could be changed to:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>
cdl_component CYGNUM_LIBM_COMPATIBILITY {
# Flavor: booldata
user_value 1 IEEE
# value_source default
# Default value: 1 POSIX
# Legal values: “POSIX” “IEEE” “XOPEN” “SVID”
...
}; </PRE
></TD
></TR
></TABLE
><P
>or alternatively, if the whole component should be disabled,
to:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>
cdl_component CYGNUM_LIBM_COMPATIBILITY {
# Flavor: booldata
user_value 0 POSIX
# value_source default
# Default value: 1 POSIX
# Legal values: “POSIX” “IEEE” “XOPEN” “SVID”
...
}; </PRE
></TD
></TR
></TABLE
><P
>Some options take values that span multiple lines. An example
would be:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_option CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS {
# Flavor: data
# No user value, uncomment the following line to provide one.
# user_value \
# “CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \\
# CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \\
# CYG_UIT_MEMPOOLVAR( vpool3, 2000 ),”
# value_source default
# Default value: \
# “CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \\
# CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \\
# CYG_UIT_MEMPOOLVAR( vpool3, 2000 ),”
}; </PRE
></TD
></TR
></TABLE
><P
>Setting a user value for this option involves uncommenting
and modifying all relevant lines, for example:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_option CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS {
# Flavor: data
user_value \
“CYG_UIT_MEMPOOLVAR( vpool1, 4000 ), \\
CYG_UIT_MEMPOOLVAR( vpool2, 4000 ),”
# value_source default
# Default value: \
# “CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \\
# CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \\
# CYG_UIT_MEMPOOLVAR( vpool3, 2000 ),”
}; </PRE
></TD
></TR
></TABLE
><P
>In such cases appropriate care has to be taken to preserve
Tcl syntax, as discussed below.</P
><P
>The configuration system has the ability to keep track of
several different values for any given option. All options
start off with a default value, in other words their value
source is set to <TT
CLASS="LITERAL"
>default</TT
>. If a
configuration involves conflicts and the configuration
system’s inference engine is allowed to resolve these
automatically then it may provide an
<TT
CLASS="LITERAL"
>inferred</TT
> value instead, for
example:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
# Flavor: bool
# No user value, uncomment the following line to provide one.
# user_value 1
# The inferred value should not be edited directly.
inferred_value 0
# value_source inferred
# Default value: 1
...
}; </PRE
></TD
></TR
></TABLE
><P
>Inferred values are calculated by the configuration system
and should not be edited by the user. If the inferred value is not
correct then a user value should be substituted instead:</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cdl_option CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT {
# Flavor: bool
user_value 1
# The inferred value should not be edited directly.
inferred_value 0
# value_source inferred
# Default value: 1
...
}; </PRE
></TD
></TR
></TABLE
><P
>The inference engine will not override a user value with an
inferred one. Making a change like this may well re-introduce a
conflict, since the inferred value was only calculated to resolve
a conflict. Another run of the inference engine may find a different
and more acceptable way of resolving the conflict, but this is not guaranteed
and it may be up to the user to examine the various dependencies
and work out an acceptable solution.</P
><P
>Inferred values are listed in the savefile because the exact
inferred value may depend on the order in which changes were made
and conflicts were resolved. If the inferred values were absent
then it is possible that reloading a savefile would not exactly
restore the configuration. Default values on the other hand are
entirely deterministic so there is no actual need for the values
to be listed in the savefile. However, the default value can be
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -