Separate the architecture config file and function script.
/trunk/kconfig/kconfig.mk | 46 23 23 0 +++++++++++++++++++++++-----------------------
/trunk/scripts/crosstool.sh | 2 1 1 0 +-
/trunk/docs/overview.txt | 28 11 17 0 +++++++++++-----------------
3 files changed, 35 insertions(+), 41 deletions(-)
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/config/arch/alpha.in Sun Oct 05 15:32:00 2008 +0000
1.3 @@ -0,0 +1,62 @@
1.4 +# Alpha specific configuration file
1.5 +
1.6 +config ARCH_alpha
1.7 + select ARCH_SUPPORT_CPU
1.8 + select ARCH_SUPPORT_TUNE
1.9 + help
1.10 + The Alpha architecture.
1.11 +
1.12 +choice
1.13 + bool
1.14 + prompt "Variant"
1.15 +
1.16 +config ARCH_ALPHA_EV4
1.17 + bool
1.18 + prompt "EV4"
1.19 +
1.20 +config ARCH_ALPHA_EV45
1.21 + bool
1.22 + prompt "EV45"
1.23 +
1.24 +config ARCH_ALPHA_EV5
1.25 + bool
1.26 + prompt "EV5"
1.27 +
1.28 +config ARCH_ALPHA_EV56
1.29 + bool
1.30 + prompt "EV56"
1.31 +
1.32 +config ARCH_ALPHA_EV6
1.33 + bool
1.34 + prompt "EV6"
1.35 +
1.36 +config ARCH_ALPHA_EV67
1.37 + bool
1.38 + prompt "EV67"
1.39 +
1.40 +endchoice
1.41 +
1.42 +config ARCH_ALPHA_VARIANT
1.43 + string
1.44 + default "ev4" if ARCH_ALPHA_EV4
1.45 + default "ev45" if ARCH_ALPHA_EV45
1.46 + default "ev5" if ARCH_ALPHA_EV5
1.47 + default "ev56" if ARCH_ALPHA_EV56
1.48 + default "ev6" if ARCH_ALPHA_EV6
1.49 + default "ev67" if ARCH_ALPHA_EV67
1.50 +
1.51 +config ARCH_CPU
1.52 + default "ev4" if ARCH_ALPHA_EV4
1.53 + default "ev45" if ARCH_ALPHA_EV45
1.54 + default "ev5" if ARCH_ALPHA_EV5
1.55 + default "ev56" if ARCH_ALPHA_EV56
1.56 + default "ev6" if ARCH_ALPHA_EV6
1.57 + default "ev67" if ARCH_ALPHA_EV67
1.58 +
1.59 +config ARCH_TUNE
1.60 + default "ev4" if ARCH_ALPHA_EV4
1.61 + default "ev45" if ARCH_ALPHA_EV45
1.62 + default "ev5" if ARCH_ALPHA_EV5
1.63 + default "ev56" if ARCH_ALPHA_EV56
1.64 + default "ev6" if ARCH_ALPHA_EV6
1.65 + default "ev67" if ARCH_ALPHA_EV67
2.1 --- a/config/arch/alpha/config.in Sun Oct 05 12:32:42 2008 +0000
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,62 +0,0 @@
2.4 -# Alpha specific configuration file
2.5 -
2.6 -config ARCH_alpha
2.7 - select ARCH_SUPPORT_CPU
2.8 - select ARCH_SUPPORT_TUNE
2.9 - help
2.10 - The Alpha architecture.
2.11 -
2.12 -choice
2.13 - bool
2.14 - prompt "Variant"
2.15 -
2.16 -config ARCH_ALPHA_EV4
2.17 - bool
2.18 - prompt "EV4"
2.19 -
2.20 -config ARCH_ALPHA_EV45
2.21 - bool
2.22 - prompt "EV45"
2.23 -
2.24 -config ARCH_ALPHA_EV5
2.25 - bool
2.26 - prompt "EV5"
2.27 -
2.28 -config ARCH_ALPHA_EV56
2.29 - bool
2.30 - prompt "EV56"
2.31 -
2.32 -config ARCH_ALPHA_EV6
2.33 - bool
2.34 - prompt "EV6"
2.35 -
2.36 -config ARCH_ALPHA_EV67
2.37 - bool
2.38 - prompt "EV67"
2.39 -
2.40 -endchoice
2.41 -
2.42 -config ARCH_ALPHA_VARIANT
2.43 - string
2.44 - default "ev4" if ARCH_ALPHA_EV4
2.45 - default "ev45" if ARCH_ALPHA_EV45
2.46 - default "ev5" if ARCH_ALPHA_EV5
2.47 - default "ev56" if ARCH_ALPHA_EV56
2.48 - default "ev6" if ARCH_ALPHA_EV6
2.49 - default "ev67" if ARCH_ALPHA_EV67
2.50 -
2.51 -config ARCH_CPU
2.52 - default "ev4" if ARCH_ALPHA_EV4
2.53 - default "ev45" if ARCH_ALPHA_EV45
2.54 - default "ev5" if ARCH_ALPHA_EV5
2.55 - default "ev56" if ARCH_ALPHA_EV56
2.56 - default "ev6" if ARCH_ALPHA_EV6
2.57 - default "ev67" if ARCH_ALPHA_EV67
2.58 -
2.59 -config ARCH_TUNE
2.60 - default "ev4" if ARCH_ALPHA_EV4
2.61 - default "ev45" if ARCH_ALPHA_EV45
2.62 - default "ev5" if ARCH_ALPHA_EV5
2.63 - default "ev56" if ARCH_ALPHA_EV56
2.64 - default "ev6" if ARCH_ALPHA_EV6
2.65 - default "ev67" if ARCH_ALPHA_EV67
3.1 --- a/config/arch/alpha/functions Sun Oct 05 12:32:42 2008 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,9 +0,0 @@
3.4 -# Compute Alpha-specific values
3.5 -
3.6 -CT_DoArchValues () {
3.7 - # The architecture part of the tuple:
3.8 - CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_ALPHA_VARIANT}"
3.9 -
3.10 - # The kernel ARCH:
3.11 - CT_KERNEL_ARCH=${CT_ARCH}
3.12 -}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/config/arch/arm.in Sun Oct 05 15:32:00 2008 +0000
4.3 @@ -0,0 +1,26 @@
4.4 +# ARM specific configuration file
4.5 +
4.6 +config ARCH_arm
4.7 + select ARCH_SUPPORTS_BOTH_ENDIAN
4.8 + select ARCH_DEFAULT_LE
4.9 + select ARCH_SUPPORT_ARCH
4.10 + select ARCH_SUPPORT_CPU
4.11 + select ARCH_SUPPORT_TUNE
4.12 + select ARCH_SUPPORT_FPU
4.13 + help
4.14 + The ARM architecture, as defined by:
4.15 + http://www.arm.com/
4.16 +
4.17 +config ARCH_ARM_EABI
4.18 + bool
4.19 + prompt "Use EABI"
4.20 + default n
4.21 + help
4.22 + Set up the toolchain so that it generates EABI-compliant binaries.
4.23 +
4.24 +config ARCH_ARM_ABI_OK
4.25 + bool
4.26 + default y
4.27 + depends on ! ARCH_ARM_EABI
4.28 + select ARCH_SUPPORT_ABI
4.29 +
5.1 --- a/config/arch/arm/config.in Sun Oct 05 12:32:42 2008 +0000
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,26 +0,0 @@
5.4 -# ARM specific configuration file
5.5 -
5.6 -config ARCH_arm
5.7 - select ARCH_SUPPORTS_BOTH_ENDIAN
5.8 - select ARCH_DEFAULT_LE
5.9 - select ARCH_SUPPORT_ARCH
5.10 - select ARCH_SUPPORT_CPU
5.11 - select ARCH_SUPPORT_TUNE
5.12 - select ARCH_SUPPORT_FPU
5.13 - help
5.14 - The ARM architecture, as defined by:
5.15 - http://www.arm.com/
5.16 -
5.17 -config ARCH_ARM_EABI
5.18 - bool
5.19 - prompt "Use EABI"
5.20 - default n
5.21 - help
5.22 - Set up the toolchain so that it generates EABI-compliant binaries.
5.23 -
5.24 -config ARCH_ARM_ABI_OK
5.25 - bool
5.26 - default y
5.27 - depends on ! ARCH_ARM_EABI
5.28 - select ARCH_SUPPORT_ABI
5.29 -
6.1 --- a/config/arch/arm/functions Sun Oct 05 12:32:42 2008 +0000
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,17 +0,0 @@
6.4 -# Compute ARM-specific values
6.5 -
6.6 -CT_DoArchValues() {
6.7 - # The architecture part of the tuple:
6.8 - CT_TARGET_ARCH="${CT_ARCH}${target_endian_eb}"
6.9 -
6.10 - # The system part of the tuple:
6.11 - case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
6.12 - *glibc,y) CT_TARGET_SYS=gnueabi;;
6.13 - uClibc,y) CT_TARGET_SYS=uclibcgnueabi;;
6.14 - none,y) CT_TARGET_SYS=eabi;;
6.15 - esac
6.16 -
6.17 - # In case we're EABI, do *not* specify any ABI!
6.18 - # which means, either we do not have an ABI specified, or we're not EABI.
6.19 - CT_TestOrAbort "Internal error: CT_ARCH_ABI should not be set for EABI build." -z "${CT_ARCH_ABI}" -o -z "${CT_ARCH_ARM_EABI}"
6.20 -}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/config/arch/ia64.in Sun Oct 05 15:32:00 2008 +0000
7.3 @@ -0,0 +1,8 @@
7.4 +# ia64 specific config options
7.5 +# EXPERIMENTAL
7.6 +
7.7 +config ARCH_ia64
7.8 + select ARCH_SUPPORTS_BOTH_ENDIAN
7.9 + help
7.10 + The ia64 architecture, as defined by:
7.11 + http://www.intel.com/design/itanium/arch_spec.htm
8.1 --- a/config/arch/ia64/config.in Sun Oct 05 12:32:42 2008 +0000
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,8 +0,0 @@
8.4 -# ia64 specific config options
8.5 -# EXPERIMENTAL
8.6 -
8.7 -config ARCH_ia64
8.8 - select ARCH_SUPPORTS_BOTH_ENDIAN
8.9 - help
8.10 - The ia64 architecture, as defined by:
8.11 - http://www.intel.com/design/itanium/arch_spec.htm
9.1 --- a/config/arch/ia64/functions Sun Oct 05 12:32:42 2008 +0000
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,6 +0,0 @@
9.4 -# Compute IA-64-specific values
9.5 -
9.6 -CT_DoArchValues() {
9.7 - # The architecture part of the tuple:
9.8 - CT_TARGET_ARCH="${CT_ARCH}"
9.9 -}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/config/arch/mips.in Sun Oct 05 15:32:00 2008 +0000
10.3 @@ -0,0 +1,11 @@
10.4 +# MIPS specific config options
10.5 +
10.6 +config ARCH_mips
10.7 + select ARCH_SUPPORTS_BOTH_ENDIAN
10.8 + select ARCH_DEFAULT_BE
10.9 + select ARCH_SUPPORT_ARCH
10.10 + select ARCH_SUPPORT_ABI
10.11 + select ARCH_SUPPORT_TUNE
10.12 + help
10.13 + The MIPS architecture, as defined by:
10.14 + http://www.mips.com/
11.1 --- a/config/arch/mips/config.in Sun Oct 05 12:32:42 2008 +0000
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,11 +0,0 @@
11.4 -# MIPS specific config options
11.5 -
11.6 -config ARCH_mips
11.7 - select ARCH_SUPPORTS_BOTH_ENDIAN
11.8 - select ARCH_DEFAULT_BE
11.9 - select ARCH_SUPPORT_ARCH
11.10 - select ARCH_SUPPORT_ABI
11.11 - select ARCH_SUPPORT_TUNE
11.12 - help
11.13 - The MIPS architecture, as defined by:
11.14 - http://www.mips.com/
12.1 --- a/config/arch/mips/functions Sun Oct 05 12:32:42 2008 +0000
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,12 +0,0 @@
12.4 -# Compute IA-64-specific values
12.5 -
12.6 -CT_DoArchValues() {
12.7 - # The architecture part of the tuple:
12.8 - CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
12.9 -
12.10 - # Override CFLAGS for endianness:
12.11 - case "${CT_ARCH_BE},${CT_ARCH_LE}" in
12.12 - y,) CT_ARCH_ENDIAN_CFLAG="-EB";;
12.13 - ,y) CT_ARCH_ENDIAN_CFLAG="-EL";;
12.14 - esac
12.15 -}
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/config/arch/powerpc.in Sun Oct 05 15:32:00 2008 +0000
13.3 @@ -0,0 +1,25 @@
13.4 +# powerpc specific configuration file
13.5 +
13.6 +config ARCH_powerpc
13.7 + select ARCH_SUPPORT_ABI
13.8 + select ARCH_SUPPORT_CPU
13.9 + select ARCH_SUPPORT_TUNE
13.10 + help
13.11 + The PowerPC architecture, as defined by:
13.12 + http://www.ibm.com/developerworks/eserver/articles/archguide.html
13.13 +
13.14 +config ARCH_POWERPC_SPE
13.15 + bool
13.16 + prompt "Enable SPE support"
13.17 + default n
13.18 + help
13.19 + Add support for the Signal Processing Engine. This will set up
13.20 + the toolchain so that it supports the SPE ABI extensions. This
13.21 + mainly targets Freescale e500 processors.
13.22 +
13.23 + Setting this option will append "spe" to the end of your target
13.24 + tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
13.25 + configure/build system will know to include SPE ABI support.
13.26 + It will also automatically add "-mabi=spe -mspe" to your
13.27 + TARGET_CFLAGS, and "--enable-e500_double" to your CC_EXTRA_CONFIG,
13.28 + so you do not need to explicitly add them.
14.1 --- a/config/arch/powerpc/config.in Sun Oct 05 12:32:42 2008 +0000
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,25 +0,0 @@
14.4 -# powerpc specific configuration file
14.5 -
14.6 -config ARCH_powerpc
14.7 - select ARCH_SUPPORT_ABI
14.8 - select ARCH_SUPPORT_CPU
14.9 - select ARCH_SUPPORT_TUNE
14.10 - help
14.11 - The PowerPC architecture, as defined by:
14.12 - http://www.ibm.com/developerworks/eserver/articles/archguide.html
14.13 -
14.14 -config ARCH_POWERPC_SPE
14.15 - bool
14.16 - prompt "Enable SPE support"
14.17 - default n
14.18 - help
14.19 - Add support for the Signal Processing Engine. This will set up
14.20 - the toolchain so that it supports the SPE ABI extensions. This
14.21 - mainly targets Freescale e500 processors.
14.22 -
14.23 - Setting this option will append "spe" to the end of your target
14.24 - tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
14.25 - configure/build system will know to include SPE ABI support.
14.26 - It will also automatically add "-mabi=spe -mspe" to your
14.27 - TARGET_CFLAGS, and "--enable-e500_double" to your CC_EXTRA_CONFIG,
14.28 - so you do not need to explicitly add them.
15.1 --- a/config/arch/powerpc/functions Sun Oct 05 12:32:42 2008 +0000
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,22 +0,0 @@
15.4 -# Compute powerpc-specific values
15.5 -
15.6 -CT_DoArchValues () {
15.7 - # The architecture part of the tuple:
15.8 - CT_TARGET_ARCH="${CT_ARCH}"
15.9 -
15.10 - # The kernel ARCH:
15.11 - CT_KERNEL_ARCH=powerpc
15.12 -
15.13 - # Add spe in the tuplet if needed
15.14 - case "${CT_LIBC},${CT_ARCH_POWERPC_SPE}" in
15.15 - glibc,|eglibc,) CT_TARGET_SYS=gnu;;
15.16 - glibc,y|eglibc,y) CT_TARGET_SYS=gnuspe;;
15.17 - esac
15.18 -
15.19 - # Add extra flags for SPE if needed
15.20 - if [ "${CT_ARCH_POWERPC_SPE}" = "y" ]; then
15.21 - CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe"
15.22 - CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double"
15.23 - CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"
15.24 - fi
15.25 -}
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/config/arch/sh.in Sun Oct 05 15:32:00 2008 +0000
16.3 @@ -0,0 +1,33 @@
16.4 +# Super-H specific configuration file
16.5 +# EXPERIMENTAL
16.6 +
16.7 +config ARCH_sh
16.8 + select ARCH_SUPPORTS_BOTH_ENDIAN
16.9 + select ARCH_DEFAULT_LE
16.10 + help
16.11 + The Super-H architecture, as defined by:
16.12 + http://www.renesas.com/fmwk.jsp?cnt=superh_family_landing.jsp&fp=/products/mpumcu/superh_family/
16.13 +
16.14 +choice
16.15 + bool
16.16 + prompt "Variant"
16.17 +
16.18 +config ARCH_SH_SH3
16.19 + bool
16.20 + prompt "sh3"
16.21 +
16.22 +config ARCH_SH_SH4
16.23 + bool
16.24 + prompt "sh4"
16.25 +
16.26 +config ARCH_SH_SH4A
16.27 + bool
16.28 + prompt "sh4a"
16.29 +
16.30 +endchoice
16.31 +
16.32 +config ARCH_SH_VARIANT
16.33 + string
16.34 + default "sh3" if ARCH_SH_SH3
16.35 + default "sh4" if ARCH_SH_SH4
16.36 + default "sh4a" if ARCH_SH_SH4A
17.1 --- a/config/arch/sh/config.in Sun Oct 05 12:32:42 2008 +0000
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,33 +0,0 @@
17.4 -# Super-H specific configuration file
17.5 -# EXPERIMENTAL
17.6 -
17.7 -config ARCH_sh
17.8 - select ARCH_SUPPORTS_BOTH_ENDIAN
17.9 - select ARCH_DEFAULT_LE
17.10 - help
17.11 - The Super-H architecture, as defined by:
17.12 - http://www.renesas.com/fmwk.jsp?cnt=superh_family_landing.jsp&fp=/products/mpumcu/superh_family/
17.13 -
17.14 -choice
17.15 - bool
17.16 - prompt "Variant"
17.17 -
17.18 -config ARCH_SH_SH3
17.19 - bool
17.20 - prompt "sh3"
17.21 -
17.22 -config ARCH_SH_SH4
17.23 - bool
17.24 - prompt "sh4"
17.25 -
17.26 -config ARCH_SH_SH4A
17.27 - bool
17.28 - prompt "sh4a"
17.29 -
17.30 -endchoice
17.31 -
17.32 -config ARCH_SH_VARIANT
17.33 - string
17.34 - default "sh3" if ARCH_SH_SH3
17.35 - default "sh4" if ARCH_SH_SH4
17.36 - default "sh4a" if ARCH_SH_SH4A
18.1 --- a/config/arch/sh/functions Sun Oct 05 12:32:42 2008 +0000
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,32 +0,0 @@
18.4 -# Compute sh-specific values
18.5 -
18.6 -CT_DoArchValues () {
18.7 - # The architecture part of the tuple:
18.8 - CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${target_endian_eb}"
18.9 -
18.10 - # gcc ./configure flags
18.11 - CT_ARCH_WITH_ARCH=
18.12 - CT_ARCH_WITH_ABI=
18.13 - CT_ARCH_WITH_CPU=
18.14 - CT_ARCH_WITH_TUNE=
18.15 - CT_ARCH_WITH_FPU=
18.16 - CT_ARCH_WITH_FLOAT=
18.17 -
18.18 - # Endianness stuff
18.19 - case "${CT_ARCH_BE},${CT_ARCH_LE}" in
18.20 - y,) CT_ARCH_ENDIAN_CFLAG=-mb;;
18.21 - ,y) CT_ARCH_ENDIAN_CFLAG=-ml;;
18.22 - esac
18.23 -
18.24 - # CFLAGS
18.25 - case "${CT_ARCH_SH_VARIENT}" in
18.26 - sh3) CT_ARCH_ARCH_CFLAG=-m3;;
18.27 - sh4*)
18.28 - case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
18.29 - y,) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}";;
18.30 - ,y) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}-nofpu";;
18.31 - esac
18.32 - ;;
18.33 - esac
18.34 - CT_ARCH_FLOAT_CFLAG=
18.35 -}
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/config/arch/x86.in Sun Oct 05 15:32:00 2008 +0000
19.3 @@ -0,0 +1,9 @@
19.4 +# x86 specific options
19.5 +
19.6 +config ARCH_x86
19.7 + select ARCH_SUPPORT_ARCH
19.8 + select ARCH_SUPPORT_CPU
19.9 + select ARCH_SUPPORT_TUNE
19.10 + help
19.11 + The x86 architecture, as defined by:
19.12 + http://www.intel.com/
20.1 --- a/config/arch/x86/config.in Sun Oct 05 12:32:42 2008 +0000
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,9 +0,0 @@
20.4 -# x86 specific options
20.5 -
20.6 -config ARCH_x86
20.7 - select ARCH_SUPPORT_ARCH
20.8 - select ARCH_SUPPORT_CPU
20.9 - select ARCH_SUPPORT_TUNE
20.10 - help
20.11 - The x86 architecture, as defined by:
20.12 - http://www.intel.com/
21.1 --- a/config/arch/x86/functions Sun Oct 05 12:32:42 2008 +0000
21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
21.3 @@ -1,22 +0,0 @@
21.4 -# Compute x86-specific values
21.5 -
21.6 -# This one really need a little love! :-(
21.7 -
21.8 -CT_DoArchValues() {
21.9 - # The architecture part of the tuple:
21.10 - arch="${CT_ARCH_ARCH}"
21.11 - [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
21.12 - case "${arch}" in
21.13 - nocona|athlon*64|k8|athlon-fx|opteron)
21.14 - CT_DoError "Architecture is x86 (32-bit) but selected processor is \"${arch}\" (64-bit)";;
21.15 - "") CT_TARGET_ARCH=i386;;
21.16 - i386|i486|i586|i686) CT_TARGET_ARCH="${arch}";;
21.17 - winchip*) CT_TARGET_ARCH=i486;;
21.18 - pentium|pentium-mmx|c3*) CT_TARGET_ARCH=i586;;
21.19 - pentiumpro|pentium*|athlon*) CT_TARGET_ARCH=i686;;
21.20 - *) CT_TARGET_ARCH=i586;;
21.21 - esac
21.22 -
21.23 - # The kernel ARCH:
21.24 - CT_KERNEL_ARCH=i386
21.25 -}
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/config/arch/x86_64.in Sun Oct 05 15:32:00 2008 +0000
22.3 @@ -0,0 +1,9 @@
22.4 +# x86_64 specific options
22.5 +
22.6 +config ARCH_x86_64
22.7 + select ARCH_SUPPORT_ARCH
22.8 + select ARCH_SUPPORT_CPU
22.9 + select ARCH_SUPPORT_TUNE
22.10 + help
22.11 + The x86_64 architecture, as defined by:
22.12 + http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html
23.1 --- a/config/arch/x86_64/config.in Sun Oct 05 12:32:42 2008 +0000
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,9 +0,0 @@
23.4 -# x86_64 specific options
23.5 -
23.6 -config ARCH_x86_64
23.7 - select ARCH_SUPPORT_ARCH
23.8 - select ARCH_SUPPORT_CPU
23.9 - select ARCH_SUPPORT_TUNE
23.10 - help
23.11 - The x86_64 architecture, as defined by:
23.12 - http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html
24.1 --- a/config/arch/x86_64/functions Sun Oct 05 12:32:42 2008 +0000
24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
24.3 @@ -1,6 +0,0 @@
24.4 -# Compute x86_64-specific values
24.5 -
24.6 -CT_DoArchValues() {
24.7 - # The architecture part of the tuple:
24.8 - CT_TARGET_ARCH="${CT_ARCH}"
24.9 -}
25.1 --- a/docs/overview.txt Sun Oct 05 12:32:42 2008 +0000
25.2 +++ b/docs/overview.txt Sun Oct 05 15:32:00 2008 +0000
25.3 @@ -541,20 +541,14 @@
25.4 - a human-readable name, in lower case letters, with numbers as appropriate.
25.5 The underscore is allowed; space and special characters are not.
25.6 Eg.: arm, x86_64
25.7 - - a directory in "config/arch/" named after the architecture, with the same
25.8 - letters as above. Eg.: arch/arm, arch/x86_64
25.9 - This directory contains the following files, and only those files:
25.10 - - a configuration file in kconfig syntax, named "config.in", which shall
25.11 - follow the API defined below.
25.12 - Eg.: config/arch/arm/config.in
25.13 - - a function script in bash-3.0 syntax, named "functions", which shall
25.14 - follow the API defined below.
25.15 - Eg.: config/arch/arm/functions
25.16 - - an optional file, named "experimental" (in lower case!), which, if it
25.17 - is present, means that support for this architecture is EXPERIMENTAL.
25.18 - Eg.: config/arch/arm/experimental
25.19 + - a file in "config/arch/", named after the architecture's name, and suffixed
25.20 + with ".in".
25.21 + Eg.: config/arch/arm.in
25.22 + - a file in "scripts/build/arch/", named after the architecture's name, and
25.23 + suffixed with ".sh".
25.24 + Eg.: scripts/build/arch/arm.sh
25.25
25.26 -The "config.in" file API:
25.27 +The architecture's ".in" file API:
25.28 > the config option "ARCH_%arch%" (where %arch% is to be replaced with the
25.29 actual architecture name).
25.30 That config option must have *neither* a type, *nor* a prompt! Also, it can
25.31 @@ -584,7 +578,7 @@
25.32 this, as the architecture name was written all upper case. However, the
25.33 prefix is unique among architectures, and does not cause harm).
25.34
25.35 -The "functions" file API:
25.36 +The architecture's ".sh" file API:
25.37 > the function "CT_DoArchValues"
25.38 + parameters: none
25.39 + environment:
25.40 @@ -656,8 +650,8 @@
25.41 - default to:
25.42 - all empty
25.43
25.44 -You can have a look at "config/arch/arm/" for an quite complete example of
25.45 -what an actual architecture description looks like.
25.46 +You can have a look at "config/arch/arm.in" and "scripts/build/arch/arm.sh" for
25.47 +a quite complete example of what an actual architecture description looks like.
25.48
25.49 Kernel specific |
25.50 ----------------+
25.51 @@ -760,7 +754,7 @@
25.52 any name-clashing.
25.53
25.54 You can have a look at "config/kernel/linux.in" and "scripts/build/kernel/linux.sh"
25.55 -as an example of what a complex kernel description looks like,
25.56 +as an example of what a complex kernel description looks like.
25.57
25.58 Adding a new version of a component |
25.59 ------------------------------------+
26.1 --- a/kconfig/kconfig.mk Sun Oct 05 12:32:42 2008 +0000
26.2 +++ b/kconfig/kconfig.mk Sun Oct 05 15:32:00 2008 +0000
26.3 @@ -19,7 +19,7 @@
26.4 endif
26.5
26.6 # Build a list of all config files
26.7 -ARCH_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/arch/*/config.in)
26.8 +ARCH_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/arch/*.in)
26.9 KERN_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/kernel/*.in)
26.10 DEBUG_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/debug/*.in)
26.11 TOOLS_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/tools/*.in)
26.12 @@ -33,7 +33,7 @@
26.13 CONFIG_FILES=$(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES)
26.14
26.15 # Build list of items
26.16 -ARCHS = $(patsubst $(CT_LIB_DIR)/config/arch/%/config.in,%,$(ARCH_CONFIG_FILES))
26.17 +ARCHS = $(patsubst $(CT_LIB_DIR)/config/arch/%.in,%,$(ARCH_CONFIG_FILES))
26.18 KERNELS = $(patsubst $(CT_LIB_DIR)/config/kernel/%.in,%,$(KERN_CONFIG_FILES))
26.19
26.20 $(GEN_CONFIG_FILES): $(CT_TOP_DIR)/config.gen \
26.21 @@ -44,27 +44,27 @@
26.22
26.23 $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES)
26.24 @echo ' IN config.gen/arch.in'
26.25 - @(echo "# Architectures menu"; \
26.26 - echo "# Generated file, do not edit!!!"; \
26.27 - echo ""; \
26.28 - for arch in $(ARCHS); do \
26.29 - _arch=$$(echo "$${arch}" |sed -r -s -e 's/[-.+]/_/g;'); \
26.30 - echo "config ARCH_$${_arch}"; \
26.31 - echo " bool"; \
26.32 - printf " prompt \"$${arch}"; \
26.33 - if grep -E '^# +EXPERIMENTAL$$' config/arch/$${arch}/config.in >/dev/null 2>&1; then \
26.34 - echo " (EXPERIMENTAL)\""; \
26.35 - echo " depends on EXPERIMENTAL"; \
26.36 - else \
26.37 - echo "\""; \
26.38 - fi; \
26.39 - echo "if ARCH_$${_arch}"; \
26.40 - echo "config ARCH"; \
26.41 - echo " default \"$${arch}\" if ARCH_$${_arch}"; \
26.42 - echo "source config/arch/$${arch}/config.in"; \
26.43 - echo "endif"; \
26.44 - echo ""; \
26.45 - done; \
26.46 + @(echo "# Architectures menu"; \
26.47 + echo "# Generated file, do not edit!!!"; \
26.48 + echo ""; \
26.49 + for arch in $(ARCHS); do \
26.50 + _arch=$$(echo "$${arch}" |sed -r -s -e 's/[-.+]/_/g;'); \
26.51 + echo "config ARCH_$${_arch}"; \
26.52 + echo " bool"; \
26.53 + printf " prompt \"$${arch}"; \
26.54 + if grep -E '^# +EXPERIMENTAL$$' config/arch/$${arch}.in >/dev/null 2>&1; then \
26.55 + echo " (EXPERIMENTAL)\""; \
26.56 + echo " depends on EXPERIMENTAL"; \
26.57 + else \
26.58 + echo "\""; \
26.59 + fi; \
26.60 + echo "if ARCH_$${_arch}"; \
26.61 + echo "config ARCH"; \
26.62 + echo " default \"$${arch}\" if ARCH_$${_arch}"; \
26.63 + echo "source config/arch/$${arch}.in"; \
26.64 + echo "endif"; \
26.65 + echo ""; \
26.66 + done; \
26.67 ) >$@
26.68
26.69 $(CT_TOP_DIR)/config.gen/kernel.in: $(KERN_CONFIG_FILES)
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
27.2 +++ b/scripts/build/arch/alpha.sh Sun Oct 05 15:32:00 2008 +0000
27.3 @@ -0,0 +1,9 @@
27.4 +# Compute Alpha-specific values
27.5 +
27.6 +CT_DoArchValues () {
27.7 + # The architecture part of the tuple:
27.8 + CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_ALPHA_VARIANT}"
27.9 +
27.10 + # The kernel ARCH:
27.11 + CT_KERNEL_ARCH=${CT_ARCH}
27.12 +}
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/scripts/build/arch/arm.sh Sun Oct 05 15:32:00 2008 +0000
28.3 @@ -0,0 +1,17 @@
28.4 +# Compute ARM-specific values
28.5 +
28.6 +CT_DoArchValues() {
28.7 + # The architecture part of the tuple:
28.8 + CT_TARGET_ARCH="${CT_ARCH}${target_endian_eb}"
28.9 +
28.10 + # The system part of the tuple:
28.11 + case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
28.12 + *glibc,y) CT_TARGET_SYS=gnueabi;;
28.13 + uClibc,y) CT_TARGET_SYS=uclibcgnueabi;;
28.14 + none,y) CT_TARGET_SYS=eabi;;
28.15 + esac
28.16 +
28.17 + # In case we're EABI, do *not* specify any ABI!
28.18 + # which means, either we do not have an ABI specified, or we're not EABI.
28.19 + CT_TestOrAbort "Internal error: CT_ARCH_ABI should not be set for EABI build." -z "${CT_ARCH_ABI}" -o -z "${CT_ARCH_ARM_EABI}"
28.20 +}
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/scripts/build/arch/ia64.sh Sun Oct 05 15:32:00 2008 +0000
29.3 @@ -0,0 +1,6 @@
29.4 +# Compute IA-64-specific values
29.5 +
29.6 +CT_DoArchValues() {
29.7 + # The architecture part of the tuple:
29.8 + CT_TARGET_ARCH="${CT_ARCH}"
29.9 +}
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/scripts/build/arch/mips.sh Sun Oct 05 15:32:00 2008 +0000
30.3 @@ -0,0 +1,12 @@
30.4 +# Compute IA-64-specific values
30.5 +
30.6 +CT_DoArchValues() {
30.7 + # The architecture part of the tuple:
30.8 + CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
30.9 +
30.10 + # Override CFLAGS for endianness:
30.11 + case "${CT_ARCH_BE},${CT_ARCH_LE}" in
30.12 + y,) CT_ARCH_ENDIAN_CFLAG="-EB";;
30.13 + ,y) CT_ARCH_ENDIAN_CFLAG="-EL";;
30.14 + esac
30.15 +}
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/scripts/build/arch/powerpc.sh Sun Oct 05 15:32:00 2008 +0000
31.3 @@ -0,0 +1,22 @@
31.4 +# Compute powerpc-specific values
31.5 +
31.6 +CT_DoArchValues () {
31.7 + # The architecture part of the tuple:
31.8 + CT_TARGET_ARCH="${CT_ARCH}"
31.9 +
31.10 + # The kernel ARCH:
31.11 + CT_KERNEL_ARCH=powerpc
31.12 +
31.13 + # Add spe in the tuplet if needed
31.14 + case "${CT_LIBC},${CT_ARCH_POWERPC_SPE}" in
31.15 + glibc,|eglibc,) CT_TARGET_SYS=gnu;;
31.16 + glibc,y|eglibc,y) CT_TARGET_SYS=gnuspe;;
31.17 + esac
31.18 +
31.19 + # Add extra flags for SPE if needed
31.20 + if [ "${CT_ARCH_POWERPC_SPE}" = "y" ]; then
31.21 + CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe"
31.22 + CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double"
31.23 + CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"
31.24 + fi
31.25 +}
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
32.2 +++ b/scripts/build/arch/sh.sh Sun Oct 05 15:32:00 2008 +0000
32.3 @@ -0,0 +1,32 @@
32.4 +# Compute sh-specific values
32.5 +
32.6 +CT_DoArchValues () {
32.7 + # The architecture part of the tuple:
32.8 + CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${target_endian_eb}"
32.9 +
32.10 + # gcc ./configure flags
32.11 + CT_ARCH_WITH_ARCH=
32.12 + CT_ARCH_WITH_ABI=
32.13 + CT_ARCH_WITH_CPU=
32.14 + CT_ARCH_WITH_TUNE=
32.15 + CT_ARCH_WITH_FPU=
32.16 + CT_ARCH_WITH_FLOAT=
32.17 +
32.18 + # Endianness stuff
32.19 + case "${CT_ARCH_BE},${CT_ARCH_LE}" in
32.20 + y,) CT_ARCH_ENDIAN_CFLAG=-mb;;
32.21 + ,y) CT_ARCH_ENDIAN_CFLAG=-ml;;
32.22 + esac
32.23 +
32.24 + # CFLAGS
32.25 + case "${CT_ARCH_SH_VARIENT}" in
32.26 + sh3) CT_ARCH_ARCH_CFLAG=-m3;;
32.27 + sh4*)
32.28 + case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
32.29 + y,) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}";;
32.30 + ,y) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}-nofpu";;
32.31 + esac
32.32 + ;;
32.33 + esac
32.34 + CT_ARCH_FLOAT_CFLAG=
32.35 +}
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/scripts/build/arch/x86.sh Sun Oct 05 15:32:00 2008 +0000
33.3 @@ -0,0 +1,22 @@
33.4 +# Compute x86-specific values
33.5 +
33.6 +# This one really need a little love! :-(
33.7 +
33.8 +CT_DoArchValues() {
33.9 + # The architecture part of the tuple:
33.10 + arch="${CT_ARCH_ARCH}"
33.11 + [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
33.12 + case "${arch}" in
33.13 + nocona|athlon*64|k8|athlon-fx|opteron)
33.14 + CT_DoError "Architecture is x86 (32-bit) but selected processor is \"${arch}\" (64-bit)";;
33.15 + "") CT_TARGET_ARCH=i386;;
33.16 + i386|i486|i586|i686) CT_TARGET_ARCH="${arch}";;
33.17 + winchip*) CT_TARGET_ARCH=i486;;
33.18 + pentium|pentium-mmx|c3*) CT_TARGET_ARCH=i586;;
33.19 + pentiumpro|pentium*|athlon*) CT_TARGET_ARCH=i686;;
33.20 + *) CT_TARGET_ARCH=i586;;
33.21 + esac
33.22 +
33.23 + # The kernel ARCH:
33.24 + CT_KERNEL_ARCH=i386
33.25 +}
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
34.2 +++ b/scripts/build/arch/x86_64.sh Sun Oct 05 15:32:00 2008 +0000
34.3 @@ -0,0 +1,6 @@
34.4 +# Compute x86_64-specific values
34.5 +
34.6 +CT_DoArchValues() {
34.7 + # The architecture part of the tuple:
34.8 + CT_TARGET_ARCH="${CT_ARCH}"
34.9 +}
35.1 --- a/scripts/crosstool.sh Sun Oct 05 12:32:42 2008 +0000
35.2 +++ b/scripts/crosstool.sh Sun Oct 05 15:32:00 2008 +0000
35.3 @@ -57,7 +57,7 @@
35.4 CT_DoLog INFO "Building environment variables"
35.5
35.6 # Parse architecture-specific functions
35.7 -. "${CT_LIB_DIR}/config/arch/${CT_ARCH}/functions"
35.8 +. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
35.9
35.10 # Target tuple: CT_TARGET needs a little love:
35.11 CT_DoBuildTargetTuple