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 # Build script for D.U.M.A.
3 is_enabled="${CT_DUMA}"
6 [ "${CT_DUMA}" = "y" ] || return 0
7 echo "duma_${CT_DUMA_VERSION}"
11 CT_GetFile "duma_${CT_DUMA_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/duma/
12 # D.U.M.A. doesn't separate its name from its version with a dash,
13 # but with an underscore. Create a link so that crosstool-NG can
15 CT_Pushd "${CT_TARBALLS_DIR}"
16 duma_ext=$(CT_GetFileExtension "duma_${CT_DUMA_VERSION}")
17 rm -f "duma-${CT_DUMA_VERSION}${duma_ext}"
18 ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}"
19 # Downloading from sourceforge leaves garbage, cleanup
20 rm -f showfiles.php\?group_id\=*
24 do_debug_duma_extract() {
25 CT_ExtractAndPatch "duma-${CT_DUMA_VERSION}"
27 rm -f "duma-${CT_DUMA_VERSION}"
28 ln -sf "duma_${CT_DUMA_VERSION}" "duma-${CT_DUMA_VERSION}"
31 do_debug_duma_build() {
32 CT_DoStep INFO "Installing D.U.M.A."
33 CT_DoLog EXTRA "Copying sources"
34 cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}" "${CT_BUILD_DIR}/build-duma"
35 CT_Pushd "${CT_BUILD_DIR}/build-duma"
38 [ "${CT_CC_LANG_CXX}" = "y" ] && DUMA_CPP=1
40 # The shared library needs some love: some version have libduma.so.0.0,
41 # while others have libduma.so.0.0.0
42 duma_so=$(make -n -p 2>&1 |egrep '^libduma.so[^:]*:' |head -n 1 |cut -d : -f 1)
45 [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a"
46 [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} ${duma_so}"
48 CT_DoLog EXTRA "Building libraries '${libs}'"
50 make HOSTCC="${CT_CC_NATIVE}" \
51 HOSTCXX="${CT_CC_NATIVE}" \
52 CC="${CT_TARGET}-gcc" \
53 CXX="${CT_TARGET}-gcc" \
54 RANLIB="${CT_TARGET}-ranlib" \
55 DUMA_CPP="${DUMA_CPP}" \
57 CT_DoLog EXTRA "Installing libraries '${libs}'"
58 CT_DoExecLog ALL install -m 644 ${libs} "${CT_SYSROOT_DIR}/usr/lib"
59 if [ "${CT_DUMA_SO}" = "y" ]; then
60 CT_DoLog EXTRA "Installing shared library link"
61 ln -vsf ${duma_so} "${CT_SYSROOT_DIR}/usr/lib/libduma.so" 2>&1 |CT_DoLog ALL
62 CT_DoLog EXTRA "Installing wrapper script"
63 mkdir -p "${CT_DEBUG_INSTALL_DIR}/usr/bin"
64 # Install a simpler, smaller, safer wrapper than the one provided by D.U.M.A.
65 sed -r -e 's:^LIBDUMA_SO=.*:LIBDUMA_SO=/usr/lib/'"${duma_so}"':;' \
66 "${CT_LIB_DIR}/scripts/build/debug/duma.in" \
67 >"${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"
68 chmod 755 "${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"