Skip to content
Snippets Groups Projects
erko_howto_tools.txt 67 KiB
Newer Older
ssh -J bastion.astron.nl regtest@dop349.astron.nl
You won't be asked for a (bastion) password. The certificate you've just generated will last for twelve hours. Once it's elapsed, the only step from the above you need to perform again is

$ step ssh login example@email.com --provisioner "keycloak"
alias mystep='step ssh login example@email.com --provisioner "keycloak"'
Whereupon you'll be good for another twelve hours. The above command is a great candidate for a shell alias.


*******************************************************************************
* Regression test
*******************************************************************************

Remote access using step:

> mystep

then:

> ping dop349.astron.nl --> responses within ~20 ms
> ping 10.87.0.149 --> --> responses within ~20 ms, ip dop349 = 10.87.0.149 (was 10.87.6.144)

> ssh -X regtest@dop349.astron.nl

crontab -l  # shows scheduled cron jobs
crontab -e  # edit schedule

tail -n 1000 unb2b_modelsim_regression_test_vhdl_cron.log

*******************************************************************************
* License server
*******************************************************************************

export LM_LICENSE_FILE=1800@license4.astron.nl:1717@license5.astron.nl
ping 10.87.3.179  # = ping license4.astron.nl
ping 10.87.3.114  # = ping license5.astron.nl


*******************************************************************************
* Screen to run a terminal session without ssh connection
*******************************************************************************

https://linuxize.com/post/how-to-use-linux-screen/

screen --version

Basic Linux Screen Usage

On the command prompt, type screen.
Run the desired program.
Use the key sequence Ctrl-a + Ctrl-d to detach from the screen session.
Reattach to the screen session by typing screen -r.


To start a screen session, simply type screen in your console:

screen
screen -S session_name

This will open a screen session, create a new window, and start a shell in
that window. Now that you have opened a screen session, you can get a list of
commands by typing:

Ctrl+a ?

When you start a new screen session, it creates a single window with a shell
in it. You can have multiple windows inside a Screen session.
To create a new window with shell type Ctrl+a c, the first available number
from the range 0...9 will be assigned to it. Below are some most common
commands for managing Linux Screen Windows:

Ctrl+a c Create a new window (with shell)
Ctrl+a " List all window
Ctrl+a 0 Switch to window 0 (by number )
Ctrl+a A Rename the current window
Ctrl+a S Split current region horizontally into two regions
Ctrl+a | Split current region vertically into two regions
Ctrl+a tab Switch the input focus to the next region
Ctrl+a Ctrl+a Toggle between the current and previous region
Ctrl+a Q Close all regions but the current one
Ctrl+a X Close the current region

You can detach from the screen session at any time by typing:

Ctrl+a d

The program running in the screen session will continue to run after you detach
from the session. To resume your screen session use the following command:

screen -r

In case you have multiple screen sessions running on your machine, you will
need to append the screen session ID after the r switch.
To find the session ID list the current running screen sessions with:

screen -ls

There are screens on:
    10835.pts-0.linuxize-desktop   (Detached)
    10366.pts-0.linuxize-desktop   (Detached)
2 Sockets in /run/screens/S-linuxize.

If you want to restore screen 10835.pts-0, then type the following command:

screen -r 10835

When screen is started, it reads its configuration parameters from
/etc/screenrc and ~/.screenrc if the file is present. We can modify the default
Screen settings according to our preferences using the .screenrc file.
Here is a sample ~/.screenrc configuration with customized status line and few
 additional options:
~/.screenrc
# Turn off the welcome message
startup_message off

# Disable visual bell
vbell off

# Set scrollback buffer to 10000
defscrollback 10000

# Customize the status line
Eric Kooistra's avatar
Eric Kooistra committed
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]'
Copy

Eric Kooistra's avatar
Eric Kooistra committed
* uex in screen lijkt eerst niet op te starten,
  matlab wel dus het ligt niet aan GUI, daarna lukts uex wel.
* :kooistra@dop386:~/git/hdl>  --> in gewone terminal
* ::kooistra@dop386:~/git/hdl> --> in screen terminal

*******************************************************************************
* Quartus Qsys IP files in GIT
*******************************************************************************

1) Designs without QSYS: unb2b_arp_ping
Met meld blijkt dat de ip dir van unb2b_arp_ping en unb2b_minimal gelijk zijn
in de STAT-266 branch. Dat komt omdat je ze gecopieerd hebt en omdat
unb2b_arp_ping geen QSYS heeft zijn ze dus ongewijzigd.

Aangezien unb2b_arp_ping geen QSYS heeft, en ook niet zou krijgen, is het
beter om de unb2b_arp_ping/quartus/ip dir van unb2_arp_ping te deleten.

2) Designs with QSYS
Elk design op basis van unb2_minimal heeft zijn eigen QSYS ip files:

> ls $RADIOHDL_WORK/boards/uniboard2b/designs/unb2b_minimal/quartus/ip/qsys_unb2b_minimal

Als een design meer MM ports heeft dan heeft het ook meer ip files, bijv.
qsys_unb2b_heater_reg_heater.ip voor de unb2b_heater.

Het is kennelijk voor QSYS nodig om naast de .qsys file ook de ip/ files in de
repository te bewaren. Het is dus ook nodig om ze per design te bewaren, want
elk design heeft zijn eigen naam en extra MM slaves tov unb2b_minimal.

Echter het blijkt dat een nieuw design ook dezelfde ip/ files als unb2_minimal
mag gebruiken, dus zonder naamswijziging.

ll $RADIOHDL_WORK/boards/uniboard2b/designs/unb2b_jesd/quartus/
  ip/
  qsys_unb2b_jesd.qsys
ll $RADIOHDL_WORK/boards/uniboard2b/designs/unb2b_jesd/quartus/ip/qsys_unb2b_minimal
total 2492
-rw-r--r-- 1 kooistra users 234095 Sep 23 13:01 altjesd_ss_RX_corepll.ip
-rw-r--r-- 1 kooistra users  16145 Sep 23 13:01 altjesd_ss_RX_frame_reset.ip
-rw-r--r-- 1 kooistra users  16139 Sep 23 13:01 altjesd_ss_RX_link_reset.ip
-rw-r--r-- 1 kooistra users 104258 Sep 23 13:01 altjesd_ss_RX_reset_seq.ip
-rw-r--r-- 1 kooistra users  42930 Sep 23 13:01 altjesd_ss_RX_xcvr_reset_control.ip
-rw-r--r-- 1 kooistra users  21228 Sep 23 13:01 device_clk.ip
-rw-r--r-- 1 kooistra users  21226 Sep 23 13:01 frame_clk.ip
-rw-r--r-- 1 kooistra users 159233 Sep 23 13:01 jesd.ip
-rw-r--r-- 1 kooistra users  21347 Sep 23 13:01 link_clk.ip
-rw-r--r-- 1 kooistra users  62203 Sep 23 13:01 qsys_unb2b_minimal_avs_common_mm_0.ip
-rw-r--r-- 1 kooistra users  62217 Sep 23 13:01 qsys_unb2b_minimal_avs_common_mm_1.ip
-rw-r--r-- 1 kooistra users 162287 Sep 23 13:01 qsys_unb2b_minimal_avs_eth_0.ip
-rw-r--r-- 1 kooistra users  21256 Sep 23 13:01 qsys_unb2b_minimal_clk_0.ip
-rw-r--r-- 1 kooistra users 189801 Sep 23 13:01 qsys_unb2b_minimal_cpu_0.ip
-rw-r--r-- 1 kooistra users 211623 Sep 23 13:01 qsys_unb2b_minimal_jesd204.ip
-rw-r--r-- 1 kooistra users  57037 Sep 23 13:01 qsys_unb2b_minimal_jtag_uart_0.ip
-rw-r--r-- 1 kooistra users  66156 Sep 23 13:01 qsys_unb2b_minimal_onchip_memory2_0.ip
-rw-r--r-- 1 kooistra users  61818 Sep 23 13:01 qsys_unb2b_minimal_pio_pps.ip
-rw-r--r-- 1 kooistra users  62201 Sep 23 13:01 qsys_unb2b_minimal_pio_system_info.ip
-rw-r--r-- 1 kooistra users  60152 Sep 23 13:01 qsys_unb2b_minimal_pio_wdi.ip
-rw-r--r-- 1 kooistra users  61896 Sep 23 13:01 qsys_unb2b_minimal_reg_dpmm_ctrl.ip
-rw-r--r-- 1 kooistra users  61896 Sep 23 13:01 qsys_unb2b_minimal_reg_dpmm_data.ip
-rw-r--r-- 1 kooistra users  62108 Sep 23 13:01 qsys_unb2b_minimal_reg_epcs.ip
-rw-r--r-- 1 kooistra users  62238 Sep 23 13:01 qsys_unb2b_minimal_reg_fpga_temp_sens.ip
-rw-r--r-- 1 kooistra users  62277 Sep 23 13:01 qsys_unb2b_minimal_reg_fpga_voltage_sens.ip
-rw-r--r-- 1 kooistra users  61896 Sep 23 13:01 qsys_unb2b_minimal_reg_mmdp_ctrl.ip
-rw-r--r-- 1 kooistra users  61896 Sep 23 13:01 qsys_unb2b_minimal_reg_mmdp_data.ip
-rw-r--r-- 1 kooistra users  62108 Sep 23 13:01 qsys_unb2b_minimal_reg_remu.ip
-rw-r--r-- 1 kooistra users  62176 Sep 23 13:01 qsys_unb2b_minimal_reg_unb_pmbus.ip
-rw-r--r-- 1 kooistra users  62163 Sep 23 13:01 qsys_unb2b_minimal_reg_unb_sens.ip
-rw-r--r-- 1 kooistra users  61818 Sep 23 13:01 qsys_unb2b_minimal_reg_wdi.ip
-rw-r--r-- 1 kooistra users  62209 Sep 23 13:01 qsys_unb2b_minimal_rom_system_info.ip
-rw-r--r-- 1 kooistra users  63384 Sep 23 13:01 qsys_unb2b_minimal_timer_0.ip


*******************************************************************************
* Quartus version
*******************************************************************************

Quartus version meeting minutes 13 may 2020 (RW, LH JH, EK):

1) UniBoard2b IP is created using Quartus 18.0, same as used for ARTS SC3.

2) UniBoard2b synthesis is done with Q18.0 or newer. In case of a newer Quartus version we rely on Quartus to upgrade the Q18.0 IP for synthesis which works fine sofar. We also rely on that the Q18.0 models are still sufficiently correct.

2a) Jonathan uses Q19.4, because Q18.0 does not work remotely via ssh.
2b) Reinier uses Q19.2, because that is the latest version that support OpenCL without microprocesor.

3) UniBoard2c IP was created using Q19.4 by Jonathan, but we need to reconsider going to the latest Quartus version and recreate the IP, when we continue with the pinning and test designs for UniBoard2c


*******************************************************************************
* Quartus issues
*******************************************************************************

1) run_quartus unb2b fails to start:

quartus: /home/software/Altera/18.0/quartus/linux64/liblzma.so.5:
no version information available (required by /lib/x86_64-linux-gnu/libsystemd.so.0)

# Installing libpng12 did not help to fix this (because this libsystemd is only a warning):
> sudo add-apt-repository ppa:linuxuprising/libpng12
> sudo apt update
> sudo apt install libpng12-0

# Changing video driver via system settings did not help

Linux video driver teruggezet naar xserver-xorg-video-nouveau (19 jan 2022)
nvidia-driver-470
Version 470.161.03-Oubuntu0.20.04.1
NVIDEA driver metapackage

change to

xserver-xorg-video-nouveau (0pen source)
Version 1:1.0.16-1
X.Org X server - Nouveau display driver

geeft:

pk-client-error-quark: E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. (281)

na sudo dpkg --configure -a die de 470 uninstallde kon ik de driver terug zetten
en werkte shutdown weer als shutdown ipv als suspend.

# sudo ln -s /usr/lib/x86_64-linux-gnu/dri ./dri haalt een error weg, maar dan deze error:
  libGL error: MESA-LOADER: failed to open iris: /home/software/Altera/18.0/quartus/linux64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
  libGL error: failed to load driver: iris
  libGL error: MESA-LOADER: failed to open iris: /home/software/Altera/18.0/quartus/linux64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
  libGL error: failed to load driver: iris
  libGL error: MESA-LOADER: failed to open swrast: /home/software/Altera/18.0/quartus/linux64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
  libGL error: failed to load driver: swrast

kooistra@dop466:/dop466_0/kooistra/git/hdl$ find /usr -name libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/i386-linux-gnu/libstdc++.so.6
/usr/local/MATLAB/R2018a/sys/os/glnxa64/libstdc++.so.6

  cd /home/software/Altera/18.0/quartus/linux64/
  cp -p libstdc++.so.6 libstdc++.so.6.quartus
  rm libstdc++.so.6
  ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6

Dit werkt, oplossing komt uit:

https://forum.step.esa.int/t/snap9-error-libegl-warning-mesa-loader-failed-to-open-swrast/36702/2

Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* Linux
*******************************************************************************

# Window outside screen
Doe Alt-F7 in window, daarna kun je het met de muis slepen.

Eric Kooistra's avatar
Eric Kooistra committed
# Linux Mint version
> cat /etc/issue

Eric Kooistra's avatar
Eric Kooistra committed
https://regexr.com/

https://linuxize.com/

Eric Kooistra's avatar
Eric Kooistra committed
> passwd

Eric Kooistra's avatar
Eric Kooistra committed
# If login does not source .bashrc, then set bash as default shell and relogin
chsh -s /bin/bash

Eric Kooistra's avatar
Eric Kooistra committed
# Linux update via
# - system updates available icon and notifications icon in toolbar
# - of via command line:
> uname -a # linux info
> sudo -s  # become root
> apt-get upgrade
> apt-get dist-upgrade
> apt autoremove

# Henk Vosmeier
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt remove

# Login on dop386 and then power off:
> sudo shutdown
Eric Kooistra's avatar
Eric Kooistra committed

Eric Kooistra's avatar
Eric Kooistra committed
dop466 = SSD
dop466_0 = HDD

Eric Kooistra's avatar
Eric Kooistra committed
> tar -cvf filename.tar dir_name/   # create tar
> tar -xvf filename.tar             # extract tar
> gzip filename        # zip file
> unzip filename.gz    # unzip file

> zip -r apertif_matlab-v1.0.zip apertif_matlab
> zipinfo apertif_matlab-v1.0.zip

> tar -xvzf lofar2_unb2b_sdp_station_full_wg-r241070441.tar.gz

Eric Kooistra's avatar
Eric Kooistra committed
> grep -rl 'search text in files' .  # -r for recursive, -l for only list filename
> find . -name *_thisfile.txt
> scp kooistra@dop386:/home/kooistra/x.txt .
Eric Kooistra's avatar
Eric Kooistra committed

Eric Kooistra's avatar
Eric Kooistra committed
Start --> Administration --> Synaptic package manager

Eric Kooistra's avatar
Eric Kooistra committed
> sudo -s   # to become root
> sudo pip install numpy      # to run Python2 library installer as root
> sudo pip3 install numpy     # to run Python3 library installer as root
> sudo pip3 install matplotlib
> sudo apt-get install python3-tk # worked, now I can do: python3 test_plot.py

Eric Kooistra's avatar
Eric Kooistra committed
> sudo apt-get install pip    # to install Python2 library installer
> sudo apt-get install python-matplotlib
Eric Kooistra's avatar
Eric Kooistra committed

# ARGS doc gen
Eric Kooistra's avatar
Eric Kooistra committed
> sudo pip3 install --upgrade setuptools
Eric Kooistra's avatar
Eric Kooistra committed
> sudo pip3 install --upgrade pyyaml

Eric Kooistra's avatar
Eric Kooistra committed
> sudo pip3 install pylatex
Eric Kooistra's avatar
Eric Kooistra committed

> sudo apt-get update -y
> sudo apt-get install -y latexmk

Eric Kooistra's avatar
Eric Kooistra committed
> sudo apt-get install texlive-latex-base
> sudo apt-get install texlive-fonts-recommended
> sudo apt-get install texlive-fonts-extra
> sudo apt-get install texlive-latex-extra

Eric Kooistra's avatar
Eric Kooistra committed
> sudo apt-get install lmodern # want log gaf aan dat lmodern.sty miste, nu wel pdf gegenereerd

Eric Kooistra's avatar
Eric Kooistra committed
> sudo pip3 install jupyterlab
# Add to .bashrc: export PATH="$HOME/.local/bin:$PATH"
> jupyter-lab

WARNING: The scripts f2py, f2py3 and f2py3.8 are installed in '/home/kooistra/.local/bin' which is not on PATH.

Eric Kooistra's avatar
Eric Kooistra committed
# Markdown
> sudo pip3 install markdown  # zit al in Python3, maar kan alleen md --> html
> sudo pip3 install mdutils   # https://pypi.org/project/mdutils/ # kan md genereren

Eric Kooistra's avatar
Eric Kooistra committed
# Ethernet
Eric Kooistra's avatar
Eric Kooistra committed
> ifconfig

# primary group
# supplementary groups

groups kooistra           # lists in which Linux groups I am a member of
id kooistra               # lists in which Linux groups I am a member of
getent group sudo         # lists which users are in the sudo Linux group
getent group software     # lists which users are in the software Linux group
more /etc/group
sudo groupadd software                 # add new Linux group 'software'
sudo usermod -a -G software kooistra   # add user 'kooistra' to a Linux group 'software'

ls -l filename                  # shows current user,group owners of the 'filename'
sudo chgrp software filename    # change group of 'filename' to 'software'
sudo chgrp -R software dirname  # recursively change group of 'dirname' to 'software'
Eric Kooistra's avatar
Eric Kooistra committed

sudo chown user_name file_name  # change user,group
Eric Kooistra's avatar
Eric Kooistra committed

Eric Kooistra's avatar
Eric Kooistra committed
# Linux Mint 20.3 upgrade 26 april 2022
https://linuxmint-user-guide.readthedocs.io/en/latest/upgrade-to-mint-20.html

Eric Kooistra's avatar
Eric Kooistra committed
sudo pip3 install matplotlib
sudo apt-get install python3-pil.imagetk
> python3 base/test_plot.py # werkt nu
sudo pip3 install asyncua
./sdp_rw.py --host dop421 -l  # werkt nu


Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* ICT diensten
*******************************************************************************

Self Service Password Reset

Met Self Service Password Reset (SSPR) is het mogelijk voor gebruikers om zelf hun wachtwoord
opnieuw instellen voor diverse ldap-diensten zonder tussenkomst van ict, zoals bijvoorbeeld de
netwerkschijven (H en I), intranet, vpn, Confluence, Jira en Surfmarkt.
Door middel van uitdagingsvragen kan een gebruiker bevestigen wie hij/zij is voordat ze hun
wachtwoorden veilig kunnen resetten.
Link: https://sspr.astron.nl

SURFfilesender
SURFfilesender is een webgebaseerde applicatie waarmee geauthenticeerde gebruikers veilig en
gemakkelijk willekeurig grote bestanden naar andere gebruikers kunnen verzenden. Gebruikers zonder
een account kunnen een gastvoucher worden gestuurd door een geverifieerde gebruiker. SURFfilesender
is ontwikkeld volgens de eisen en wensen van onderwijs en onderzoek.
Link: https://filesender.surf.nl

edu.nl: privacy-vriendelijke URL-shortener
edu.nl is dé URL-shortener voor onderwijs en onderzoek. Veilig omdat gebruikers inloggen met
SURFconext. Privacy-vriendelijk omdat edu.nl geen persoonlijke gegevens van gebruikers opslaat en
bezoekers van links niet trackt. edu.nl is kosteloos voor alle bij SURF aangesloten instellingen.
Link: https://filesender.surf.nl

Een uitgebreide beschrijving van deze diensten (Home » Diensten » ICT » Manuals and Documents)
is te vinden op het intranet
https://intranet.astron.nl/diensten/ict/manuals-and-documents/manuals-and-documents


*******************************************************************************
* Python
*******************************************************************************

pycharm
https://pypi.org/project/black/ # Python code formatter
Eric Kooistra's avatar
Eric Kooistra committed

numpy tutorial:
https://lwn.net/SubscriberLink/847039/3016fa7278000b77/
Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* Numpy, matplotlib.pyplot
*******************************************************************************

a = 20
plt.figure(figsize=(16, 6))
plt.subplot(1, 2, 1)
plt.plot(si_ampls[0:a], si_SSTs_dB[0:a])
plt.title(f"SST as function of input sine amplitude [0:{a}>")
plt.xlabel("si_ampl, ni_sigma [q]")
plt.ylabel("SST [dB]")
plt.grid()

plt.subplot(1, 2, 2)
plt.plot(si_ampls[a:], si_SSTs_dB[a:])
plt.title(f"SST as function of input sine amplitude [{a}:{FS}>")
plt.xlabel("si_ampl, ni_sigma [q]")
plt.ylabel("SST [dB]")
plt.grid()


Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* Jupyter
*******************************************************************************

Installed in:
ll /home/kooistra/.local/bin/

jupyter tutorial
https://www.dataquest.io/blog/jupyter-notebook-tutorial/
https://www.dataquest.io/blog/advanced-jupyter-notebooks-tutorial/

uses Markdown

Startup with:
> jupyter-lab  # lab is new,

Works from home in VPN:
* LTS --> http://test-lcu2.astron.nl:8888/notebooks/   # = dop81
* DTS --> http://dts-lcu.astron.nl:8888/notebooks/

XST indices:
* DTS --> http://dts-lcu.astron.nl:8888/tree/python_test_scripts/XST_test/XSTs
* DTS --> http://dts-lcu.astron.nl:8888/notebooks/python_test_scripts/XST_test/XST_index_test.ipynb
Eric Kooistra's avatar
Eric Kooistra committed
  ~/dop466_0/Documents/LOFAR2/ipynb_results/L2SDP-596-XST-input-delay.pdf
Eric Kooistra's avatar
Eric Kooistra committed
AST, SST levels
* DTS-lab --> http://dts-lcu.astron.nl:8888/notebooks/python_test_scripts/L2SDP_809_sdpfw_levels_erko.ipynb#
Eric Kooistra's avatar
Eric Kooistra committed
  ~/dop466_0/Documents/LOFAR2/ipynb_results/2SDP_809_sdpfw_levels_erko_*.pdf
Get XST results h5 file per crosslet on local machine from LCU2
> ls22-statistics-writer -a dts-lcu.astron.nl

Eric Kooistra's avatar
Eric Kooistra committed
Check of SDPTR op dop369 actief is met:
> uals -u 10.87.2.36:4840 -p "0:Objects"

*******************************************************************************
* Graphana
*******************************************************************************

http://dts-lcu.astron.nl:3000/?orgId=1


*******************************************************************************
* Zenodo DOI
*******************************************************************************

- login at https://zenodo.org/
- choose Upload in main menu --> my zenodo DOIs area
- choose New Upload button
- fill in all fields, reserve a DOI and do save
- check the README.md, NOTICE.md (with the DOI) and the LICENSE.md
- create the zip file
- upload the zip file and publish the DOI.


Eric Kooistra's avatar
Eric Kooistra committed

*******************************************************************************
* Install OpenSCAD
*******************************************************************************

https://ubuntuhandbook.org/index.php/2019/01/install-openscad-ubuntu-18-10-18-04/

> sudo apt-get install openscad  # werkt niet voor Unbuntu 18.04 = Mint 19.03

> sudo add-apt-repository ppa:openscad/releases  # use Personal Package Archive = PPA instead
You are about to add the following PPA:
 Backports of OpenSCAD stable releases
 More info: https://launchpad.net/~openscad/+archive/ubuntu/releases
Press Enter to continue or Ctrl+C to cancel

Executing: /tmp/apt-key-gpghome.2EIWTkQ4Yk/gpg.1.sh --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys CB86A1742C718B1EEA0440B3176F9F68AD382CA4
gpg: key 176F9F68AD382CA4: public key "Launchpad PPA for OpenSCAD packagers" imported
gpg: Total number processed: 1
gpg:               imported: 1

> sudo apt-get update
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://ppa.launchpad.net/openscad/releases/ubuntu bionic InRelease [15,9 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Hit:5 http://ppa.launchpad.net/remmina-ppa-team/remmina-next/ubuntu bionic InRelease
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Hit:7 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:8 http://archive.canonical.com/ubuntu bionic InRelease
Ign:9 http://packages.linuxmint.com tricia InRelease
Get:10 http://ppa.launchpad.net/openscad/releases/ubuntu bionic/main i386 Packages [2296 B]
Hit:11 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:12 http://ppa.launchpad.net/openscad/releases/ubuntu bionic/main amd64 Packages [2296 B]
Get:13 http://ppa.launchpad.net/openscad/releases/ubuntu bionic/main Translation-en [1020 B]
Hit:14 http://packages.linuxmint.com tricia Release
Fetched 185 kB in 1s (191 kB/s)
Reading package lists... Done

> sudo apt-get install openscad
Gelukt !
*******************************************************************************
* Drawio
*******************************************************************************

Oude drawio uninstall mbv Administration/Software Manager
Nieuw heet nu diagrams.net 18.1.3 installed mbv Administration/Software Manager
Alt-F7 to move window on screen



*******************************************************************************
* DTS-lab unb2c
*******************************************************************************

> mystep
> Program FPGA using USB programmer:
  > run_quartus unb2c &
    - Open programmer via button icon --> Hardware setup --> Add hardware
      Server name 10.87.6.204 (lab laptop) password: uniboard
      JTAG settings (OK)
      Hardware settings dubbel click
      Auto detect
      Select FPGA --> change file (sof) --> select Program/Reconfigure --> Start
  > Via dop421 upe_gear:
    . ./init_upe.sh
    mkdir reginfo
Eric Kooistra's avatar
Eric Kooistra committed
    util_unb2.py --unb2 0 --pn2 0:3 --seq REGMAP
Eric Kooistra's avatar
Eric Kooistra committed

Eric Kooistra's avatar
Eric Kooistra committed
* Port forwarden:
Reinier gebruikte dop421 altijd als jumphost (of hoe het ook heet) en dan draai ik de scripts dus lokaal.

ssh -C -N -L 4840:10.99.0.250:4840 10.87.1.41 &
10.99.0.250:4840 is de raspberrypi waar de sdp translator op draait op poort 4840
10.87.1.41 is dop491
Op de PC waar je dit ssh commando uitvoert kun je je dan de sdp translator bereiken op (localhost, poort 4840)
De eerste 4840 in het commando mag ook een andere waarde hebben

Dan zonder --host
:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py -r firmware_version

Helaas verwacht het SST script dat de data op de lokale machine aankomt, maar hetkomt op dop421 aan. Dus voor offload scripts werkt lokaal draaien zo niet.
Eric Kooistra's avatar
Eric Kooistra committed

*******************************************************************************
Eric Kooistra's avatar
Eric Kooistra committed
* Flake8, black
Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************

Eric Kooistra's avatar
Eric Kooistra committed
# gebruik flake8 voor code check, en black als formatter
# https://flake8.pycqa.org/en/latest/
# https://pypi.org/project/black/

Eric Kooistra's avatar
Eric Kooistra committed
python3 -m pip install flake8

# add to path in ~/.bashrc
export PATH=~/.local/bin:$PATH
Eric Kooistra's avatar
Eric Kooistra committed

# run flake8 in dir, to check all py files in that dir and below
> flake8
Eric Kooistra's avatar
Eric Kooistra committed


*******************************************************************************
* MATLAB
*******************************************************************************

Can't reload '/usr/loca​l/MATLAB/R​2018a/bin/​glnxa64/libmwcoder_types.so'

FIx:

> ll /usr/local/MATLAB/R2018a/bin/glnxa64/
> sudo mkdir /usr/local/MATLAB/R2018a/bin/glnxa64/exclude
> cd /usr/local/MATLAB/R2018a/bin/glnxa64/
> sudo mv libmwcoder_types.so exclude/

restart matlab