Commit before push.

This commit is contained in:
cyteen 2024-07-09 00:03:21 +01:00
parent 389842ff13
commit 33c5a5499c
7 changed files with 193 additions and 31 deletions

View File

@ -221,7 +221,7 @@ cat <<-'EOF' | sudo tee /etc/udev/rules.d/99-ch341a-prog.rules
LABEL="ch431a-prog_rules_end"
EOF
echo 'blacklist usbtest' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist usbtest' >>/etc/modprobe.d/blacklist.conf
cat <<-'EOF' | sudo tee /etc/udev/rules.d/99-xf2-logic.rules
SUBSYSTEM!="usb", GOTO="fx2-probe--programming_rules_end"
@ -231,7 +231,7 @@ cat <<-'EOF' | sudo tee /etc/udev/rules.d/99-xf2-logic.rules
LABEL="fx2-probe--programming_rules_end"
EOF
echo 'blacklist usbtest' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist usbtest' >>/etc/modprobe.d/blacklist.conf
cat <<-'EOF' | sudo tee /etc/udev/rules.d/60-blackmagic-probe.rules
SUBSYSTEM!="usb", GOTO="blackmagic-probe-programming_rules_end"
@ -250,6 +250,15 @@ cat <<-'EOF' | sudo tee /etc/udev/rules.d/60-st-linkv2.rules
#LABEL="st-link-v2-programming_rules_end"
EOF
cat <<-'EOF' | sudo tee /etc/udev/rules.d/60-st-linkv2_1.rules
## Now in stlink-utils 49-stlinkv2-1.rules
#SUBSYSTEM!="usb", GOTO="st-link-v2-1-programming_rules_end"
#
#ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE="0666", GROUP="plugdev"
#
#LABEL="st-link-v2-1-programming_rules_end"
EOF
cat <<-'EOF' | sudo tee /etc/udev/rules.d/60-cp210x.rules
# udev rules file for CP210x device to be programmable py
# cp210x-program
@ -278,7 +287,7 @@ cat <<-'EOF' | sudo tee /etc/udev/rules.d/99-USBasp.rules
LABEL="USBasp_rules_end"
EOF
cat <<-'EOF' | sudo tee /etc/udev/rules.d/81-thinkpad-dock.rules << 'EOF'
cat <<-'EOF' | sudo tee /etc/udev/rules.d/81-thinkpad-dock.rules <<'EOF'
KERNEL=="dock.0", ACTION=="change", RUN+="/usr/local/sbin/thinkpad-dock.sh"
EOF

View File

@ -2,7 +2,6 @@
# http://github.com/FreeCAD/FreeCAD/releases/
# debian is still on 0.16 but 0.17 is needed for current workbenches
# the ppa has calculix-ccx eigen3 freecad-daily (0.18~beta1) opencascade
# ppa:freecad-maintainers/freecad-daily
@ -14,16 +13,10 @@
# community: * * * *
# elmer: * * * * * *
YOUR_UBUNTU_VERSION_HERE=kinetic # 22.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=goovy # 20.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=focal # 20.04 buster/sid
# YOUR_UBUNTU_VERSION_HERE=eoan # 19.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=disco # 19.04 buster/sid
# YOUR_UBUNTU_VERSION_HERE=cosmic # 18.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=bionic # 18.04 buster/sid
# YOUR_UBUNTU_VERSION_HERE=artful # 17.10 stretch/sid
# YOUR_UBUNTU_VERSION_HERE=xenial # 16.04 stretch/sid
# YOUR_UBUNTU_VERSION_HERE=trusty # 14.04 jessie/sid
# YOUR_UBUNTU_VERSION_HERE=noble # 24.04 LTS buster/sid
YOUR_UBUNTU_VERSION_HERE=mantic # 22.04 LTS buster/sid
# YOUR_UBUNTU_VERSION_HERE=jammy # 22.04 LTS buster/sid
# YOUR_UBUNTU_VERSION_HERE=focal # 20.04 LTS buster/sid
sudo bash -c "cat > /etc/apt/sources.list-available/freecad-daily.list" <<EOF
deb http://ppa.launchpad.net/freecad-maintainers/freecad-daily/ubuntu $YOUR_UBUNTU_VERSION_HERE main
@ -32,7 +25,7 @@ EOF
sudo ln -sf /etc/apt/sources.list-available/freecad-daily.list /etc/apt/sources.list.d/freecad-daily.list
# Launchpad PPA for FreeCAD maintainers
# 1024R/83193AA3B52FF6FCF10A1BBF005EAE8119BB5BCA
# 1024R/83193AA3B52FF6FCF10A1BBF005EAE8119BB5BCA
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 19BB5BCA
sudo bash -c "cat > /etc/apt/sources.list-available/freecad-stable.list" <<EOF
deb http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu $YOUR_UBUNTU_VERSION_HERE main
@ -45,7 +38,7 @@ deb http://ppa.launchpad.net/freecad-community/ppa/ubuntu $YOUR_UBUNTU_VERSION_H
deb-src http://ppa.launchpad.net/freecad-community/ppa/ubuntu $YOUR_UBUNTU_VERSION_HERE main
EOF
sudo ln -sf /etc/apt/sources.list-available/freecad-community.list /etc/apt/sources.list.d/freecad-community.list
# 4096R/D2A62B5CEA1A30BBE1E44B561CDA5240F1B6CE9D
# 4096R/D2A62B5CEA1A30BBE1E44B561CDA5240F1B6CE9D
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F1B6CE9D
sudo bash -c "cat > /etc/apt/sources.list-available/elmer.list" <<EOF
@ -53,15 +46,14 @@ deb http://ppa.launchpad.net/elmer-csc-ubuntu/elmer-csc-ppa/ubuntu $YOUR_UBUNTU_
deb-src http://ppa.launchpad.net/elmer-csc-ubuntu/elmer-csc-ppa/ubuntu $YOUR_UBUNTU_VERSION_HERE main
EOF
sudo ln -sf /etc/apt/sources.list-available/elmer.list /etc/apt/sources.list.d/elmer.list
# 4096R/1FE4A88ACFEE8388A409F23A89358ABF9FB7E178
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9FB7E178
# 4096R/1FE4A88ACFEE8388A409F23A89358ABF9FB7E178
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9FB7E178
sudo apt update
# If building, use cmake gui for configuring the build.
sudo apt install -y cmake-qt-gui python3-numpy vtk9 python3-vtk9 z88
sudo apt install -y freecad-daily calculix-ccx elmerfem-csc
### Netgen
@ -112,7 +104,6 @@ sudo apt install -y netgen python3-netgen
# opencascade in experimental
# https://ftp-master.debian.org/new/opencascade_7.2.0+dfsg1-1.html
# http://github.com/qingfengxia/FenicsSolver
# Available as addon in freecad interface
@ -127,7 +118,7 @@ sudo apt install -y gnuplot paraview python3-paraview openfoam kicad-packages3d
# https://forum.freecadweb.org/viewtopic.php?t=21576
# https://opensimsa.github.io/training.htmlGnuplot, Paraview and OpenFOAM
# http://github.com/jaheyns/CfdOF
# Requirements:
# Requirements:
# * Latest release version of FreeCAD (0.18) or latest development version (0.19 prerelease)
# ** or latest development version (0.18 prerelease; requires git commit 12539 or later)
# * OpenFOAM (versions 4.x and 5.x tested; other versions may work.) ascii has 4.1+dfsg1-1
@ -146,14 +137,14 @@ sudo apt install -y gnuplot paraview python3-paraview openfoam kicad-packages3d
#wget -c -O cfmesh-cfdof.zip https://downloads.sourceforge.net/project/cfmesh-cfdof/cfmesh-cfdof.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fcfmesh-cfdof%2Ffiles%2Fcfmesh-cfdof.zip%2Fdownload&ts=1603110024
#unzip -d ./cfmesh-cfdof-${NOW} cfmesh-cfdof.zip
#
# If sourceforge doesn't work: https://develop.openfoam.com/Community/integration-cfmesh
# If sourceforge doesn't work: https://develop.openfoam.com/Community/integration-cfmesh
#git clone https://git.code.sf.net/p/cfmesh-cfdof/cfmesh cfmesh-cfdof-cfmesh cfmesh-cfdof-${NOW}
#cd cfmesh-cfdof-${NOW}/ && \
# sudo checkinstall \
# ./Allwmake 2>&1 | tee ./make.log \
# wmake libso meshLibrary \
# wmake all executables \
# wmake all utilities
# wmake all utilities
# Build elmer from git
apt update -o Acquire::CompressionTypes::Order::=gz && apt upgrade -y && apt install -y \
@ -185,15 +176,15 @@ apt update -o Acquire::CompressionTypes::Order::=gz && apt upgrade -y && apt ins
# Mystran
MYSTRAN_BUILD=/var/tmp/mystran_build
mkdir ${MYSTRAN_BUILD}
mkdir -p ${MYSTRAN_BUILD}
pushd ${MYSTRAN_BUILD} || exit
git clone https://github.com/MYSTRANsolver/MYSTRAN.git mystran
cd mystran || exit
cmake .
make -j"$(nproc)"
#sudo make install # or;
# sudo checkinstall make install
git clone https://github.com/MYSTRANsolver/MYSTRAN.git mystran
cd mystran || exit
cmake .
make -j"$(nproc)"
#sudo make install # or;
# sudo checkinstall make install
popd || exit
# pynastran

19
020_github-api.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# https://github.com/settings/tokens
# DEST=${1:-/etc/skel}
DEST=${HOME}
GITHUB_API_TOKEN="yEum5b7vNJ9mOjxUp7NJS1fiyWJFlSvUeFiBeljv"
# PLugins that Use COHERE_API_KEYs get called early so so we need to put them
# in .zshrc.pre-plugins.d so they can be loaded before the plugins are loaded.
cat <<-EOF | sudo tee "${DEST}"/.zshrc.pre-plugins.d/009_github.zsh
export GITHUB_API_TOKEN="${GITHUB_API_TOKEN}"
EOF
# a couple of github specific packages
apt-get install -f gist gh
apt-get -f install

19
020_gitlab-api.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
# DEST=${1:-/etc/skel}
DEST=${HOME}
GITLAB_PA_TOKEN="yEum5b7vNJ9mOjxUp7NJS1fiyWJFlSvUeFiBeljv"
# PLugins that Use COHERE_API_KEYs get called early so so we need to put them
# in .zshrc.pre-plugins.d so they can be loaded before the plugins are loaded.
cat <<-EOF | sudo tee "${DEST}"/.zshrc.pre-plugins.d/009_gitlab.zsh
export GITLAB_PA_TOKEN="${GITHUB_PA_TOKEN}"
EOF
# a couple of github specific packages
apt-get install -y gitlab-cl
apt-get -f install

73
020_gpsd.sh Normal file
View File

@ -0,0 +1,73 @@
#!/usr/bin/env bash
# The goal is tobe able to attach a u-blox NEO-6M gps module via a
# usb->serial converter and change its settings using ubxtools from
# gpsd-clients.
#
# See: https://gpsd.io/ubxtool-examples.html
#
# The minimal binary protocol allows for 10Hz update
#
sudo apt-get install -y gpsd gpsd-tools gpsd-clients
# A u-blox 6 assume protocol version 12
CURRENT_VERSION=$(ubxtool -p MON-VER)
echo "Current Version: ${CURRENT_VERSION}"
export UBXOPTS="-P 12"
# Reset to factory defaults
ubxtool -p RESET
# Enable binary messages
ubxtool -e BINARY
# Disable NMEA
ubxtool -d NMEA
# Rate settings - slow for low power, high for fast to compute fix in dynamic
# environments.
# Current rate:
echo "Before rate: $(ubxtool -p CFG_RATE)"
# Change to 10Hz measurement and fix rate (in milliseconds)
ubxtool -p CFG-RATE,100
# New rate:
echo "After rate: $(ubxtool -p CFG_RATE)"
# Check constellations (GPS only for 7 and below)
ubxtool -p MON_GNSS
# https://gist.githubusercontent.com/jnunyez/519f3f1a807d0f2b4dc8bd307e11c066/raw/003927f12a5ec4378b98e66b1dec392fe7129b3f/useful-commands-environment
# grep ubxtool /tmp/useful-commands-environment.txt
#
# ubxtool -g CFG-TMODE-SVIN_MIN_DUR -P 29.20
# ubxtool -t -p TIM-SVIN -P 29.20
# ubxtool -t -p NAV-CLOCK -P 29.20
# ubxtool -t -p TIM-SVIN -P 29.20
# ubxtool -t -P 29.20 -e SURVEYIN,86400,1000
(#ubxtool -t -p TIM-SVIN -P 29.20) meanV should decrease over time
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_X,<value>,5 -w 1
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_Y,<value>,5 -w 1
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_Z,<value>,5 -w 1
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-MODE,2,5 -v 1 -w 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-MODE,0 -v 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-ECEF_X,2 -v 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-ECEF_Y,2 -v 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-ECEF_Z,2 -v 1
# ubxtool -P 29.20 -w 1 -v 3 -z CFG-NAVSPG-INFIL_NCNOTHRS,50,1
# ubxtool -P 29.20 -w 1 -v 3 -z CFG-NAVSPG-INFIL_NCNOTHRS,0,1
# ubxtool -g CFG-TP-ANT_CABLEDELAY -P 29.20
# ubxtool -v 1 -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1
# ubxtool -v 1 -P 29.20 -p MON-RF
# ubxtool -p CFG-GNSS
# ubxtool -g CFG-TMODE-SVIN_MIN_DUR -P 29.20
# ubxtool -t -p NAV-CLOCK -P 29.20
# ubxtool -t -P 29.20 -v 1 -e SURVEYIN,60,20000
# ubxtool: enable SURVEYIN,60,20000
# ubxtool -t -p TIM-SVIN -P 29.20
# ubxtool -t -p NAV-STATUS -P 29.20
# ubxtool -p CFG-TP5

View File

@ -79,7 +79,7 @@ apt-get install \
### /home/default/.local/share/kicad/5.99/scripting/plugins
### /home/default/.local/share/kicad/5.99/3rdparty/plugins
# ~/.kicad_plugins/
KICAD_SCRIPTS=${HOME}/.local/share/kicad/7.0/scripting/plugins/
KICAD_SCRIPTS=${HOME}/.local/share/kicad/8.0/scripting/plugins/
mkdir -p "${KICAD_SCRIPTS}"
# Rounded tracks

51
020_kisak-mesa.sh Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/env bash
# sudo apt install -y kodi
# 18.04 bionic buster
# 17.10 artful stretch
PROJECT="kisak-mesa"
PROJECT_URL="https://launchpad.net/~"${PROJECT}"/+archive/ubuntu/ppa"
PROJECT_PAGE="$(curl -sS "${PROJECT_URL}")"
KEY_LINK_XPATH='string(//*[@id="signing-key"]/dd[1]/a[1]/@href)'
KEY_LINK="$(echo "${PROJECT_PAGE}" | xmllint --html --xpath "${KEY_LINK_XPATH}" - 2>/dev/null)"
FINGERPRINT_XPATH='string(//*[@id="signing-key"]/dd[1]/a[1]/code)'
FINGERPRINT="$(echo "${PROJECT_PAGE}" | xmllint --html --xpath "${FINGERPRINT_XPATH}" - 2>/dev/null)"
KEY_ID_XPATH='string(//*[@id="signing-key"]/dd[2])'
KEY_ID="$(echo "${PROJECT_PAGE}" | xmllint --html --xpath "${KEY_ID_XPATH}" - 2>/dev/null)"
# set arch
ARCH=$(dpkg --print-architecture)
# Download the key
KEY_SERVER="keyserver.ubuntu.com"
KEY_DIR="/etc/apt/trusted.gpg.d/"
SIGNED_BY="${KEY_DIR}/${PROJECT}.gpg"
sudo gpg --homedir /tmp --no-default-keyring --keyring "${SIGNED_BY}" --keyserver "${KEY_SERVER}" --recv-keys "${KEY_ID}
RELEASE="mantic"
sudo echo "deb [arch=${ARCH} signed-by=${SIGNED_BY}] http://ppa.launchpad.net/${PROJECT}/ppa/ubuntu ${RELEASE} main" > /etc/apt/sources.list-available/${PROJECT}.list
sudo echo "deb-src [arch=${ARCH} signed-by=${SIGNED_BY}] http://ppa.launchpad.net/${PROJECT}/ppa/ubuntu ${RELEASE} main" >> /etc/apt/sources.list-available/${PROJECT}.list
sudo ln -sf /etc/apt/sources.list-available/${PROJECT.list /etc/apt/sources.list.d/${PROJECT}.list
sudo apt update
packages=" \
mesa-vulkan-drivers \
libgl1-mesa-dri \
libglx-mesa0 \
glmark2 \
tzdata \
"
packages_missing=""
sudo apt install -y --no-install-recommends $packages
# sudo apt install -y --no-install-recommends $packages_missing
# sudo apt install -y --no-install-recommends