mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-21 17:26:41 +00:00
Merge the uClinux/noMMU stuff back to /trunk:
- merge Linux and uClinux back to a single kernel - add ARCH_USE_MMU and acquainted config options that architectures can auto-select - make binutils and elf2flt two "Binary utilities" that go in a single common sub-{menu,directory} structure -------- diffstat follows -------- /trunk/scripts/build/kernel/uclinux.sh | 2 0 2 0 - /trunk/scripts/build/kernel/linux.sh | 206 204 2 0 +++++++++++++++++++++++++++++ /trunk/scripts/build/kernel/linux-common.sh | 198 0 198 0 ---------------------------- /trunk/scripts/build/binutils.sh | 232 0 232 0 -------------------------------- /trunk/scripts/build/elf2flt.sh | 150 0 150 0 --------------------- /trunk/scripts/crosstool-NG.sh.in | 6 4 2 0 + /trunk/config/kernel/linux.in | 249 249 0 0 +++++++++++++++++++++++++++++++++++ /trunk/config/kernel/linux.in-common | 252 0 252 0 ----------------------------------- /trunk/config/kernel/uclinux.in | 21 0 21 0 --- /trunk/config/target.in | 23 22 1 0 +++ /trunk/config/elf2flt.in | 49 0 49 0 ------- /trunk/config/libc/glibc.in | 2 1 1 0 /trunk/config/libc/eglibc.in | 2 1 1 0 /trunk/config/config.in | 1 0 1 0 - /trunk/config/arch/sh.in | 1 1 0 0 + /trunk/config/arch/arm.in | 2 1 1 0 /trunk/config/arch/powerpc.in | 1 1 0 0 + /trunk/config/arch/ia64.in | 1 1 0 0 + /trunk/config/arch/alpha.in | 1 1 0 0 + /trunk/config/arch/x86.in | 1 1 0 0 + /trunk/config/arch/mips.in | 1 1 0 0 + /trunk/config/arch/powerpc64.in | 1 1 0 0 + 22 files changed, 489 insertions(+), 913 deletions(-)
This commit is contained in:
parent
5a32a8b8e8
commit
45747a6453
@ -1,6 +1,7 @@
|
||||
# Alpha specific configuration file
|
||||
|
||||
config ARCH_alpha
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_SUPPORT_CPU
|
||||
select ARCH_SUPPORT_TUNE
|
||||
help
|
||||
|
@ -1,6 +1,7 @@
|
||||
# ARM specific configuration file
|
||||
|
||||
config ARCH_arm
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_SUPPORTS_BOTH_ENDIAN
|
||||
select ARCH_DEFAULT_LE
|
||||
select ARCH_SUPPORT_ARCH
|
||||
@ -23,4 +24,3 @@ config ARCH_ARM_ABI_OK
|
||||
default y
|
||||
depends on ! ARCH_ARM_EABI
|
||||
select ARCH_SUPPORT_ABI
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
# depends on EXPERIMENTAL
|
||||
|
||||
config ARCH_ia64
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_64
|
||||
select ARCH_SUPPORTS_BOTH_ENDIAN
|
||||
help
|
||||
|
@ -1,6 +1,7 @@
|
||||
# MIPS specific config options
|
||||
|
||||
config ARCH_mips
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_SUPPORTS_BOTH_ENDIAN
|
||||
select ARCH_DEFAULT_BE
|
||||
select ARCH_SUPPORT_ARCH
|
||||
|
@ -1,6 +1,7 @@
|
||||
# powerpc specific configuration file
|
||||
|
||||
config ARCH_powerpc
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_SUPPORT_ABI
|
||||
select ARCH_SUPPORT_CPU
|
||||
select ARCH_SUPPORT_TUNE
|
||||
|
@ -2,6 +2,7 @@
|
||||
# depends on EXPERIMENTAL
|
||||
|
||||
config ARCH_powerpc64
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_64
|
||||
select ARCH_SUPPORT_ABI
|
||||
select ARCH_SUPPORT_CPU
|
||||
|
@ -2,6 +2,7 @@
|
||||
# depends on EXPERIMENTAL
|
||||
|
||||
config ARCH_sh
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_SUPPORTS_BOTH_ENDIAN
|
||||
select ARCH_DEFAULT_LE
|
||||
help
|
||||
|
@ -1,6 +1,7 @@
|
||||
# x86 specific options
|
||||
|
||||
config ARCH_x86
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_SUPPORT_ARCH
|
||||
select ARCH_SUPPORT_CPU
|
||||
select ARCH_SUPPORT_TUNE
|
||||
|
@ -1,160 +1,44 @@
|
||||
# binutils options
|
||||
# Binary utilities menu
|
||||
|
||||
menu "binutils"
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
menu "Binary utilities"
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "binutils version"
|
||||
prompt "Binary format:"
|
||||
|
||||
config BINUTILS_V_2_14
|
||||
if ARCH_USE_MMU
|
||||
|
||||
config ARCH_BINFMT_ELF
|
||||
bool
|
||||
prompt "2.14 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
prompt "ELF"
|
||||
help
|
||||
This will make your system build ELF exectubales,
|
||||
suitable for architectures with an MMU.
|
||||
|
||||
config BINUTILS_V_2_15
|
||||
endif # ARCH_USE_MMU
|
||||
|
||||
if ! ARCH_USE_MMU
|
||||
|
||||
config ARCH_BINFMT_FLAT
|
||||
bool
|
||||
prompt "2.15 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
prompt "Flat"
|
||||
help
|
||||
This will build flat binaries, suitable for
|
||||
MMU-less architectures.
|
||||
|
||||
config BINUTILS_V_2_16_1
|
||||
config ARCH_BINFMT_FDPIC
|
||||
bool
|
||||
prompt "2.16.1"
|
||||
prompt "FD_PIC ELF"
|
||||
help
|
||||
This will build FD_PIC ELF binaries, suitable for
|
||||
MMU-less architectures that still require to use
|
||||
shared libraries (FIXME).
|
||||
|
||||
config BINUTILS_V_2_17
|
||||
bool
|
||||
prompt "2.17"
|
||||
endif # ! ARCH_USE_MMU
|
||||
|
||||
config BINUTILS_V_2_18
|
||||
bool
|
||||
prompt "2.18"
|
||||
|
||||
config BINUTILS_V_2_18_50_0_4
|
||||
bool
|
||||
prompt "2.18.50.0.4 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_6
|
||||
bool
|
||||
prompt "2.18.50.0.6 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_7
|
||||
bool
|
||||
prompt "2.18.50.0.7 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_8
|
||||
bool
|
||||
prompt "2.18.50.0.8 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_9
|
||||
bool
|
||||
prompt "2.18.50.0.9 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_90
|
||||
bool
|
||||
prompt "2.18.90 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_91
|
||||
bool
|
||||
prompt "2.18.91 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_92
|
||||
bool
|
||||
prompt "2.18.92 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_93
|
||||
bool
|
||||
prompt "2.18.93 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_19
|
||||
bool
|
||||
prompt "2.19"
|
||||
|
||||
config BINUTILS_V_2_19_1
|
||||
bool
|
||||
prompt "2.19.1"
|
||||
|
||||
config BINUTILS_V_2_19_50_0_1
|
||||
bool
|
||||
prompt "2.19.50.0.1 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_19_51_0_1
|
||||
bool
|
||||
prompt "2.19.51.0.1 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_19_51_0_2
|
||||
bool
|
||||
prompt "2.19.51.0.2 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
# CT_INSERT_VERSION_ABOVE
|
||||
# Don't remove above line!
|
||||
endchoice
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
default "2.14" if BINUTILS_V_2_14
|
||||
default "2.15" if BINUTILS_V_2_15
|
||||
default "2.16.1" if BINUTILS_V_2_16_1
|
||||
default "2.17" if BINUTILS_V_2_17
|
||||
default "2.18" if BINUTILS_V_2_18
|
||||
default "2.18.50.0.4" if BINUTILS_V_2_18_50_0_4
|
||||
default "2.18.50.0.6" if BINUTILS_V_2_18_50_0_6
|
||||
default "2.18.50.0.7" if BINUTILS_V_2_18_50_0_7
|
||||
default "2.18.50.0.8" if BINUTILS_V_2_18_50_0_8
|
||||
default "2.18.50.0.9" if BINUTILS_V_2_18_50_0_9
|
||||
default "2.18.90" if BINUTILS_V_2_18_90
|
||||
default "2.18.91" if BINUTILS_V_2_18_91
|
||||
default "2.18.92" if BINUTILS_V_2_18_92
|
||||
default "2.18.93" if BINUTILS_V_2_18_93
|
||||
default "2.19" if BINUTILS_V_2_19
|
||||
default "2.19.1" if BINUTILS_V_2_19_1
|
||||
default "2.19.50.0.1" if BINUTILS_V_2_19_50_0_1
|
||||
default "2.19.51.0.1" if BINUTILS_V_2_19_51_0_1
|
||||
default "2.19.51.0.2" if BINUTILS_V_2_19_51_0_2
|
||||
# CT_INSERT_VERSION_STRING_ABOVE
|
||||
# Don't remove above line!
|
||||
|
||||
config BINUTILS_EXTRA_CONFIG
|
||||
string
|
||||
prompt "binutils extra config"
|
||||
default ""
|
||||
help
|
||||
Extra flags passed onto ./configure when configuring
|
||||
|
||||
config BINUTILS_FOR_TARGET
|
||||
bool
|
||||
prompt "binutils libraries for the target"
|
||||
depends on ! BARE_METAL
|
||||
default n
|
||||
help
|
||||
Some utilities may need binutils libraries to be available on
|
||||
the target, eg. oprofile.
|
||||
|
||||
if BINUTILS_FOR_TARGET
|
||||
|
||||
config BINUTILS_FOR_TARGET_IBERTY
|
||||
bool
|
||||
prompt "libiberty"
|
||||
default y
|
||||
|
||||
config BINUTILS_FOR_TARGET_BFD
|
||||
bool
|
||||
prompt "libbfd"
|
||||
default y
|
||||
|
||||
endif # BINUTILS_FOR_TARGET
|
||||
source config/binutils/binutils.in
|
||||
source config/binutils/elf2flt.in
|
||||
|
||||
endmenu
|
||||
|
158
config/binutils/binutils.in
Normal file
158
config/binutils/binutils.in
Normal file
@ -0,0 +1,158 @@
|
||||
# binutils options
|
||||
|
||||
comment "GNU binutils"
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "binutils version"
|
||||
|
||||
config BINUTILS_V_2_14
|
||||
bool
|
||||
prompt "2.14 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config BINUTILS_V_2_15
|
||||
bool
|
||||
prompt "2.15 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config BINUTILS_V_2_16_1
|
||||
bool
|
||||
prompt "2.16.1"
|
||||
|
||||
config BINUTILS_V_2_17
|
||||
bool
|
||||
prompt "2.17"
|
||||
|
||||
config BINUTILS_V_2_18
|
||||
bool
|
||||
prompt "2.18"
|
||||
|
||||
config BINUTILS_V_2_18_50_0_4
|
||||
bool
|
||||
prompt "2.18.50.0.4 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_6
|
||||
bool
|
||||
prompt "2.18.50.0.6 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_7
|
||||
bool
|
||||
prompt "2.18.50.0.7 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_8
|
||||
bool
|
||||
prompt "2.18.50.0.8 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_50_0_9
|
||||
bool
|
||||
prompt "2.18.50.0.9 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_90
|
||||
bool
|
||||
prompt "2.18.90 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_91
|
||||
bool
|
||||
prompt "2.18.91 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_92
|
||||
bool
|
||||
prompt "2.18.92 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_18_93
|
||||
bool
|
||||
prompt "2.18.93 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_19
|
||||
bool
|
||||
prompt "2.19"
|
||||
|
||||
config BINUTILS_V_2_19_1
|
||||
bool
|
||||
prompt "2.19.1"
|
||||
|
||||
config BINUTILS_V_2_19_50_0_1
|
||||
bool
|
||||
prompt "2.19.50.0.1 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_19_51_0_1
|
||||
bool
|
||||
prompt "2.19.51.0.1 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
config BINUTILS_V_2_19_51_0_2
|
||||
bool
|
||||
prompt "2.19.51.0.2 (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
# CT_INSERT_VERSION_ABOVE
|
||||
# Don't remove above line!
|
||||
endchoice
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
default "2.14" if BINUTILS_V_2_14
|
||||
default "2.15" if BINUTILS_V_2_15
|
||||
default "2.16.1" if BINUTILS_V_2_16_1
|
||||
default "2.17" if BINUTILS_V_2_17
|
||||
default "2.18" if BINUTILS_V_2_18
|
||||
default "2.18.50.0.4" if BINUTILS_V_2_18_50_0_4
|
||||
default "2.18.50.0.6" if BINUTILS_V_2_18_50_0_6
|
||||
default "2.18.50.0.7" if BINUTILS_V_2_18_50_0_7
|
||||
default "2.18.50.0.8" if BINUTILS_V_2_18_50_0_8
|
||||
default "2.18.50.0.9" if BINUTILS_V_2_18_50_0_9
|
||||
default "2.18.90" if BINUTILS_V_2_18_90
|
||||
default "2.18.91" if BINUTILS_V_2_18_91
|
||||
default "2.18.92" if BINUTILS_V_2_18_92
|
||||
default "2.18.93" if BINUTILS_V_2_18_93
|
||||
default "2.19" if BINUTILS_V_2_19
|
||||
default "2.19.1" if BINUTILS_V_2_19_1
|
||||
default "2.19.50.0.1" if BINUTILS_V_2_19_50_0_1
|
||||
default "2.19.51.0.1" if BINUTILS_V_2_19_51_0_1
|
||||
default "2.19.51.0.2" if BINUTILS_V_2_19_51_0_2
|
||||
# CT_INSERT_VERSION_STRING_ABOVE
|
||||
# Don't remove above line!
|
||||
|
||||
config BINUTILS_EXTRA_CONFIG
|
||||
string
|
||||
prompt "binutils extra config"
|
||||
default ""
|
||||
help
|
||||
Extra flags passed onto ./configure when configuring
|
||||
|
||||
config BINUTILS_FOR_TARGET
|
||||
bool
|
||||
prompt "binutils libraries for the target"
|
||||
depends on ! BARE_METAL
|
||||
default n
|
||||
help
|
||||
Some utilities may need binutils libraries to be available on
|
||||
the target, eg. oprofile.
|
||||
|
||||
if BINUTILS_FOR_TARGET
|
||||
|
||||
config BINUTILS_FOR_TARGET_IBERTY
|
||||
bool
|
||||
prompt "libiberty"
|
||||
default y
|
||||
|
||||
config BINUTILS_FOR_TARGET_BFD
|
||||
bool
|
||||
prompt "libbfd"
|
||||
default y
|
||||
|
||||
endif # BINUTILS_FOR_TARGET
|
@ -1,7 +1,8 @@
|
||||
# elf2flt options
|
||||
|
||||
menu "elf2flt"
|
||||
depends on KERNEL_UCLINUX_BINFMT_FLAT
|
||||
if ARCH_BINFMT_FLAT
|
||||
|
||||
comment "elf2flt"
|
||||
|
||||
config ELF2FLT_VERSION
|
||||
string
|
||||
@ -46,4 +47,4 @@ config ELF2FLT_EXTRA_CONFIG
|
||||
help
|
||||
Extra flags passed onto ./configure when configuring
|
||||
|
||||
endmenu
|
||||
endif
|
@ -4,7 +4,6 @@ source config/toolchain.in
|
||||
source config/kernel.in
|
||||
source config/companion_libs.in
|
||||
source config/binutils.in
|
||||
source config/elf2flt.in
|
||||
source config/cc.in
|
||||
source config/libc.in
|
||||
source config/tools.in
|
||||
|
@ -1,6 +1,255 @@
|
||||
# Linux kernel options
|
||||
|
||||
# Linux kernel options
|
||||
|
||||
config KERNEL_linux
|
||||
help
|
||||
Build a toolchain targeting systems running Linux as a kernel.
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "Get kernel headers from:"
|
||||
|
||||
config KERNEL_LINUX_INSTALL
|
||||
bool
|
||||
prompt "kernel's 'headers_install'"
|
||||
help
|
||||
This will make use of the new headers_install rule in recent kernels.
|
||||
This is most probably what you want to use.
|
||||
|
||||
if KERNEL_LINUX_INSTALL
|
||||
|
||||
config KERNEL_LINUX_INSTALL_CHECK
|
||||
bool
|
||||
prompt "Check installed headers"
|
||||
default y
|
||||
help
|
||||
If you are in doubt that installed headers are buggy, say 'Y'
|
||||
here to have an extra check passed onto the headers.
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "Linux kernel version"
|
||||
|
||||
config KERNEL_V_2_6_18_8
|
||||
bool
|
||||
prompt "2.6.18.8 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_19_7
|
||||
bool
|
||||
prompt "2.6.19.7 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_20_21
|
||||
bool
|
||||
prompt "2.6.20.21 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_21_7
|
||||
bool
|
||||
prompt "2.6.21.7 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_22_19
|
||||
bool
|
||||
prompt "2.6.22.19 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_23_17
|
||||
bool
|
||||
prompt "2.6.23.17 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_24_7
|
||||
bool
|
||||
prompt "2.6.24.7 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_25_20
|
||||
bool
|
||||
prompt "2.6.25.20 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_26_8
|
||||
bool
|
||||
prompt "2.6.26.8 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_27_22
|
||||
bool
|
||||
prompt "2.6.27.22 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_28
|
||||
bool
|
||||
prompt "2.6.28"
|
||||
|
||||
config KERNEL_V_2_6_28_1
|
||||
bool
|
||||
prompt "2.6.28.1"
|
||||
|
||||
config KERNEL_V_2_6_28_2
|
||||
bool
|
||||
prompt "2.6.28.2"
|
||||
|
||||
config KERNEL_V_2_6_28_3
|
||||
bool
|
||||
prompt "2.6.28.3"
|
||||
|
||||
config KERNEL_V_2_6_28_4
|
||||
bool
|
||||
prompt "2.6.28.4"
|
||||
|
||||
config KERNEL_V_2_6_28_5
|
||||
bool
|
||||
prompt "2.6.28.5"
|
||||
|
||||
config KERNEL_V_2_6_28_6
|
||||
bool
|
||||
prompt "2.6.28.6"
|
||||
|
||||
config KERNEL_V_2_6_28_7
|
||||
bool
|
||||
prompt "2.6.28.7"
|
||||
|
||||
config KERNEL_V_2_6_28_8
|
||||
bool
|
||||
prompt "2.6.28.8"
|
||||
|
||||
config KERNEL_V_2_6_28_9
|
||||
bool
|
||||
prompt "2.6.28.9"
|
||||
|
||||
config KERNEL_V_2_6_28_10
|
||||
bool
|
||||
prompt "2.6.28.10"
|
||||
|
||||
config KERNEL_V_2_6_29
|
||||
bool
|
||||
prompt "2.6.29"
|
||||
|
||||
config KERNEL_V_2_6_29_1
|
||||
bool
|
||||
prompt "2.6.29.1"
|
||||
|
||||
config KERNEL_V_2_6_29_2
|
||||
bool
|
||||
prompt "2.6.29.2"
|
||||
|
||||
# CT_INSERT_VERSION_ABOVE
|
||||
# Don't remove above line!
|
||||
|
||||
config KERNEL_V_select
|
||||
bool
|
||||
prompt "Other version (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
endchoice
|
||||
|
||||
config KERNEL_VERSION
|
||||
string
|
||||
prompt "Kernel version" if KERNEL_V_select
|
||||
default "2.6.18.8" if KERNEL_V_2_6_18_8
|
||||
default "2.6.19.7" if KERNEL_V_2_6_19_7
|
||||
default "2.6.20.21" if KERNEL_V_2_6_20_21
|
||||
default "2.6.21.7" if KERNEL_V_2_6_21_7
|
||||
default "2.6.22.19" if KERNEL_V_2_6_22_19
|
||||
default "2.6.23.17" if KERNEL_V_2_6_23_17
|
||||
default "2.6.24.7" if KERNEL_V_2_6_24_7
|
||||
default "2.6.25.20" if KERNEL_V_2_6_25_20
|
||||
default "2.6.26.8" if KERNEL_V_2_6_26_8
|
||||
default "2.6.27.22" if KERNEL_V_2_6_27_22
|
||||
default "2.6.28" if KERNEL_V_2_6_28
|
||||
default "2.6.28.1" if KERNEL_V_2_6_28_1
|
||||
default "2.6.28.2" if KERNEL_V_2_6_28_2
|
||||
default "2.6.28.3" if KERNEL_V_2_6_28_3
|
||||
default "2.6.28.4" if KERNEL_V_2_6_28_4
|
||||
default "2.6.28.5" if KERNEL_V_2_6_28_5
|
||||
default "2.6.28.6" if KERNEL_V_2_6_28_6
|
||||
default "2.6.28.7" if KERNEL_V_2_6_28_7
|
||||
default "2.6.28.8" if KERNEL_V_2_6_28_8
|
||||
default "2.6.28.9" if KERNEL_V_2_6_28_9
|
||||
default "2.6.28.10" if KERNEL_V_2_6_28_10
|
||||
default "2.6.29" if KERNEL_V_2_6_29
|
||||
default "2.6.29.1" if KERNEL_V_2_6_29_1
|
||||
default "2.6.29.2" if KERNEL_V_2_6_29_2
|
||||
# CT_INSERT_VERSION_STRING_ABOVE
|
||||
# Don't remove above line!
|
||||
help
|
||||
Enter here the kernel version you want to use, if it is
|
||||
not listed above. Something like V.P.S or V.P.S.E, where:
|
||||
V: VERSION
|
||||
P: PATCHLEVEL
|
||||
S: SUBLEVEL
|
||||
E: EXTRAVERSION
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "Kernel verbosity:"
|
||||
default KERNEL_LINUX_VERBOSITY_0
|
||||
|
||||
config KERNEL_LINUX_VERBOSITY_0
|
||||
bool
|
||||
prompt "Simplified"
|
||||
help
|
||||
Print simplified command lines.
|
||||
|
||||
config KERNEL_LINUX_VERBOSITY_1
|
||||
bool
|
||||
prompt "Full commands"
|
||||
help
|
||||
Print full command lines.
|
||||
|
||||
config KERNEL_LINUX_VERBOSITY_2
|
||||
bool
|
||||
prompt "Exec reasons"
|
||||
help
|
||||
Print the reasons why a make target is rebuild.
|
||||
|
||||
endchoice
|
||||
|
||||
config KERNEL_LINUX_VERBOSE_LEVEL
|
||||
int
|
||||
default 0 if KERNEL_LINUX_VERBOSITY_0
|
||||
default 1 if KERNEL_LINUX_VERBOSITY_1
|
||||
default 2 if KERNEL_LINUX_VERBOSITY_2
|
||||
|
||||
endif
|
||||
|
||||
config KERNEL_LINUX_USE_CUSTOM_HEADERS
|
||||
bool
|
||||
prompt "Use custom headers"
|
||||
help
|
||||
If you have some kernel headers lying around, you can enter the path
|
||||
below.
|
||||
|
||||
if KERNEL_LINUX_USE_CUSTOM_HEADERS
|
||||
|
||||
config KERNEL_LINUX_CUSTOM_IS_TARBALL
|
||||
bool
|
||||
prompt "This is a tarball"
|
||||
default n
|
||||
help
|
||||
If you say 'n' here, the path below is expected to point to a directory
|
||||
containing readily prepared headers
|
||||
|
||||
If you say 'y' here, then the path below is expected to point to a
|
||||
tarball of such a directory.
|
||||
|
||||
Eg., if your headers are available in: /foo/bar/buz/my_hdrs/include,
|
||||
say 'n' here, and enter: /foo/bar/buz/my_hdrs below.
|
||||
|
||||
Now, passing a tarball around is easier than passing a directory, so
|
||||
if you want to, you can make a tarball of /foo/bar/buz/my_hdrs/include,
|
||||
say 'y' here, and enter the path to this tarball below.
|
||||
|
||||
config KERNEL_LINUX_CUSTOM_PATH
|
||||
string
|
||||
prompt "Path to custom headers directory/tarball"
|
||||
help
|
||||
See KERNEL_LINUX_CUSTOM_IS_TARBALL, above.
|
||||
|
||||
endif # KERNEL_LINUX_USE_CUSTOM_DIR
|
||||
|
||||
endchoice
|
||||
|
@ -1,252 +0,0 @@
|
||||
# Linux kernel options
|
||||
|
||||
if KERNEL_linux || KERNEL_uclinux
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "Get kernel headers from:"
|
||||
|
||||
config KERNEL_LINUX_INSTALL
|
||||
bool
|
||||
prompt "kernel's 'headers_install'"
|
||||
help
|
||||
This will make use of the new headers_install rule in recent kernels.
|
||||
This is most probably what you want to use.
|
||||
|
||||
if KERNEL_LINUX_INSTALL
|
||||
|
||||
config KERNEL_LINUX_INSTALL_CHECK
|
||||
bool
|
||||
prompt "Check installed headers"
|
||||
default y
|
||||
help
|
||||
If you are in doubt that installed headers are buggy, say 'Y'
|
||||
here to have an extra check passed onto the headers.
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "Linux kernel version"
|
||||
|
||||
config KERNEL_V_2_6_18_8
|
||||
bool
|
||||
prompt "2.6.18.8 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_19_7
|
||||
bool
|
||||
prompt "2.6.19.7 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_20_21
|
||||
bool
|
||||
prompt "2.6.20.21 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_21_7
|
||||
bool
|
||||
prompt "2.6.21.7 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_22_19
|
||||
bool
|
||||
prompt "2.6.22.19 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_23_17
|
||||
bool
|
||||
prompt "2.6.23.17 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_24_7
|
||||
bool
|
||||
prompt "2.6.24.7 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_25_20
|
||||
bool
|
||||
prompt "2.6.25.20 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_26_8
|
||||
bool
|
||||
prompt "2.6.26.8 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_27_22
|
||||
bool
|
||||
prompt "2.6.27.22 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config KERNEL_V_2_6_28
|
||||
bool
|
||||
prompt "2.6.28"
|
||||
|
||||
config KERNEL_V_2_6_28_1
|
||||
bool
|
||||
prompt "2.6.28.1"
|
||||
|
||||
config KERNEL_V_2_6_28_2
|
||||
bool
|
||||
prompt "2.6.28.2"
|
||||
|
||||
config KERNEL_V_2_6_28_3
|
||||
bool
|
||||
prompt "2.6.28.3"
|
||||
|
||||
config KERNEL_V_2_6_28_4
|
||||
bool
|
||||
prompt "2.6.28.4"
|
||||
|
||||
config KERNEL_V_2_6_28_5
|
||||
bool
|
||||
prompt "2.6.28.5"
|
||||
|
||||
config KERNEL_V_2_6_28_6
|
||||
bool
|
||||
prompt "2.6.28.6"
|
||||
|
||||
config KERNEL_V_2_6_28_7
|
||||
bool
|
||||
prompt "2.6.28.7"
|
||||
|
||||
config KERNEL_V_2_6_28_8
|
||||
bool
|
||||
prompt "2.6.28.8"
|
||||
|
||||
config KERNEL_V_2_6_28_9
|
||||
bool
|
||||
prompt "2.6.28.9"
|
||||
|
||||
config KERNEL_V_2_6_28_10
|
||||
bool
|
||||
prompt "2.6.28.10"
|
||||
|
||||
config KERNEL_V_2_6_29
|
||||
bool
|
||||
prompt "2.6.29"
|
||||
|
||||
config KERNEL_V_2_6_29_1
|
||||
bool
|
||||
prompt "2.6.29.1"
|
||||
|
||||
config KERNEL_V_2_6_29_2
|
||||
bool
|
||||
prompt "2.6.29.2"
|
||||
|
||||
# CT_INSERT_VERSION_ABOVE
|
||||
# Don't remove above line!
|
||||
|
||||
config KERNEL_V_select
|
||||
bool
|
||||
prompt "Other version (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
endchoice
|
||||
|
||||
config KERNEL_VERSION
|
||||
string
|
||||
prompt "Kernel version" if KERNEL_V_select
|
||||
default "2.6.18.8" if KERNEL_V_2_6_18_8
|
||||
default "2.6.19.7" if KERNEL_V_2_6_19_7
|
||||
default "2.6.20.21" if KERNEL_V_2_6_20_21
|
||||
default "2.6.21.7" if KERNEL_V_2_6_21_7
|
||||
default "2.6.22.19" if KERNEL_V_2_6_22_19
|
||||
default "2.6.23.17" if KERNEL_V_2_6_23_17
|
||||
default "2.6.24.7" if KERNEL_V_2_6_24_7
|
||||
default "2.6.25.20" if KERNEL_V_2_6_25_20
|
||||
default "2.6.26.8" if KERNEL_V_2_6_26_8
|
||||
default "2.6.27.22" if KERNEL_V_2_6_27_22
|
||||
default "2.6.28" if KERNEL_V_2_6_28
|
||||
default "2.6.28.1" if KERNEL_V_2_6_28_1
|
||||
default "2.6.28.2" if KERNEL_V_2_6_28_2
|
||||
default "2.6.28.3" if KERNEL_V_2_6_28_3
|
||||
default "2.6.28.4" if KERNEL_V_2_6_28_4
|
||||
default "2.6.28.5" if KERNEL_V_2_6_28_5
|
||||
default "2.6.28.6" if KERNEL_V_2_6_28_6
|
||||
default "2.6.28.7" if KERNEL_V_2_6_28_7
|
||||
default "2.6.28.8" if KERNEL_V_2_6_28_8
|
||||
default "2.6.28.9" if KERNEL_V_2_6_28_9
|
||||
default "2.6.28.10" if KERNEL_V_2_6_28_10
|
||||
default "2.6.29" if KERNEL_V_2_6_29
|
||||
default "2.6.29.1" if KERNEL_V_2_6_29_1
|
||||
default "2.6.29.2" if KERNEL_V_2_6_29_2
|
||||
# CT_INSERT_VERSION_STRING_ABOVE
|
||||
# Don't remove above line!
|
||||
help
|
||||
Enter here the kernel version you want to use, if it is
|
||||
not listed above. Something like V.P.S or V.P.S.E, where:
|
||||
V: VERSION
|
||||
P: PATCHLEVEL
|
||||
S: SUBLEVEL
|
||||
E: EXTRAVERSION
|
||||
|
||||
choice
|
||||
bool
|
||||
prompt "Kernel verbosity:"
|
||||
default KERNEL_LINUX_VERBOSITY_0
|
||||
|
||||
config KERNEL_LINUX_VERBOSITY_0
|
||||
bool
|
||||
prompt "Simplified"
|
||||
help
|
||||
Print simplified command lines.
|
||||
|
||||
config KERNEL_LINUX_VERBOSITY_1
|
||||
bool
|
||||
prompt "Full commands"
|
||||
help
|
||||
Print full command lines.
|
||||
|
||||
config KERNEL_LINUX_VERBOSITY_2
|
||||
bool
|
||||
prompt "Exec reasons"
|
||||
help
|
||||
Print the reasons why a make target is rebuild.
|
||||
|
||||
endchoice
|
||||
|
||||
config KERNEL_LINUX_VERBOSE_LEVEL
|
||||
int
|
||||
default 0 if KERNEL_LINUX_VERBOSITY_0
|
||||
default 1 if KERNEL_LINUX_VERBOSITY_1
|
||||
default 2 if KERNEL_LINUX_VERBOSITY_2
|
||||
|
||||
endif
|
||||
|
||||
config KERNEL_LINUX_USE_CUSTOM_HEADERS
|
||||
bool
|
||||
prompt "Use custom headers"
|
||||
help
|
||||
If you have some kernel headers lying around, you can enter the path
|
||||
below.
|
||||
|
||||
if KERNEL_LINUX_USE_CUSTOM_HEADERS
|
||||
|
||||
config KERNEL_LINUX_CUSTOM_IS_TARBALL
|
||||
bool
|
||||
prompt "This is a tarball"
|
||||
default n
|
||||
help
|
||||
If you say 'n' here, the path below is expected to point to a directory
|
||||
containing readily prepared headers
|
||||
|
||||
If you say 'y' here, then the path below is expected to point to a
|
||||
tarball of such a directory.
|
||||
|
||||
Eg., if your headers are available in: /foo/bar/buz/my_hdrs/include,
|
||||
say 'n' here, and enter: /foo/bar/buz/my_hdrs below.
|
||||
|
||||
Now, passing a tarball around is easier than passing a directory, so
|
||||
if you want to, you can make a tarball of /foo/bar/buz/my_hdrs/include,
|
||||
say 'y' here, and enter the path to this tarball below.
|
||||
|
||||
config KERNEL_LINUX_CUSTOM_PATH
|
||||
string
|
||||
prompt "Path to custom headers directory/tarball"
|
||||
help
|
||||
See KERNEL_LINUX_CUSTOM_IS_TARBALL, above.
|
||||
|
||||
endif # KERNEL_LINUX_USE_CUSTOM_DIR
|
||||
|
||||
endchoice
|
||||
endif
|
@ -1,21 +0,0 @@
|
||||
# uClinux kernel options
|
||||
# depends on EXPERIMENTAL
|
||||
|
||||
config KERNEL_uclinux
|
||||
help
|
||||
Build a toolchain targeting systems running uClinux as a kernel.
|
||||
|
||||
choice
|
||||
bool
|
||||
depends on KERNEL_uclinux
|
||||
prompt "noMMU binary format"
|
||||
|
||||
config KERNEL_UCLINUX_BINFMT_FLAT
|
||||
bool
|
||||
prompt "binfmt_flat"
|
||||
help
|
||||
This will build the elf2flt and flthdr utilities for your architecture
|
||||
into the toolchain
|
||||
|
||||
endchoice
|
||||
|
@ -1,5 +1,5 @@
|
||||
# eglibc options
|
||||
# depends on ! BARE_METAL && ! KERNEL_uclinux
|
||||
# depends on ! BARE_METAL && ARCH_USE_MMU
|
||||
|
||||
config LIBC_eglibc
|
||||
select LIBC_SUPPORT_NPTL
|
||||
|
@ -1,5 +1,5 @@
|
||||
# glibc options
|
||||
# depends on ! BARE_METAL && ! KERNEL_uclinux
|
||||
# depends on ! BARE_METAL && ARCH_USE_MMU
|
||||
|
||||
config LIBC_glibc
|
||||
select LIBC_SUPPORT_NPTL
|
||||
|
@ -10,14 +10,18 @@ config ARCH_64
|
||||
default n
|
||||
|
||||
# Pre-declare target optimisation variables
|
||||
config ARCH_SUPPORTS_BOTH_MMU
|
||||
config ARCH_SUPPORTS_BOTH_ENDIAN
|
||||
config ARCH_SUPPORT_ARCH
|
||||
config ARCH_SUPPORT_ABI
|
||||
config ARCH_SUPPORT_CPU
|
||||
config ARCH_SUPPORT_TUNE
|
||||
config ARCH_SUPPORT_FPU
|
||||
config ARCH_SUPPORTS_BOTH_ENDIAN
|
||||
|
||||
config ARCH_DEFAULT_HAS_MMU
|
||||
config ARCH_DEFAULT_BE
|
||||
config ARCH_DEFAULT_LE
|
||||
|
||||
config ARCH_ARCH
|
||||
config ARCH_ABI
|
||||
config ARCH_CPU
|
||||
@ -34,6 +38,22 @@ comment "General target options"
|
||||
|
||||
source config.gen/arch.in
|
||||
|
||||
#--------------------------------------
|
||||
config ARCH_SUPPORTS_BOTH_MMU
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_DEFAULT_HAS_MMU
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_USE_MMU
|
||||
bool
|
||||
prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
|
||||
default n if ! ARCH_DEFAULT_HAS_MMU
|
||||
default y if ARCH_DEFAULT_HAS_MMU
|
||||
|
||||
#--------------------------------------
|
||||
config ARCH_SUPPORTS_BOTH_ENDIAN
|
||||
bool
|
||||
default n
|
||||
@ -63,6 +83,7 @@ config ARCH_LE
|
||||
|
||||
endchoice
|
||||
|
||||
#--------------------------------------
|
||||
comment "Target optimisations"
|
||||
|
||||
config ARCH_SUPPORT_ARCH
|
||||
|
@ -67,9 +67,3 @@ do_elf2flt() {
|
||||
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
# Now on for the target libraries
|
||||
do_elf2flt_target() {
|
||||
exit -1
|
||||
}
|
||||
|
@ -1,99 +0,0 @@
|
||||
# This file declares functions to install the kernel headers for linux
|
||||
# Copyright 2007 Yann E. MORIN
|
||||
# Licensed under the GPL v2. See COPYING in the root of this package
|
||||
|
||||
CT_DoKernelTupleValues() {
|
||||
# Nothing to do, keep the default value
|
||||
:
|
||||
}
|
||||
|
||||
# Download the kernel
|
||||
do_kernel_get() {
|
||||
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" != "y" ]; then
|
||||
CT_GetFile "linux-${CT_KERNEL_VERSION}" \
|
||||
{ftp,http}://ftp.{de.,eu.,}kernel.org/pub/linux/kernel/v2.{6{,/testing},4,2}
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Extract kernel
|
||||
do_kernel_extract() {
|
||||
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" != "y" ]; then
|
||||
CT_Extract "linux-${CT_KERNEL_VERSION}"
|
||||
CT_Patch "linux-${CT_KERNEL_VERSION}"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Wrapper to the actual headers install method
|
||||
do_kernel_headers() {
|
||||
CT_DoStep INFO "Installing kernel headers"
|
||||
|
||||
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then
|
||||
do_kernel_custom
|
||||
else
|
||||
do_kernel_install
|
||||
fi
|
||||
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
# Install kernel headers using headers_install from kernel sources.
|
||||
do_kernel_install() {
|
||||
CT_DoLog DEBUG "Using kernel's headers_install"
|
||||
|
||||
mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
|
||||
cd "${CT_BUILD_DIR}/build-kernel-headers"
|
||||
|
||||
# Only starting with 2.6.18 does headers_install is usable. We only
|
||||
# have 2.6 version available, so only test for sublevel.
|
||||
k_sublevel=$(awk '/^SUBLEVEL =/ { print $3 }' "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}/Makefile")
|
||||
[ ${k_sublevel} -ge 18 ] || CT_Abort "Kernel version >= 2.6.18 is needed to install kernel headers."
|
||||
|
||||
V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}"
|
||||
|
||||
CT_DoLog EXTRA "Installing kernel headers"
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" \
|
||||
O=$(pwd) \
|
||||
ARCH=${CT_KERNEL_ARCH} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
headers_install
|
||||
|
||||
if [ "${CT_KERNEL_LINUX_INSTALL_CHECK}" = "y" ]; then
|
||||
CT_DoLog EXTRA "Checking installed headers"
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" \
|
||||
O=$(pwd) \
|
||||
ARCH=${CT_KERNEL_ARCH} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
headers_check
|
||||
find "${CT_SYSROOT_DIR}" -type f -name '.check*' -exec rm {} \;
|
||||
fi
|
||||
}
|
||||
|
||||
# Use custom headers (most probably by using make headers_install in a
|
||||
# modified (read: customised) kernel tree, or using pre-2.6.18 headers, such
|
||||
# as 2.4). In this case, simply copy the headers in place
|
||||
do_kernel_custom() {
|
||||
local tar_opt
|
||||
|
||||
CT_DoLog EXTRA "Installing custom kernel headers"
|
||||
|
||||
mkdir -p "${CT_SYSROOT_DIR}/usr"
|
||||
cd "${CT_SYSROOT_DIR}/usr"
|
||||
if [ "${CT_KERNEL_LINUX_CUSTOM_IS_TARBALL}" = "y" ]; then
|
||||
case "${CT_KERNEL_LINUX_CUSTOM_PATH}" in
|
||||
*.tar) ;;
|
||||
*.tgz) tar_opt=--gzip;;
|
||||
*.tar.gz) tar_opt=--gzip;;
|
||||
*.tar.bz2) tar_opt=--bzip2;;
|
||||
*.tar.lzma) tar_opt=--lzma;;
|
||||
esac
|
||||
CT_DoExecLog ALL tar x ${tar_opt} -vf ${CT_KERNEL_LINUX_CUSTOM_PATH}
|
||||
else
|
||||
CT_DoExecLog ALL cp -rv "${CT_KERNEL_LINUX_CUSTOM_PATH}/include" .
|
||||
fi
|
||||
}
|
@ -1 +1,102 @@
|
||||
. ${CT_LIB_DIR}/scripts/build/kernel/linux-common.sh
|
||||
# This file declares functions to install the kernel headers for linux
|
||||
# Copyright 2007 Yann E. MORIN
|
||||
# Licensed under the GPL v2. See COPYING in the root of this package
|
||||
|
||||
CT_DoKernelTupleValues() {
|
||||
if [ "${CT_ARCH_USE_MMU}" = "y" ]; then
|
||||
CT_TARGET_KERNEL="linux"
|
||||
else
|
||||
CT_TARGET_KERNEL="uclinux"
|
||||
fi
|
||||
}
|
||||
|
||||
# Download the kernel
|
||||
do_kernel_get() {
|
||||
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" != "y" ]; then
|
||||
CT_GetFile "linux-${CT_KERNEL_VERSION}" \
|
||||
{ftp,http}://ftp.{de.,eu.,}kernel.org/pub/linux/kernel/v2.{6{,/testing},4,2}
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Extract kernel
|
||||
do_kernel_extract() {
|
||||
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" != "y" ]; then
|
||||
CT_Extract "linux-${CT_KERNEL_VERSION}"
|
||||
CT_Patch "linux-${CT_KERNEL_VERSION}"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Wrapper to the actual headers install method
|
||||
do_kernel_headers() {
|
||||
CT_DoStep INFO "Installing kernel headers"
|
||||
|
||||
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then
|
||||
do_kernel_custom
|
||||
else
|
||||
do_kernel_install
|
||||
fi
|
||||
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
# Install kernel headers using headers_install from kernel sources.
|
||||
do_kernel_install() {
|
||||
CT_DoLog DEBUG "Using kernel's headers_install"
|
||||
|
||||
mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
|
||||
cd "${CT_BUILD_DIR}/build-kernel-headers"
|
||||
|
||||
# Only starting with 2.6.18 does headers_install is usable. We only
|
||||
# have 2.6 version available, so only test for sublevel.
|
||||
k_sublevel=$(awk '/^SUBLEVEL =/ { print $3 }' "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}/Makefile")
|
||||
[ ${k_sublevel} -ge 18 ] || CT_Abort "Kernel version >= 2.6.18 is needed to install kernel headers."
|
||||
|
||||
V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}"
|
||||
|
||||
CT_DoLog EXTRA "Installing kernel headers"
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" \
|
||||
O=$(pwd) \
|
||||
ARCH=${CT_KERNEL_ARCH} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
headers_install
|
||||
|
||||
if [ "${CT_KERNEL_LINUX_INSTALL_CHECK}" = "y" ]; then
|
||||
CT_DoLog EXTRA "Checking installed headers"
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" \
|
||||
O=$(pwd) \
|
||||
ARCH=${CT_KERNEL_ARCH} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
headers_check
|
||||
find "${CT_SYSROOT_DIR}" -type f -name '.check*' -exec rm {} \;
|
||||
fi
|
||||
}
|
||||
|
||||
# Use custom headers (most probably by using make headers_install in a
|
||||
# modified (read: customised) kernel tree, or using pre-2.6.18 headers, such
|
||||
# as 2.4). In this case, simply copy the headers in place
|
||||
do_kernel_custom() {
|
||||
local tar_opt
|
||||
|
||||
CT_DoLog EXTRA "Installing custom kernel headers"
|
||||
|
||||
mkdir -p "${CT_SYSROOT_DIR}/usr"
|
||||
cd "${CT_SYSROOT_DIR}/usr"
|
||||
if [ "${CT_KERNEL_LINUX_CUSTOM_IS_TARBALL}" = "y" ]; then
|
||||
case "${CT_KERNEL_LINUX_CUSTOM_PATH}" in
|
||||
*.tar) ;;
|
||||
*.tgz) tar_opt=--gzip;;
|
||||
*.tar.gz) tar_opt=--gzip;;
|
||||
*.tar.bz2) tar_opt=--bzip2;;
|
||||
*.tar.lzma) tar_opt=--lzma;;
|
||||
esac
|
||||
CT_DoExecLog ALL tar x ${tar_opt} -vf ${CT_KERNEL_LINUX_CUSTOM_PATH}
|
||||
else
|
||||
CT_DoExecLog ALL cp -rv "${CT_KERNEL_LINUX_CUSTOM_PATH}/include" .
|
||||
fi
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
. ${CT_LIB_DIR}/scripts/build/kernel/linux-common.sh
|
@ -91,7 +91,8 @@ CT_DoLog INFO "Building environment variables"
|
||||
. "${CT_LIB_DIR}/scripts/build/companion_libs/gmp.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/companion_libs/ppl.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/binutils.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/binutils/binutils.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/binutils/elf2flt.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
|
||||
. "${CT_LIB_DIR}/scripts/build/tools.sh"
|
||||
|
Loading…
x
Reference in New Issue
Block a user