Skip to content

Instantly share code, notes, and snippets.

View patrickod's full-sized avatar
🔐

Patrick O'Doherty patrickod

🔐
View GitHub Profile
@patrickod
patrickod / steps.md
Last active February 5, 2022 00:28
`.polar` syntax highlighting in JetBrains-based IDEs
  1. create a new custom language type with the extension .polar custom polar language type
  2. use the following list of reserved keywords (section 1)
and
cut
forall
if
in
matches
@patrickod
patrickod / nannou-flake.nix
Last active December 3, 2021 17:25
Nix flake for graphic, audio programming with Rust and the Nannou framework
{
description = "rust nannou graphics & art development";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
12:20:47 patrickod@finn feather-test main ? cargo run 1 ↵
Compiling feather-test v0.1.0 (/home/patrickod/code/lsm6ds33/feather-test)
Finished dev [optimized + debuginfo] target(s) in 0.31s
Running `probe-run --chip nRF52840_xxAA target/thumbv7em-none-eabihf/debug/feather-test`
(HOST) INFO flashing program (9.29 KiB)
(HOST) INFO success!
────────────────────────────────────────────────────────────────────────────────
RTT error: Error communicating with probe: An error with the usage of the probe occured
stack backtrace:
0: Reset
UF2 Bootloader 0.2.9 lib/nrfx (v1.1.0-1-g096e770) lib/tinyusb (legacy-755-g55874813) s140 6.1.1
Model: Adafruit Feather nRF52840 Express
Board-ID: NRF52-Bluefruit-v0
Bootloader: s140 6.1.1
Date: Feb 22 2019
these derivations will be built:
/nix/store/k5za4yrjfdg7y31zx6wwhny04gv4m4mm-looking-glass-client-B2-rc4.drv
building '/nix/store/k5za4yrjfdg7y31zx6wwhny04gv4m4mm-looking-glass-client-B2-rc4.drv'...
unpacking sources
unpacking source archive /nix/store/dikab72bwnymm13d5sqka88cxvbvlcgz-source
source root is source/client
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/x10pdsa70p7319kcb19pavivdxz325pd-looking-glass-client-B2-rc4/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/x10pdsa70p7319kcb19pavivdxz325pd-looking-glass-client-B2-rc4/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/x10pdsa70p7319kcb19pavivdxz325pd-looking-glass-client-B2-rc4/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/x10pdsa70p7319kcb19pavivdxz325pd-looking-glass-client-B2-rc4/share/doc/looking-glass-clie
these derivations will be built:
/nix/store/35cl4j336xsrisii8l1xc1sa2sp9dijd-looking-glass-client-B2-rc4.drv
building '/nix/store/35cl4j336xsrisii8l1xc1sa2sp9dijd-looking-glass-client-B2-rc4.drv'...
unpacking sources
unpacking source archive /nix/store/dikab72bwnymm13d5sqka88cxvbvlcgz-source
source root is source/client
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/lyh0lxcxd1q06hhjr6pqw509pd5aby66-looking-glass-client-B2-rc4/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/lyh0lxcxd1q06hhjr6pqw509pd5aby66-looking-glass-client-B2-rc4/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/lyh0lxcxd1q06hhjr6pqw509pd5aby66-looking-glass-client-B2-rc4/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/lyh0lxcxd1q06hhjr6pqw509pd5aby66-looking-glass-client-B2-rc4/share/doc/looking-glass-clie
these derivations will be built:
/nix/store/1pf9wlvxlxzh5d4k5fvc5s0pfvdp1b3w-looking-glass-client-B2-rc4.drv
building '/nix/store/1pf9wlvxlxzh5d4k5fvc5s0pfvdp1b3w-looking-glass-client-B2-rc4.drv'...
unpacking sources
unpacking source archive /nix/store/dikab72bwnymm13d5sqka88cxvbvlcgz-source
source root is source/client
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/s9xvp2iyf9jzik1353jwadkhx8b8jl57-looking-glass-client-B2-rc4/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/s9xvp2iyf9jzik1353jwadkhx8b8jl57-looking-glass-client-B2-rc4/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/s9xvp2iyf9jzik1353jwadkhx8b8jl57-looking-glass-client-B2-rc4/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/s9xvp2iyf9jzik1353jwadkhx8b8jl57-looking-glass-client-B2-rc4/share/doc/looking-glass-clie
with import <nixpkgs> {};
let
vfio-isolate = with python38Packages; buildPythonApplication rec {
name = "vfio-isolate";
version = "0.3.1";
src = pkgs.fetchFromGitHub {
owner = "spheenik";
repo = "${name}";
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 35d0d638d..3555ccf1c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5095,6 +5095,10 @@ static void quirk_intel_no_flr(struct pci_dev *dev)
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_no_flr);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_no_flr);
+/* FLR causes Ryzen 3000s built-in HD Audio & USB Controllers to hang on VFIO passthrough */
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x149c, quirk_intel_no_flr);
@patrickod
patrickod / build.log
Created June 24, 2020 01:33
Looking Glass client B2-rc2 nixos build output
these derivations will be built:
/nix/store/inbmfd0pdsrdbi1rx4796jxavil1bk9s-looking-glass-client-B2-rc2.drv
building '/nix/store/inbmfd0pdsrdbi1rx4796jxavil1bk9s-looking-glass-client-B2-rc2.drv'...
unpacking sources
unpacking source archive /nix/store/bnpgjss2yajrj5dxxlnklyv467myv1ng-source
source root is source/client
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/v072dvmlm3v8p0nihay9157m8b3mlwfc-looking-glass-client-B2-rc2/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/v072dvmlm3v8p0nihay9157m8b3mlwfc-looking-glass-client-B2-rc2/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/v072dvmlm3v8p0nihay9157m8b3mlwfc-looking-glass-client-B2-rc2/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/v072dvmlm3v8p0nihay9157m8b3mlwfc-looking-glass-client-B2-rc2/share/doc/ -DCMAKE_INSTALL_I