[rtems-release commit] Update to support RTEMS 5

Chris Johns chrisj at rtems.org
Tue Oct 29 04:27:23 UTC 2019


Module:    rtems-release
Branch:    master
Commit:    db2c6837717dd04b314fad745ab5501c4e259be3
Changeset: http://git.rtems.org/rtems-release/commit/?id=db2c6837717dd04b314fad745ab5501c4e259be3

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue Oct 29 15:27:17 2019 +1100

Update to support RTEMS 5

---

 README.txt                  | 27 +++++++++++++++++++++++++--
 README.txt.in               |  4 ++--
 rtems-release               | 14 +++++++++-----
 rtems-release-docs          | 37 ++++++++++++++++++++++++++++---------
 rtems-release-kernel        | 21 +++++++++++++++------
 rtems-release-notes         |  3 ++-
 rtems-release-package       | 16 +++++++++++-----
 rtems-release-package-end   |  2 +-
 rtems-release-package-start |  2 +-
 rtems-release-rsb-version   |  6 +++---
 rtems-release-sources       | 44 +++++++++++++++++++++++++++-----------------
 rtems-release-tag           |  4 ++--
 rtems-release-version       | 31 +++++++++++++++++++++++++++++++
 rtems-source-packages       | 13 +++++++++++--
 14 files changed, 168 insertions(+), 56 deletions(-)

diff --git a/README.txt b/README.txt
index dd93fba..a28fe21 100644
--- a/README.txt
+++ b/README.txt
@@ -1,11 +1,34 @@
 RTEMS Project Release Scripts.
 
 Chris Johns <chrisj at rtems.org>
-Date: March 2016
+Date: November 2019
 
 These scripts release the RTEMS kernel. They are tested and run on the
 RTEMS Project FreeBSD server.
 
 To run:
 
-  $ ./rtems-release 4.11 0-rc1
+  $ ./rtems-release 5 0.0-m1911
+
+Set Up
+------
+
+Releases are made on a FreeBSD machine. These scripts should work on
+any hosts however no testing has been done on other systems.
+
+1. Install git.
+
+2. Crate a python3 vritualenv set up. If python3 is the system default
+   the --python option is not needed:
+
+    $ virtualenv --python=python3 release
+
+3. Install sphinx using pip in the virtualenv:
+
+   $ . ./release/bin/activate
+   (release) $ pip install sphinx
+   (release) $ pip install sphinxcontrib-bibtex
+
+4. Install npm and the install the HTML inliner:
+
+   # npm install inliner
diff --git a/README.txt.in b/README.txt.in
index d9c127e..65b9f7e 100644
--- a/README.txt.in
+++ b/README.txt.in
@@ -8,8 +8,8 @@ The Real-Time Executive for Multiprocessor Systems or RTEMS is an open
 source Real Time Operating System (RTOS) that supports open standard
 application programming interfaces (API) such as POSIX. It is used in
 space flight, medical, networking and many more embedded devices using
-processor architectures including ARM, PowerPC, SPARC, Intel, Blackfin,
-MIPS, Microblaze and more.
+processor architectures including ARM, PowerPC, SPARC, Intel, RISCV,
+MIPS, NIOS-II, Microblaze and more.
 
 This directory contains the source code for the RTEMS @VERSION@ operating
 system and tools. Please refer to the RTEMS Developers Wiki for the release
diff --git a/rtems-release b/rtems-release
index 341fe90..b57b2f9 100755
--- a/rtems-release
+++ b/rtems-release
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016,2019 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -33,8 +33,8 @@
 # This is the top level RTEMS release script. Supply the version and and the
 # release.
 #
-
-echo "RTEMS Release, v0.1"
+. ./rtems-release-version
+echo "RTEMS Release, v${rtems_release_version}"
 
 #
 # Global release top path.
@@ -79,13 +79,17 @@ build rtems-tools          ${version} ${revision}
 build rtems                ${version} ${revision} rtems-release-kernel
 build rtems-source-builder ${version} ${revision} rtems-release-rsb-version
 if [ ${rtems_examples} = yes ]; then
-  build examples-v2         ${version} ${revision}
+ if [ ${verison} -lt 5 ]; then
+  build examples-v2 ${version} ${revision}
   # Hack around the repo naming.
   mv ${release}/examples-v2-${release}.tar.${comp_ext} \
      ${release}/rtems-examples-v2-${release}.tar.${comp_ext}
+ else
+  build rtems-examples ${version} ${revision}
+ fi
 fi
 if [ ${rtems_libbsd} = yes ]; then
- build rtems-libbsd        ${version} ${revision}
+ build rtems-libbsd ${version} ${revision}
 fi
 
 #
diff --git a/rtems-release-docs b/rtems-release-docs
index ee9f176..d561cc9 100755
--- a/rtems-release-docs
+++ b/rtems-release-docs
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016,2019 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -32,7 +32,8 @@
 #
 # This worker script to build the doco.
 #
-echo "RTEMS Documentation Release builder, v0.1"
+. ${release_top}/rtems-release-version
+echo "RTEMS Documentation Release builder, v${rtems_release_version}"
 
 #
 # Defaults.
@@ -66,8 +67,13 @@ git clone ${git_remote} ${git_local}
 cd ${git_local}
  echo "git fetch origin"
  git fetch origin
- echo "git archive --format=tar --prefix=${prefix}/ origin/${version}"
- git archive --format=tar --prefix=${prefix}/ origin/${version} | \
+ # Get the remote branch. If the release branch is not found use master.
+ remote_branch=$(git branch --remote | grep ${version} | tr -d "[:space:]")
+ if [ -z "${remote_branch}" ]; then
+  remote_branch="master"
+ fi
+ echo "git archive --format=tar --prefix=${prefix}/ ${remote_branch}"
+ git archive --format=tar --prefix=${prefix}/ ${remote_branch} | \
      ${comp} > ../${prefix}-unstamped.tar.${comp_ext}
  cd ..
 
@@ -81,12 +87,25 @@ cd ${prefix}
  #
  # This is a hack until I add support for the VERSION file created below.
  #
- cat wscript | sed -e "s/^version[[:space:]].*=.*$/version = '${release}'/g" > wscript.tmp
- rm -f wscript
- mv wscript.tmp wscript
  echo "Creating VERSION: ${release}"
- echo "[version]" > VERSION
- echo "release = ${release}" >> VERSION
+ if [ ${version} -le 5 ]; then
+   cat wscript | sed -e "s/^version[[:space:]].*=.*$/version = '${release}'/g" > wscript.tmp
+   rm -f wscript
+   mv wscript.tmp wscript
+ else
+  echo "[version]" > VERSION
+  echo "revision = ${release}" >> VERSION
+  d=$(date +%e)
+  case $d in
+   1?) d=${d}th ;;
+   *1) d=${d}st ;;
+   *2) d=${d}nd ;;
+   *3) d=${d}rd ;;
+   *)  d=${d}th ;;
+  esac
+  now=$(date +"%d${d} %B %Y")
+  echo "date = %{now}" >> VERSION
+ fi
  cd ..
 
 echo "tar cf - ${prefix}"
diff --git a/rtems-release-kernel b/rtems-release-kernel
index 7988836..13a13d7 100755
--- a/rtems-release-kernel
+++ b/rtems-release-kernel
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016,2019 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -32,7 +32,8 @@
 #
 # This worker script bootstraps the RTEMS kernel.
 #
-echo "RTEMS Release RTEMS Kernel, v0.1"
+. ${release_top}/rtems-release-version
+echo "RTEMS Release RTEMS Kernel, v${rtems_release_version}"
 
 #
 # Defaults.
@@ -96,9 +97,13 @@ m4_define([_RTEMS_API],[${version}])
 EOF
  done
  echo "Bootstrapping RTEMS"
- ./bootstrap -c
- ./bootstrap -p
- ${top}/${rsb}/source-builder/sb-bootstrap
+  ./bootstrap -c
+ if [ ${version} -lt 5 ]; then
+  ./bootstrap -p
+  ${top}/${rsb}/source-builder/sb-bootstrap
+ else
+  ./rtems-bootstrap
+ fi
  echo "Cleaning autom4te.cache"
  rm -rf $(find . -name autom4te.cache)
  echo "Generate ARCH-BSP.txt"
@@ -137,7 +142,11 @@ HAVE_DOT /g"> Doxyfile
 doxygen Doxyfile
 
 echo "Creating: rtems-doxygen-${release}.tar.${comp_ext}"
-mv cpukit_doxy/html rtems-doxygen-${release}
+if [ ${version} -lt 5 ]; then
+ mv cpukit_doxy/html rtems-doxygen-${release}
+else
+ mv html rtems-doxygen-${release}
+fi
 tar cf - rtems-doxygen-${release} | \
     ${comp} > ../rtems-doxygen-${release}.tar.${comp_ext}
 
diff --git a/rtems-release-notes b/rtems-release-notes
index 3dee8f7..e2dd1c4 100755
--- a/rtems-release-notes
+++ b/rtems-release-notes
@@ -32,7 +32,8 @@
 #
 # This worker script to build the doco.
 #
-echo "RTEMS Release Notes builder, v0.1"
+. ${release_top}/rtems-release-version
+echo "RTEMS Release Notes builder, v${rtems_release_version}"
 
 #
 # Defaults.
diff --git a/rtems-release-package b/rtems-release-package
index a405236..6f98035 100755
--- a/rtems-release-package
+++ b/rtems-release-package
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016,2019 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -32,7 +32,8 @@
 #
 # This script packages a package in a tar file.
 #
-echo "RTEMS Release Package, v0.1"
+. ${release_top}/rtems-release-version
+echo "RTEMS Release Package, v${rtems_release_version}"
 
 #
 # Defaults.
@@ -65,6 +66,11 @@ stamped_tar=${prefix}-unstamped
 cd ${git_local}
  echo "git fetch origin"
  git fetch origin
+ # Get the remote branch. If the release branch is not found use master.
+ remote_branch=$(git branch --remote | grep ${version} | tr -d "[:space:]")
+ if [ -z "${remote_branch}" ]; then
+  remote_branch="master"
+ fi
  git_submodules=$(git submodule | cut -w -f 2)
  if [ -n "${git_submodules}" ]; then
   echo "git submodules found ...."
@@ -75,7 +81,7 @@ cd ${git_local}
    if [ "${ok}" != "no" ]; then
     echo "git submodule update ${s}"
     git submodule update ${s}
-    treeish=$(git ls-tree origin/${version} ${s} | cut -w -f 3)
+    treeish=$(git ls-tree ${remote_branch} ${s} | cut -w -f 3)
     cd ${s}
      echo "git archive --format=tar --prefix=${prefix}/${s}/ ${treeish}"
      git archive --format=tar --prefix=${prefix}/${s}/ ${treeish} > \
@@ -86,8 +92,8 @@ cd ${git_local}
    fi
   done
  fi
- echo "git archive --format=tar --prefix=${prefix}/ origin/${version}"
- git archive --format=tar --prefix=${prefix}/ origin/${version} > \
+ echo "git archive --format=tar --prefix=${prefix}/ ${remote_branch}"
+ git archive --format=tar --prefix=${prefix}/ ${remote_branch} > \
                                           ../${stamped_tar}.tar
  cd ..   # ${git_local}
 
diff --git a/rtems-release-package-end b/rtems-release-package-end
index 8dcff69..a255542 100755
--- a/rtems-release-package-end
+++ b/rtems-release-package-end
@@ -1,5 +1,5 @@
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
diff --git a/rtems-release-package-start b/rtems-release-package-start
index e540180..fe00de4 100755
--- a/rtems-release-package-start
+++ b/rtems-release-package-start
@@ -1,5 +1,5 @@
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
diff --git a/rtems-release-rsb-version b/rtems-release-rsb-version
index 5e79f69..33ec03a 100755
--- a/rtems-release-rsb-version
+++ b/rtems-release-rsb-version
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016,2019 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -32,8 +32,8 @@
 #
 # This script adds the hashes to the release packages to the RSB.
 #
-
-echo "RTEMS Release RSB Versioning, v0.1"
+. ${release_top}/rtems-release-version
+echo "RTEMS Release RSB Versioning, v${rtems_release_version}"
 
 #
 # Defaults.
diff --git a/rtems-release-sources b/rtems-release-sources
index 306bcc2..39e33c8 100755
--- a/rtems-release-sources
+++ b/rtems-release-sources
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016,2019 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -32,8 +32,8 @@
 #
 # The script collects the sources for all the tools.
 #
-
-echo "RTEMS Release Sources, v0.1"
+. ${release_top}/rtems-release-version
+echo "RTEMS Release Sources, v${rtems_release_version}"
 
 #
 # Defaults.
@@ -106,13 +106,18 @@ cd ${release}
     #
     # Fetch the source for RTEMS tools.
     #
-    echo "../source-builder/sb-set-builder --dry-run --with-download " \
-         "--without-error-report --without-release-url " \
-         "${rtems_pkgs}"
-    ../source-builder/sb-set-builder --dry-run --with-download \
-                                     --without-error-report \
-                                     --without-release-url \
-                                     ${rtems_pkgs}
+    if [ ${version} -lt 5 ]; then
+     echo "../source-builder/sb-set-builder --dry-run --with-download " \
+          "--without-error-report --without-release-url " \
+          "${rtems_pkgs}"
+     ../source-builder/sb-set-builder --dry-run --with-download \
+                                      --without-error-report \
+                                      --without-release-url \
+                                      ${rtems_pkgs}
+    else
+     echo "../source-builder/sb-get-sources ${rtems_pkgs}"
+     ../source-builder/sb-get-sources ${rtems_pkgs}
+    fi
     #
     # Remove the top level packages because they do not have a VERSION file.
     #
@@ -148,13 +153,18 @@ cd ${release}
     cd bare
      export_source="${export_source} bare"
      mkdir sources patches
-     echo "../source-builder/sb-set-builder --dry-run --with-download " \
-          "--without-error-report --without-release-url " \
-          "${bare_pkgs}"
-     ../source-builder/sb-set-builder --dry-run --with-download \
-                                      --without-error-report \
-                                      --without-release-url \
-                                      ${bare_pkgs}
+     if [ ${version} -lt 5 ]; then
+      echo "../source-builder/sb-set-builder --dry-run --with-download " \
+           "--without-error-report --without-release-url " \
+           "${bare_pkgs}"
+      ../source-builder/sb-set-builder --dry-run --with-download \
+                                       --without-error-report \
+                                       --without-release-url \
+                                       ${bare_pkgs}
+     else
+      echo "../source-builder/sb-get-sources ${bare_pkgs}"
+      ../source-builder/sb-get-sources ${bare_pkgs}
+     fi
      #
      # Remove the git, svn or cvs directory if empty.
      #
diff --git a/rtems-release-tag b/rtems-release-tag
index 408088f..c2fe8bd 100755
--- a/rtems-release-tag
+++ b/rtems-release-tag
@@ -33,8 +33,8 @@
 # This is the top level RTEMS release script. Supply the version and and the
 # release.
 #
-
-echo "RTEMS Release, v0.1"
+. ./rtems-release-version
+echo "RTEMS Release, v${rtems_release_version}"
 
 #
 # Global release top path.
diff --git a/rtems-release-version b/rtems-release-version
new file mode 100644
index 0000000..a2b7136
--- /dev/null
+++ b/rtems-release-version
@@ -0,0 +1,31 @@
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright 2019 Chris Johns (chrisj at rtems.org)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+rtems_release_version="5.0"
diff --git a/rtems-source-packages b/rtems-source-packages
index 5d32f96..0cb4a74 100755
--- a/rtems-source-packages
+++ b/rtems-source-packages
@@ -1,7 +1,7 @@
 #! /bin/sh
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015-2016 Chris Johns (chrisj at rtems.org)
+# Copyright 2015,2016,2019 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -38,12 +38,21 @@ rtems_pkgs="${version}/rtems-all"
 bare_pkgs=None
 
 if [ ${version} == 4.11 ]; then
+ # RTEMS packages
  rtems_pkgs="${rtems_pkgs} ${version}/graphics/libjpeg"
  rtems_pkgs="${rtems_pkgs} ${version}/databases/sqlite"
  rtems_pkgs="${rtems_pkgs} ${version}/net-mgmt/net-snmp"
  rtems_pkgs="${rtems_pkgs} ${version}/net/ntp"
  rtems_pkgs="${rtems_pkgs} ${version}/net/protobuf"
-
+ # Bare packages
  bare_pkgs="devel/dtc"
  bare_pkgs="${bare_pkgs} devel/qemu"
+elif [ ${version} -ge 5 ]; then
+ # RTEMS packages
+ rtems_pkgs="${rtems_pkgs} ${version}/rtems-packages"
+ # Bare packages
+ bare_pkgs="devel/qemu"
+ bare_pkgs="${bare_pkgs} devel/qemu-couverture"
+ bare_pkgs="${bare_pkgs} devel/sis"
+ bare_pkgs="${bare_pkgs} devel/spike"
 fi



More information about the vc mailing list