Skip to content

Instantly share code, notes, and snippets.

View franzflasch's full-sized avatar

franzflasch

View GitHub Profile
@franzflasch
franzflasch / Makefile
Created January 10, 2022 12:06 — forked from 38/Makefile
A Minimal LLVM JIT example for LLVM-5
jit-toy: jit-toy.cpp
clang++ -g -o $@ $^ $(shell /usr/lib/llvm-5.0/bin/llvm-config --cxxflags --ldflags --system-libs --libs core)
@franzflasch
franzflasch / drm-prime-dumb-kms.c
Created May 20, 2021 20:43 — forked from Miouyouyou/drm-prime-dumb-kms.c
Simple example showing how to use DRM to : allocate a Dumb buffer on the GPU, use it as a framebuffer, use this CRTC on the currently connected screen (expecting 1 connected screen), export the buffer, reimport it implicitly with mmap and write in it.
// This will works on Embedded GPU that implements .gem_prime_mmap like Rockchip ones.
// This will fail on most DRM drivers for GPU with dedicated memory as they tend to NOT implement .gem_prime_mmap.
#include <stdio.h>
#include <libdrm/drm.h>
#include <stdint.h>
#include <sys/mman.h>
#include <string.h>
@franzflasch
franzflasch / qemu-networking.md
Created November 26, 2019 12:38 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network