Skip to content

Instantly share code, notes, and snippets.

@l3laze
Last active July 6, 2020 00:40
Show Gist options
  • Save l3laze/473558816174b5b1b0bded808da393de to your computer and use it in GitHub Desktop.
Save l3laze/473558816174b5b1b0bded808da393de to your computer and use it in GitHub Desktop.
kcov ARM build script
#!/usr/bin/env bash
#
# Installs dependencies and builds kcov from [tagged] source, and
# + then installs it to /usr/local/bin/kcov.
#
# Tested on Ubuntu 18.04 running on an ARMv8a processor
# + (ARM Cortex-A53 in LG Rebel 4) through UserLAnd on Android 8.
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y cmake g++ python3 git binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev
sudo apt-get --reinstall install libc6-dev
mkdir /usr/include/sys
ln -s /usr/include/arm-linux-gnueabihf/asm/types.h /usr/include/sys/types.h
ln -s /usr/include/arm-linux-gnueabihf/asm/stat.h /usr/include/sys/stat.h
git clone https://github.com/SimonKagstrom/kcov
cd kcov/
git checkout v38
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment