summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2008-01-11 22:38:36 +0000
committerChris Johns <chrisj@rtems.org>2008-01-11 22:38:36 +0000
commitd24a72f2202c052c19baca29430dd99f736c7b28 (patch)
tree6a1bcd71f6cc1f2560e4eeef95c01e0802d65185
parent2007-12-23 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-d24a72f2202c052c19baca29430dd99f736c7b28.tar.bz2
2008-01-11 Chris Johns <chisj@rtems.org>
* expat-version: New. * build-exes.sh: Fix the size calculation. * build-rpms.sh: Add expax support. Clean the BUILD, RPM and SRPM directories. Delete the RPM database if cleaning. * msys-path.nsi: Add comments. * rtems-tools.nsi: Fix the uninstall targets check. * target-section-text, targets: Add bfin target. * upload.sh: Upload only the specific version of files. * version: Build 17.
-rw-r--r--contrib/mingw/ChangeLog21
-rwxr-xr-xcontrib/mingw/build-exes.sh12
-rwxr-xr-xcontrib/mingw/build-rpms.sh88
-rw-r--r--contrib/mingw/expat-version3
-rw-r--r--contrib/mingw/msys-path.nsi2
-rw-r--r--contrib/mingw/rtems-tools.nsi2
-rw-r--r--contrib/mingw/target-section-text1
-rw-r--r--contrib/mingw/targets2
-rwxr-xr-xcontrib/mingw/upload.sh8
-rw-r--r--contrib/mingw/version2
10 files changed, 121 insertions, 20 deletions
diff --git a/contrib/mingw/ChangeLog b/contrib/mingw/ChangeLog
index fb667ae231..daf6d373dc 100644
--- a/contrib/mingw/ChangeLog
+++ b/contrib/mingw/ChangeLog
@@ -1,4 +1,23 @@
-2007-0823 Chris Johns <chisj@rtems.org>
+2008-01-11 Chris Johns <chisj@rtems.org>
+
+ * expat-version: New.
+
+ * build-exes.sh: Fix the size calculation.
+
+ * build-rpms.sh: Add expax support. Clean the BUILD, RPM and SRPM
+ directories. Delete the RPM database if cleaning.
+
+ * msys-path.nsi: Add comments.
+
+ * rtems-tools.nsi: Fix the uninstall targets check.
+
+ * target-section-text, targets: Add bfin target.
+
+ * upload.sh: Upload only the specific version of files.
+
+ * version: Build 17.
+
+2007-08-23 Chris Johns <chisj@rtems.org>
* mingw-path.nsi: Change the forward slashes to back slashes for
Windows.
diff --git a/contrib/mingw/build-exes.sh b/contrib/mingw/build-exes.sh
index d21939ccfa..53690e0a41 100755
--- a/contrib/mingw/build-exes.sh
+++ b/contrib/mingw/build-exes.sh
@@ -198,8 +198,16 @@ get_size_in_k()
cd $1
check "changing directory: $1"
- local size_in_k=$(du -c -k $(cat files.txt) | grep total | sed -e "s/\t.*//g")
- check "getting total size"
+ local total=
+ local f
+ local size
+ for f in $(cat files.txt)
+ do
+ size=$(ls -l "$f" | awk '{ print $5 }')
+ check "getting size"
+ total=$(expr $total + $size)
+ done
+ local size_in_k=$(expr $total / 1024)
cd $here
check "changing directory: $here"
diff --git a/contrib/mingw/build-rpms.sh b/contrib/mingw/build-rpms.sh
index cfd5c02d77..522d2fbdfc 100755
--- a/contrib/mingw/build-rpms.sh
+++ b/contrib/mingw/build-rpms.sh
@@ -35,14 +35,20 @@ processor=$(uname -p)
base_tool_list="binutils gcc"
target_list=$(cat $source/targets)
-host_list="cygwin freebsd5.2 freebsd6.0 freebsd6.1 mingw32"
+# host_list="cygwin freebsd5.2 freebsd6.0 freebsd6.1 mingw32"
+host_list="mingw32"
-rtems_tool_list="autoconf automake $base_tool_list gdb"
linux_tool_list="autoconf automake $base_tool_list"
cygwin_tool_list="w32api libs autoconf automake $base_tool_list"
freebsd_tool_list="libs autoconf automake $base_tool_list"
mingw32_tool_list="w32api libs autoconf automake $base_tool_list"
+# We may build a different set of packages for different
+# hosts depending on what builds.
+rtems_tool_list="autoconf automake $base_tool_list"
+linux_rtems_tool_list=$rtems_tool_list
+mingw32_rtems_tool_list="$rtems_tool_list gdb"
+
cygwin_cc_name="pc"
freebsd_cc_name="pc"
mingw32_cc_name="pc"
@@ -52,7 +58,8 @@ cygwin_cpu_list="i686"
freebsd_cpu_list="i586"
mingw32_cpu_list="i686"
-rpm_topdir=$(rpm --eval "%{_topdir}")
+expat_list="mingw32"
+. $source/expat-version
prefix=/opt/rtems-$version
hosts=$host_list
@@ -120,6 +127,8 @@ do
shift
done
+rpm_topdir=$(rpm --eval "%{_topdir}")
+
for t in $targets;
do
if [ -z "$(echo $target_list | grep $t)" ]; then
@@ -135,6 +144,7 @@ mkdir=${run_prefix}mkdir
rm=${run_prefix}rm
rpmbuild=${run_prefix}rpmbuild
rpm=${run_prefix}rpm
+tar=${run_prefix}tar
if [ $local_rpm_database = yes ]; then
rpm_database="--dbpath $prefix/var/lib/rpm"
@@ -142,6 +152,12 @@ else
rpm_database=
fi
+#
+# We always build tools for the build host. We need them to
+# build the libraries for the target processor.
+#
+hosts="linux $hosts"
+
echo " Source: $source"
echo " Prefix: $prefix"
echo " Hosts: $hosts"
@@ -166,9 +182,24 @@ fi
$cd $prefix
check "cannot change to the prefix directory: $prefix"
+#
+# Clean the files from the current prefix. Remove the various RPM
+# and SRPM files.
+#
if [ $clean = yes ]; then
echo "Cleaning: $(pwd)"
$rm -rf *
+ $rm -rf $rpm_topdir/BUILD/*
+ for h in $hosts;
+ do
+ for d in RPMS SRPMS
+ do
+ rm -rf $rpm_topdir/$h/$d
+ check "removing rpm/srpm directory: $rpm_topdir/$h/$d"
+ mkdir -p $rpm_topdir/$h/$d
+ check "creating directory: $rpm_topdir/$h/$d"
+ done
+ done
fi
#
@@ -185,6 +216,10 @@ if [ $local_rpm_database = yes ]; then
$mkdir -p var/lib
check "making the local RPM database directory: var/lib"
fi
+ if [ $clean = yes ]; then
+ $rm -rf var/lib/rpm/*
+ check "Deleting the current database."
+ fi
if [ $clean = yes -o ! -e var/lib/rpmPackages ]; then
echo "Copying RPM database to a local RPM database"
$cp -r /var/lib/rpm var/lib/rpm
@@ -263,12 +298,6 @@ rpm_arch()
fi
}
-#
-# We always build tools for the build host. We need them to
-# build the libraries for the target processor.
-#
-hosts="linux $hosts"
-
echo "Configuring target: all"
echo "configure --prefix=$prefix $rpm_prefix_arg " \
" --target=all $infos"
@@ -283,6 +312,10 @@ echo "make -C autotools"
$make -C autotools
check "building the rpm spec files failed"
+#
+# Build for each type of host in your host list. The build host
+# will always be present.
+#
for h in $hosts;
do
#
@@ -341,11 +374,46 @@ do
$rpmbuild_cmd
done
fi
+
+ #
+ # See if the host is listed in the expat list. If it is build the
+ # expat library.
+ #
+ for eh in $expat_list
+ do
+ if [ $th == $eh ]; then
+ _curpath=$PATH
+ PATH=$prefix/bin:$PATH
+ expat_build=${rpm_prefix}${th}-expat-${expat_version}
+ $rm -rf ${rpm_topdir}/BUILD/$expat_build
+ check "cleaning expat directory: ${rpm_topdir}/BUILD/$expat_build"
+ $mkdir ${rpm_topdir}/BUILD/$expat_build
+ check "make directory: ${rpm_topdir}/BUILD/$expat_build"
+ _curdir=$(pwd)
+ $cd ${rpm_topdir}/BUILD/$expat_build
+ check "change to directory: ${rpm_topdir}/BUILD/$expat_build"
+ $tar x${expat_tar_comp}f $rpm_topdir/SOURCES/expat-${expat_version}.tar.${expat_tar_ext}
+ check "extract tar file: $rpm_topdir/SOURCES/expat-${expat_version}.tar.${expat_tar_ext}"
+ $mkdir build
+ check "make directory: build"
+ $cd build
+ check "change directory: build"
+ ${run_prefix}../expat-${expat_version}/configure --build=$build --host=$p-pc-$th --prefix=$prefix
+ check "configure failed: ../expat-${expat_version}/configure --build=$build --host=$p-pc-$th --prefix=$prefix"
+ $make all install
+ check "expat make all install"
+ $cd $_curdir
+ check "change directory: $_curdir"
+ PATH=$_curpath
+ fi
+ done
done
for t in $targets;
do
- for s in ${rtems_tool_list}
+ rtl=${h}_rtems_tool_list
+ echo "RTEMS Tool List: ${!rtl}"
+ for s in ${!rtl}
do
case $s in
autoconf|automake)
diff --git a/contrib/mingw/expat-version b/contrib/mingw/expat-version
new file mode 100644
index 0000000000..f793a570d4
--- /dev/null
+++ b/contrib/mingw/expat-version
@@ -0,0 +1,3 @@
+expat_version=2.0.1
+expat_tar_comp=z
+expat_tar_ext=gz
diff --git a/contrib/mingw/msys-path.nsi b/contrib/mingw/msys-path.nsi
index c90da3f673..df673d52c6 100644
--- a/contrib/mingw/msys-path.nsi
+++ b/contrib/mingw/msys-path.nsi
@@ -120,6 +120,7 @@ FunctionEnd
Function MSYSFstabUpdate
Call MSYSDetectSilent
+ ; Check the result.
Pop $R0
Push $R0
Push $INSTDIR
@@ -132,6 +133,7 @@ Function MSYSFstabUpdate
StrCpy $R1 "$R1 /opt/rtems-${PRODUCT_VERSION}$\n"
FileOpen $9 "$R0\etc\fstab" a
ifErrors 0 +3
+ ; Create the file.
MessageBox MB_OK "Cannot open $R0\etc\fstab. MSYS mount point not added."
Goto Close
FileSeek $9 0 SET
diff --git a/contrib/mingw/rtems-tools.nsi b/contrib/mingw/rtems-tools.nsi
index 251f429d48..912edb2ae1 100644
--- a/contrib/mingw/rtems-tools.nsi
+++ b/contrib/mingw/rtems-tools.nsi
@@ -295,7 +295,7 @@ Section Uninstall
FindFirst $0 $1 "$INSTDIR\rtems${PRODUCT_VERSION}-${RTEMS_BUILD_VERSION}-tools-*-uninst.exe"
Uninstall_Targets:
StrCmp $1 "" Uninstall_Targets_Done
- IntCmp $2 0 0 +3
+ IntCmp $2 0 0 0 +3
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 \
"You have tools installed. Are you sure you want to uninstall all RTEMS Tools ?" IDYES +2
Abort
diff --git a/contrib/mingw/target-section-text b/contrib/mingw/target-section-text
index 27c9baca4a..0ab472e50e 100644
--- a/contrib/mingw/target-section-text
+++ b/contrib/mingw/target-section-text
@@ -1,5 +1,6 @@
auto_section_text="Autoconf and Automake"
arm_section_text="ARM Targets"
+bfin_section_text="Blackfin Targets"
h8300_section_text="H8300 16bit Target"
i386_section_text="Intel i386 Targets"
m68k_section_text="Coldfire and M68000 Targets"
diff --git a/contrib/mingw/targets b/contrib/mingw/targets
index bde2e3f743..c78f8e9033 100644
--- a/contrib/mingw/targets
+++ b/contrib/mingw/targets
@@ -1 +1 @@
-arm h8300 i386 m68k mips powerpc sh sparc
+arm bfin h8300 i386 m68k mips powerpc sh sparc
diff --git a/contrib/mingw/upload.sh b/contrib/mingw/upload.sh
index 56d42ab249..bca987f234 100755
--- a/contrib/mingw/upload.sh
+++ b/contrib/mingw/upload.sh
@@ -72,13 +72,13 @@ if [ $prefix = none ]; then
terminate "no prefix set"
fi
-exebase=${prefix}/${version}/packages/mingw32/exe
-srcbase=${prefix}/${version}/packages/mingw32/SRPMS
+exebase=${prefix}/packages/mingw32/exe
+srcbase=${prefix}/packages/mingw32/SRPMS
mkdir -p ${ftpbase}/${version}/build-${tool_build}/source
check "creating: ${ftpbase}/${version}/build-${tool_build}/source"
-exes=$(find $exebase -name \*-${tool_build}.exe)
+exes=$(find $exebase -name rtems${version}-\*-${tool_build}.exe)
for e in $exes
do
echo "cp $e ${ftpbase}/${version}/build-${tool_build}/."
@@ -89,7 +89,7 @@ done
cd ${ftpbase}/${version}/build-${tool_build}/source
check "change directory: ${ftpbase}/${version}/build-${tool_build}/source"
-for s in ${srcbase}/*.rpm
+for s in ${srcbase}/*-rtems${version}-*.rpm
do
echo "rpm2cpio $s | cpio --extract --quiet"
rpm2cpio $s | cpio --extract --quiet
diff --git a/contrib/mingw/version b/contrib/mingw/version
index 4e709d38d0..6b3a5c45e7 100644
--- a/contrib/mingw/version
+++ b/contrib/mingw/version
@@ -1,2 +1,2 @@
version=4.8
-tool_build=15
+tool_build=17