Skip to content

My Own Private Hercules – Rebuilding Hercules for TK4-

September 8, 2018

18-09-11 frontpanel
18-09-13 my version
I got instructions from the developer responsible for the TK4- package for rebuilding it as follows:
18-09-07 buildinst
I got a good description of the recommended process from this web site:

There were only 3 files in the Architecture_dependencies folder that had to be copied into the source folder as below:

pi@raspberrypi:~/mvs4mod/hercules/source4mods$ ls
Architecture_dependencies  Hercules_for_TK4-_Update_08
pi@raspberrypi:~/mvs4mod/hercules/source4mods$ cd Hercules_for_TK4-_Update_08/
pi@raspberrypi:~/mvs...$ cp /Architecture_dependencies/32-bit_dyn75.c dyn75.c
pi@raspberrypi:~/mvs...$ cp /Architecture_dependencies/32-bit_tcpip.c tcpip.c
pi@raspberrypi:~/mvs...$ cp /Architecture_dependencies/ARM_cmpsctst.h cmpsctst.h

I then had to run automake –add-missing before ./ would work

pi@raspberrypi:~/mvs...$ automake --add-missing
pi@raspberrypi:~/mvs...$ ./

aclocal...    OK.  (25% done)
autoheader... OK.  (50% done)
automake...   OK.  (75% done)
autoconf...   OK.  (100% done)
All processing sucessfully completed.
You may now run ./configure in order to create a custom Makefile
that is suitable for your platform and environment.

I was then able to run ./configure which generated makefiles.

The generated Makefiles caused a compile error with GCC to do with the CPU type. I reran make as “make -j 4 CFLAGS=”-W -w -O3 -frename-registers”

Because the make file expected to delete some files I had to create and (“touch”) to get it to run.

After that, “make install” moved the generated binaries into /usr/local/bin and /usr/local/lib.

To get TK4- started with my binaries i edited the MVS batch script (saving it as MVS2) and forced those directories into PATH and LD_LIBRARY_PATH as follows(around line 20)
case $system in
export PATH=/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib/hercules:$LD_LIBRARY_PATH

I spent some time dinking around “touch”ing various things co convince myself my build was running and finally changed version.c to include a line of my own around line 225

Now it works and, although it identifies itself as the base Hercules rather than the version for TK4- I can see my BUILT text. It ipls MVS, shows its console on :8038, and accepts and runs batch jobs which is all i really wanted.

From → Olduino/370

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: