Skip to content

Instantly share code, notes, and snippets.

@mauriciovasquezbernal
Created August 12, 2021 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauriciovasquezbernal/fdf3ef8b263779b3e4df87f9ab06ca99 to your computer and use it in GitHub Desktop.
Save mauriciovasquezbernal/fdf3ef8b263779b3e4df87f9ab06ca99 to your computer and use it in GitHub Desktop.
Download btf info from btfhub
#! /bin/bash
set -e
set -x
source /etc/os-release
KERNEL=$(uname -r)
ARCH=$(uname -m)
URL="https://github.com/aquasecurity/btfhub/raw/main/$ID/$VERSION_ID/$ARCH/$KERNEL.btf.tar.xz"
wget -q -O /tmp/vmlinux.btf.tar.xz "$URL"
tar -xf /tmp/vmlinux.btf.tar.xz
mv *.btf /tmp/vmlinux.btf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment