- Need to update this since CentOS is no longer installed.
The Spectrum XMC1151 digitizer libraries we have require a specific flavour of Linux to operate.
Download the specific version by getting the http://vault.centos.org/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso which is the “minimal” CentOS 6.5.
Kernel from OS install 2016.04.14
Linux lvisf 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
In case your kernel is wrong, you can download the RPM and install directly
cd ~/download wget http://vault.centos.org/6.5/centosplus/x86_64/Packages/kernel-2.6.32-431.el6.centos.plus.x86_64.rpm wget http://vault.centos.org/6.5/centosplus/x86_64/Packages/kernel-devel-2.6.32-431.el6.centos.plus.x86_64.rpm
sudo rpm -ivh --oldpackage kernel-2.6.32-431.el6.centos.plus.x86_64.rpm sudo rpm -ivh --oldpackage kernel-devel-2.6.32-431.el6.centos.plus.x86_64.rpm
I had to do this, but not sure if really I needed to just install the top thing?
cd /usr/src/kernels ln -s 2.6.32-431.el6.centos.plus.x86_64 2.6.32-431.el6.x86_64
kboardconfig PciCfgDelay 5s
kboardconfig PciCfgDelay # will see [5s] highlighted in green (and that is the longest delay available)
# ONLY RT version needs this DO NOT DO THIS for normal operations with NORT build (build02 / v2) kboardconfig IntelVT disabled kboardconfig IntelHT disabled
exit
Using the 500_00746_r100_SDR7000_Linux_SG.pdf document, set up the core data system.
This did work in adding the 6.10 repository to our system: (from) https://www.mark-gilbert.co.uk/fixing-yum-repos-on-centos-6-now-its-eol/
curl http://mark-gilbert-co-uk.s3-website-eu-west-1.amazonaws.com/CentOS-Base.repo --output /etc/yum.repos.d/CentOS-Base.repo curl http://mark-gilbert-co-uk.s3-website-eu-west-1.amazonaws.com/epel.repo --output /etc/yum.repos.d/epel.repo
Maybe we should grab what we need? I dunno. Maybe we just make an image that we can expand to a 64 GB drive and be happy.
NOTE: Press the Delete key while booting in order to change the boot to either the USB PLEXTOR drive or the LEXAR CFAST drive
Some notes on using virtual box
Used RedHat 64 Bit as the base machine, worked fine with the CentOS minimal
In order to ssh to your host, you can add a rule to port forward into your VM
ssh -CY root@127.0.1.1 -p2222
sudo nano /etc/fstab
LABEL=LVISF_INTERNAL /mnt/internal ext4 defaults,noatime 0 0 LABEL=LVISF_EXTERNAL /mnt/external ext4 defaults,noatime 0 0 LABEL=LVISF_NAV /mnt/nav ext4 defaults,noatime 0 0 tmpfs /mnt/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1M 0 0
sudo mkdir /mnt/internal /mnt/external /mnt/nav /mnt/tmp /mnt/usb /mnt/nfs /mnt/ramdisk
ONBOOT=yes
sudo ifup eth0
yum groupinstall 'Development Tools'
yum install ftp -y yum install nano -y yum install wget -y
mkdir ~/down cd ~/down wget https://downloadmirror.intel.com/13663/eng/igb-5.3.5.3.tar.gz
tar xvf igb-5.3.4.4.tar.gz
cd ~/tmp/igb-5.3.4.4/src/ make sudo make install
sudo nano /etc/sysconfig/modules/lvisf.modules
#!/bin/sh # start intel network driver /sbin/modprobe igb
sudo chmod 755 /etc/sysconfig/modules/lvisf.modules
NOTE: you can just do this
sudo cp /opt/lvisf/src/lvisF/scripts/ifcfg-eth* /etc/sysconfig/network-scripts/
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 HWADDR=00:80:82:1B:E7:04 TYPE=Ethernet UUID=98bd88d8-8fe8-4b8e-bca0-a58bd3306717 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static NAME="System eth0" IPADDR=10.4.1.2 NETMASK=255.255.255.0
vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=lvisf NETWORKING_IPV6=no IPV6INIT=no GATEWAY=10.4.1.1 # or 10.4.1.254 if using Dell Laptop Gateway for WiFi still
vi /etc/resolv.conf
search gsfc.nasa.gov nameserver 128.183.10.134 nameserver 128.183.50.17
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1 HWADDR=00:80:82:1B:E7:05 TYPE=Ethernet UUID=5eb0ea0f-b1e8-43ab-a64d-83d3d9e1dc95 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static NAME="System eth1" IPADDR=192.168.0.2 NETMASK=255.255.255.0
vi /etc/sysconfig/network-scripts/ifcfg-eth1:1
DEVICE=eth1:1 HWADDR=00:80:82:1B:E7:05 TYPE=Ethernet UUID=5eb0ea0f-b1e8-43ab-a64d-83d3d9e1dc95 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static NAME="System eth1:1" IPADDR=129.100.0.2 NETMASK=255.255.255.0
useradd lvis
passwd lvis
visudo
lvis ALL=(ALL) ALL
sudo yum install epel-release
sudo yum install fuse fuse-ntfs-3g
sudo yum install epel-release sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
sudo yum install exfat-utils fuse-exfat
sudo mount -t exfat /dev/sdc1 /mnt/tmp
# core X11 sudo yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils xterm -y # required for tuna sudo yum install xauth pygtk2-libglade -y
sudo yum install tuna -y
X11Forwarding yes
sudo service exim stop
sudo rpm -e --nodeps exim
sudo service auditd stop # now sudo chkconfig auditd off # after reboot
sudo service postfix stop
sudo rpm -e --nodeps postfix
Our eSATA connection to the raid (and any external ATA devices) was occasionaly running into issues when running at high speed (6.0 GBPS). Dan Caplan found online notes that people put a speed limit on the kernel module that regulates the ATA commuincations, and that solved the types of errors we have been seeing.
libata.force=3.0
#boot=/dev/sda1 device (hd0) HD(1,800,200000,a70d9e49-77c1-4fc8-b5ce-81ede8517477) default=0 timeout=5 splashimage=(hd0,1)/boot/grub/splash.xpm.gz serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 terminal --timeout=5 serial console hiddenmenu title CentOS (2.6.32-431.el6.x86_64) root (hd0,1) kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=2804bc4c-c850-4d83-9fec-7de10cb1e2b4 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarc yrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb console=tty0 console=ttyS0,115200n8 libata.force=3.0 initrd /boot/initramfs-2.6.32-431.el6.x86_64.img
If you want to send the kernel messages out to the serial port for logging.
sudo nano /etc/grub.conf
rhgb quiet
rhgb console=tty0 console=ttyS0,115200n8
And, to make it such that you can log onto the system over that console port…
sudo nano /etc/grub.conf
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 terminal --timeout=5 serial console hiddenmenu
console=tty0 console=ttyS0,115200n8
sudo nano /etc/securetty
ttyS0
sudo nano /etc/init/ttyS0.conf
# ttyS0 - getty # # This service maintains a getty on ttyS0 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL=[2345] and ( not-container or container CONTAINER=lxc or container CONTAINER=lxc-libvirt) stop on runlevel [!2345] respawn exec /sbin/getty -L 115200 ttyS0 vt102 ########
Still as root logged into the main desktop
sudo service iptables stop sudo service ip6tables stop
sudo chkconfig iptables off sudo chkconfig ip6tables off
sudo vi /etc/selinux/config
SELINUX=enforcing
SELINUX=disabled
sudo vi /etc/sysconfig/network
NETWORKING_IPV6=no IPV6INIT=no
sudo nano /etc/ssh/sshd_config # lvisf - ipv4 only AddressFamily inet ListenAddress 0.0.0.0
sudo vi /etc/modprobe.d/lvisf-blacklist.conf
# lvisf kernel module blacklist # version 1.0 - dlr - 20160418 # ipv6 blacklist ipv6 # NMI watchdog blacklist iTCO_wdt blacklist iTCO_vendor_support blacklist i2c_i801 # blacklist igb blacklist lpc_ich blacklist shpchp blacklist dm_mirror # intel sound blacklist soundcore blacklist snd blacklist snd_seq blacklist snd_hda_intel blacklist snd_hda_codec_hdmi # USB controller (still loads) blacklist xhci_hcd # this is required to REMOVE ipv6 module, I am not sure why # http://www.cyberciti.biz/faq/redhat-centos-disable-ipv6-networking/ install ipv6 /bin/true
# USB driver... if you're using the nousb kernel, this will work sudo modprobe --remove xhci_hcd sudo modprobe --remove dm_mirror
Module Size Used by e1000 170646 0 sg 29350 0 ext4 374902 3 jbd2 93427 1 ext4 mbcache 8193 1 ext4 sd_mod 39069 3 crc_t10dif 1541 1 sd_mod ahci 42215 2 i915 624511 1 drm_kms_helper 44321 1 i915 drm 280012 2 i915,drm_kms_helper i2c_algo_bit 5935 1 i915 i2c_core 31084 4 i915,drm_kms_helper,drm,i2c_algo_bit video 20674 1 i915 output 2409 1 video dm_mod 84209 9
NOTE: This is obsolete (the repository link), but left here for posterity.
Repository URL: https://zj.yancich.com:8443/svn/NASA/trunk/lvisF username "lvis" password: standard lvis password This is a cmake project. To rebuild the make files: In "build" directory type "cmake ../" Then "make" to build everything. "make clean" to clean the programs and kernel modules.
(Yancich sent this to me in March 2016) Original document is configuration_and_build_procedures_for_lvisf_and_support_libraries.docx
sudo yum install cmake -y
sudo yum install htop -y
sudo yum install ftp://ftp.pbone.net/mirror/centos.karan.org/el5/extras/testing/i386/RPMS/jed-0.99.18-5.el5.kb.i386.rpm -y
sudo yum install nano -y
sudo yum install p7zip pigz -y
sudo yum install pciutils -y
sudo yum install screen -y
sudo yum install telnet -y
sudo yum install wget -y
sudo yum groupinstall "Development Tools"
sudo yum install openssl-devel -y
sudo yum install ncurses-devel -y
sudo yum install md5deep -y
sudo yum install man -y sudo yum install man-pages -y
cd mkdir download cd ~/download wget http://vault.centos.org/6.5/os/x86_64/Packages/kernel-devel-2.6.32-431.el6.x86_64.rpm sudo yum --nogpgcheck localinstall ~/download/kernel-devel-2.6.32-431.el6.x86_64.rpm -y
sudo yum install gdisk -y
sudo yum install libtiff-devel -y
sudo yum install libX11-devel -y
sudo yum install gdb gdb-gdbserver
sudo yum install yum-utils
sudo /etc/yum.repos.d/CentOS-Debuginfo.repo # and set # enabled=1
sudo debuginfo-install glibc
Download version 2.5 and follow install instructions. This will build libgsl and libgslcblas need for the DEM library.
cd ~/download wget http://mirror.rit.edu/gnu/gsl/gsl-2.5.tar.gz cd ~/code tar -xvf ~/download/gsl-2.5.tar.gz
cd ~/code/gsl-2.5 ./configure make -j 4 sudo make install
sudo mkdir /opt/lvisf
sudo chown -R lvis:lvis /opt/lvisf
cd / tar jxvf /media/LVIS-GH-2TB_WD209/lvisf_build/lvisf_sourcesnapshot_20160816_svn439.tar.bz2
cd /opt/lvisf svn co https://svn.yancich.com:8443/svn/NASA/LVIS/trunk/ src
cd /opt/lvisf/src svn update
cd /home/lvis mkdir src ln -s /opt/lvisf/src/* /home/lvis/src/
nano /home/lvis/.bash_profile
# For SVN commit comment editor export SVN_EDITOR=nano # For the Innovative digitizer export WD_BASEDIR=/home/lvis/src/Innovative/WinDriver # For the SyncClock timer card export PLX_SDK_DIR=/home/lvis/src/PLX/PlxSdk # For the spectrum digitizer export SSP_INSTALL_ROOT=/home/lvis/src/spectrum
source ~/.bash_profile
sudo nano /etc/ld.so.conf.d/lvisf.conf
/home/lvis/src/Innovative/winCloudDrvr/winclouddrvr_installation/lib /home/lvis/src/MIC3753/linux_driver_source_3.2.7.0_64bit/libs /home/lvis/src/spectrum/shared/linux/pc64/lib
sudo ldconfig
cd /home/lvis/src/PLX/PlxSdk/Driver
./buildalldrivers
cd /home/lvis/src/PLX/PlxSdk
make clean make
cd /home/lvis/src/PLX/PlxSdk/Bin
sudo ./Plx_load 9030 # to just see what boards are supported, run the script with no argument ./Plx_load
NOTE These drivers NEED to be built as root, you cannot sudo to build these drivers
sudo bash
cd /home/lvis/src/MIC3753/linux_driver_source_3.2.7.0_64bit/drivers/driver_base/src/lnx_ko
make
cd /home/lvis/src/MIC3753/linux_driver_source_3.2.7.0_64bit/drivers/pci1753_mic3753_pcm3753i/src/lnx_ko
# to disable IRQs in this driver, just use this code where the IRQ calls are commented out cp init.c.no_irq init.c make
ln -s /opt/lvisf/src/MIC3753/linux_driver_source_3.2.7.0_64bit/drivers/bin/*.ko /lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/misc/
cd /home/lvis/src/MIC3753/linux_driver_source_3.2.7.0_64bit/drivers/bin insmod biokernbase.ko insmod bio1753.ko
exit
Described in LinuxNotes.pdf (might be this /usr/Innovative/MalibuRed-1.3/KerPlug/LinuxNotes.pdf)
sudo ln -s /opt/lvisf/src/Innovative /usr/Innovative
tar -zxvf /opt/lvisf/src/tars/64WinDriver-12.3-0.X86_64.tgz.tar.gz --directory=/usr/Innovative/
cd /usr/Innovative rm /usr/Innovative/WinDriver ln -s WinDriver-12.3 WinDriver
cd /usr/Innovative/WinDriver/redist
./configure make sudo make install # they say do not do this, we live on the edge
cd /usr/Innovative/KerPlug/linux ./configure make
nano Makefile
MOD_CSRCS = $(WD_BASEDIR)/redist/linux_wrappers.c
MOD_CSRCS = ../../../../../../../$(WD_BASEDIR)/redist/linux_wrappers.c
make
sudo insmod LINUX.2.6.32-431.el6.x86_64.x86_64/kp_malibu_module.ko
cd /usr/Innovative/KerPlug sudo ./quicklink wdapi 1230
sudo yum install qt4 -y sudo yum install qt4-devel -y
cd /home/lvis/src/Innovative/Malibu/Qt/Os_Mb qmake-qt4 make
All of this below is just for historical records. Do NOT need to do any more Innovative.
Raw code from /etc/rc.local from the primary machine to load this
sudo bash cd /usr/Innovative/WinDriver-12.3/redist && ./wdreg LINUX.2.6.32-431.el6.x86_64.x86_64/windrvr1230 auto #/usr/Innovative/winCloudDrvr/winclouddrvr_installation/redist/wdreg winCloudDrvr auto #chmod 666 /dev/winCloudDrvr insmod /usr/Innovative/KerPlug/linux/LINUX.2.6.32-431.el6.x86_64.x86_64/kp_malibu_module.ko exit
In the field we noticed that the driver was saying unregistered, and would only run for 60 minutes (sometimes it ran longer, but this was an issue). Dave found these instructions from an email:
FIRST! Make sure this folder exists: /usr/Innovative/Lib/Dll (and it is linked to the Innovative folder in src) Make sure LicenseLoader.so exists in that folder. (I have attached that file and a tar of the 3 others needed to rebuild) Hopefully its just that the .so did not make it to that system disk. If is does exist: Copy all the files in the tar to: /home/lvis/src/Innovative/Malibu Cd to /home/lvis/src/Innovative/Malibu/Qt/Os_Mb “qmake-qt4” “make” This will make the Os library and copy it to the correct folder. “That is all I got” 😊 Dave
sudo ln -s /opt/lvisf/src/spectrum /spectrum
cd /home/lvis/src/spectrum/shared/linux/pc64/bin
cp -a /home/lvis/src/spectrum/shared/linux/pc64/bin/`uname -r`/*.ko /home/lvis/src/spectrum/shared/linux/pc64/bin/
chmod 755 *.sh # not sure why these were not already executable sudo bash ./setup_xmc1151_dvt.sh
sudo ln -s /opt/lvisf/src/MIC3753/linux_driver_source_3.2.7.0_64bit/drivers/bin/*.ko /lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/misc/
sudo nano /etc/sysconfig/modules/lvisf.modules sudo chmod 755 /etc/sysconfig/modules/lvisf.modules
# start the MIC-3753 drivers /sbin/modprobe biokernbase /sbin/modprobe bio1753
NOTE: (in lieu of step 2 below) I had this not work when I manually edited it the first time. A copy of the file is in the repository, you could just copy that file in:
sudo cp /opt/lvisf/src/lvisF/scripts/lvisf.modules /etc/sysconfig/modules/lvisf.modules
sudo ln -s /opt/lvisf/src/PLX/PlxSdk/Driver/Source.Plx9000/Output/Plx9030.ko /lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/misc/
sudo nano /etc/sysconfig/modules/lvisf.modules
# start the Plx9030 syncclock32 driver /sbin/modprobe Plx9030
# remove the symlink sudo rm /etc/rc.local # move the original to something else sudo mv /etc/rc.d/rc.local /etc/rc.d/rc.local_orig
sudo ln -s /opt/lvisf/src/lvisF/scripts/rc.local /etc/rc.d/rc.local sudo ln -s /etc/rc.d/rc.local /etc/rc.local
# look for this near the top AUTOSTART_LVISF="false"
The boost C++ library is required for the data system. The tarball of the 1.6.2 version is in the repository. Or download the latest from http://www.boost.org/users/download/. Here is the latest as of 2018.01.04 https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2
cd /opt sudo tar -jxvf /opt/lvisf/src/tars/boost_1_62_0.tar.bz2
sudo ln -s /opt/boost_1_62_0 /opt/boost
sudo chown -R lvis:lvis /opt/boost_1_62_0
nano /home/lvis/.bash_profile
# Add the boost root directory export BOOST_ROOT=/opt/boost
source /home/lvis/.bash_profile
cd /opt/boost ./bootstrap.sh ./b2 -j $(nproc --all) # should figure out number of cpus automagically
Follow the instructions here:
Follow the instructions below to compile the USB temperature monitoring device libraries required.
mkdir ~/bin
ln -s /opt/lvisf/src/lvisF/scripts/applanix* ~/bin/. ln -s /opt/lvisf/src/lvisF/scripts/build* ~/bin/. ln -s /opt/lvisf/src/lvisF/scripts/javad* ~/bin/. ln -s /opt/lvisf/src/lvisF/scripts/lvis* ~/bin/. ln -s /opt/lvisf/src/lvisF/scripts/query* ~/bin/. ln -s /opt/lvisf/src/lvisF/scripts/run* ~/bin/.
sudo insmod /home/lvis/src/MIC3753/linux_driver_source_3.2.7.0_64bit/drivers/bin/biokernbase.ko sudo insmod /home/lvis/src/MIC3753/linux_driver_source_3.2.7.0_64bit/drivers/bin/bio1753.ko
cd /home/lvis/src/PLX/PlxSdk/Bin sudo ./Plx_load 9030
cd /home/lvis/src/lvisF/build
cmake ../
make
cd /home/lvis/src/lvisF/build/bin/tests/syncclock
sudo ./galvMove
CPU_SET(3, &cpus);
sudo chrt --fifo 99 ./galvMove
isolcpus=2,3
CPU_SET(3, &cpus);
sudo chrt --fifo 99 ./galvMove
sudo bash -c 'echo 2 > /proc/irq/19/smp_affinity'
rhgb nousb quiet isolcpus=2,3 nosoftlockup mce=ignore_ce audit=0
sudo yum install perf
cd /opt/lvisf/src/lvisF/build/bin/tests/syncclock sudo perf sched record -o /dev/shm/perf.data chrt --fifo 99 ./galvMove
sudo perf sched -i /dev/shm/perf.data latency > /tmp/perf.latency.report
cat /proc/interrupts # notice that CPU1 has all the timer card interrupts (PLx9030) [lvis@lvisf syncclock]$ cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 0: 125 0 0 0 IR-IO-APIC-edge timer 8: 1 0 0 0 IR-IO-APIC-edge rtc0 9: 0 0 0 0 IR-IO-APIC-fasteoi acpi 18: 1968 0 0 0 IR-IO-APIC-fasteoi eth2 19: 0 2021327 0 0 IR-IO-APIC-fasteoi Plx9030 24: 0 0 0 0 DMAR_MSI-edge dmar0 25: 0 0 0 0 DMAR_MSI-edge dmar1 26: 2 0 0 0 IR-HPET_MSI-edge hpet2 27: 0 0 0 0 IR-HPET_MSI-edge hpet3 28: 0 0 0 0 IR-HPET_MSI-edge hpet4 29: 0 0 0 0 IR-HPET_MSI-edge hpet5 34: 235 0 0 0 IR-PCI-MSI-edge i915 35: 0 0 0 0 IR-PCI-MSI-edge ahci 36: 7971 0 0 0 IR-PCI-MSI-edge ahci NMI: 0 0 0 0 Non-maskable interrupts LOC: 20569 29227 10924 50493 Local timer interrupts SPU: 0 0 0 0 Spurious interrupts PMI: 0 0 0 0 Performance monitoring interrupts IWI: 0 0 0 0 IRQ work interrupts RES: 324 194 372 353 Rescheduling interrupts CAL: 47 197 178 211 Function call interrupts TLB: 142 610 312 1 TLB shootdowns TRM: 0 0 0 0 Thermal event interrupts THR: 0 0 0 0 Threshold APIC interrupts MCE: 0 0 0 0 Machine check exceptions MCP: 1 1 1 1 Machine check polls ERR: 0 MIS: 0