Difference between revisions of "Config"

From ICE Enterprises
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 +
== Prerequisites ==
 +
 
As root,
 
As root,
  
Line 7: Line 9:
 
* kernel-headers
 
* kernel-headers
 
* kernel-devel
 
* kernel-devel
 +
* tcsh
 +
 +
== ICE Operator User ==
  
 
Create ICE operating user 'iceman':
 
Create ICE operating user 'iceman':
Line 12: Line 17:
 
  passwd iceman
 
  passwd iceman
 
  <enter password>
 
  <enter password>
 
If not already installed, install TC-Shell:
 
yum install tcsh
 
  
 
Change iceman's shell to TC-Shell:
 
Change iceman's shell to TC-Shell:
 
  usermod -s /bin/tcsh iceman
 
  usermod -s /bin/tcsh iceman
 +
 +
== Directory Structure ==
  
 
Create the following directory structure:
 
Create the following directory structure:
Line 49: Line 53:
 
The entire /opt/ice directory should be owned by iceman, as well as /mnt/icedisk:
 
The entire /opt/ice directory should be owned by iceman, as well as /mnt/icedisk:
 
  chown -R iceman:iceman /opt/ice /mnt/icedisk
 
  chown -R iceman:iceman /opt/ice /mnt/icedisk
 +
 +
== Download Software ==
  
 
Download the latest stable ICE tree and NeXtMidas release from  
 
Download the latest stable ICE tree and NeXtMidas release from  
Line 60: Line 66:
 
  chown iceman:iceman /opt/ice/pkg/*
 
  chown iceman:iceman /opt/ice/pkg/*
  
Now as iceman dearchive the software packages and make symbolic links, which makes
+
Now switch users to iceman:
 +
su - iceman
 +
 
 +
Dearchive the software packages and make symbolic links, which makes
 
the paths more manageable and later software upgrades considerably easier:
 
the paths more manageable and later software upgrades considerably easier:
 
  cd /opt/ice/pkg
 
  cd /opt/ice/pkg
Line 69: Line 78:
 
  tar -xzf jdkXXX.tar.gz
 
  tar -xzf jdkXXX.tar.gz
 
  ln -s jdkXXX jdk
 
  ln -s jdkXXX jdk
 +
 +
== Temporary Files Directory ==
 +
 +
Create directory for temporary NeXtMidas files:
 +
mkdir ~/tmp
 +
 +
== Configuration Files ==
  
 
Modify /opt/ice/pkg/nmxxx/nxm/sys/cfg/nmstartup.mm to include the following (use this as a complete example):
 
Modify /opt/ice/pkg/nmxxx/nxm/sys/cfg/nmstartup.mm to include the following (use this as a complete example):
Line 85: Line 101:
 
  file name u:aux.2  (opt,ice,aux,ramdisk)
 
  file name u:aux.2  (opt,ice,aux,ramdisk)
 
  file name u:aux.11 (opt,ice,aux,data11,+)
 
  file name u:aux.11 (opt,ice,aux,data11,+)
file name u:aux.12 (opt,ice,aux,data12,+)
 
 
   
 
   
 
  ! define OS specific AUXes
 
  ! define OS specific AUXes
Line 108: Line 123:
 
  endmacro
 
  endmacro
  
Add the following lines to ~iceman/.cshrc, creating the file if it does not already
+
Add the following lines to /home/iceman/.cshrc, creating the file if it does not already
exist (this is a bare minimum TCSH login script for our purposes):
+
exist:
setenv ICEPKG /opt/ice/pkg
 
setenv ICEROOT $ICEPKG/icexxx
 
setenv NMROOT $ICEPKG/nmxxx
 
setenv JAVAHOME $ICEPKG/
 
 
 
 
  #!/bin/csh
 
  #!/bin/csh
 
  #
 
  #
Line 138: Line 148:
 
     setenv NM_USER_JVM_FLAGS "-Xmx1024m -Xms1024m"
 
     setenv NM_USER_JVM_FLAGS "-Xmx1024m -Xms1024m"
 
     setenv NMHISTORY_DIR $TMPDIR
 
     setenv NMHISTORY_DIR $TMPDIR
    setenv XMDISK $ICEPKG/xmxxx
 
    setenv XMHISTORY_DIR $TMPDIR
 
 
     setenv JAVAHOME $ICEPKG/jdk   
 
     setenv JAVAHOME $ICEPKG/jdk   
 
     if ( -e $JAVAHOME/bin ) then
 
     if ( -e $JAVAHOME/bin ) then
Line 160: Line 168:
 
   setenv COLUMNS   
 
   setenv COLUMNS   
 
  endif
 
  endif
   
+
  #
 
  # Aliases
 
  # Aliases
 
  alias ice      ${ICEROOT}/jre/ice
 
  alias ice      ${ICEROOT}/jre/ice
alias xms      source ${XMDISK}/xm/unix/xmstart
 
alias xmstart  source ${XMDISK}/xm/unix/xmstart
 
 
  alias nms      source ${NMROOT}/os/unix/nmstart
 
  alias nms      source ${NMROOT}/os/unix/nmstart
 
  alias nmstart  source ${NMROOT}/os/unix/nmstart
 
  alias nmstart  source ${NMROOT}/os/unix/nmstart
  
Create the follow NeXtMidas macro ~/nmstartup.mm
+
Now load the setting from the .cshrc file, either logout and log back in as iceman, or
 +
source ~/.cshrc
 +
 
 +
Create the following NeXtMidas macro ~/nmstartup.mm
 
  startmacro
 
  startmacro
 
   
 
   
Line 179: Line 188:
 
   
 
   
 
  endmacro
 
  endmacro
+
 
 +
== Compile the Software ==
 +
 
 
Compile NeXtMidas and the ICE tree:
 
Compile NeXtMidas and the ICE tree:
 
  nms
 
  nms
Line 186: Line 197:
 
  nmend
 
  nmend
  
As root, build the ICE-PIC driver:
+
== Build and Install the ICE-PIC Driver ==
 +
 
 +
As root, build the driver:
 
  cd /opt/ice/pkg/icexxx/drv/lnx
 
  cd /opt/ice/pkg/icexxx/drv/lnx
 
  ./icepic make
 
  ./icepic make
Line 192: Line 205:
 
  ./icepic start
 
  ./icepic start
  
Note: If you are upgrading the driver from a previous version, stop and remove the old driver:
+
Note: If you are upgrading the driver from a previous version, first stop and remove the old driver:
 
  ./icepic stop
 
  ./icepic stop
 
  ./icepic remove
 
  ./icepic remove

Revision as of 11:08, 30 April 2020

Prerequisites

As root,

Install prerequisite packages:

  • gcc
  • gcc-c++
  • libstdc++-devel
  • kernel-headers
  • kernel-devel
  • tcsh

ICE Operator User

Create ICE operating user 'iceman':

useradd iceman
passwd iceman
<enter password>

Change iceman's shell to TC-Shell:

usermod -s /bin/tcsh iceman

Directory Structure

Create the following directory structure:

/
|-- ...
|-- mnt
|   |-- data01
|   |-- data11
|   |-- icedisk
|   `-- ramdisk
|-- opt
|   `-- ice
|   |   |-- aux
|   |   |   |-- data01 -> /mnt/data01
|   |   |   |-- data11 -> /mnt/data11
|   |   |   |-- icedisk -> /mnt/icedisk
|   |   |   `-- ramdisk -> /mnt/ramdisk
|   |   |-- pkg
|-- ...

Note that /opt/ice/aux only contains links. This is a matter of convenience so that all of the AUXes can be referenced from within the ICE tree. They can be create as such:

cd /opt/ice/aux
ln -s /mnt/data01 data01
ln -s /mnt/data11 data11
ln -s /mnt/icedisk icedisk
ln -s /mnt/ramdisk ramdisk

The entire /opt/ice directory should be owned by iceman, as well as /mnt/icedisk:

chown -R iceman:iceman /opt/ice /mnt/icedisk

Download Software

Download the latest stable ICE tree and NeXtMidas release from http://www.ice-online.com/software/downloads/stable/

Copy the ICE tree software ZIP archive, the NeXtMidas ZIP archive, and the JDK archive into /opt/ice/pkg and make sure they are owned by iceman:

cp <source path>/iceXXX.zip /opt/ice/pkg
cp <source path>/nxmXXX.zip /opt/ice/pkg
cp <source path>jdkXXX.tar.gz /opt/ice/pkg
chown iceman:iceman /opt/ice/pkg/*

Now switch users to iceman:

su - iceman

Dearchive the software packages and make symbolic links, which makes the paths more manageable and later software upgrades considerably easier:

cd /opt/ice/pkg
unzip iceXXX.zip
ln -s iceXXX icexxx
unzip nxmXXX.zip
ln -s nxmXXX nmxxx
tar -xzf jdkXXX.tar.gz
ln -s jdkXXX jdk

Temporary Files Directory

Create directory for temporary NeXtMidas files:

mkdir ~/tmp

Configuration Files

Modify /opt/ice/pkg/nmxxx/nxm/sys/cfg/nmstartup.mm to include the following (use this as a complete example):

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Macro to initialize system specific settings.
! @author Jeff Schoen
! @version $Id: nmstartup.mm,v 1.37 2011/11/10 20:58:41 ntn Exp $
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
startmacro

info "DEPRECATION warnings ON, to turn off edit nmstartup.mm in SYS->CFG"
debug on DEPRECATE

! portable way to define normal auxes (1 = /opt/ice/aux/data01/+/, etc.)
file name u:aux.1  (opt,ice,aux,data01,+)
file name u:aux.2  (opt,ice,aux,ramdisk)
file name u:aux.11 (opt,ice,aux,data11,+)

! define OS specific AUXes
if env.ostype eqs "UNIX"
  sedit AUX.9 AUX.9 append ",RAM,AUTO"
! sedit AUX.9 AUX.9 append ",RAM,<start>M,<sized>M"
elseif env.ostype eqs "DOS"
  sedit AUX.9 AUX.9 append ",RAM,<start>M,<sized>M"
elseif env.ostype eqs "VMS"
  ! nothing specific for VMS
endif

! set write AUX and read AUX list
aux 1 1 cwd dat ram

path set dsp hwc

env set "HWFILE" "nxm.sys.dat.hwconfig"
res t:km "nxm.sys.cfg.keyMap.tbl"
env set KEYMAP ^km

endmacro

Add the following lines to /home/iceman/.cshrc, creating the file if it does not already exist:

#!/bin/csh
#
# Red-Hat System csh.cshrc
if ( -f /etc/csh.cshrc ) source /etc/csh.cshrc
#
# Set environment variables
if ( "${?HOMEDIR}" == 0 ) then
  setenv HOMEDIR /home/iceman
endif
if ( "${?TMPDIR}" == 0 ) then
  setenv TMPDIR $HOMEDIR/tmp
endif
if ( "${?USERPATH}" == 0 ) then
  setenv USERPATH /bin:/sbin:/usr/bin:/usr/sbin:${HOMEDIR}/bin
  setenv PATH ${PATH}:${USERPATH}
endif
if ( "${?ICEPKG}" == 0 ) then
  if ( -e /opt/ice/pkg ) then
    setenv ICEPKG  /opt/ice/pkg
    setenv ICEROOT $ICEPKG/icexxx
    setenv NMROOT  $ICEPKG/nmxxx
    setenv NM_USER_JVM_FLAGS "-Xmx1024m -Xms1024m"
    setenv NMHISTORY_DIR $TMPDIR
    setenv JAVAHOME $ICEPKG/jdk  
    if ( -e $JAVAHOME/bin ) then
      setenv PATH ${PATH}:$JAVAHOME/bin
    endif
    if ( -e $JAVAHOME/jre/bin ) then
      setenv PATH ${PATH}:$JAVAHOME/jre/bin
    endif
    if ( -e /opt/ice/bin ) then
      setenv PATH ${PATH}:/opt/ice/bin
    endif
  endif
endif
#
# Set C-Shell/TCSH environment
if ( "${?LINES}" == 0 ) then
  setenv LINES   
endif
if ( "${?COLUMNS}" == 0 ) then
  setenv COLUMNS   
endif
#
# Aliases
alias ice      ${ICEROOT}/jre/ice
alias nms      source ${NMROOT}/os/unix/nmstart
alias nmstart  source ${NMROOT}/os/unix/nmstart

Now load the setting from the .cshrc file, either logout and log back in as iceman, or

source ~/.cshrc

Create the following NeXtMidas macro ~/nmstartup.mm

startmacro

option ice /opt/ice/pkg/icexxx
if "/proc/driver/icepic" fexists then
  pic aux 9
endif
hw file nxm.ice.dat.hwconfig
aux 1 1|2|9|DAT|11|CWD|RAM|HOME

endmacro

Compile the Software

Compile NeXtMidas and the ICE tree:

nms
nm make all
nm make all ice
nmend

Build and Install the ICE-PIC Driver

As root, build the driver:

cd /opt/ice/pkg/icexxx/drv/lnx
./icepic make
./icepic install
./icepic start

Note: If you are upgrading the driver from a previous version, first stop and remove the old driver:

./icepic stop
./icepic remove

Configure the kernel line parameters in /etc/default/grub (This example uses kernel allocated memory):

...
GRUB_CMDLINE_LINUX="... ice.ra=2 ice.rd=8000M ice.rm=64M"

Remake grub.cfg:

On Legacy/BIOS systems:

grub2-mkconfig -o /boot/grub2/grub.cfg

On UEFI systems:

grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Reboot the machine.

Once rebooted, log into a graphical session as iceman.

Check the that the driver loaded and verify that the requested memory buffer size was obtained:

cat /proc/driver/icepic

You should see

RamStart  : XXXX Mby
RamDisk   : 8000 Mby
RamMapped : 64 Mby
...

Try starting NeXtMidas and test the configuration:

nms
nm
nM> plot apenny

Now from within the NeXtMidas shell, detect any ICE-PIC cards that might be installed:

nM> pic detect

Note the PCI-e width and generation.