From c1a7c215e9209f8101ebfa8de622c127f5412881 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Fri, 24 Sep 2021 14:51:48 +0000 Subject: docs/linux: add Prerequisites section --- docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'docs/linux') diff --git a/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md b/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md index b9b6f6c28..141be0de7 100644 --- a/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md +++ b/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md @@ -4,6 +4,16 @@ These are the instructions on how to fuzz the x86-64 kernel in a QEMU with Ubunt In the instructions below, the `$VAR` notation (e.g. `$GCC`, `$KERNEL`, etc.) is used to denote paths to directories that are either created when executing the instructions (e.g. when unpacking GCC archive, a directory will be created), or that you have to create yourself before running the instructions. Substitute the values for those variables manually. + +## Install Prerequisites + +Command: +``` bash +sudo apt update +sudo apt install make gcc flex bison libncurses-dev libelf-dev libssl-dev +``` + + ## GCC If your distro's GCC is older, it's preferable to get the lastest GCC from [this](/docs/syzbot.md#crash-does-not-reproduce) list. Download and unpack into `$GCC`, and you should have GCC binaries in `$GCC/bin/` @@ -83,10 +93,10 @@ make CC="$GCC/bin/gcc" -j64 Now you should have `vmlinux` (kernel binary) and `bzImage` (packed kernel image): ``` bash -$ ls $KERNEL/vmlinux -$KERNEL/vmlinux -$ ls $KERNEL/arch/x86/boot/bzImage -$KERNEL/arch/x86/boot/bzImage +ls $KERNEL/vmlinux +# sample output - $KERNEL/vmlinux +ls $KERNEL/arch/x86/boot/bzImage +# sample output - $KERNEL/arch/x86/boot/bzImage ``` ## Image -- cgit mrf-deployment