Helpful scripts and code snippets
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
ExtPkgs.cmd
ExtPkgs.cmd.ini
README.md
extpkgs.sh
extpkgs.sh.ini

README.md

gists

Helpful scripts and code snippets

  This is a collection of helpful scripts and code snippets associated with the SoftDevLabs version of the Hercules 4.0 (Hyperion) System/370, ESA/390, and z/Architecture Emulator.

extpkgs

The one and only script at this time is the extpkgs script which automates the cloning, updating and building of the emulator's External Package static libraries that are required in order to build the emulator.

The manual method for building the External Packages is documented in both the README.EXTPKG document that comes with the emulator itself, as well as the individual README documents that come delivered with each external package's repository.

The extpkgs script is designed to make things even easier

Simply create a directory somewhere (e.g. extpkgs), switch to that directory, and then enter the extpkgs command (or on Linux, extpkgs.sh) to have each external package cloned or updated and built within that same directory:

cmdline = extpkgs.sh clone c d s t

action         =  CLONE
crypto_repo    = "./repos/crypto-0"
decnumber_repo = "./repos/decNumber-0"
softfloat_repo = "./repos/SoftFloat-0"
telnet_repo    = "./repos/telnet-0"
install_dir    = "/home/fish/hercules/extpkgs/."
cpu            = "x86"
Initialized empty Git repository in /home/fish/hercules/extpkgs/repos/crypto-0/.git/
remote: Enumerating objects: 198, done.
remote: Total 198 (delta 0), reused 0 (delta 0), pack-reused 198
Receiving objects: 100% (198/198), 151.07 KiB, done.
Resolving deltas: 100% (115/115), done.
Initialized empty Git repository in /home/fish/hercules/extpkgs/repos/decNumber-0/.git/
remote: Enumerating objects: 479, done.
remote: Total 479 (delta 0), reused 0 (delta 0), pack-reused 479
Receiving objects: 100% (479/479), 1.07 MiB, done.
Resolving deltas: 100% (301/301), done.
Initialized empty Git repository in /home/fish/hercules/extpkgs/repos/SoftFloat-0/.git/
remote: Enumerating objects: 1612, done.
remote: Total 1612 (delta 0), reused 0 (delta 0), pack-reused 1612
Receiving objects: 100% (1612/1612), 703.37 KiB, done.
Resolving deltas: 100% (1388/1388), done.
Initialized empty Git repository in /home/fish/hercules/extpkgs/repos/telnet-0/.git/
remote: Enumerating objects: 235, done.
remote: Total 235 (delta 0), reused 0 (delta 0), pack-reused 235
Receiving objects: 100% (235/235), 131.29 KiB, done.
Resolving deltas: 100% (143/143), done.

All External Packages SUCCESSFULLY cloned!  :))

crypto ...
  64-bit Debug ...
  SUCCESS!
  64-bit Release ...
  SUCCESS!
  32-bit Debug ...
  SUCCESS!
  32-bit Release ...
  SUCCESS!
decNumber ...
  64-bit Debug ...
  SUCCESS!
  64-bit Release ...
  SUCCESS!
  32-bit Debug ...
  SUCCESS!
  32-bit Release ...
  SUCCESS!
SoftFloat ...
  64-bit Debug ...
  SUCCESS!
  64-bit Release ...
  SUCCESS!
  32-bit Debug ...
  SUCCESS!
  32-bit Release ...
  SUCCESS!
telnet ...
  64-bit Debug ...
  SUCCESS!
  64-bit Release ...
  SUCCESS!
  32-bit Debug ...
  SUCCESS!
  32-bit Release ...
  SUCCESS!

All External Packages SUCCESSFULLY built!  :))

 

Then, to build Hercules, all you need to do is either:

  1. Point your LIB and INCLUDE environment variables to the lib and include subdirectories of your extpkgs directory (for Linux it would be the LIBRARY_PATH and CPATH environment variables), or

  2. Specify the --enable-extpkgs=<dir> option on your ./configure command. (For Windows it would be the -extpkg "dir" option on your makefile.bat command)

  What follows below is the --help information that is displayed for the Linux extpkgs.sh script, but the help information for the Windows ExtPkgs.cmd batch file is essentially identical:

 

cmdline = extpkgs.sh --help


    NAME

        extpkgs.sh   --   Build and install Hercules External Package(s)

    SYNOPSIS

        extpkgs.sh      { [CLONE | UPDATE]   [C]  [D]  [S]  [T] }

    DESCRIPTION

        extpkgs.sh performs a full build and install of each specified
        Hercules External Package.  It is used to automate the
        cloning, updating and/or building and installing of all
        selected External Packages with one simple command (rather
        than having to perform each of the builds individually)
        and ensures that each of them are built the same way.

    ARGUMENTS

        CLONE      Indicates the specified package repositories do
                   not exist yet and need to be git cloned before
                   building.  This option, if specified, must come
                   before the C|D|S|T option(s).

        UPDATE     Indicates the specified package repositories
                   should be git updated before building.  This
                   option, if specified, must come before the
                   C|D|S|T option(s).

        C|D|S|T    Corresponds to which external package(s) you
                   wish to clone, update and/or build and install
                   (crypto, decNumber, SoftFloat and/or telnet,
                   or all four, or any combination thereof)

    EXIT STATUS

        0   Success    All specified external packages built and
                       successfully installed.

        1   Failure    The build or install of one or more of the
                       specified packages has failed.

    NOTES

        The required extpkgs.sh.ini control file identifies the
        fixed parameters needed by the script, and is expected to
        exist somewhere in your search PATH.

        The control file must contain statements that identify the
        directory of each external package's repository, as well
        as the common installation directory where each package
        will be installed into.

        The format of the statements is very simple:

             cpu             =  arm|mips|ppc|sparc|xscale|x86|unknown
             install_dir     =  <dir>
             crypto_repo     =  <dir>
             decnumber_repo  =  <dir>
             softfloat_repo  =  <dir>
             telnet_repo     =  <dir>

        The specified directory may be either relative or absolute.
        Blank lines and lines beginning with '*', '#' or ';' are
        ignored.

    AUTHOR

        "Fish"  (David B. Trout)

    VERSION

        1.0     (September 18, 2018)

 

If you have any questions or problems with this script, create a GitHub Issue and we will look into your problem right away.

Thank you!

The SDL Hercules 4.0 Hyperion development team