tools/patch-renumber.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Oct 14 17:42:10 2008 +0000 (2008-10-14)
changeset 929 7c958fb04f28
permissions -rwxr-xr-x
Sample config for e500v2 toolchain

On Tuesday 14 October 2008 17:05:31 Nate Case wrote:
> This is a sample config file for Freescale e500v2 processors (e.g.,
> MPC8548, MPC8572). It uses eglibc (for e500/SPE patches) and a recent
> gcc (4.3.1, for e500v2 DPFP support) and will generate appropriate
> dual-precision floating point instructions by default.
>
> Note: If building a Linux kernel with this toolchain, you will want to
> make sure -mno-spe AND -mspe=no are passed to gcc to prevent SPE
> ABI/instructions from getting into the kernel (which is currently
> unsupported). At this time, the kernel build system only passes
> -mno-spe by default (this should be fixed soon hopefully).
>
> A binutils snapshot is used to fix a bug present in 2.18 preventing
> U-Boot from being compiled (CodeSourcery issue #2297: internal.h
> (ELF_IS_SECTION_IN_SEGMENT): Adjust to cope with segments at the end of
> memory).

Obsoletes the powerpc-unknown-linux-gnuspe sample, so remove it.

/trunk/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 307 307 0 0 +++++++++++++++++++
1 file changed, 307 insertions(+)
yann@756
     1
#!/bin/sh
yann@756
     2
# Yes, this intends to be a true POSIX script file.
yann@756
     3
yann@756
     4
myname="$0"
yann@756
     5
yann@756
     6
doUsage() {
yann@756
     7
  cat <<_EOF_
yann@756
     8
Usage: ${myname} <dir> <base> <inc>
yann@756
     9
    Will renumber all patches found in <dir>, starting at <base>, and with
yann@756
    10
    an increment of <inc>
yann@756
    11
    Eg.: patch-renumber patches/gcc/4.3.1 100 10
yann@756
    12
_EOF_
yann@756
    13
}
yann@756
    14
yann@756
    15
[ $# -eq 3 ] || { doUsage; exit 1; }
yann@756
    16
[ -d "${1}" ] || { doUsage; exit 1; }
yann@756
    17
yann@756
    18
dir="${1}"
yann@756
    19
cpt="${2}"
yann@756
    20
inc="${3}"
yann@756
    21
yann@756
    22
case $(LC_ALL=C svnversion 2>/dev/null) in
yann@756
    23
    exported)   CMD="mv -v";;
yann@756
    24
    *)          CMD="svn mv";;
yann@756
    25
esac
yann@756
    26
yann@756
    27
for p in "${dir}"/*.patch; do
yann@756
    28
    [ -e "${p}" ] || { echo "No such file '${p}'"; exit 1; }
yann@756
    29
    newname="$(printf "%03d" ${cpt})-$(basename "${p}" |sed -r -e 's/^[[:digit:]]{3}-//')"
yann@756
    30
    [ "${p}" = "${dir}/${newname}" ] || ${CMD} "${p}" "${dir}/${newname}"
yann@756
    31
    cpt=$((cpt+inc))
yann@756
    32
done