Skip to content

Instantly share code, notes, and snippets.

@takaswie
takaswie / pcm-rw-interleaved.c
Last active August 29, 2025 10:30
ALSA PCM application to utilize intermediate buffer inner kernel space
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@kiler129
kiler129 / prevent-host-driver-in-pci-pass.md
Last active December 13, 2025 10:31
Definitely prevent stubborn devices from being bound by the host driver in PCI passthrough scenario

Deprecated

The method described in this gist has been deprecated/superceeded by kiler129/early-vfio-pci-isolate tool.
It is more robust, configurable, and doesn't hack around scripts that are sometimes overwritten by system updates. The tool uses similar methods to the ones described below, but extends the capabilities by e.g. easy NVMe passthrough by S/N.

The description below has been preserved for historical context. At the time of writing, the tool above has been tested for ~6 months across multiple systems.




@geerlingguy
geerlingguy / nvidia-gt710-arm-pi-setup.sh
Last active September 30, 2025 20:20
Set up the Nvidia GeForce GT 710 on Raspberry Pi Compute Module 4
#!/bin/bash
# Attempt to set up the Nvidia GeForce GT 710 on a Pi CM4.
#
# I have tried both armv7l and aarch64 versions of the proprietary driver, in
# addition to the nouveau open source driver (which needs to be compiled into
# a custom Raspberry Pi kernel).
#
# tl;dr - None of the drivers worked :P
@SwitHak
SwitHak / 20190730-TLP-WHITE_URGENT11_VxWorks.MD
Last active June 5, 2020 08:12
Tracking vendors responses to URGENT/11 VxWorks vulnerabilities (Last updated: 2020-02-21 1019 UTC)

Advisory (URGENT/11)

UPDATE (2019-10-02 1241 UTC)

General

Armis released new information about the vulnerabilities scope. The vulnerabilities impact more RTOS than expected.

IP Stacks backstory

  • Some of the vulnerabilities discovered by Armis doesn't resides in VxWorks RTOS but in one part of it, the IP stack. This IP stack named IPNET stack comes from Interpeak AB, a company acquired by Wind River the editor of VxWorks RTOS, the 20th March 2006.
  • Before been acquired by Wind River, the Interpeak AB company sold IP stacks to several customers of them. Interpeak AB sold 2 major IP stacks named IPNET & IPLITE, IPLITE is a light version of IPNET.
@brabect1
brabect1 / riscv_debug_module_v11.md
Last active January 16, 2025 09:51
Describes implementation of RISC-V Debug Module (primarily as per Debug Spec. v0.11).

RISC-V Debug Module Implementation

This gist discusses implementation of a Debug Module (DM) primarily per RISC-V Debug Specification v0.11. The core ideas, though, apply to Debug Specification v0.13. Information presented here come from various sources, but mostly from Debug Specs, riscv-isa-sim and from reverse engineering e200_opensource. Relevant source of information is also riscv-openocd.

General Discussion

RV Debug Task Group

RISC-V Foundation established a debug task group to propose and standardize mechanisms for external debugging of RISC-V (RV) cores. This effort resulted in drafting a RISC-V External Debug Supprt specification, early [v0.1

@jeez
jeez / Scheduled Tx Tools
Last active February 12, 2026 08:56
[TSN] Scheduled Tx Tools - Examples and Helpers for testing SO_TXTIME, and the etf and taprio qdiscs
We couldn’t find that file to show.
gxb_p201_v1#reset
resetting ...
!-;
sdio debug board detected
TE: 44458
BL2 Built : 16:48:47, Feb 3 2016.
gxb g49f8e60 - xiaobo.gu@droid05
set vcck to 1100 mv
@drmalex07
drmalex07 / README-oneshot-systemd-service.md
Last active October 28, 2025 12:45
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh:

@tonosaman
tonosaman / Howto-build-openocd.md
Last active January 12, 2025 14:33
Olimex ARM-USB-OCD-H / openocd-0.9.0 / libftd2xx1.1.12 / Raspberry Pi 2 / Ubuntu 15.04

for RPi2 JTAG debugging with Olimex ARM-USB-OCD-H

System constitution

  • probe device: Olimex ARM-USB-OCD-H
  • target device: Raspberry Pi 2
    • files for booting: bootcode.bin, start.elf, config.txt from here
    • jtag target image armjtag.bin: from here
    • config.txt: edit to add a line kernel=armjtag.bin
  • host machine: Ubuntu 15.04
    • openocd-0.9.0 as debugger host:
      • probe device driver: libftd2xx1.1.12
@dariuskl
dariuskl / cc3200_linux.md
Last active June 23, 2017 18:27
A document on how to set up a development tool-chain for the CC3200 under Linux.

CC3200 Development under Linux

This document contains a HOWTO on developing applications for the TI CC3200 Launchpad under Linux. It is a work-in-progress, but all information contained should work and has been tested on my Arch Linux system. If you feel that something is missing, can be improved or is wrong, please let me know.

Setup