Skip to content

Instantly share code, notes, and snippets.

@markbirss
markbirss / skylake-tuning-linux.md
Created December 22, 2018 19:46 — forked from Brainiarc7/skylake-tuning-linux.md
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

#!/bin/bash
dl_and_install_build_prereq() {
# Prerequisites: https://openwrt.org/docs/guide-developer/quickstart-build-images
# Download and install prerequisites for compiling firmware
sudo apt-get -y update && sudo apt-get -y upgrade
sudo apt -y install subversion g++ zlib1g-dev build-essential git python time
sudo apt -y install libncurses5-dev gawk gettext unzip file libssl-dev wget
sudo apt -y install libelf-dev ecj fastjar java-propose-classpath
/*
This is an example of how simple driving a Neopixel can be
This code is optimized for understandability and changability rather than raw speed
More info at http://wp.josh.com/2014/05/11/ws2812-neopixels-made-easy/
*/
// Change this to be at least as long as your pixel string (too long will work fine, just be a little slower)
#define PIXELS 46 // Number of pixels in the string
From 2158e288d82e70e80568cfa33d7294f4bf8de910 Mon Sep 17 00:00:00 2001
From: Chris Blake <chrisrblake93@gmail.com>
Date: Sun, 5 May 2019 12:56:03 -0500
Subject: [PATCH] ath79: add support for Aruba AP-105
SoC: Atheros AR7161-8C1A @ 680 MHz
RAM: 128MB - 2x Etron Technology EM6AB160TSA-5G
NOR: 16MB - 1x MXIC MX25L12845EMI-10G (SPI-NOR)
WI1: Atheros AR9223-AC1A 802.11bgn
WI2: Atheros AR9220-AC1A 802.11an
@markbirss
markbirss / Mellanox OFED cheat sheet
Created September 26, 2020 18:57 — forked from githubfoam/Mellanox OFED cheat sheet
Mellanox OFED cheat sheet
--------------------------------------------------------------------------
# ofed_info -s
--------------------------------------------------------------------------
Find Mellanox Adapter Type and Firmware/Driver version
ConnectX-4 card
# lspci | grep Mellanox
0a:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
# lspci -vv -s 0a:00.0 | grep "Part number" -A 3
# lspci | grep Mellanox | awk '{print $1}' | xargs -i -r mstvpd {}
@markbirss
markbirss / docker-on-android.md
Created November 4, 2020 19:25
Docker on Android

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@markbirss
markbirss / readme.md
Created November 21, 2020 15:10 — forked from rometsch/BH456A_linux_driver.md
MPOW BH456A Bluetooth USB Adapter Kernel Module Adjustements (Realtek RTL8761B chip)

Problem

The MPOW Bluetooth 5 dongle (Model: BH456A) does not work out of the box on Ubuntu 20.04 (kernel 5.4.0-42).

Solution

Patch the bluetooth kernel module and copy the firmware binaries to /lib/firmware.

Copy the fimware

@markbirss
markbirss / rpi0_rust_env.md
Created May 10, 2021 14:41 — forked from tstellanova/rpi0_rust_env.md
Install rust development environment on Raspberry Pi Zero W (rpi0w)

Purpose

Setup your Raspberry Pi 0 w to develop with the Rust language.

Initial configuration

  • Ensure your rpi0 has a network connection so it can download and install packages
  • Install Raspbian based on Debian Stretch

Configure pigpio

If you're working with the rpi0's GPIO, the pigpio library can be very handy.

@markbirss
markbirss / qnap-qts-fw-cryptor.py
Created May 27, 2021 09:08 — forked from ulidtko/qnap-qts-fw-cryptor.py
QNAP QTS firmware encryptor/decryptor.
#!/usr/bin/env python3
import os, sys
import argparse
import struct
from functools import reduce
"""
QNAP QTS firmware encryptor/decryptor.
Based on https://pastebin.com/KHbX85nG
#include <M5EPD.h>
#include <WiFi.h>
rtc_time_t RTCtime;
rtc_date_t RTCDate;
char timeStrbuff[64];
static const int JST = 3600 * 9;
static const char *wd[7] = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"};