Changeset 10629f7 in rtems


Ignore:
Timestamp:
Oct 20, 1999, 3:29:12 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
5f7b118
Parents:
1410dc36
Message:

New version from Ralf.

Location:
scripts
Files:
19 added
9 edited

Legend:

Unmodified
Added
Removed
  • scripts/TODO

    r1410dc36 r10629f7  
    11
    2 use mk* to insert tool version numbers. :)
    3 
    4 make gcc/newlib work
    5 
    6 write gdb one.
    7   /opt/rtems/@target_alias@/include/readline*
  • scripts/buildall

    r1410dc36 r10629f7  
    33#  Generate all the specs and then cycle through building them.
    44#
    5 
    6 RTEMS_DIR=`dirname $0`
    75
    86# This is the full list .. hppa1.1 does not build now.
     
    1816# This is what we are building this time
    1917#TARGETS=${ALL_TARGETS}
    20 TARGETS="sh-rtems"
    21 
    22 testing=no
    23 
    24 binutils=990901
    25 gcc=2.95.1
    26 gdb=4.18
    27 newlib=1.8.2
    28 buildroot=/opt/tmp
    29 
    30 #
    31 #  Now get started
    32 #
    33 start=`date`
    34 
    35 
    36 echo PATH=$PATH
    37 
    38 if [ ${testing} = yes ] ; then
    39   ECHO=echo
    40 fi
    41 
    42 installed_count=`rpm -qa | grep rtems | wc -l`
    43 if [ ${installed_count} -ne 0 ] ; then
    44   echo This script should be run with NO rtems RPMs installed.
    45   echo It appears that the following rtems RPMs are installed:
    46   echo
    47   rpm -qa | grep rtems
    48   echo
    49   echo Please remove these and restart this script.
    50   exit 1
    51 fi
     18TARGETS="i386-rtems m68k-rtems powerpc-rtems sh-rtems"
    5219
    5320# Some linux distributions use /usr/src/packages
     
    6835for target in ${TARGETS}
    6936do
    70   ${ECHO} ${RTEMS_DIR}/mkspec ${target}
     37  ./mkspec ${target}
    7138done
    7239
     
    7542test -d log || mkdir log
    7643
    77 
    78 #  do all the tools
     44#  do all the binutils
    7945for target in ${TARGETS}
    8046do
    81   logfile=log/${target}-binutils
    82   specfile=${dst}/${target}-binutils-${binutils}.spec
    83   echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
    84   if [ ${testing} = no ] ; then
    85     rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
    86   fi
    87   ${ECHO} rm -rf ${dst}/../BUILD/${target}-binutils*
    88   ${ECHO} rm -rf ${buildroot}/opt
     47  rpm -ba --buildroot=/opt/tmp \
     48     ${dst}/${target}-binutils.spec >log/${target}-binutils 2>&1
     49  rm -rf ${dst}/../BUILD/${target}-binutils
     50  rm -rf /opt/tmp/opt
    8951
    9052  # now build gdb
    91   logfile=log/${target}-gdb
    92   specfile=${dst}/${target}-gdb-${gdb}.spec
    93   echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
    94   if [ ${testing} = no ] ; then
    95     rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
    96   fi
    97   ${ECHO} rm -rf ${dst}/../BUILD/${target}-gdb*
    98   ${ECHO} rm -rf ${buildroot}/opt
     53  rpm -ba --buildroot=/opt/tmp \
     54     ${dst}/${target}-gdb.spec >log/${target}-gdb 2>&1
     55  rm -rf ${dst}/../BUILD/${target}-gdb
     56  rm -rf /opt/tmp/opt
    9957
    10058  # now build gcc/newlib
    10159  #    NOTE: This requires having binutils installed and we immediately
    10260  #          remove it once finished.
    103   ${ECHO} rpm -i ${dst}/../RPMS/i386/${target}-binutils-${binutils}-0.i386.rpm
     61  rpm -i ${dst}/../RPMS/i386/${target}-binutils-19991011-0.i386.rpm
    10462
    105   logfile=log/${target}-gccnewlib
    106   specfile=${dst}/${target}-gcc-${gcc}-newlib-${newlib}.spec
    107   echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
    108   if [ ${testing} = no ] ; then
    109     rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
    110   fi
    111   ${ECHO} rm -rf ${dst}/../BUILD/${target}-gcc*
    112   ${ECHO} rm -rf ${buildroot}/opt
     63  rpm -ba --buildroot=/opt/tmp \
     64     ${dst}/${target}-gcc_newlib.spec >log/${target}-gccnewlib 2>&1
     65  rm -rf ${dst}/../BUILD/${target}-gcc_newlib
     66  rm -rf /opt/tmp/opt
    11367
    114   echo uninstalling binutils for ${target}
    115   if [ ${testing} = no ] ; then
    116     rpm -e `rpm -qa | grep rtems`
    117   fi
     68  rpm -e `rpm -qa | grep rtems`
    11869done
    11970
    120 staging_dir=/usr3/rtems_cds/test_cd/linux
     71mv ${dst}/../RPMS/i386/*.rpm /usr3/rtems_cds/test_cd/RPMS
     72mv ${dst}/../SRPMS/*.rpm /usr3/rtems_cds/test_cd/SRPMS
    12173
    122 ${ECHO} mkdir ${staging_dir}
    123 ${ECHO} mkdir ${staging_dir}/RPMS
    124 ${ECHO} mkdir ${staging_dir}/SRPMS
    125 
    126 echo Moving RPMs to CD staging directory
    127 for file in `ls -1 ${dst}/../RPMS/i386/*.rpm 2>/dev/null`
    128 do
    129   ${ECHO} mv ${file} ${staging_dir}/RPMS
    130 done
    131 
    132 echo Moving SRPMs to CD staging directory
    133 for file in `ls -1 ${dst}/../SRPMS/*.rpm 2>/dev/null`
    134 do
    135   ${ECHO} mv ${file} ${staging_dir}/SRPMS
    136 done
    137 
    138 # Now we are done
    139 
    140 stop=`date`
    141 
    142 echo
    143 echo "Started:  " $start
    144 echo "Finished: " $stop
    14574exit 0
  • scripts/gccnewlib.spec.in

    r1410dc36 r10629f7  
    66# please send bugfixes or comments to joel@OARcorp.com
    77#
    8 
    9 # neededforbuild  @target_alias@-binutils @target_alias@-gcc
    108
    119Vendor:       OAR Corporation
     
    4038
    4139%prep
    42 # untar the sources inside @target_alias@-gcc-newlib
     40# untar the sources inside @target_alias@-gcc-newlib -@Version@
    4341%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
    4442
     
    4947
    5048  # Now link the C library into the source tree
    51   ln -s ../newlib-@newlib_version@/newlib .
     49  ln -s ../newlib-1.8.2/newlib .
    5250)
    5351
     
    5755  ../gcc-@gcc_version@/configure --target=@target_alias@ \
    5856    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
    59     --prefix=/opt/rtems
    60 
    61   test -d $RPM_BUILD_ROOT/opt \
    62     || mkdir $RPM_BUILD_ROOT/opt
    63   test -d $RPM_BUILD_ROOT/opt/rtems \
    64     || mkdir $RPM_BUILD_ROOT/opt/rtems
    65   test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@ \
    66     || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@
    67   test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
    68     || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include
    69   test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include \
    70     || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
     57    --prefix=/opt/rtems --enable-languages="c c++"
     58  ../gcc-@gcc_version@/mkinstalldirs \
     59    $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include \
     60    $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include
    7161
    7262  srclimits=../gcc-@gcc_version@/newlib/libc/sys/rtems/include/limits.h
     
    9484  cd @target_alias@/newlib
    9585  make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
     86# gzip info files
     87  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
     88  gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null
    9689)
    9790
     91%post
     92  if test -d $RPM_INSTALL_PREFIX/rtems/info;
     93  then
     94    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
     95    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
     96    test -n "$f" && for i in $f; do
     97      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
     98    done
     99  fi
     100
     101%postun
     102  if test -d $RPM_INSTALL_PREFIX/rtems/info;
     103  then
     104    rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
     105    f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
     106    test -n "$f" && for i in $f; do
     107      install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
     108    done
     109  fi
     110
    98111%files
    99 %dir /opt/rtems
    100 %dir /opt/rtems/bin
    101112%dir /opt/rtems/info
    102 %dir /opt/rtems/lib
    103 %dir /opt/rtems/lib/gcc-lib
    104 %dir /opt/rtems/lib/gcc-lib/@target_alias@
    105 %dir /opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@
    106 %dir /opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include
    107 %dir /opt/rtems/@target_alias@
    108 %dir /opt/rtems/@target_alias@/include
    109 %dir /opt/rtems/@target_alias@/sys-include
    110 %dir /opt/rtems/@target_alias@/lib
    111 %dir /opt/rtems/man
    112 %dir /opt/rtems/man/man1
    113 
     113%doc /opt/rtems/info/dir
    114114%doc /opt/rtems/info/chill.info*
    115115%doc /opt/rtems/info/cpp.info*
     
    118118%doc /opt/rtems/info/libc.info*
    119119%doc /opt/rtems/info/libm.info*
     120
     121%dir /opt/rtems/man
     122%dir /opt/rtems/man/man1
    120123%doc /opt/rtems/man/man1/cccp.1
    121124%doc /opt/rtems/man/man1/@target_alias@-gcc.1
    122125%doc /opt/rtems/man/man1/@target_alias@-g++.1
    123126
     127%dir /opt/rtems/bin
    124128/opt/rtems/bin/cpp
    125129/opt/rtems/bin/@target_alias@-c++
     
    127131/opt/rtems/bin/@target_alias@-gcc
    128132/opt/rtems/bin/@target_alias@-gcj
     133%dir /opt/rtems/lib
     134%dir /opt/rtems/lib/gcc-lib
     135%dir /opt/rtems/lib/gcc-lib/@target_alias@
    129136/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@
    130137/opt/rtems/@target_alias@/include
  • scripts/gdb.spec.in

    r1410dc36 r10629f7  
    2020Packager:     corsepiu@faw.uni-ulm.de and joel@OARcorp.com
    2121
    22 Version:      gdb@gdb_version@
     22Version:      @Version@
    2323Summary:      gdb for target @target_alias@
    24 Source0:        gdb-@gdb_version@.tar.gz
    25 Patch0:         gdb-@gdb_version@-rtems-@gdb_patch_version@.diff
     24Source0:        gdb-4.18.tar.gz
     25Patch0:         gdb-4.18-rtems-19991015.diff
    2626
    2727Buildroot:    /tmp
     
    3838
    3939%prep
    40 # untar the sources inside @target_alias@-gdb
     40# untar the sources inside @target_alias@-gdb-@Version@
    4141%setup -c -n @target_alias@-gdb -a 0
    4242
     
    4646test -d build || mkdir build
    4747( cd build
    48   ../gdb-@gdb_version@/configure --target=@target_alias@ \
     48  ../gdb-4.18/configure --target=@target_alias@ \
    4949    --verbose --prefix=/opt/rtems
    5050
     
    6565
    6666%files
    67 %dir /opt/rtems
    68 %dir /opt/rtems/bin
    69 %dir /opt/rtems/include
    70 %dir /opt/rtems/info
    71 %dir /opt/rtems/lib
    72 %dir /opt/rtems/man
    73 %dir /opt/rtems/man/man1
    74 
    7567%doc /opt/rtems/info/gdb.info*
    7668%doc /opt/rtems/info/mmalloc.info*
  • scripts/mkbinutilspec

    r1410dc36 r10629f7  
    11#!/bin/sh
    22#
    3 #  Usage: mktoolspec CPU
     3#  Usage: mkbinutilspec CPU
    44#
    55
    66RTEMS_DIR=`dirname $0`
    77
     8CFG=user.cfg
     9dst=/usr/src/packages/SPECS
     10
     11usage()
     12{
     13  echo "$0 [options] <target_alias>"
     14  echo "  options:"
     15  echo "    -cfg <user.cfg>"
     16  echo "    -o <rpm-spec-dir>"
     17  exit 1 ;
     18}
     19
     20while test $# -ge 2; do
     21case $1 in
     22-cfg)
     23  shift
     24  CFG=$1
     25  shift
     26  ;;
     27-o)
     28  shift
     29  dst=$1
     30  shift
     31  ;;
     32-*)
     33  echo "invalid option $1";
     34  usage
     35  ;;
     36esac
     37done
     38
     39if test ! $# -eq 1;
     40then
     41  echo "Invalid number of arguments"
     42  usage
     43fi
     44
     45# target to build for
    846target_alias=$1
    947
     
    1149rpm_release=0
    1250
    13 # binutils version number
    14 binutils_version=990901
    15 binutils_patch_version=19991015
    16 
    17 # Some linux distributions use /usr/src/packages
    18 # redhat uses /usr/src/redhat
    19 # others might use /usr/src
    20 if test -d /usr/src/packages/SPECS;
    21 then
    22 dst=/usr/src/packages/SPECS;
    23 elif test -d /usr/src/redhat/SPECS;
    24  then
    25 dst=/usr/src/redhat/SPECS;
    26 elif test -d /usr/src/SPECS/;
    27 then
    28 dst=/usr/src/SPECS;
    29 fi
     51. ./$CFG
    3052
    3153specfile=${dst}/$target_alias-binutils-${binutils_version}.spec
     
    3557    -e "s%@binutils_version@%${binutils_version}%g" \
    3658    -e "s%@binutils_patch_version@%${binutils_patch_version}%g" \
    37 < ${RTEMS_DIR}/binutils.spec.in \
     59< ${RTEMS_DIR}/binutils/binutils.spec.in \
    3860> ${specfile}
    3961
    40 echo Generated ${specfile}.
     62echo Generated ${specfile}
  • scripts/mkgccnewlibspec

    r1410dc36 r10629f7  
    66RTEMS_DIR=`dirname $0`
    77
     8CFG=user.cfg
     9dst=/usr/src/packages/SPECS
     10
     11usage()
     12{
     13  echo "$0 [options] <target_alias>"
     14  echo "  options:"
     15  echo "    -cfg <user.cfg>"
     16  echo "    -o <rpm-spec-dir>"
     17  exit 1 ;
     18}
     19
     20while test $# -ge 2; do
     21case $1 in
     22-cfg)
     23  shift
     24  CFG=$1
     25  shift
     26  ;;
     27-o)
     28  shift
     29  dst=$1
     30  shift
     31  ;;
     32-*)
     33  echo "invalid option $1";
     34  usage
     35  ;;
     36esac
     37done
     38
     39if test ! $# -eq 1;
     40then
     41  echo "Invalid number of arguments"
     42  usage
     43fi
     44
     45# target to build for
    846target_alias=$1
    947
     
    1149rpm_release=0
    1250
    13 # gcc version number
    14 gcc_version=2.95.1
    15 gcc_patch_version=19991015
    16 
    17 # newlib version number
    18 newlib_version=1.8.2
    19 newlib_patch_version=19991015
    20 
    21 # Some linux distributions use /usr/src/packages
    22 # redhat uses /usr/src/redhat
    23 # others might use /usr/src
    24 if test -d /usr/src/packages/SPECS;
    25 then
    26 dst=/usr/src/packages/SPECS;
    27 elif test -d /usr/src/redhat/SPECS;
    28  then
    29 dst=/usr/src/redhat/SPECS;
    30 elif test -d /usr/src/SPECS/;
    31 then
    32 dst=/usr/src/SPECS;
    33 fi
     51. ./$CFG
    3452
    3553specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
     54
    3655sed -e "s%@Release@%${rpm_release}%g" \
    3756    -e "s%@target_alias@%${target_alias}%g" \
     
    4059    -e "s%@newlib_version@%${newlib_version}%g" \
    4160    -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
    42 < ${RTEMS_DIR}/gccnewlib.spec.in \
     61< ${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in \
    4362> ${specfile}
    4463
  • scripts/mkgdbspec

    r1410dc36 r10629f7  
    55
    66RTEMS_DIR=`dirname $0`
     7RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
     8sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
    79
    810target_alias=$1
    9 
    10 # RPM release number
    11 rpm_release=0
    12 
    13 # gdb version number
    14 gdb_version=4.18
    15 gdb_patch_version=19991015
     11release=0
    1612
    1713# Some linux distributions use /usr/src/packages
     
    2925fi
    3026
    31 specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
    32 
    33 sed -e "s%@Release@%${rpm_release}%g" \
    34     -e "s%@target_alias@%${target_alias}%g" \
    35     -e "s%@gdb_version@%${gdb_version}%g" \
    36     -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
     27sed -e "s%@Version@%${RTEMS_VERSION}%g" \
     28-e "s%@bsp@%${bsp}%g" \
     29-e "s%@Release@%${release}%g" \
     30-e "s%@target_alias@%${target_alias}%g" \
    3731< ${RTEMS_DIR}/gdb.spec.in \
    38 > ${specfile}
     32> ${dst}/$target_alias-gdb.spec
    3933
    4034case ${target} in
     
    4741     ;;
    4842  *) ;;
    49 esac >> ${specfile}
     43esac >> ${dst}/$target_alias-gdb.spec
    5044
    51 echo Generated ${specfile}.
     45echo Generated ${dst}/$target_alias-gdb.spec.
  • scripts/mkspec

    r1410dc36 r10629f7  
    1414#${RTEMS_DIR}/scripts/mkgccnewlibspec $target_alias
    1515#${RTEMS_DIR}/scripts/mkgdbspec $target_alias
    16 ${RTEMS_DIR}/mkbinutilspec $target_alias
    17 ${RTEMS_DIR}/mkgccnewlibspec $target_alias
    18 ${RTEMS_DIR}/mkgdbspec $target_alias
     16./mkbinutilspec $target_alias
     17./mkgccnewlibspec $target_alias
     18./mkgdbspec $target_alias
    1919
  • scripts/rtems.spec.in

    r1410dc36 r10629f7  
    66# please send bugfixes or comments to joel@OARcorp.com
    77#
    8 
    9 # neededforbuild  @target_alias@-binutils @target_alias@-gcc
    108
    119Vendor:       OAR Corporation
     
    5856%install
    5957  make RTEMS_BSP=@bsp@ prefix=$RPM_BUILD_ROOT/opt/rtems/@target_alias@ install
    60 %files
    61 %dir /opt/rtems/@target_alias@/@bsp@
    62 /opt/rtems/@target_alias@/@bsp@/*
    63 /opt/rtems/@target_alias@/make/*
    64 /opt/rtems/@target_alias@/bin/install-if-change
    65 /opt/rtems/@target_alias@/bin/packhex
    66 /opt/rtems/@target_alias@/bin/unhex
    67 /opt/rtems/@target_alias@/bin/lock-directory
    68 /opt/rtems/@target_alias@/bin/unlock-directory
    69 /opt/rtems/@target_alias@/bin/eolstrip
    70 /opt/rtems/@target_alias@/bin/cklength
     58  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/@bsp@ -type d | \
     59    sed "s,^$RPM_BUILD_ROOT,%dir ,g" > files
     60  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/@bsp@ -type f | \
     61    sed "s,^$RPM_BUILD_ROOT,,g" >> files
     62  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/make -type d | \
     63    sed "s,^$RPM_BUILD_ROOT,%dir ,g" >> files
     64  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/make -type f | \
     65    sed "s,^$RPM_BUILD_ROOT,,g" >> files
     66
     67%post
     68  if test "$RPM_INSTALL_PREFIX" != "/opt/";
     69  then
     70    if test -f $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg;
     71    then
     72    sed -e 's,/opt/rtems/,$RPM_INSTALL_PREFIX/rtems,g' \
     73      < $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg \
     74      > $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg~
     75    mv $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg~ \
     76      $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg
     77    fi
     78  fi
     79
     80%files -f files
Note: See TracChangeset for help on using the changeset viewer.