diff --git a/001_udev-rules.sh b/001_udev-rules.sh index 3ac5f00..52e58e6 100755 --- a/001_udev-rules.sh +++ b/001_udev-rules.sh @@ -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 diff --git a/020_freecad.sh b/020_freecad.sh index 90746bf..4ea0dbf 100755 --- a/020_freecad.sh +++ b/020_freecad.sh @@ -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" < /etc/apt/sources.list-available/freecad-stable.list" < /etc/apt/sources.list-available/elmer.list" <&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 diff --git a/020_github-api.sh b/020_github-api.sh new file mode 100644 index 0000000..0d8b97c --- /dev/null +++ b/020_github-api.sh @@ -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 diff --git a/020_gitlab-api.sh b/020_gitlab-api.sh new file mode 100644 index 0000000..2c9b02b --- /dev/null +++ b/020_gitlab-api.sh @@ -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 diff --git a/020_gpsd.sh b/020_gpsd.sh new file mode 100644 index 0000000..e58ff72 --- /dev/null +++ b/020_gpsd.sh @@ -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,,5 -w 1 +# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_Y,,5 -w 1 +# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_Z,,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 diff --git a/020_kicad-nightly.sh b/020_kicad-nightly.sh index 38ed67d..ac2b4cc 100644 --- a/020_kicad-nightly.sh +++ b/020_kicad-nightly.sh @@ -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 diff --git a/020_kisak-mesa.sh b/020_kisak-mesa.sh new file mode 100755 index 0000000..9ee4d7c --- /dev/null +++ b/020_kisak-mesa.sh @@ -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