Skip to content

Instantly share code, notes, and snippets.

@qnnnnez
qnnnnez / flash-openstick-boot-img.sh
Last active November 16, 2023 06:13
Flash boot partition directly on your OpenStick device. (Tested on UZ801V3)
#!/bin/bash
set -e
set -x
if [ $# -eq 0 ]; then
echo "Usage: $0 kernel-version"
echo "kernel-version is the suffix of vmlinuz and initrd.img in /boot"
exit 1
fi
@qnnnnez
qnnnnez / Makefile
Last active March 31, 2025 16:55
Portable ebpf for network packet size stats
all: pktsize_hist_bpfel.o pktsize_hist_bpfeb.o
pktsize_hist.ll: pktsize_hist.c
clang -O2 -emit-llvm -g -c $^ -o $@
pktsize_hist_bpfel.o: pktsize_hist.ll
llc -march=bpfel -filetype=obj $^ -o $@
pktsize_hist_bpfeb.o: pktsize_hist.ll
llc -march=bpfeb -filetype=obj $^ -o $@