Working on being able to cut RPMs. It now appears that the process

is working mostly for sparc at least.

There is one major problem -- the current process generates a unique
source file per RPM when in fact all of the source files are nearly
the same -- it is only the spec part of the rpm which differs.
The new file mkbinutils_subpackage_version is an attempt to
address this.  It does part of the job right -- one source file
produces multiple binary RPMs.  BUT the end user can not produce
the resulting RPMS themselves from SRPMS unless they also
build all targets.
This commit is contained in:
Joel Sherrill
1999-10-18 19:10:03 +00:00
parent 18408afbc7
commit 8c5e54b1af
12 changed files with 788 additions and 27 deletions
+154 -10
View File
@@ -16,20 +16,164 @@ bsp from an rpm-spec template (rtems.spec.in).
A second shell script (mkrpms) is a convienience script which invokes a
sequence of building rpms for several bsps.
mkbinutilspec
-------------
mkbinutilspec takes two arguments:
$1 ... the target_alias for binutils RPMs of this toolset
Invoking mkbinutilspec will generate a <target_alias>-binutils.spec either in
/usr/src/packages/SPECS (SuSE convention) or
/usr/src/redhat/SPECS (Redhat convention) or
/usr/src/SPECS
Eg. ./mkbinutilspec sparc-rtems generates
On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-binutils.spec
On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-binutils.spec
mkgccnewlibspec
---------------
mkgccnewlibspec takes two arguments:
$1 ... the target_alias for the gcc/newlib RPMs of this toolset
Invoking mkgccnewlibspec will generate a <target_alias>-gccnewlibs.spec
either in:
/usr/src/packages/SPECS (SuSE convention) or
/usr/src/redhat/SPECS (Redhat convention) or
/usr/src/SPECS
Eg. ./mkgccnewlibspec sparc-rtems generates
On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec
On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-gcc_newlib.spec
mkgdbspec
---------
mkgdbspec takes two arguments:
$1 ... the target_alias for the gdb RPMs of this toolset
Invoking mkgdbspec will generate a <target_alias>-gdb.spec
either in:
/usr/src/packages/SPECS (SuSE convention) or
/usr/src/redhat/SPECS (Redhat convention) or
/usr/src/SPECS
Eg. ./mkgdbspec sparc-rtems generates
On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec
On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-gcc_newlib.spec
# XXX BSPs not tested yet by Joel
#
# mkbspspec
# ---------
#
# mkbspspec takes two arguments:
# $1 ... the target_alias this bsp belongs to
# $2 ... the bsp to be built
#
# Invoking mkbspspec will generate a rtems-<target_alias>-<bsp>.spec either in
# /usr/src/packages/SPECS (SuSE convention) or
# /usr/src/redhat/SPECS (Redhat convention) or
# /usr/src/SPECS
#
# Eg. ./mkspec gensh1 sh-rtemself generates
# /usr/src/packages/SPECS/rtems-sh-rtemself-gensh1.spec on SuSE-6.2.
mkspec
------
---------
mkspec takes two arguments:
$1 ... the bsp to be built
$2 ... the target_alias this bsp belongs to
mkspec takes two arguments:
Invoking mkspecs will generate a rtems-<target_alias>-<bsp>.spec either in
/usr/src/packages/SPECS (SuSE convention) or
/usr/src/redhat/SPECS (Redhat convention) or
/usr/src/SPECS
$1 ... the target_alias for the RPMs composing this toolset
$2 ... the bsp to be built
Eg. ./mkspec gensh1 sh-rtemself generates
/usr/src/packages/SPECS/rtems-sh-rtemself-gensh1.spec on SuSE-6.2.
Invoking mkspec will generate a set of spec files either in:
/usr/src/packages/SPECS (SuSE convention) or
/usr/src/redhat/SPECS (Redhat convention) or
/usr/src/SPECS
Eg. ./mkspec sparc-rtems erc32 generates
On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-binutils.spec
/usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec
/usr/src/packages/SPECS/sparc-rtems-gdb.spec
On RedHat 6.0: /usr/src/packages/SPECS/sparc-rtems-binutils.spec
/usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec
/usr/src/packages/SPECS/sparc-rtems-gdb.spec
Building binutils-rpms
----------------------
0. Login as root.
1. Install a tarball of the various tool sources (with the
version number attached!) to /usr/src/[packages|redhat]/SOURCES
cd /usr/src/[packages|redhat]/SOURCES
cp .../binutils-<VERSION> .
cp .../binutils-<VERSION>-rtems-<DATE>.diff .
2. Generate and install the required rpm-spec file[s]
cd rtems-<VERSION>/scripts/
mkbinutilspec <target_alias>
where target_alias is of the form sparc-rtems or sh-rtems-elf.
3. Build the rpms
Building a binary rpm:
rpm -bb /usr/src/[packages|redhat]/SPECS/rtems-<target_alias>-binutils.spec
Building a source and binary rpm
rpm -ba /usr/src/[packages|redhat]/SPECS/rtems-<target_alias>-binutils.spec
XXX Note: a BSP's src.rpm contains its spec-file and the tar-archive of the
sources (approx. 4-5MB per BSP).
Building TOOL-rpms
------------------
0. Login as root.
1. Install a tarball of the various tool sources (with the
version number attached!) to /usr/src/[packages|redhat]/SOURCES
cd /usr/src/[packages|redhat]/SOURCES
cp .../binutils-<VERSION> .
cp .../gcc-<VERSION> .
cp .../newlib-<VERSION> .
2. Generate and install the required rpm-spec file[s]
cd rtems-<VERSION>/scripts/
mktoolspec <target_alias>
3. Build the rpms
Building a binary rpm:
rpm -bb /usr/src/[packages|redhat]/SPECS/rtems-<target_alias>.spec
Building a source and binary rpm
rpm -ba /usr/src/[packages|redhat]/SPECS/rtems-<target_alias>.spec
XXX Note: a BSP's src.rpm contains its spec-file and the tar-archive of the
sources (approx. 4-5MB per BSP).
Building BSP-rpms
-----------------
+7
View File
@@ -0,0 +1,7 @@
use mk* to insert tool version numbers. :)
make gcc/newlib work
write gdb one.
/opt/rtems/@target_alias@/include/readline*
+113
View File
@@ -0,0 +1,113 @@
#
# spec file for package rtems
#
# Copyright (c) 1999 OARCorp, Huntsville, AL
#
# please send bugfixes or comments to joel@OARcorp.com
#
# neededforbuild @target_alias@-binutils @target_alias@-gcc
Vendor: OAR Corporation
Distribution: Linux
Name: @target_alias@-binutils
Release: @Release@
Copyright: 1999 OARCorp
Group: unsorted
Provides: @target_alias@-binutils
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Version: @Version@
Summary: binutils for target @target_alias@
Source0: binutils-990901.tar.gz
Patch0: binutils-990901-rtems-19991015.diff
Buildroot: /tmp
# Patch:
%description
RTEMS is an open source operating system for embedded systems.
This is the GNU binutils for RTEMS targetting @target_alias@.
Authors:
--------
Joel Sherrill (joel@oarcorp.com)
...
%prep
# untar the sources inside @target_alias@-binutils-@Version@
%setup -c -n @target_alias@-binutils -a 0
%patch0 -p0
%build
test -d build || mkdir build
( cd build
../binutils-990901/configure --target=@target_alias@ \
--verbose --prefix=/opt/rtems
test -d $RPM_BUILD_ROOT/opt \
|| mkdir $RPM_BUILD_ROOT/opt
test -d $RPM_BUILD_ROOT/opt/rtems \
|| mkdir $RPM_BUILD_ROOT/opt/rtems
make all
make info
)
%install
( cd build
make prefix=$RPM_BUILD_ROOT/opt/rtems install
make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
)
%files
%doc /opt/rtems/info/as.info*
%doc /opt/rtems/info/bfd.info*
%doc /opt/rtems/info/binutils.info*
%doc /opt/rtems/info/gasp.info*
%doc /opt/rtems/info/ld.info*
%doc /opt/rtems/info/standards.info*
%doc /opt/rtems/man/man1/@target_alias@-ar.1
%doc /opt/rtems/man/man1/@target_alias@-nm.1
%doc /opt/rtems/man/man1/@target_alias@-objdump.1
%doc /opt/rtems/man/man1/@target_alias@-ranlib.1
%doc /opt/rtems/man/man1/@target_alias@-size.1
%doc /opt/rtems/man/man1/@target_alias@-strings.1
%doc /opt/rtems/man/man1/@target_alias@-strip.1
%doc /opt/rtems/man/man1/@target_alias@-objcopy.1
%doc /opt/rtems/man/man1/@target_alias@-addr2line.1
%doc /opt/rtems/man/man1/@target_alias@-nlmconv.1
%doc /opt/rtems/man/man1/@target_alias@-c++filt.1
%doc /opt/rtems/man/man1/@target_alias@-as.1
%doc /opt/rtems/man/man1/@target_alias@-ld.1
/opt/rtems/bin/@target_alias@-addr2line
/opt/rtems/bin/@target_alias@-ar
/opt/rtems/bin/@target_alias@-as
/opt/rtems/bin/@target_alias@-c++filt
/opt/rtems/bin/@target_alias@-gasp
/opt/rtems/bin/@target_alias@-ld
/opt/rtems/bin/@target_alias@-nm
/opt/rtems/bin/@target_alias@-objcopy
/opt/rtems/bin/@target_alias@-objdump
/opt/rtems/bin/@target_alias@-ranlib
/opt/rtems/bin/@target_alias@-readelf
/opt/rtems/bin/@target_alias@-size
/opt/rtems/bin/@target_alias@-strings
/opt/rtems/bin/@target_alias@-strip
/opt/rtems/include/bfd.h
/opt/rtems/include/ansidecl.h
/opt/rtems/include/bfdlink.h
/opt/rtems/lib/libbfd*
/opt/rtems/lib/libiberty*
/opt/rtems/lib/libopcodes*
/opt/rtems/@target_alias@/bin/ar
/opt/rtems/@target_alias@/bin/as
/opt/rtems/@target_alias@/bin/ld
/opt/rtems/@target_alias@/bin/nm
/opt/rtems/@target_alias@/bin/ranlib
/opt/rtems/@target_alias@/bin/strip
/opt/rtems/@target_alias@/lib/ldscripts
+116
View File
@@ -0,0 +1,116 @@
#
# spec file for package rtems
#
# Copyright (c) 1999 OARCorp, Huntsville, AL
#
# please send bugfixes or comments to joel@OARcorp.com
#
# neededforbuild @target_alias@-binutils @target_alias@-gcc
Vendor: OAR Corporation
Distribution: Linux
Name: @target_alias@-gcc-newlib
Release: @Release@
Copyright: 1999 OARCorp
Group: unsorted
Provides: @target_alias@-gcc-newlib
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Version: @Version@
Summary: rtems gcc and newlib C Library for target @target_alias@
Source0: gcc-2.95.1.tar.gz
Source1: newlib-1.8.2.tar.gz
Patch0: gcc-2.95.1-rtems-19991015.diff
Patch1: newlib-1.8.2-rtems-19991015.diff
Buildroot: /tmp
# Patch:
%description
RTEMS is an open source operating system for embedded systems.
This is gcc and newlib C Library for @target_alias@.
Authors:
--------
Joel Sherrill (joel@oarcorp.com)
...
%prep
# untar the sources inside @target_alias@-gcc-newlib -@Version@
%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
%patch0 -p0
%patch1 -p0
( cd gcc-2.95.1
# Now link the C library into the source tree
ln -s ../newlib-1.8.2/newlib .
)
%build
test -d build || mkdir build
( cd build
../gcc-2.95.1/configure --target=@target_alias@ \
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
--prefix=/opt/rtems
test -d $RPM_BUILD_ROOT/opt \
|| mkdir $RPM_BUILD_ROOT/opt
test -d $RPM_BUILD_ROOT/opt/rtems \
|| mkdir $RPM_BUILD_ROOT/opt/rtems
test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@ \
|| mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@
test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
|| mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include
test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include \
|| mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
srclimits=../gcc-2.95.1/newlib/libc/sys/rtems/include/limits.h
for dir in $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
$RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
do
cp ${srclimits} ${dir}
done
#make LANGUAGES="c c++" all
make all
make info
cd gcc
rm -f stmp-multilib
find . -name "*.a" -print | xargs -e rm -f
make all
cd ..
)
%install
( cd build
make prefix=$RPM_BUILD_ROOT/opt/rtems install
make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
)
%files
%doc /opt/rtems/info/chill.info*
%doc /opt/rtems/info/cpp.info*
%doc /opt/rtems/info/gcc.info*
%doc /opt/rtems/info/g77.info*
%doc /opt/rtems/info/libc.info*
%doc /opt/rtems/info/libm.info*
%doc /opt/rtems/man/man1/cccp.1
%doc /opt/rtems/man/man1/@target_alias@-gcc.1
%doc /opt/rtems/man/man1/@target_alias@-g++.1
/opt/rtems/bin/cpp
/opt/rtems/bin/@target_alias@-c++
/opt/rtems/bin/@target_alias@-g++
/opt/rtems/bin/@target_alias@-gcc
/opt/rtems/bin/@target_alias@-gcj
/opt/rtems/lib/gcc-lib/@target_alias@/2.95.1
/opt/rtems/@target_alias@/include*
/opt/rtems/@target_alias@/sys-include
/opt/rtems/@target_alias@/lib*
+76
View File
@@ -0,0 +1,76 @@
#
# spec file for package rtems
#
# Copyright (c) 1999 OARCorp, Huntsville, AL
#
# please send bugfixes or comments to joel@OARcorp.com
#
# neededforbuild -- nothing
Vendor: OAR Corporation
Distribution: Linux
Name: @target_alias@-gdb
Release: @Release@
Copyright: 1999 OARCorp
Group: unsorted
Provides: @target_alias@-gdb
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Version: @Version@
Summary: gdb for target @target_alias@
Source0: gdb-4.18.tar.gz
Patch0: gdb-4.18-rtems-19991015.diff
Buildroot: /tmp
# Patch:
%description
RTEMS is an open source operating system for embedded systems.
This is the GNU gdb for RTEMS targetting @target_alias@.
Authors:
--------
Joel Sherrill (joel@oarcorp.com)
...
%prep
# untar the sources inside @target_alias@-gdb-@Version@
%setup -c -n @target_alias@-gdb -a 0
%patch0 -p0
%build
test -d build || mkdir build
( cd build
../gdb-4.18/configure --target=@target_alias@ \
--verbose --prefix=/opt/rtems
test -d $RPM_BUILD_ROOT/opt \
|| mkdir $RPM_BUILD_ROOT/opt
test -d $RPM_BUILD_ROOT/opt/rtems \
|| mkdir $RPM_BUILD_ROOT/opt/rtems
make all
make info
)
%install
( cd build
make prefix=$RPM_BUILD_ROOT/opt/rtems install
make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
)
%files
%doc /opt/rtems/info/gdb.info*
%doc /opt/rtems/info/mmalloc.info*
%doc /opt/rtems/info/readline.info*
%doc /opt/rtems/man/man1/@target_alias@-gdb.1
/opt/rtems/bin/@target_alias@-gdb
/opt/rtems/include/bfd.h
/opt/rtems/include/bfdlink.h
/opt/rtems/lib/libbfd*
/opt/rtems/lib/libiberty*
+187
View File
@@ -0,0 +1,187 @@
#!/bin/sh
#
# Usage: mktoolspec CPU
#
RTEMS_DIR=`dirname $0`
RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
# target_alias=$1
TARGETS="i386-rtems sparc-rtems"
# should be $*
release=0
# Some linux distributions use /usr/src/packages
# redhat uses /usr/src/redhat
# others might use /usr/src
if test -d /usr/src/packages/SPECS;
then
dst=/usr/src/packages/SPECS;
elif test -d /usr/src/redhat/SPECS;
then
dst=/usr/src/redhat/SPECS;
elif test -d /usr/src/SPECS/;
then
dst=/usr/src/SPECS;
fi
# sed -e "s%@Version@%${RTEMS_VERSION}%g" \
# -e "s%@bsp@%${bsp}%g" \
# -e "s%@Release@%${release}%g" \
# -e "s%@target_alias@%${target_alias}%g" \
# < ${RTEMS_DIR}/binutils.spec.in \
# > ${dst}/$target_alias-binutils.spec
(
echo "#"
echo "# spec file for package rtems"
echo "# "
echo "# Copyright (c) 1999 OARCorp, Huntsville, AL"
echo "#"
echo "# please send bugfixes or comments to joel@OARcorp.com"
echo "#"
echo ""
# echo "# neededforbuild @target_alias@-binutils @target_alias@-gcc"
echo ""
echo "Vendor: OAR Corporation"
echo "Distribution: Linux"
echo "Name: rtems-binutils"
echo "Release: ${release}"
echo "Copyright: 1999 OARCorp"
echo "Group: unsorted"
echo "Provides: binutils for RTEMS"
echo ""
echo "Autoreqprov: on"
echo "Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com"
echo ""
echo "Version: ${RTEMS_VERSION}"
echo "Summary: binutils for RTEMS"
echo "Source0: binutils-990901.tar.gz"
echo "Patch0: binutils-990901-rtems-19991015.diff"
echo ""
echo "Buildroot: /tmp"
echo "# Patch:"
echo "%description"
echo "RTEMS is an open source operating system for embedded systems."
echo ""
echo "This is the GNU binutils for RTEMS targetting ${target_alias}."
echo ""
echo "Authors:"
echo "--------"
echo " Joel Sherrill (joel@oarcorp.com)"
echo " ..."
echo ""
#
# This has to be unrolled in the file
for target_alias in ${TARGETS}
do
echo "%package ${target_alias}"
echo "Summary: binutils for ${target_alias}"
echo "Group: unsorted"
echo ""
echo "%description ${target_alias}"
echo "binutils for ${target_alias}"
echo ""
done
echo "%prep"
echo "# untar the sources inside binutils-rtems"
echo "%setup -c -n binutils-rtems -a 0"
echo ""
echo "%patch0 -p0"
echo ""
echo "%build"
echo "if [ X\${RTEMS_RPM_TARGETS} = X ] ; then"
echo " RTEMS_RPM_TARGETS=\"${TARGETS}\""
echo "fi"
echo ""
echo "for target_alias in \${RTEMS_RPM_TARGETS}"
echo "do"
echo " test -d build-\${target_alias} || mkdir build-\${target_alias}"
echo " ( cd build-\${target_alias}"
echo " ../binutils-990901/configure --target=\${target_alias} \\"
echo " --verbose --prefix=/opt/rtems "
echo ""
echo " test -d $RPM_BUILD_ROOT/opt \\"
echo " || mkdir $RPM_BUILD_ROOT/opt"
echo " test -d $RPM_BUILD_ROOT/opt/rtems \\"
echo " || mkdir $RPM_BUILD_ROOT/opt/rtems"
echo ""
echo " make all"
echo " make info"
echo " )"
echo "done"
echo ""
echo "%install"
echo "if [ X\${RTEMS_RPM_TARGETS} = X ] ; then"
echo " RTEMS_RPM_TARGETS=\"${TARGETS}\""
echo "fi"
echo ""
echo "for target_alias in \${RTEMS_RPM_TARGETS}"
echo "do"
echo " ( cd build-\${target_alias}"
echo " make prefix=\${RPM_BUILD_ROOT}/opt/rtems install"
echo " make prefix=\${RPM_BUILD_ROOT}/opt/rtems install-info"
echo " )"
echo "done"
echo ""
for target_alias in ${TARGETS}
do
echo "%files ${target_alias}"
echo "%doc /opt/rtems/info/as.info*"
echo "%doc /opt/rtems/info/bfd.info*"
echo "%doc /opt/rtems/info/binutils.info*"
echo "%doc /opt/rtems/info/ld.info*"
echo "%doc /opt/rtems/info/standards.info*"
echo "%doc /opt/rtems/man/man1/${target_alias}-ar.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-nm.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-objdump.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-ranlib.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-size.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-strings.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-strip.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-objcopy.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-addr2line.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-nlmconv.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-c++filt.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-as.1"
echo "%doc /opt/rtems/man/man1/${target_alias}-ld.1"
echo ""
echo "/opt/rtems/bin/${target_alias}-addr2line"
echo "/opt/rtems/bin/${target_alias}-ar"
echo "/opt/rtems/bin/${target_alias}-as"
echo "/opt/rtems/bin/${target_alias}-c++filt"
echo "/opt/rtems/bin/${target_alias}-gasp"
echo "/opt/rtems/bin/${target_alias}-ld"
echo "/opt/rtems/bin/${target_alias}-nm"
echo "/opt/rtems/bin/${target_alias}-objcopy"
echo "/opt/rtems/bin/${target_alias}-objdump"
echo "/opt/rtems/bin/${target_alias}-ranlib"
echo "/opt/rtems/bin/${target_alias}-readelf"
echo "/opt/rtems/bin/${target_alias}-size"
echo "/opt/rtems/bin/${target_alias}-strings"
echo "/opt/rtems/bin/${target_alias}-strip"
echo "/opt/rtems/include/bfd.h"
echo "/opt/rtems/include/ansidecl.h"
echo "/opt/rtems/include/bfdlink.h"
echo "/opt/rtems/lib/libbfd*"
echo "/opt/rtems/lib/libiberty*"
echo "/opt/rtems/lib/libopcodes*"
echo "/opt/rtems/${target_alias}/bin/ar"
echo "/opt/rtems/${target_alias}/bin/as"
echo "/opt/rtems/${target_alias}/bin/ld"
echo "/opt/rtems/${target_alias}/bin/nm"
echo "/opt/rtems/${target_alias}/bin/ranlib"
echo "/opt/rtems/${target_alias}/bin/strip"
echo "/opt/rtems/${target_alias}/lib/ldscripts"
echo ""
done
) > ${dst}/rtems-binutils.spec
echo Generated ${dst}/rtems-binutils.spec.
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh
#
# Usage: mktoolspec CPU
#
RTEMS_DIR=`dirname $0`
RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
target_alias=$1
release=0
# Some linux distributions use /usr/src/packages
# redhat uses /usr/src/redhat
# others might use /usr/src
if test -d /usr/src/packages/SPECS;
then
dst=/usr/src/packages/SPECS;
elif test -d /usr/src/redhat/SPECS;
then
dst=/usr/src/redhat/SPECS;
elif test -d /usr/src/SPECS/;
then
dst=/usr/src/SPECS;
fi
sed -e "s%@Version@%${RTEMS_VERSION}%g" \
-e "s%@bsp@%${bsp}%g" \
-e "s%@Release@%${release}%g" \
-e "s%@target_alias@%${target_alias}%g" \
< ${RTEMS_DIR}/binutils.spec.in \
> ${dst}/$target_alias-binutils.spec
echo Generated ${dst}/rtems-$target_alias-binutils.spec.
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh
#
# Usage: mktoolspec CPU
#
RTEMS_DIR=`dirname $0`
RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
target_alias=$1
release=0
# Some linux distributions use /usr/src/packages
# redhat uses /usr/src/redhat
# others might use /usr/src
if test -d /usr/src/packages/SPECS;
then
dst=/usr/src/packages/SPECS;
elif test -d /usr/src/redhat/SPECS;
then
dst=/usr/src/redhat/SPECS;
elif test -d /usr/src/SPECS/;
then
dst=/usr/src/SPECS;
fi
sed -e "s%@Version@%${RTEMS_VERSION}%g" \
-e "s%@bsp@%${bsp}%g" \
-e "s%@Release@%${release}%g" \
-e "s%@target_alias@%${target_alias}%g" \
< ${RTEMS_DIR}/gccnewlib.spec.in \
> ${dst}/$target_alias-gcc_newlib.spec
echo Generated ${dst}/$target_alias-gcc_newlib.spec.
+45
View File
@@ -0,0 +1,45 @@
#!/bin/sh
#
# Usage: mktoolspec CPU
#
RTEMS_DIR=`dirname $0`
RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
target_alias=$1
release=0
# Some linux distributions use /usr/src/packages
# redhat uses /usr/src/redhat
# others might use /usr/src
if test -d /usr/src/packages/SPECS;
then
dst=/usr/src/packages/SPECS;
elif test -d /usr/src/redhat/SPECS;
then
dst=/usr/src/redhat/SPECS;
elif test -d /usr/src/SPECS/;
then
dst=/usr/src/SPECS;
fi
sed -e "s%@Version@%${RTEMS_VERSION}%g" \
-e "s%@bsp@%${bsp}%g" \
-e "s%@Release@%${release}%g" \
-e "s%@target_alias@%${target_alias}%g" \
< ${RTEMS_DIR}/gdb.spec.in \
> ${dst}/$target_alias-gdb.spec
case ${target} in
powerpc*)
echo "/opt/rtems/bin/@target_alias@-run"
;;
sparc*)
echo "/opt/rtems/bin/@target_alias@-run"
echo "/opt/rtems/bin/@target_alias@-sis"
;;
*) ;;
esac >> ${dst}/$target_alias-gdb.spec
echo Generated ${dst}/rtems-$target_alias-gdb.spec.
+9 -4
View File
@@ -5,10 +5,15 @@ RTEMS_DIR=`dirname $0`
RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
bsp=$1
target_alias=$2
target_alias=$1
bsp=$2
release=0
${RTEMS_DIR}/scripts/mkbspspec $bsp $target_alias
${RTEMS_DIR}/scripts/mktoolspec $target_alias
#${RTEMS_DIR}/scripts/mkbspspec $bsp $target_alias
#${RTEMS_DIR}/scripts/mkbinutilspec $target_alias
#${RTEMS_DIR}/scripts/mkgccnewlibspec $target_alias
#${RTEMS_DIR}/scripts/mkgdbspec $target_alias
./mkbinutilspec $target_alias
./mkgccnewlibspec $target_alias
./mkgdbspec $target_alias
+4 -3
View File
@@ -1,12 +1,13 @@
#!/bin/sh
#
# Usage: mktoolspec CPU
#
RTEMS_DIR=`dirname $0`
RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
bsp=$1
target_alias=$2
target_alias=$1
release=0
# Some linux distributions use /usr/src/packages
@@ -30,4 +31,4 @@ sed -e "s%@Version@%${RTEMS_VERSION}%g" \
< ${RTEMS_DIR}/toolchain.spec.in \
> ${dst}/rtems-$target_alias-tools.spec
echo Generated ${dst}/rtems-$target_alias-tools.spec.
+9 -10
View File
@@ -17,21 +17,21 @@ Group: unsorted
Provides: rtems-@target_alias@-tools
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Version: @Version@
Summary: rtems gcc tool chain for target @target_alias@
Source0: gcc-2.95.1.tar.gz
Source1: newlib-1.8.2.tar.gz
Source2: binutils-2.9.5.tar.gz
Patch0: gcc-2.95.1-rtems-19991014.diff
Patch1: newlib-1.8.2-rtems-19991014.diff
Patch2: binutils-2.9.5-rtems-19991014.diff
Source2: binutils-990901.tar.gz
Patch0: gcc-2.95.1-rtems-19991015.diff
Patch1: newlib-1.8.2-rtems-19991015.diff
Patch2: binutils-990901-rtems-19991015.diff
Buildroot: /tmp
# Patch:
%description
RTEMS is a free operating system for embedded systems.
RTEMS is an open source operating system for embedded systems.
Authors:
--------
@@ -68,7 +68,7 @@ mkdir src
# Get these components from binutils
for f in bfd binutils gas gprof ld opcodes etc
do
ln -s ../binutils-2.9.5/$f .
ln -s ../binutils-990901/$f .
done
# Now get the C library
@@ -79,9 +79,8 @@ mkdir src
test -d build || mkdir build
( cd build
../src/configure --target=@target_alias@ \
--with-gnu-as --with-gnu-ld --verbose \
--prefix=/opt/rtems \
--with-sys-includes=$RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
--prefix=/opt/rtems
test -d $RPM_BUILD_ROOT/opt \
|| mkdir $RPM_BUILD_ROOT/opt