Pimp makefile
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sun, 20 Nov 2016 19:50:05 +0000 (20:50 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sun, 20 Nov 2016 19:50:05 +0000 (20:50 +0100)
Makefile

index 8fec587db18759b586be3cdafa1e62c4beba8332..9f0990789adaa5d3a2e67fd0e9d209758c3963c9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,10 @@ fuzz: clean
        CC=afl-gcc CFLAGS=-DNMRPFLASH_FUZZ make nmrpflash
        mv nmrpflash fuzz
 
+dofuzz: fuzz
+       echo core | sudo tee /proc/sys/kernel/core_pattern
+       echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
+       afl-fuzz -i fuzzin -o fuzzout -- ./fuzz
 clean:
        rm -f $(nmrpflash_OBJ) nmrpflash