Operating System - OpenVMS
1828346 Members
3256 Online
109976 Solutions
New Discussion

Re: Porting gnu kits to OpenVMS Alpha & CPU type

 
SOLVED
Go to solution
Robert_Boyd
Respected Contributor

Porting gnu kits to OpenVMS Alpha & CPU type

I'm trying to do the build of SSH2 and running into a problem. It's looking for a c include file gmp.h. My research so far leads me to believe this is part of the GMP kit. I'm attempting to build GMP under the GNV environment and running into trouble with the configure script. Config.guess is blowing up while attempting to sort out exactly which model of Alpha I'm running on. The code looks as if it's never really been tested on VMS. There's pieces that look like they're VMS aware, but the part that gets down to distinguishing EV4/EV5/EV56... is not fleshed out.

Do any of you out there have any experience with this kind of thing?

It looks like I could fix the GMP config.sub and config.guess pieces if I had a piece of c code or bash script that would return the CPU TYPE. I could see about invoking SDA and generating the output from CLUE CONFIG, but I'm not sure how easy that will be inside of a bash script.

Or do you know another way for me to get gmp.h? Or is there another way to do what I want?

Have any of you built the SSH2 kit on Alpha?

Thanks for any leads/hints/solutions!

Robert Boyd
Master you were right about 1 thing -- the negotiations were SHORT!
12 REPLIES 12
Robert Brooks_1
Honored Contributor
Solution

Re: Porting gnu kits to OpenVMS Alpha & CPU type

SDA> exam exe$gq_cputype
EXE$GQ_CPUTYPE: 00000004.00000008 "........"
SDA> Exit
$ write sys$output f$getsyi( "cputype" )
8
Richard Whalen
Honored Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

Why are you trying to build gnu SSH? (OpenSSH?) TCP/IP Services, MultiNet and TCPware all come with SSH as part of them. I think that you'll find that getting the code to compile and link is less than half of the problem of porting SSH to VMS. The engineers spent many hours getting them to work on VMS (the code is very Unix specific in many places).
Robert_Boyd
Respected Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

Thanks Robert,

Now I just need to do a lookup of the number 8 in the table of cpu types?

! SYSTEM_TYPE and CPU_TYPE fields. It is possible that platforms with
literal HWRPB_CPU_TYPE$K_EV3 = 1; ! Reduced functionality EVAX
literal HWRPB_CPU_TYPE$K_EV4 = 2; ! First fully functional EVAX
literal HWRPB_CPU_TYPE$K_MANNEQUIN = 3; ! Mannequin simulator
literal HWRPB_CPU_TYPE$K_LCA = 4; ! Low Cost Alpha
literal HWRPB_CPU_TYPE$K_EV5 = 5; ! CMOS 5 EVAX
literal HWRPB_CPU_TYPE$K_EV45 = 6; ! EV4 shrink on CMOS 5 process
literal HWRPB_CPU_TYPE$K_EV56 = 7; ! EV5 shrink on CMOS 6 process
literal HWRPB_CPU_TYPE$K_EV6 = 8; ! CMOS 6 EVAX
literal HWRPB_CPU_TYPE$K_PCA56 = 9; ! Low cost EV56
literal HWRPB_CPU_TYPE$K_PCA57 = 10;
literal HWRPB_CPU_TYPE$K_EV67 = 11; ! EV6 shrink, cmos 7
literal HWRPB_CPU_TYPE$K_EV68CB = 12; ! EV6 shrink, cmos 8
literal HWRPB_CPU_TYPE$K_EV68A = 13; ! Samsung
literal HWRPB_CPU_TYPE$K_EV68CX = 14;
literal HWRPB_CPU_TYPE$K_EV7 = 15; !
literal HWRPB_CPU_TYPE$K_MAX_CPU_TYPE = 15;

What I want to do is reverse lookup of the number I suppose. Looks like it's time to write a perl or DCL routine to extract the HWRPBDEF module from the C library and build a reverse lookup table.

Robert

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

Richard,

We have some perl scripts which depended on using the FTP module. On some of our systems we are having to move to using SSH, so we're hoping to be able to make a modification to the scripts to use the SSH or SSH2 module instead.

If porting the SSH2 module gets to be too hairy, we may have to use callouts to DCL using the HP TCP/IP SSH capability instead. We'd like to keep the scripts more generic though since we'll be doing similar things on other platforms.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Richard Whalen
Honored Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

It's possible to use MultiNet's/TCPware's SSH to do FTP over SSH. This might be the easiest way to do what you want. I don't know if TCP/IP services can do it or not.

See http://www.process.com/tcpip/mndocs51/USER_GUIDE/Ch08.htm#E54E27 for information on how to do this for MultiNet.
Robert_Boyd
Respected Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

I thought of tunneling FTP through SSH, but the problem is that we are being asked to close down the FTP service completely for all inbound connects on all of the servers in question. This makes it difficult to have someone home to answer the call at the other end of the SSH tunnel.

If you have any suggestions how to limit the FTP service to only respond to requests coming through the tunnel and no others, that would be great.

The obvious thing going on here is shutting down services that require/allow users to put unencrypted passwords onto the LAN.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

Here is a bit of perl code that gets what I need:

my $cpu_word = qr/[a-zA-Z0-9]+/ ;
my $number = qr/[0-9]+/ ;
my @cpu_types = () ;
#
# Find the appropriate records in the include file
#
foreach (`library/text SYS\$SHARE:SYS\$LIB_C.TLB/extract=HWRPBDEF/output=sys\$output`)
{
# print ;
if ( m/HWRPB_CPU_TYPE\$K_($cpu_word)\s*($number)\s*/ ) {
@cpu_types[$2] = "alpha".$1 ;
# print $2,"=",$1,"\n"
}
}
# Turn the array into a text list
# my $cpu_list = join(',', @cpu_types) ;
# print $cpu_list, "\n" ;
#
# find out the cpu type from GETSYI
#
my $cpu_type = `write sys\$output f\$getsyi("cputype")` ;

#print "Cpu type $cpu_type = @cpu_types[$cpu_type]" ;

printf "%s", lc(@cpu_types[$cpu_type]) ;
Master you were right about 1 thing -- the negotiations were SHORT!
labadie_1
Honored Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

You have a dcl code doing something very similar at
http://dcl.openvms.org/stories.php?story=06/03/21/8098045

Just adapt it (it should be easy)
labadie_1
Honored Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

I have done it !

$ in :== wr sys$output
$pipe ( in "exam exe$gq_cputype" ) | ana/sys | ( read sys$pipe p ; -
read sys$pipe p ; read sys$pipe p ; read sys$pipe p ; def/job p &p)
$ cpuhex = f$extr(26,8,f$trn("p"))
$ cpu = %X'cpuhex'
$ sh symb cpu
$ deas/job p
$ exit

Seems to work on my DS10
labadie_1
Honored Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

Of course this will break if a new Vms version add or removes some returns in SDA>
labadie_1
Honored Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

a simpler version, which should not break so often

$ in :== wr sys$output
$pipe ( in "exam exe$gq_cputype" ) | ana/sys | sea sys$pipe exe$gq_cputype | -
( read sys$pipe p ; def/job p &p)
$ cpuhex = f$elem(1,".",f$elem(1,":",f$trn("p")))
$ cpu = %X'cpuhex'
$ sh symb cpu
$ deas/job p
$ exit
Ian Miller.
Honored Contributor

Re: Porting gnu kits to OpenVMS Alpha & CPU type

see also
http://groups.google.com/group/comp.os.vms/browse_frm/thread/e9ad6f9251b68762

for some chat on the same topic
____________________
Purely Personal Opinion