scripts/build/tools/200-sstrip.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Sep 14 16:21:07 2008 +0000 (2008-09-14)
changeset 850 ef8549b58b6f
parent 713 e074abc50374
child 916 68af6b83ff7e
permissions -rw-r--r--
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(-)
yann@479
     1
# This will build and install sstrip to run on host and sstrip target files
yann@479
     2
yann@479
     3
is_enabled="${CT_SSTRIP}"
yann@479
     4
yann@479
     5
case "${CT_SSTRIP_FROM}" in
yann@479
     6
    ELFkickers)
yann@479
     7
        do_print_filename() {
yann@479
     8
            echo "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
yann@479
     9
        }
yann@479
    10
        do_tools_sstrip_get() {
yann@479
    11
            CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"     \
yann@479
    12
                       http://www.muppetlabs.com/~breadbox/pub/software
yann@479
    13
        }
yann@479
    14
        do_tools_sstrip_extract() {
yann@479
    15
            CT_ExtractAndPatch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
yann@479
    16
        }
yann@479
    17
        do_tools_sstrip_build() {
yann@479
    18
            CT_DoStep INFO "Installing sstrip"
yann@479
    19
            mkdir -p "${CT_BUILD_DIR}/build-strip"
yann@479
    20
            cd "${CT_BUILD_DIR}/build-strip"
yann@479
    21
            ( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf -
yann@479
    22
yann@479
    23
            CT_DoLog EXTRA "Building sstrip"
yann@669
    24
            CT_DoExecLog ALL make CC="${CT_CC_NATIVE}" sstrip
yann@479
    25
            
yann@479
    26
            CT_DoLog EXTRA "Installing sstrip"
yann@669
    27
            CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
yann@479
    28
yann@479
    29
            CT_EndStep
yann@479
    30
        }
yann@479
    31
    ;;
yann@479
    32
yann@479
    33
    buildroot)
yann@479
    34
        do_print_filename() {
yann@479
    35
            echo "sstrip.c"
yann@479
    36
        }
yann@479
    37
        do_tools_sstrip_get() {
yann@713
    38
            # Note: the space between sstrip and .c is on purpose.
yann@713
    39
            CT_GetFile sstrip .c    \
yann@713
    40
                       "http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/buildroot/toolchain/sstrip/"
yann@479
    41
        }
yann@479
    42
        do_tools_sstrip_extract() {
yann@479
    43
            # We'll let buildroot guys take care of sstrip maintenance and patching.
yann@479
    44
            mkdir -p "${CT_SRC_DIR}/sstrip"
yann@669
    45
            CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
yann@479
    46
        }
yann@479
    47
        do_tools_sstrip_build() {
yann@479
    48
            CT_DoStep INFO "Installing sstrip"
yann@479
    49
            mkdir -p "${CT_BUILD_DIR}/build-sstrip"
yann@479
    50
            cd "${CT_BUILD_DIR}/build-sstrip"
yann@479
    51
yann@479
    52
            CT_DoLog EXTRA "Building sstrip"
yann@669
    53
            CT_DoExecLog ALL ${CT_CC_NATIVE} -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
yann@479
    54
yann@479
    55
            CT_DoLog EXTRA "Installing sstrip"
yann@669
    56
            CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
yann@479
    57
yann@479
    58
            CT_EndStep
yann@479
    59
        }
yann@479
    60
    ;;
yann@479
    61
yann@479
    62
    *)  do_print_filename() {
yann@479
    63
            :
yann@479
    64
        }
yann@479
    65
        do_tools_sstrip_get() {
yann@479
    66
            :
yann@479
    67
        }
yann@479
    68
        do_tools_sstrip_extract() {
yann@479
    69
            :
yann@479
    70
        }
yann@479
    71
        do_tools_sstrip_build() {
yann@479
    72
            :
yann@479
    73
        }
yann@479
    74
    ;;
yann@479
    75
esac