Introduce a new EXPERIMENTAL feature: BARE_METAL.
This should ultimately llow to build bare-metal compilers, for targets that have no kernel and no C library.
Move the C library build script to their own sub-directory; introduce an empty build script for bare-metal.
Move the compiler build script to its own sub-directory.
Move the kernel build script to its own sub-directory; introduce an empty build script for bare-metal.
Update the ARM target tuples to enable bare-metal targets.
Add two ARM bare-metal samples.
Add latest Linux kernel versions.
/trunk/scripts/build/kernel/none.sh | 77 6 71 0 +----
/trunk/scripts/build/cc/gcc.sh | 58 41 17 0 ++-
/trunk/scripts/build/libc/none.sh | 513 9 504 0 +-----------------------------
/trunk/scripts/crosstool.sh | 17 9 8 0 +
/trunk/scripts/functions | 6 4 2 0 +
/trunk/scripts/showSamples.sh | 6 3 3 0
/trunk/samples/arm-unknown-elf/crosstool.config | 225 225 0 0 +++++++++++++
/trunk/samples/arm-unknown-eabi/crosstool.config | 223 223 0 0 +++++++++++++
/trunk/config/kernel/linux_headers_install.in | 64 27 37 0 ++--
/trunk/config/kernel.in | 9 8 1 0 +
/trunk/config/toolchain.in | 1 1 0 0 +
/trunk/config/cc/gcc.in | 3 3 0 0 +
/trunk/config/debug/dmalloc.in | 1 1 0 0 +
/trunk/config/debug/gdb.in | 4 3 1 0 +
/trunk/config/debug/strace.in | 1 1 0 0 +
/trunk/config/debug/duma.in | 1 1 0 0 +
/trunk/config/cc.in | 8 8 0 0 +
/trunk/config/target.in | 13 13 0 0 +
/trunk/config/binutils.in | 1 1 0 0 +
/trunk/config/gmp_mpfr.in | 1 1 0 0 +
/trunk/config/libc.in | 17 11 6 0 +
/trunk/arch/arm/functions | 3 1 2 0 -
22 files changed, 600 insertions(+), 652 deletions(-)
1 # This file declares functions to install the kernel headers for linux
2 # Copyright 2007 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 [ "${CT_KERNEL}" = "linux" ] || return 0
7 echo "linux-${CT_KERNEL_VERSION}"
12 if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" ]; then
13 CT_GetFile "${CT_KERNEL_FILE}" {ftp,http}://ftp.kernel.org/pub/linux/kernel/v2.{6{,/testing},4,2}
20 if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" ]; then
21 CT_ExtractAndPatch "${CT_KERNEL_FILE}"
26 # Wrapper to the actual headers install method
28 CT_DoStep INFO "Installing kernel headers"
30 if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
31 do_kernel_preinstalled
39 # Install kernel headers using headers_install from kernel sources.
41 CT_DoLog DEBUG "Using kernel's headers_install"
43 mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
44 cd "${CT_BUILD_DIR}/build-kernel-headers"
46 # Only starting with 2.6.18 does headers_install is usable. We only
47 # have 2.6 version available, so only test for sublevel.
48 k_sublevel=$(awk '/^SUBLEVEL =/ { print $3 }' "${CT_SRC_DIR}/${CT_KERNEL_FILE}/Makefile")
49 [ ${k_sublevel} -ge 18 ] || CT_Abort "Kernel version >= 2.6.18 is needed to install kernel headers."
51 V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}"
53 CT_DoLog EXTRA "Installing kernel headers"
55 make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \
57 ARCH=${CT_KERNEL_ARCH} \
58 INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
62 if [ "${CT_KERNEL_LINUX_HEADERS_INSTALL_CHECK}" = "y" ]; then
63 CT_DoLog EXTRA "Checking installed headers"
65 make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \
67 ARCH=${CT_KERNEL_ARCH} \
68 INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
71 find "${CT_SYSROOT_DIR}" -type f -name '.check*' -exec rm {} \;
75 # Use preinstalled headers (most probably by using make headers_install in a
76 # modified (read: customised) kernel tree, or using pre-2.6.18 headers, such
77 # as 2.4). In this case, simply copy the headers in place
78 do_kernel_preinstalled() {
79 CT_DoLog EXTRA "Copying preinstalled kernel headers"
81 mkdir -p "${CT_SYSROOT_DIR}/usr"
82 cd "${CT_KERNEL_LINUX_HEADERS_CUSTOM_DIR}"
83 cp -rv include "${CT_SYSROOT_DIR}/usr" 2>&1 |CT_DoLog ALL